/* ============================================================
   ModelForge — Mission Control
   deep-space console · cyan→violet aurora · glass panels
   zero external assets · zero third-party deps
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #05070d;
  --bg-deep: #03050a;
  --panel: rgba(148, 163, 184, .045);
  --panel-fill: rgba(7, 11, 19, .58);
  --panel-hover: rgba(148, 163, 184, .075);
  --border: rgba(148, 163, 184, .12);
  --border-strong: rgba(148, 163, 184, .22);
  --hairline: rgba(226, 232, 240, .06);
  --text: #e6edf7;
  --text-2: #a3b2c8;
  --text-3: #7d8da5;
  --text-4: #5a6a82;
  --cyan: #22d3ee;
  --cyan-soft: #67e8f9;
  --violet: #8b5cf6;
  --violet-soft: #c4b5fd;
  --emerald: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --sky: #38bdf8;
  --pink: #f472b6;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(139, 92, 246, .14));
  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 30px 60px -52px rgba(0, 0, 0, .95);
  --shadow-pop: 0 24px 70px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(148, 163, 184, .1);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --topbar-h: 68px;
  --gutter: clamp(16px, 1.8vw, 28px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: rgba(148, 163, 184, .22) transparent; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }
svg { display: block; }
::selection { background: rgba(34, 211, 238, .3); color: #f0fdff; }
:focus-visible { outline: 1.5px solid rgba(34, 211, 238, .7); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--text-4); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 14px; height: 14px; flex: 0 0 auto; }

/* scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .18); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, .34); background-clip: content-box; }

/* ---------- ambient background ---------- */
.bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg.aurora {
  background:
    radial-gradient(880px 560px at 10% -12%, rgba(34, 211, 238, .13), transparent 62%),
    radial-gradient(1040px 640px at 92% -18%, rgba(139, 92, 246, .17), transparent 64%),
    radial-gradient(760px 480px at 50% 112%, rgba(34, 211, 238, .055), transparent 68%);
  animation: auroraBreathe 18s ease-in-out infinite alternate;
}
.bg.grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 0%, transparent 78%);
  opacity: .5;
}
.bg.noise {
  opacity: .032;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg.vignette { background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(2, 4, 8, .55) 100%); }

@keyframes auroraBreathe {
  from { opacity: .82; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: 1; transform: translate3d(0, -8px, 0) scale(1.015); }
}

/* ---------- typography helpers ---------- */
.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--text-4);
  white-space: nowrap;
}
.kicker-lg { font-size: 11px; letter-spacing: .22em; color: #6f87a6; }
.kicker .kicker-live { color: rgba(52, 211, 153, .8); }
.card-title {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #eaf1fb;
}
.card-title-sub { font-size: 10.5px; color: var(--text-4); font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: rgba(148, 163, 184, .06);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .05em;
  color: var(--text-3);
  white-space: nowrap;
}
.tag-muted { color: var(--text-4); background: transparent; border-color: rgba(148, 163, 184, .12); }
.tag-cyan { color: #a5f3fc; border-color: rgba(34, 211, 238, .28); background: rgba(34, 211, 238, .09); }
.tag-violet { color: #ddd6fe; border-color: rgba(139, 92, 246, .3); background: rgba(139, 92, 246, .11); }
.tag-emerald { color: #a7f3d0; border-color: rgba(52, 211, 153, .28); background: rgba(52, 211, 153, .09); }
.tag-amber { color: #fde68a; border-color: rgba(251, 191, 36, .28); background: rgba(251, 191, 36, .09); }
.tag-rose { color: #fecdd3; border-color: rgba(251, 113, 133, .28); background: rgba(251, 113, 133, .09); }
.tag-class { font-family: var(--font-mono); letter-spacing: .03em; }
.tag-class[data-label="World"] { color: #a5f3fc; border-color: rgba(34, 211, 238, .28); background: rgba(34, 211, 238, .08); }
.tag-class[data-label="Sports"] { color: #a7f3d0; border-color: rgba(52, 211, 153, .28); background: rgba(52, 211, 153, .08); }
.tag-class[data-label="Business"] { color: #fde68a; border-color: rgba(251, 191, 36, .26); background: rgba(251, 191, 36, .08); }
.tag-class[data-label="Sci/Tech"] { color: #ddd6fe; border-color: rgba(139, 92, 246, .3); background: rgba(139, 92, 246, .1); }

/* ---------- buttons / chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .18s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .25s, opacity .2s;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 14px; height: 14px; }
.btn-primary {
  color: #04121a;
  background: linear-gradient(135deg, #67e8f9 0%, #22d3ee 28%, #818cf8 72%, #a78bfa 100%);
  box-shadow: 0 6px 22px -10px rgba(34, 211, 238, .9), 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 1px 0 rgba(255, 255, 255, .45) inset;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #a5f3fc 0%, #22d3ee 30%, #818cf8 70%, #c4b5fd 100%);
  box-shadow: 0 10px 30px -10px rgba(34, 211, 238, .95), 0 0 0 1px rgba(255, 255, 255, .16) inset;
}
.btn-primary .icon { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .25)); }
.btn-ghost {
  color: var(--text-2);
  background: rgba(148, 163, 184, .055);
  border-color: rgba(148, 163, 184, .14);
}
.btn-ghost:hover { color: #e9f2ff; background: rgba(148, 163, 184, .1); border-color: var(--border-strong); }
.btn-danger {
  color: #fecdd3;
  background: rgba(251, 113, 133, .09);
  border-color: rgba(251, 113, 133, .26);
}
.btn-danger:hover:not(:disabled) { background: rgba(251, 113, 133, .16); border-color: rgba(251, 113, 133, .45); }
.btn:disabled { opacity: .34; cursor: not-allowed; transform: none; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 13px; border-radius: 12px; }
.btn-lg .icon { width: 16px; height: 16px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 11.5px; border-radius: 8px; }
.btn-tiny { height: 26px; padding: 0 9px; font-size: 10.5px; border-radius: 7px; gap: 4px; }
.btn-tiny .icon { width: 12px; height: 12px; }
.btn-close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--text-3);
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-close:hover { color: #fecdd3; background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .25); }
.btn-close .icon { width: 16px; height: 16px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, .045);
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
}
.chip .icon { width: 13px; height: 13px; color: var(--violet-soft); opacity: .85; }
.chip-engine { color: #b7c5d9; }
.health-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 28px;
  font-size: 9.5px;
  letter-spacing: .1em;
  color: var(--text-4);
  border: 1px solid transparent;
  border-radius: 8px;
}
.health-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); transition: background .3s, box-shadow .3s; }
.health-chip.is-ok .health-dot { background: var(--emerald); box-shadow: 0 0 8px rgba(52, 211, 153, .8); }
.health-chip.is-ok { color: #8fb7a8; }
.health-chip.is-bad .health-dot { background: var(--rose); box-shadow: 0 0 8px rgba(251, 113, 133, .8); }
.health-chip.is-bad { color: #c9a0a7; }

.badge-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .13);
  background: rgba(148, 163, 184, .045);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-3);
  white-space: nowrap;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px rgba(34, 211, 238, .9); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  background: rgba(5, 7, 13, .72);
  border-bottom: 1px solid rgba(148, 163, 184, .09);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 2%, rgba(34, 211, 238, .35) 22%, rgba(139, 92, 246, .4) 55%, rgba(34, 211, 238, .2) 80%, transparent 98%);
  opacity: .55;
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; min-width: 0; }
.brand-mark { width: 38px; height: 38px; filter: drop-shadow(0 0 12px rgba(34, 211, 238, .32)); transition: filter .3s; }
.brand:hover .brand-mark { filter: drop-shadow(0 0 18px rgba(34, 211, 238, .5)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.1;
  color: #f2f8ff;
  text-shadow: 0 0 26px rgba(103, 232, 249, .28);
}
.brand-kicker {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .2em;
  color: #5f7188;
  line-height: 1.2;
}
.brand-divider { width: 1px; height: 24px; background: linear-gradient(180deg, transparent, rgba(148, 163, 184, .28), transparent); margin: 0 4px; }
.brand-cn { font-size: 11px; color: var(--text-3); letter-spacing: .04em; white-space: nowrap; }

.status-cluster { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; justify-content: center; min-width: 0; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 13px 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, .04);
  transition: border-color .3s, background .3s, color .3s;
  white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-4); flex: 0 0 auto; }
.status-text { font-size: 11.5px; font-weight: 650; letter-spacing: .02em; color: var(--text-2); }
.status-sep { color: var(--text-4); opacity: .5; font-size: 10px; }
.status-stage { font-size: 11px; color: var(--text-3); }
.status-timer { font-size: 10.5px; color: var(--text-3); padding-left: 8px; border-left: 1px solid rgba(148, 163, 184, .14); }
.status-pill.is-idle { color: var(--text-3); }
.status-pill.is-running {
  border-color: rgba(52, 211, 153, .3);
  background: linear-gradient(90deg, rgba(52, 211, 153, .1), rgba(34, 211, 238, .06));
  box-shadow: 0 0 22px -8px rgba(52, 211, 153, .5);
}
.status-pill.is-running .status-dot { background: var(--emerald); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulseDot 2s infinite; }
.status-pill.is-running .status-text { color: #a7f3d0; }
.status-pill.is-running .status-timer { color: #8bd6bd; }
.status-pill.is-completed { border-color: rgba(34, 211, 238, .26); background: rgba(34, 211, 238, .06); }
.status-pill.is-completed .status-dot { background: var(--cyan); box-shadow: 0 0 8px rgba(34, 211, 238, .85); }
.status-pill.is-completed .status-text { color: #a5f3fc; }
.status-pill.is-stopped { border-color: rgba(251, 191, 36, .26); background: rgba(251, 191, 36, .06); }
.status-pill.is-stopped .status-dot { background: var(--amber); box-shadow: 0 0 8px rgba(251, 191, 36, .7); }
.status-pill.is-stopped .status-text { color: #fde68a; }
.status-pill.is-failed { border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .07); }
.status-pill.is-failed .status-dot { background: var(--rose); box-shadow: 0 0 8px rgba(251, 113, 133, .8); }
.status-pill.is-failed .status-text { color: #fecdd3; }
.progress-inline { display: flex; align-items: center; gap: 8px; width: 168px; flex: 0 1 168px; }
.progress-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  overflow: hidden;
}
.progress-track-lg { height: 5px; }
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #818cf8 60%, #a78bfa);
  box-shadow: 0 0 10px rgba(34, 211, 238, .55);
  transition: width .7s var(--ease);
  overflow: hidden;
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.4s infinite;
}
.progress-pct { font-size: 9.5px; color: var(--text-4); min-width: 30px; text-align: right; }

.topbar-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

@keyframes shimmer { to { transform: translateX(200%); } }
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---------- console layout ---------- */
.console {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-areas: "left main right";
  grid-template-columns: 264px minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
  max-width: 1920px;
  margin: 0 auto;
  padding: 16px var(--gutter) 56px;
}
.rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rail-left { grid-area: left; position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; overflow-x: hidden; padding-right: 2px; scrollbar-width: thin; }
.rail-right { grid-area: right; position: sticky; top: calc(var(--topbar-h) + 16px); height: calc(100vh - var(--topbar-h) - 32px); min-height: 520px; }
.main-col { grid-area: main; display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- card base ---------- */
.card {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(148, 163, 184, .055), rgba(148, 163, 184, .022) 60%),
    var(--panel-fill);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  min-width: 0;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .38), rgba(139, 92, 246, .4), transparent);
  opacity: .5;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, .06), transparent 68%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-width: 0; }
.card-head-titles { min-width: 0; }
.card-body { min-width: 0; }
.card-body.no-pad { margin: 0 -18px -16px; }

/* ---------- pipeline ---------- */
.pipeline-progress { margin: 2px 0 14px; }
.pp-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 10.5px; color: var(--text-3); }
.pp-label .mono { font-size: 10px; color: #9fe9f5; }
.stage-list { position: relative; display: flex; flex-direction: column; }
.stage-list::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 18px;
  left: 13px;
  width: 1px;
  background: linear-gradient(180deg, rgba(34, 211, 238, .35), rgba(139, 92, 246, .28) 55%, rgba(148, 163, 184, .1));
  opacity: .6;
}
.stage-row {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 8px 7px 6px;
  border-radius: 11px;
  border: 1px solid transparent;
  transition: background .25s, border-color .25s, box-shadow .3s;
  min-width: 0;
}
.stage-row + .stage-row { margin-top: 2px; }
.stage-row.is-running {
  background: linear-gradient(90deg, rgba(34, 211, 238, .09), rgba(34, 211, 238, .015) 70%, transparent);
  border-color: rgba(34, 211, 238, .22);
  animation: stageBreath 3s ease-in-out infinite;
}
.stage-row.is-completed:hover { background: rgba(148, 163, 184, .04); }
.stage-row.is-pending { opacity: .58; }
.stage-row.is-skipped { opacity: .66; }
.stage-row.is-failed { background: rgba(251, 113, 133, .06); border-color: rgba(251, 113, 133, .2); }
.stage-node {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .22);
  background: #080c14;
  color: var(--text-4);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  transition: border-color .25s, background .25s, color .25s, box-shadow .25s;
}
.stage-node .icon { width: 11px; height: 11px; }
.stage-row.is-completed .stage-node { border-color: rgba(52, 211, 153, .5); color: var(--emerald); background: rgba(52, 211, 153, .1); box-shadow: 0 0 12px -4px rgba(52, 211, 153, .7); }
.stage-row.is-running .stage-node { border-color: rgba(34, 211, 238, .75); color: #d9fbff; background: rgba(34, 211, 238, .16); box-shadow: 0 0 0 3px rgba(34, 211, 238, .1), 0 0 16px rgba(34, 211, 238, .45); }
.stage-row.is-skipped .stage-node { color: var(--amber); border-color: rgba(251, 191, 36, .35); }
.stage-row.is-failed .stage-node { color: var(--rose); border-color: rgba(251, 113, 133, .5); background: rgba(251, 113, 133, .1); }
.stage-spinner {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(34, 211, 238, .25);
  border-top-color: #a5f3fc;
  animation: spin .9s linear infinite;
}
.stage-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.stage-name { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #c9d6e8; letter-spacing: .01em; }
.stage-row.is-completed .stage-name { color: #dbe6f4; }
.stage-row.is-pending .stage-name { color: var(--text-3); }
.stage-row.is-running .stage-name { color: #eafdff; }
.stage-sub { display: flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); }
.stage-row.is-running .stage-sub .stage-state { color: rgba(34, 211, 238, .9); }
.stage-row.is-completed .stage-sub .stage-state { color: rgba(52, 211, 153, .8); }
.stage-row.is-failed .stage-sub .stage-state { color: var(--rose); }
.stage-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.stage-dur { font-size: 9px; color: var(--text-4); }
.stage-iter {
  font-size: 8.5px;
  font-family: var(--font-mono);
  color: #a5b4fc;
  background: rgba(139, 92, 246, .14);
  border: 1px solid rgba(139, 92, 246, .25);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.5;
}
.loop-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(139, 92, 246, .24);
  background: linear-gradient(90deg, rgba(139, 92, 246, .06), transparent);
  font-size: 10px;
  line-height: 1.55;
  color: var(--text-3);
}
.loop-note .icon { width: 12px; height: 12px; margin-top: 1px; color: var(--violet-soft); opacity: .8; }

@keyframes stageBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0), inset 0 0 22px -18px rgba(34, 211, 238, .4); }
  50% { box-shadow: 0 0 18px -8px rgba(34, 211, 238, .35), inset 0 0 26px -14px rgba(34, 211, 238, .5); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- run history ---------- */
.history-card { padding-bottom: 12px; }
.run-list { display: flex; flex-direction: column; gap: 4px; }
.run-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 9px;
  align-items: flex-start;
  width: 100%;
  padding: 9px 9px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-align: left;
  transition: background .2s, border-color .2s;
}
.run-item:hover { background: rgba(148, 163, 184, .055); }
.run-item.is-active {
  background: linear-gradient(100deg, rgba(34, 211, 238, .085), rgba(139, 92, 246, .04) 70%);
  border-color: rgba(34, 211, 238, .22);
}
.run-status-dot {
  width: 7px; height: 7px; border-radius: 50%; margin-top: 6px;
  background: var(--text-4);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, .07);
}
.run-status-dot.status-completed { background: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .1), 0 0 8px rgba(34, 211, 238, .55); }
.run-status-dot.status-running { background: var(--emerald); box-shadow: 0 0 0 3px rgba(52, 211, 153, .12); animation: pulseDot 2s infinite; }
.run-status-dot.status-stopped { background: var(--amber); box-shadow: 0 0 0 3px rgba(251, 191, 36, .1); }
.run-status-dot.status-failed { background: var(--rose); box-shadow: 0 0 0 3px rgba(251, 113, 133, .1); }
.run-item-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.run-item-top { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.run-tail { font-size: 10px; color: #c8d5e6; letter-spacing: .02em; }
.run-item-time { font-size: 9px; color: var(--text-4); font-family: var(--font-mono); }
.run-item-metric { margin-left: auto; font-size: 9px; color: #8ad8e6; letter-spacing: .01em; }
.run-item-metric.is-muted { color: var(--text-4); }
.run-item-bottom { display: flex; align-items: center; gap: 8px; font-size: 9px; color: var(--text-4); }
.run-item-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .1em;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid rgba(52, 211, 153, .25);
  color: rgba(167, 243, 208, .85);
  background: rgba(52, 211, 153, .07);
}
.run-item-badge.is-none { border-color: rgba(148, 163, 184, .16); color: var(--text-4); background: transparent; }
.history-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hairline); font-size: 8px; letter-spacing: .12em; color: var(--text-4); font-family: var(--font-mono); }

/* ---------- run strip ---------- */
.run-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .1);
  background: rgba(148, 163, 184, .025);
}
.run-strip-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.run-id { font-size: 11px; color: #b9c8dc; letter-spacing: .02em; }
.run-strip-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-4); }
.run-config-chips { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.config-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .02em;
  color: var(--text-3);
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, .055);
  border: 1px solid rgba(148, 163, 184, .1);
  white-space: nowrap;
}
.run-strip-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.run-created { font-size: 9.5px; color: var(--text-4); font-family: var(--font-mono); white-space: nowrap; }

/* ---------- kpi cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi-card { padding: 15px 16px 13px; overflow: hidden; }
.kpi-card.is-hero {
  border-color: rgba(34, 211, 238, .22);
  background:
    linear-gradient(155deg, rgba(34, 211, 238, .1), rgba(139, 92, 246, .055) 48%, rgba(148, 163, 184, .025)),
    var(--panel-fill);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 60px -48px rgba(34, 211, 238, .4);
}
.kpi-card.is-hero::before { opacity: .9; }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kpi-kicker { font-family: var(--font-mono); font-size: 8.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-4); line-height: 1.5; }
.kpi-icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, .16);
  background: rgba(34, 211, 238, .07);
}
.kpi-icon .icon { width: 13px; height: 13px; }
.kpi-icon.is-violet { color: var(--violet-soft); border-color: rgba(139, 92, 246, .18); background: rgba(139, 92, 246, .08); }
.kpi-icon.is-emerald { color: #a7f3d0; border-color: rgba(52, 211, 153, .18); background: rgba(52, 211, 153, .07); }
.kpi-icon.is-amber { color: #fde68a; border-color: rgba(251, 191, 36, .18); background: rgba(251, 191, 36, .07); }
.kpi-value-row { display: flex; align-items: baseline; gap: 5px; margin-top: 11px; min-width: 0; }
.kpi-value {
  font-family: var(--font-mono);
  font-size: clamp(23px, 1.75vw, 29px);
  font-weight: 640;
  line-height: 1;
  letter-spacing: -.03em;
  color: #f2f8ff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi-card.is-hero .kpi-value {
  background: linear-gradient(115deg, #ecfeff 5%, #a5f3fc 42%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, .18));
}
.kpi-unit { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; color: var(--text-4); white-space: nowrap; }
.kpi-delta-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; min-height: 18px; }
.delta-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  letter-spacing: .01em;
}
.delta-chip.is-up { color: #a7f3d0; background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .22); }
.delta-chip.is-down { color: #fecdd3; background: rgba(251, 113, 133, .08); border: 1px solid rgba(251, 113, 133, .2); }
.delta-chip.is-flat { color: var(--text-3); background: rgba(148, 163, 184, .07); border: 1px solid rgba(148, 163, 184, .14); }
.delta-note { font-size: 9px; color: var(--text-4); }
.kpi-sub { margin-top: 7px; font-size: 9.5px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub b { font-family: var(--font-mono); font-weight: 600; color: var(--text-3); }
.kpi-spark { margin-top: 10px; height: 26px; }
.kpi-spark svg { width: 100%; height: 100%; overflow: visible; }
.spark-bar { fill: rgba(34, 211, 238, .22); transition: fill .2s; }
.spark-bar.is-best { fill: rgba(34, 211, 238, .7); }
.spark-line { fill: none; stroke: rgba(139, 92, 246, .7); stroke-width: 1.2; }
.split-mini { display: flex; height: 5px; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.split-mini .seg-train { background: linear-gradient(90deg, rgba(34, 211, 238, .8), rgba(34, 211, 238, .45)); }
.split-mini .seg-test { background: linear-gradient(90deg, rgba(139, 92, 246, .85), rgba(139, 92, 246, .5)); }
.volume-mini { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.volume-mini span { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); }
.volume-mini .vm-bar { height: 4px; border-radius: 99px; background: rgba(148, 163, 184, .12); flex: 1; overflow: hidden; }
.volume-mini .vm-bar i { display: block; height: 100%; border-radius: inherit; }

/* ---------- chart card ---------- */
.chart-card .card-head { margin-bottom: 4px; align-items: center; flex-wrap: wrap; }
.head-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.iter-chips { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .12); background: rgba(4, 7, 12, .45); }
.iter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-3);
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.iter-chip:hover { color: #d6e6f7; background: rgba(148, 163, 184, .07); }
.iter-chip.is-active { color: #dffbff; background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .25); }
.iter-chip .best-star { color: var(--amber); font-size: 8px; }
.segmented { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .12); background: rgba(4, 7, 12, .45); }
.segmented button {
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .09em;
  color: var(--text-4);
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.segmented button:hover { color: var(--text-2); }
.segmented button.is-active { color: #dffbff; background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .22); }
.chart-body { position: relative; }
.chart-legend { display: flex; justify-content: flex-end; align-items: center; gap: 15px; padding: 6px 2px 0; min-height: 22px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); transition: opacity .2s; }
.legend-item:hover { color: var(--text-2); }
.legend-item.is-off { opacity: .3; text-decoration: line-through; }
.legend-swatch { width: 13px; height: 2px; border-radius: 2px; background: currentColor; }
.legend-item[data-key="train"] .legend-swatch { background: var(--cyan); box-shadow: 0 0 6px rgba(34, 211, 238, .6); }
.legend-item[data-key="val"] .legend-swatch { background: var(--violet-soft); box-shadow: 0 0 6px rgba(139, 92, 246, .6); }
.chart-canvas { position: relative; height: 238px; margin-top: 2px; cursor: crosshair; }
.chart-canvas svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: rgba(148, 163, 184, .1); stroke-width: 1; }
.chart-grid-line.is-vert { stroke-dasharray: 2 6; stroke: rgba(148, 163, 184, .07); }
.chart-axis-label { fill: #5f7089; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .02em; }
.chart-axis-label.is-right { fill: #6b5f8d; }
.chart-line { fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.chart-line.is-train { stroke: #22d3ee; filter: drop-shadow(0 0 5px rgba(34, 211, 238, .45)); }
.chart-line.is-val { stroke: #a78bfa; filter: drop-shadow(0 0 5px rgba(139, 92, 246, .5)); }
.chart-area { opacity: .9; }
.chart-dot { stroke: #05070d; stroke-width: 1.5; }
.chart-dot.is-train { fill: #22d3ee; }
.chart-dot.is-val { fill: #c4b5fd; }
.chart-dot.is-last { filter: drop-shadow(0 0 5px currentColor); }
.chart-crosshair { stroke: rgba(148, 163, 184, .35); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-best-line { stroke: rgba(251, 191, 36, .3); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 150px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .2);
  background: rgba(6, 10, 17, .94);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -108%);
  opacity: 0;
  transition: opacity .15s;
}
.chart-tooltip.is-visible { opacity: 1; }
.chart-tooltip .tt-epoch { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; color: var(--text-4); margin-bottom: 5px; text-transform: uppercase; }
.chart-tooltip .tt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 10px; color: var(--text-2); line-height: 1.8; }
.chart-tooltip .tt-row i { width: 6px; height: 6px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.chart-tooltip .tt-row .mono { color: #e8f1fb; }
.chart-tooltip .tt-row.is-train i { background: var(--cyan); }
.chart-tooltip .tt-row.is-val i { background: var(--violet-soft); }
.chart-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 9px; letter-spacing: .02em; color: var(--text-4); }
.chart-foot b { color: var(--text-2); font-weight: 600; }
.chart-foot .foot-best { color: #fde68a; }
.chart-foot .foot-rec { color: #a7f3d0; }
.chart-empty { display: grid; place-items: center; height: 238px; color: var(--text-4); font-size: 11px; }

/* ---------- conversation ---------- */
.convo-card { display: flex; flex-direction: column; padding-bottom: 0; }
.convo-card .card-head { margin-bottom: 10px; align-items: center; }
.convo-head-right { display: flex; align-items: center; gap: 8px; }
.thinking-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, .22);
  background: rgba(52, 211, 153, .07);
  font-size: 9.5px;
  color: #a7f3d0;
  white-space: nowrap;
}
.thinking-dots { display: inline-flex; gap: 2px; }
.thinking-dots i { width: 3px; height: 3px; border-radius: 50%; background: #6ee7b7; animation: thinkBounce 1.2s infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes thinkBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
.agent-filters { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .12);
  background: rgba(148, 163, 184, .035);
  font-size: 10px;
  color: var(--text-3);
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.filter-chip:hover { color: var(--text-2); border-color: var(--border-strong); }
.filter-chip.is-active { color: #e5fafe; background: rgba(34, 211, 238, .09); border-color: rgba(34, 211, 238, .3); }
.filter-avatar {
  width: 17px; height: 17px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  color: #04121a;
  background: var(--agent-color, #22d3ee);
  box-shadow: 0 0 8px -2px var(--agent-color, #22d3ee);
}
.filter-chip .filter-all { font-family: var(--font-mono); font-size: 8px; letter-spacing: .06em; color: var(--cyan-soft); padding: 0 2px; }
.convo-wrap { position: relative; flex: 1; min-height: 0; }
.convo-list {
  height: 384px;
  overflow-y: auto;
  padding: 4px 6px 18px 0;
  scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 10px), transparent 100%);
}
.convo-item { animation: msgIn .32s var(--ease) both; }
.convo-msg { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 9px; padding: 6px 0; }
.msg-avatar {
  width: 25px; height: 25px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #04121a;
  background: linear-gradient(145deg, color-mix(in srgb, var(--agent-color) 92%, #fff), var(--agent-color));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .09) inset, 0 4px 14px -8px rgba(0, 0, 0, .9);
  margin-top: 1px;
}
.msg-main { min-width: 0; }
.msg-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.msg-name { font-size: 11px; font-weight: 650; color: #dbe8f7; }
.msg-en { font-family: var(--font-mono); font-size: 8px; letter-spacing: .06em; color: var(--text-4); }
.msg-badge {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--msg-accent, rgba(148, 163, 184, .2));
  color: var(--msg-accent, var(--text-3));
  background: color-mix(in srgb, var(--msg-accent) 10%, transparent);
}
.msg-time { margin-left: auto; font-family: var(--font-mono); font-size: 8px; color: var(--text-4); }
.msg-body {
  font-size: 11.5px;
  line-height: 1.6;
  color: #c2d0e3;
  padding: 7px 10px;
  border-radius: 4px 10px 10px 4px;
  border: 1px solid rgba(148, 163, 184, .08);
  border-left: 2px solid var(--msg-accent, rgba(148, 163, 184, .3));
  background: rgba(148, 163, 184, .035);
  overflow-wrap: anywhere;
}
.msg-body .highlight { color: #eafdff; font-family: var(--font-mono); font-size: .95em; }
.msg--thought { --msg-accent: #a78bfa; }
.msg--action { --msg-accent: #38bdf8; }
.msg--result { --msg-accent: #34d399; }
.msg--decision { --msg-accent: #fbbf24; }
.msg--decision .msg-body { background: linear-gradient(90deg, rgba(251, 191, 36, .07), rgba(148, 163, 184, .02)); color: #e7dcc4; }
.msg--handoff { --msg-accent: #22d3ee; background: linear-gradient(90deg, rgba(34, 211, 238, .05), transparent); }
.msg--handoff .msg-body { background: linear-gradient(90deg, rgba(34, 211, 238, .07), rgba(148, 163, 184, .02)); }
.msg--log { --msg-accent: #64748b; }
.msg--error { --msg-accent: #fb7185; }
.convo-divider { display: flex; align-items: center; gap: 9px; margin: 11px 0 7px; }
.convo-divider .line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(148, 163, 184, .16), transparent); }
.convo-divider .line:last-child { background: linear-gradient(90deg, transparent, rgba(148, 163, 184, .16)); }
.convo-divider .label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7d8da5;
  white-space: nowrap;
}
.convo-divider .label .icon { width: 10px; height: 10px; color: var(--cyan); opacity: .7; }
.convo-divider .iter-badge { color: #b8a8f8; border: 1px solid rgba(139, 92, 246, .25); background: rgba(139, 92, 246, .1); padding: 0 4px; border-radius: 3px; font-size: 7.5px; }
.convo-divider .divider-detail { font-size: 8.5px; color: var(--text-4); letter-spacing: .02em; font-family: var(--font-ui); text-transform: none; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.convo-system {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 2px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px dashed rgba(148, 163, 184, .16);
  background: rgba(148, 163, 184, .025);
  font-size: 10px;
  color: var(--text-3);
}
.convo-system .icon { width: 12px; height: 12px; color: var(--cyan); opacity: .75; }
.convo-system.is-done .icon { color: var(--emerald); }
.convo-system b { color: var(--text-2); font-weight: 600; }
.convo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; min-height: 180px; color: var(--text-4); font-size: 11px; }
.convo-empty .icon { width: 22px; height: 22px; opacity: .4; }
.follow-pill {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, .3);
  background: rgba(8, 14, 22, .92);
  color: #a5f3fc;
  font-size: 9.5px;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .9);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.follow-pill .icon { width: 11px; height: 11px; }

@keyframes msgIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- dataset ---------- */
.duo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.duo-grid .card { display: flex; flex-direction: column; }
.duo-grid .card-body { flex: 1; }
.ds-source {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, .13);
  background: linear-gradient(90deg, rgba(34, 211, 238, .06), rgba(34, 211, 238, .015));
}
.ds-source-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: #a5f3fc;
  background: rgba(34, 211, 238, .09);
  border: 1px solid rgba(34, 211, 238, .17);
}
.ds-source-icon .icon { width: 14px; height: 14px; }
.ds-source-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ds-source-name { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #dceaf8; }
.ds-source-path { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-split { margin-top: 13px; }
.ds-split-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; color: var(--text-4); }
.ds-split-head b { font-size: 11px; color: #dceaf8; font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.ds-split-head .seg-train-label b { color: #a5f3fc; }
.ds-split-head .seg-test-label b { color: #c4b5fd; }
.ds-split-bar { display: flex; gap: 2px; height: 18px; }
.ds-split-bar span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(3, 12, 18, .82);
  font-weight: 700;
  min-width: 30px;
  transition: width .6s var(--ease);
}
.ds-split-bar .seg-train { background: linear-gradient(90deg, #22d3ee, #38bdf8); border-radius: 5px 2px 2px 5px; }
.ds-split-bar .seg-test { background: linear-gradient(90deg, #8b5cf6, #a78bfa); border-radius: 2px 5px 5px 2px; color: #f2edff; }
.ds-classes { margin-top: 14px; }
.ds-subhead { display: flex; align-items: baseline; justify-content: space-between; font-size: 10px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.ds-subhead .mono { font-size: 8px; letter-spacing: .1em; color: var(--text-4); font-weight: 500; }
.class-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 48px; gap: 9px; align-items: center; padding: 4px 0; }
.class-name { display: flex; flex-direction: column; line-height: 1.25; }
.class-name b { font-size: 10.5px; font-weight: 600; color: #c6d5e8; }
.class-name span { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .06em; color: var(--text-4); }
.class-bars { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.class-bar { height: 4px; border-radius: 99px; background: rgba(148, 163, 184, .09); overflow: hidden; }
.class-bar i { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--ease); }
.class-bar.is-train i { background: linear-gradient(90deg, rgba(34, 211, 238, .9), rgba(56, 189, 248, .55)); }
.class-bar.is-test i { background: linear-gradient(90deg, rgba(139, 92, 246, .9), rgba(167, 139, 250, .55)); }
.class-count { text-align: right; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); line-height: 1.5; }
.class-count b { font-weight: 600; color: var(--text-3); }
.ds-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.ds-stat { padding: 7px 8px 6px; border-radius: 8px; background: rgba(148, 163, 184, .035); border: 1px solid rgba(148, 163, 184, .08); min-width: 0; }
.ds-stat-value { display: block; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: #e4eefb; letter-spacing: -.02em; white-space: nowrap; }
.ds-stat-label { display: block; font-family: var(--font-mono); font-size: 7px; letter-spacing: .09em; color: var(--text-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-preview { margin-top: 14px; }
.preview-list { display: flex; flex-direction: column; gap: 4px; }
.preview-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 7px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, .07);
  background: rgba(148, 163, 184, .022);
  transition: background .2s, border-color .2s;
}
.preview-item:hover { background: rgba(148, 163, 184, .05); border-color: rgba(148, 163, 184, .14); }
.preview-idx { font-family: var(--font-mono); font-size: 8px; color: var(--text-4); padding-top: 2px; }
.preview-text {
  font-size: 10px;
  line-height: 1.5;
  color: #a9b8cc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.preview-item .tag { font-size: 7.5px; padding: 1px 5px; margin-top: 1px; }

/* ---------- model ---------- */
.model-hero { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.model-param { display: flex; flex-direction: column; gap: 2px; }
.model-param-value {
  font-family: var(--font-mono);
  font-size: clamp(25px, 2vw, 31px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.05;
  background: linear-gradient(115deg, #ecfeff, #a5f3fc 45%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(34, 211, 238, .14));
}
.model-param-label { font-family: var(--font-mono); font-size: 8px; letter-spacing: .16em; color: var(--text-4); }
.model-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; max-width: 56%; }
.model-arch-desc { font-family: var(--font-mono); font-size: 8.5px; line-height: 1.55; color: var(--text-4); }
.layer-table { margin-top: 14px; }
.layer-row { display: grid; grid-template-columns: minmax(64px, 1fr) 68px 66px 52px; gap: 7px; align-items: center; padding: 5px 6px; border-radius: 6px; }
.layer-row:nth-child(even) { background: rgba(148, 163, 184, .025); }
.layer-head { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); text-transform: uppercase; padding-bottom: 4px; }
.layer-head span:last-child { text-align: right; }
.layer-name { font-size: 9px; color: #b9c8dc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-shape { font-size: 8.5px; color: var(--text-4); text-align: right; }
.layer-params { font-size: 9px; color: #d5e2f1; text-align: right; }
.layer-share { height: 4px; border-radius: 99px; background: rgba(148, 163, 184, .1); overflow: hidden; }
.layer-share i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(34, 211, 238, .85), rgba(139, 92, 246, .75)); }
.volume-compare { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--hairline); position: relative; }
.volume-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 62px; gap: 8px; align-items: center; padding: 3px 0; }
.volume-label { font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; color: var(--text-4); }
.volume-bar { height: 7px; border-radius: 99px; background: rgba(148, 163, 184, .09); overflow: hidden; }
.volume-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(139, 92, 246, .85), rgba(167, 139, 250, .6)); transition: width .6s var(--ease); }
.volume-bar.is-int8 i { background: linear-gradient(90deg, #22d3ee, rgba(34, 211, 238, .5)); }
.volume-val { font-size: 8.5px; color: var(--text-2); text-align: right; white-space: nowrap; }
.volume-badge {
  position: absolute;
  right: 0;
  top: 11px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .04em;
  color: #a7f3d0;
  background: rgba(52, 211, 153, .09);
  border: 1px solid rgba(52, 211, 153, .22);
  border-radius: 5px;
  padding: 1px 6px;
}

/* ---------- evaluation ---------- */
.eval-head-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eval-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.eval-tile { padding: 10px 11px 9px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .09); background: rgba(148, 163, 184, .03); position: relative; overflow: hidden; }
.eval-tile::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, rgba(34, 211, 238, .7), transparent); opacity: .6; }
.eval-tile.is-violet::after { background: linear-gradient(180deg, rgba(139, 92, 246, .75), transparent); }
.eval-tile.is-emerald::after { background: linear-gradient(180deg, rgba(52, 211, 153, .7), transparent); }
.eval-tile.is-amber::after { background: linear-gradient(180deg, rgba(251, 191, 36, .7), transparent); }
.eval-label { display: block; font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .12em; color: var(--text-4); }
.eval-value { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 19px; font-weight: 640; letter-spacing: -.03em; color: #eef6ff; line-height: 1.1; }
.eval-value.is-accent { color: #a5f3fc; }
.eval-sub { display: block; margin-top: 2px; font-size: 8.5px; color: var(--text-4); }
.eval-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr); gap: 18px; margin-top: 16px; }
.eval-subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 10px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.eval-subhead .mono { font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); font-weight: 500; }
.eval-table { border-radius: 9px; border: 1px solid rgba(148, 163, 184, .09); overflow: hidden; }
.eval-tr { display: grid; grid-template-columns: minmax(70px, 1fr) 42px 42px 46px 40px; gap: 4px; align-items: center; padding: 6px 9px; font-size: 10px; }
.eval-tr + .eval-tr { border-top: 1px solid rgba(148, 163, 184, .06); }
.eval-th { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); background: rgba(148, 163, 184, .04); }
.eval-th span:not(:first-child) { text-align: right; }
.eval-tr .num { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); text-align: right; }
.eval-tr .num.is-f1 { color: #dcf5fa; }
.eval-class-name { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #c9d7e9; }
.eval-class-name .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--class-color, #22d3ee); box-shadow: 0 0 6px -1px var(--class-color, #22d3ee); }
.matrix-wrap { min-width: 0; }
.matrix-grid { display: grid; grid-template-columns: 42px repeat(4, minmax(0, 1fr)); gap: 3px; }
.matrix-corner { display: grid; place-items: center; font-family: var(--font-mono); font-size: 6.5px; letter-spacing: .04em; color: var(--text-4); text-align: center; line-height: 1.3; }
.matrix-head { display: grid; place-items: center; font-family: var(--font-mono); font-size: 7px; letter-spacing: .04em; color: var(--text-4); padding-bottom: 2px; text-align: center; }
.matrix-rowlabel { display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; font-family: var(--font-mono); font-size: 7px; color: var(--text-4); white-space: nowrap; overflow: hidden; }
.matrix-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1.5;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(228, 245, 255, calc(.55 + var(--v, 0) * .45));
  background: linear-gradient(135deg, rgba(34, 211, 238, calc(.045 + var(--v, 0) * .38)), rgba(56, 189, 248, calc(.02 + var(--v, 0) * .16)));
  border: 1px solid rgba(34, 211, 238, calc(.06 + var(--v, 0) * .16));
  transition: transform .18s, filter .18s;
}
.matrix-cell.is-off { color: rgba(254, 205, 211, calc(.35 + var(--v, 0) * .5)); background: linear-gradient(135deg, rgba(251, 113, 133, calc(.02 + var(--v, 0) * .16)), rgba(148, 163, 184, .02)); border-color: rgba(251, 113, 133, calc(.05 + var(--v, 0) * .1)); }
.matrix-cell.is-diag { box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .16); }
.matrix-cell:hover { transform: scale(1.06); filter: brightness(1.25); }
.matrix-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 7px; font-family: var(--font-mono); font-size: 7px; color: var(--text-4); }
.matrix-legend i { width: 12px; height: 6px; border-radius: 2px; background: rgba(34, 211, 238, var(--a)); }
.errors-block { margin-top: 16px; }
.errors-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.errors-count { margin-left: auto; font-family: var(--font-mono); font-size: 8px; color: var(--text-4); }
.error-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.error-item { padding: 8px 9px; border-radius: 8px; border: 1px solid rgba(251, 113, 133, .1); background: linear-gradient(120deg, rgba(251, 113, 133, .035), rgba(148, 163, 184, .015)); min-width: 0; }
.error-top { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; flex-wrap: wrap; }
.error-tag { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; border: 1px solid; white-space: nowrap; }
.error-tag.is-true { color: #a7f3d0; border-color: rgba(52, 211, 153, .24); background: rgba(52, 211, 153, .07); }
.error-tag.is-pred { color: #fecdd3; border-color: rgba(251, 113, 133, .26); background: rgba(251, 113, 133, .07); }
.error-arrow { color: var(--text-4); font-size: 9px; font-family: var(--font-mono); }
.error-conf { margin-left: auto; font-family: var(--font-mono); font-size: 7.5px; color: rgba(251, 191, 36, .8); }
.error-text {
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.eval-empty { padding: 26px 12px; text-align: center; color: var(--text-4); font-size: 11px; border: 1px dashed rgba(148, 163, 184, .14); border-radius: 12px; }
.eval-empty .icon { margin: 0 auto 8px; width: 22px; height: 22px; opacity: .4; }

/* ---------- leaderboard ---------- */
.target-chip {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  color: #fde68a;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid rgba(251, 191, 36, .22);
  background: rgba(251, 191, 36, .07);
  white-space: nowrap;
}
.leaderboard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lb-wrap { overflow-x: auto; }
.lb-table { min-width: 640px; }
.lb-row {
  display: grid;
  grid-template-columns: 54px minmax(190px, 1.5fr) 78px 78px 116px 66px 72px;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  font-size: 10px;
  color: var(--text-3);
  border-top: 1px solid rgba(148, 163, 184, .06);
  width: 100%;
  text-align: left;
}
.lb-head { border-top: 0; padding: 7px 14px; font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); }
.lb-head span:nth-child(n+3) { text-align: right; }
.lb-row:not(.lb-head) { cursor: pointer; transition: background .2s, box-shadow .2s; position: relative; }
.lb-row:not(.lb-head):hover { background: rgba(148, 163, 184, .045); }
.lb-row.is-best { background: linear-gradient(90deg, rgba(34, 211, 238, .085), rgba(139, 92, 246, .035) 55%, transparent); box-shadow: inset 2px 0 0 rgba(34, 211, 238, .65); }
.lb-row.is-selected { background: rgba(34, 211, 238, .05); }
.lb-iter { display: flex; align-items: center; gap: 5px; }
.lb-iter b { font-family: var(--font-mono); font-size: 12px; font-weight: 650; color: #dbe8f7; letter-spacing: -.02em; }
.lb-crown { width: 11px; height: 11px; color: var(--amber); filter: drop-shadow(0 0 5px rgba(251, 191, 36, .5)); }
.best-badge { font-family: var(--font-mono); font-size: 6.5px; letter-spacing: .1em; color: #fde68a; border: 1px solid rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .1); padding: 1px 4px; border-radius: 3px; }
.lb-config { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lb-config-main { font-family: var(--font-mono); font-size: 9px; color: #b9c8dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-diff { font-size: 8.5px; color: rgba(196, 181, 253, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-num { font-family: var(--font-mono); font-size: 9.5px; color: #c9d7e9; text-align: right; white-space: nowrap; }
.lb-metric { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lb-metric b { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: #e5fafe; }
.lb-metric i { display: block; height: 3px; width: 66px; border-radius: 99px; background: rgba(148, 163, 184, .1); position: relative; overflow: hidden; }
.lb-metric i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: linear-gradient(90deg, #22d3ee, #a78bfa); border-radius: inherit; }
.lb-target { display: flex; justify-content: flex-end; }
.lb-target-tag { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-size: 8px; padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(148, 163, 184, .14); color: var(--text-4); white-space: nowrap; }
.lb-target-tag .icon { width: 9px; height: 9px; }
.lb-target-tag.is-met { color: #a7f3d0; border-color: rgba(52, 211, 153, .22); background: rgba(52, 211, 153, .07); }
.lb-target-tag.is-miss { color: #fecdd3; border-color: rgba(251, 113, 133, .2); background: rgba(251, 113, 133, .06); }
.lb-status { display: flex; justify-content: flex-end; }
.lb-status-tag { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .06em; padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(148, 163, 184, .14); color: var(--text-4); white-space: nowrap; }
.lb-status-tag.is-completed { color: #a5f3fc; border-color: rgba(34, 211, 238, .22); background: rgba(34, 211, 238, .06); }
.lb-status-tag.is-running { color: #a7f3d0; border-color: rgba(52, 211, 153, .25); background: rgba(52, 211, 153, .07); }
.lb-status-tag.is-pending { color: var(--text-4); }
.lb-status-tag.is-failed { color: #fecdd3; border-color: rgba(251, 113, 133, .22); }
.lb-empty { padding: 18px; text-align: center; color: var(--text-4); font-size: 11px; }

/* ---------- release ---------- */
.release-head-right { display: flex; align-items: center; gap: 6px; }
.release-hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.release-version { min-width: 0; flex: 1 1 360px; }
.release-version-row { display: flex; align-items: center; gap: 9px; margin-top: 4px; flex-wrap: wrap; }
.release-version-text { font-size: 18px; font-weight: 600; letter-spacing: -.02em; color: #f0f7ff; }
.release-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em;
  color: #a7f3d0; border: 1px solid rgba(52, 211, 153, .28); background: rgba(52, 211, 153, .08);
  padding: 2px 7px; border-radius: 999px;
}
.release-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 6px rgba(52, 211, 153, .9); }
.release-status.is-pending { color: #fde68a; border-color: rgba(251, 191, 36, .25); background: rgba(251, 191, 36, .07); }
.release-status.is-pending i { background: var(--amber); }
.release-status.is-skipped { color: var(--text-3); border-color: rgba(148, 163, 184, .18); background: rgba(148, 163, 184, .05); }
.release-status.is-skipped i { background: var(--text-4); }
.release-time { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); margin-top: 4px; }
.release-notes { margin-top: 9px; font-size: 11px; line-height: 1.6; color: var(--text-3); max-width: 560px; }
.release-facts { display: flex; gap: 22px; flex: 0 0 auto; }
.release-fact { display: flex; flex-direction: column; gap: 1px; text-align: right; }
.release-fact-value { font-family: var(--font-mono); font-size: 17px; font-weight: 600; letter-spacing: -.03em; color: #e8f6ff; }
.release-fact-label { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .08em; color: var(--text-4); white-space: nowrap; }
.artifacts { margin-top: 16px; }
.artifacts-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.artifacts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.artifact {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, .09);
  background: rgba(148, 163, 184, .025);
  min-width: 0;
  transition: background .2s, border-color .2s;
}
.artifact:hover { background: rgba(148, 163, 184, .05); border-color: rgba(148, 163, 184, .16); }
.artifact-icon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid; }
.artifact-icon .icon { width: 13px; height: 13px; }
.artifact-icon.kind-model { color: #a5f3fc; border-color: rgba(34, 211, 238, .2); background: rgba(34, 211, 238, .07); }
.artifact-icon.kind-doc { color: #c4b5fd; border-color: rgba(139, 92, 246, .22); background: rgba(139, 92, 246, .08); }
.artifact-icon.kind-manifest { color: #fde68a; border-color: rgba(251, 191, 36, .2); background: rgba(251, 191, 36, .06); }
.artifact-icon.kind-data { color: #a7f3d0; border-color: rgba(52, 211, 153, .2); background: rgba(52, 211, 153, .06); }
.artifact-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.artifact-name { font-size: 10px; color: #d3e1f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artifact-meta { font-size: 7.5px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artifact-dl {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px;
  color: var(--text-3);
  border: 1px solid rgba(148, 163, 184, .12);
  background: rgba(148, 163, 184, .04);
  transition: color .2s, background .2s, border-color .2s;
  flex: 0 0 auto;
}
.artifact-dl:hover { color: #a5f3fc; background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .3); }
.artifact-dl .icon { width: 12px; height: 12px; }
.release-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.model-card-details { border: 1px solid rgba(148, 163, 184, .1); border-radius: 11px; background: rgba(148, 163, 184, .022); overflow: hidden; }
.model-card-details summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
  list-style: none;
  transition: background .2s;
}
.model-card-details summary::-webkit-details-marker { display: none; }
.model-card-details summary:hover { background: rgba(148, 163, 184, .04); }
.model-card-details summary .icon { width: 13px; height: 13px; color: var(--violet-soft); opacity: .8; }
.model-card-details summary .mono { margin-left: auto; font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); font-weight: 500; }
.model-card-details summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--text-4); border-bottom: 1.5px solid var(--text-4); transform: rotate(45deg); transition: transform .2s; margin-left: 4px; }
.model-card-details[open] summary::after { transform: rotate(-135deg); }
.model-card-details pre {
  margin: 0;
  padding: 0 12px 13px;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.7;
  color: var(--text-3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 220px;
  overflow-y: auto;
}
.release-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, .15);
  background: linear-gradient(120deg, rgba(148, 163, 184, .025), transparent);
}
.release-empty-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--text-3); border: 1px solid rgba(148, 163, 184, .15); background: rgba(148, 163, 184, .05); flex: 0 0 auto; }
.release-empty-icon .icon { width: 18px; height: 18px; opacity: .7; }
.release-empty h3 { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.release-empty p { font-size: 10.5px; color: var(--text-4); line-height: 1.55; }

/* predict playground */
.predict-panel { border: 1px solid rgba(139, 92, 246, .18); border-radius: 11px; background: linear-gradient(150deg, rgba(139, 92, 246, .055), rgba(34, 211, 238, .025) 60%, rgba(148, 163, 184, .02)); padding: 11px 12px 12px; min-width: 0; }
.predict-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.predict-head h3 { font-size: 11.5px; font-weight: 600; color: #dbe8f7; margin-top: 2px; }
.predict-head .tag { font-size: 7px; }
.predict-input-row { display: flex; gap: 6px; margin-top: 9px; }
.predict-input {
  flex: 1;
  min-width: 0;
  height: 31px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: rgba(4, 7, 12, .55);
  color: var(--text);
  font-size: 11px;
  transition: border-color .2s, box-shadow .2s;
}
.predict-input::placeholder { color: var(--text-4); }
.predict-input:focus { outline: none; border-color: rgba(34, 211, 238, .5); box-shadow: 0 0 0 3px rgba(34, 211, 238, .09); }
.sample-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 7px; }
.sample-chip {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .02em;
  color: var(--text-3);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .12);
  background: rgba(148, 163, 184, .03);
  transition: color .2s, border-color .2s, background .2s;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sample-chip:hover { color: #a5f3fc; border-color: rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .06); }
.predict-result { margin-top: 9px; min-height: 58px; }
.predict-empty { font-size: 9.5px; color: var(--text-4); line-height: 1.55; padding: 8px 0 2px; display: flex; align-items: center; gap: 6px; }
.predict-empty .icon { width: 12px; height: 12px; opacity: .5; }
.prob-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.prob-top-label { font-size: 11px; font-weight: 600; color: #eafdff; display: flex; align-items: center; gap: 6px; }
.prob-top-label .tag { font-size: 7px; }
.prob-conf { font-family: var(--font-mono); font-size: 10px; color: #a7f3d0; }
.prob-rows { display: flex; flex-direction: column; gap: 4px; }
.prob-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) 38px; gap: 7px; align-items: center; }
.prob-label { font-family: var(--font-mono); font-size: 8px; color: var(--text-3); }
.prob-track { height: 4px; border-radius: 99px; background: rgba(148, 163, 184, .09); overflow: hidden; }
.prob-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(34, 211, 238, .85), rgba(139, 92, 246, .8)); transition: width .55s var(--ease); }
.prob-row.is-top .prob-label { color: #a5f3fc; }
.prob-row.is-top .prob-track i { background: linear-gradient(90deg, #22d3ee, #a78bfa); box-shadow: 0 0 8px rgba(34, 211, 238, .45); }
.prob-val { font-size: 8.5px; color: var(--text-3); text-align: right; }
.predict-error { font-size: 9.5px; color: #fecdd3; line-height: 1.5; display: flex; gap: 6px; align-items: flex-start; }
.predict-error .icon { width: 12px; height: 12px; margin-top: 1px; flex: 0 0 auto; }
.predict-loading { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--text-3); padding: 6px 0; }
.predict-loading .spin { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(34, 211, 238, .2); border-top-color: var(--cyan); animation: spin .8s linear infinite; }

/* ---------- right rail feed ---------- */
.rail-right .feed-card { flex: 1; display: flex; flex-direction: column; padding-bottom: 0; min-height: 0; }
.feed-card .card-head { margin-bottom: 8px; align-items: center; }
.sse-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(148, 163, 184, .04);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .06em;
  color: var(--text-4);
  white-space: nowrap;
}
.sse-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-4); }
.sse-badge.is-open { color: #a7f3d0; border-color: rgba(52, 211, 153, .25); background: rgba(52, 211, 153, .07); }
.sse-badge.is-open .sse-dot { background: var(--emerald); box-shadow: 0 0 6px rgba(52, 211, 153, .9); animation: pulseDot 2s infinite; }
.sse-badge.is-connecting { color: #fde68a; border-color: rgba(251, 191, 36, .22); background: rgba(251, 191, 36, .06); }
.sse-badge.is-connecting .sse-dot { background: var(--amber); animation: blink 1s infinite; }
.sse-badge.is-offline { color: #fecdd3; border-color: rgba(251, 113, 133, .25); background: rgba(251, 113, 133, .07); }
.sse-badge.is-offline .sse-dot { background: var(--rose); }
@keyframes blink { 50% { opacity: .3; } }
.feed-meta { display: flex; justify-content: space-between; padding: 0 2px 7px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px; font-size: 7.5px; letter-spacing: .08em; color: var(--text-4); }
.feed-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding: 2px 2px 10px 0; }
.feed-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px;
  padding: 5px 6px 5px 7px;
  border-radius: 6px;
  border-left: 2px solid var(--tc, rgba(148, 163, 184, .3));
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 5%, transparent), transparent 70%);
  animation: feedIn .3s var(--ease) both;
}
.feed-item:hover { background: rgba(148, 163, 184, .04); }
.feed-time { font-family: var(--font-mono); font-size: 7.5px; color: var(--text-4); padding-top: 1px; }
.feed-body { min-width: 0; }
.feed-top { display: flex; align-items: center; gap: 4px; margin-bottom: 1px; flex-wrap: wrap; }
.feed-agent { font-family: var(--font-mono); font-size: 7.5px; font-weight: 600; letter-spacing: .02em; color: color-mix(in srgb, var(--tc) 75%, #fff); }
.feed-type { font-family: var(--font-mono); font-size: 6.5px; letter-spacing: .06em; padding: 0 4px; border-radius: 3px; color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); background: color-mix(in srgb, var(--tc) 8%, transparent); }
.feed-stage { font-size: 7px; color: var(--text-4); margin-left: auto; font-family: var(--font-mono); white-space: nowrap; }
.feed-content {
  font-size: 9.5px;
  line-height: 1.5;
  color: #9fb0c6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.feed-item.is-new { animation: feedIn .35s var(--ease) both; }
.feed-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; min-height: 160px; color: var(--text-4); font-size: 10px; text-align: center; padding: 20px; }
.feed-empty .icon { width: 20px; height: 20px; opacity: .35; }
.feed-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .06em; color: var(--text-4); flex: 0 0 auto; }
.feed-follow { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .06em; color: var(--cyan-soft); padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(34, 211, 238, .16); background: rgba(34, 211, 238, .05); }
.feed-follow.is-paused { color: var(--text-4); border-color: rgba(148, 163, 184, .14); background: transparent; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.mini-info-card { padding: 13px 15px 11px; flex: 0 0 auto; }
.mini-info-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 9.5px; color: var(--text-4); border-bottom: 1px solid rgba(148, 163, 184, .05); }
.mini-info-row:last-of-type { border-bottom: 0; }
.mini-info-row .mono { font-size: 8px; letter-spacing: .06em; color: var(--text-3); }
.mini-info-foot { margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 7px; letter-spacing: .02em; color: var(--text-4); text-align: center; }

/* ---------- empty state ---------- */
.empty-state {
  position: relative;
  min-height: calc(100vh - var(--topbar-h) - 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px clamp(20px, 4vw, 64px) 44px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, .09);
  background:
    radial-gradient(680px 340px at 50% -6%, rgba(34, 211, 238, .075), transparent 70%),
    radial-gradient(520px 360px at 82% 108%, rgba(139, 92, 246, .07), transparent 72%),
    linear-gradient(180deg, rgba(148, 163, 184, .028), rgba(5, 7, 13, .1));
  overflow: hidden;
  text-align: center;
}
.empty-aura { position: absolute; width: 560px; height: 560px; top: -220px; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, rgba(34, 211, 238, .12), rgba(139, 92, 246, .07) 42%, transparent 68%); filter: blur(10px); pointer-events: none; }
.empty-rings { position: absolute; inset: 0; pointer-events: none; }
.empty-rings span { position: absolute; left: 50%; top: 30%; border-radius: 50%; border: 1px solid rgba(34, 211, 238, .08); }
.empty-rings span:nth-child(1) { width: 300px; height: 300px; margin: -150px 0 0 -150px; animation: spinSlow 46s linear infinite; }
.empty-rings span:nth-child(2) { width: 460px; height: 460px; margin: -230px 0 0 -230px; border-color: rgba(139, 92, 246, .07); animation: spinSlow 70s linear infinite reverse; }
.empty-rings span:nth-child(3) { width: 640px; height: 640px; margin: -320px 0 0 -320px; border-color: rgba(148, 163, 184, .045); animation: spinSlow 100s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.empty-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; max-width: 880px; }
.empty-mark { width: 112px; height: 112px; margin-bottom: 18px; filter: drop-shadow(0 0 34px rgba(34, 211, 238, .3)); animation: floatMark 7s ease-in-out infinite; }
.empty-mark svg { width: 100%; height: 100%; }
@keyframes floatMark { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.empty-state h1 {
  margin-top: 10px;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 680;
  letter-spacing: -.025em;
  line-height: 1.15;
  background: linear-gradient(112deg, #f5fbff 10%, #b8f4ff 48%, #c9baff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.empty-sub { margin-top: 12px; max-width: 620px; font-size: 12.5px; line-height: 1.75; color: var(--text-3); }
.empty-cta { display: flex; gap: 11px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.empty-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 32px; width: 100%; max-width: 840px; text-align: left; }
.empty-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, .1);
  background: linear-gradient(160deg, rgba(148, 163, 184, .045), rgba(148, 163, 184, .015));
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.empty-feature:hover { transform: translateY(-2px); border-color: rgba(34, 211, 238, .22); background: linear-gradient(160deg, rgba(34, 211, 238, .06), rgba(148, 163, 184, .02)); }
.feature-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #a5f3fc; border: 1px solid rgba(34, 211, 238, .18); background: rgba(34, 211, 238, .07); flex: 0 0 auto; }
.feature-icon .icon { width: 15px; height: 15px; }
.empty-feature h3 { font-size: 11.5px; font-weight: 600; color: #dbe8f7; margin-bottom: 2px; }
.empty-feature p { font-size: 10px; line-height: 1.55; color: var(--text-4); }
.empty-stage-track { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 28px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .05em; color: var(--text-4); }
.empty-stage-track span { padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, .1); background: rgba(148, 163, 184, .03); white-space: nowrap; }
.empty-stage-track i { width: 14px; height: 1px; background: linear-gradient(90deg, rgba(34, 211, 238, .35), rgba(139, 92, 246, .2)); }
.empty-note { margin-top: 18px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; color: #4d5c72; }

/* ---------- modal ---------- */
.modal { border: 0; padding: 0; background: transparent; color: var(--text); width: min(640px, calc(100vw - 28px)); max-height: calc(100vh - 28px); }
.modal::backdrop { background: rgba(2, 4, 8, .72); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); animation: fadeIn .25s ease; }
.modal[open] { animation: modalIn .32s var(--ease-out); }
.modal-inner {
  position: relative;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 22px 24px 20px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, .18);
  background:
    radial-gradient(560px 260px at 12% -12%, rgba(34, 211, 238, .09), transparent 65%),
    radial-gradient(520px 280px at 94% -10%, rgba(139, 92, 246, .1), transparent 66%),
    linear-gradient(180deg, rgba(12, 18, 28, .97), rgba(6, 10, 17, .99));
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.modal-inner::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .6), rgba(139, 92, 246, .6), transparent);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(148, 163, 184, .1); }
.modal-head h2 { margin-top: 6px; font-size: 20px; font-weight: 650; letter-spacing: -.02em; color: #f2f8ff; }
.modal-head p { margin-top: 4px; font-size: 11px; color: var(--text-4); }
.modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; padding: 18px 0 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 600; color: var(--text-2); }
.field-label em { font-style: normal; font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); font-weight: 500; margin-left: 4px; }
.field-value { font-size: 14px; font-weight: 600; color: #a5f3fc; letter-spacing: -.01em; }
.field-hint { font-size: 8.5px; line-height: 1.5; color: var(--text-4); }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  margin: 5px 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #22d3ee 0%, #8b5cf6 var(--pct, 50%), rgba(148, 163, 184, .14) var(--pct, 50%));
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #e8fdff;
  border: 2px solid #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .16), 0 2px 8px rgba(0, 0, 0, .5);
  transition: transform .15s, box-shadow .15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); box-shadow: 0 0 0 4px rgba(34, 211, 238, .2), 0 2px 10px rgba(0, 0, 0, .5); }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #e8fdff; border: 2px solid #22d3ee; box-shadow: 0 0 0 3px rgba(34, 211, 238, .16); }
.seg-choices { display: flex; gap: 4px; }
.seg-choices button {
  flex: 1;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(148, 163, 184, .04);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
  transition: color .2s, border-color .2s, background .2s;
}
.seg-choices button:hover { color: var(--text-2); border-color: var(--border-strong); }
.seg-choices button.is-active { color: #dffbff; border-color: rgba(34, 211, 238, .4); background: linear-gradient(150deg, rgba(34, 211, 238, .14), rgba(139, 92, 246, .1)); box-shadow: 0 0 14px -6px rgba(34, 211, 238, .6); }
.switch { display: flex; align-items: center; gap: 9px; align-self: flex-start; padding: 2px 0; }
.switch-track { position: relative; width: 35px; height: 19px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, .2); background: rgba(148, 163, 184, .1); transition: background .25s, border-color .25s; flex: 0 0 auto; }
.switch-thumb { position: absolute; top: 50%; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #8a9bb2; transform: translateY(-50%); transition: left .25s var(--ease), background .25s; }
.switch.is-on .switch-track { background: linear-gradient(90deg, rgba(34, 211, 238, .3), rgba(139, 92, 246, .35)); border-color: rgba(34, 211, 238, .45); box-shadow: 0 0 12px -4px rgba(34, 211, 238, .6); }
.switch.is-on .switch-thumb { left: 18px; background: #dffbff; box-shadow: 0 0 8px rgba(34, 211, 238, .7); }
.switch-label { font-size: 10.5px; color: var(--text-3); font-family: var(--font-mono); letter-spacing: .01em; }
.seed-input {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: rgba(4, 7, 12, .5);
  color: var(--text-2);
  font-size: 11px;
  max-width: 220px;
}
.seed-input:focus { outline: none; border-color: rgba(34, 211, 238, .45); box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }
.field-seed { padding-top: 2px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid rgba(148, 163, 184, .1); flex-wrap: wrap; }
.modal-estimate { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); }
.modal-estimate .icon { width: 12px; height: 12px; color: var(--amber); opacity: .8; align-self: center; }
.estimate-detail { font-size: 8.5px; color: var(--text-4); }
.modal-actions { display: flex; gap: 8px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- toasts ---------- */
.toast-host { position: fixed; top: calc(var(--topbar-h) + 14px); right: var(--gutter); z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 360px; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px 10px 11px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-left: 2px solid var(--toast-color, var(--cyan));
  background: rgba(8, 13, 21, .94);
  box-shadow: 0 22px 48px -20px rgba(0, 0, 0, .9);
  backdrop-filter: blur(14px);
  animation: toastIn .3s var(--ease-out) both;
  pointer-events: auto;
}
.toast .icon { width: 14px; height: 14px; color: var(--toast-color, var(--cyan)); margin-top: 1px; flex: 0 0 auto; }
.toast-main { min-width: 0; }
.toast-title { font-size: 11px; font-weight: 600; color: #e3eefb; }
.toast-msg { font-size: 10px; line-height: 1.5; color: var(--text-3); margin-top: 1px; overflow-wrap: anywhere; }
.toast.is-error { --toast-color: var(--rose); }
.toast.is-success { --toast-color: var(--emerald); }
.toast.is-warn { --toast-color: var(--amber); }
.toast.is-leaving { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }

/* ---------- boot / loading ---------- */
.boot-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 420px; color: var(--text-4); font-size: 11px; }
.boot-spinner { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .15); border-top-color: var(--cyan); animation: spin .9s linear infinite; box-shadow: 0 0 20px -8px rgba(34, 211, 238, .6); }
.boot-state .mono { font-size: 8px; letter-spacing: .16em; color: #4d5c72; }
.noscript { position: fixed; inset: auto 20px 20px; z-index: 99; padding: 12px 16px; border-radius: 10px; background: #1a0e13; border: 1px solid rgba(251, 113, 133, .3); color: #fecdd3; font-size: 12px; }

/* ---------- entry animation ---------- */
body[data-ready="1"] .main-col > * { animation: riseIn .5s var(--ease-out) both; }
body[data-ready="1"] .main-col > *:nth-child(2) { animation-delay: .04s; }
body[data-ready="1"] .main-col > *:nth-child(3) { animation-delay: .07s; }
body[data-ready="1"] .main-col > *:nth-child(4) { animation-delay: .1s; }
body[data-ready="1"] .rail { animation: riseIn .55s var(--ease-out) both; }
body[data-ready="1"] .rail-right { animation-delay: .06s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1560px) {
  .console { grid-template-columns: 250px minmax(0, 1fr) 286px; }
  .status-cluster { gap: 10px; }
  .brand-divider, .brand-cn { display: none; }
}
@media (max-width: 1439px) {
  .brand-kicker { display: none; }
  .brand-text { gap: 0; }
  .status-stage { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 1280px) {
  .console {
    grid-template-areas: "left main" "left right";
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .rail-left { max-height: none; }
  .rail-right { position: static; height: auto; min-height: 0; flex-direction: column; }
  .rail-right .feed-card { height: 360px; }
  .mini-info-card { display: none; }
  .eval-grid { grid-template-columns: 1fr; gap: 16px; }
  .release-lower { grid-template-columns: 1fr; }
  .topbar-right .chip-engine { display: none; }
  .status-cluster { justify-content: flex-start; }
  .progress-inline { width: 130px; flex-basis: 130px; }
}
@media (max-width: 1100px) {
  .duo-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eval-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .error-list { grid-template-columns: 1fr; }
  .release-facts { gap: 16px; }
  .brand-kicker { display: block; }
  .brand-text { gap: 1px; }
}
@media (max-width: 900px) {
  :root { --topbar-h: 60px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: var(--topbar-h); padding-top: 8px; padding-bottom: 8px; row-gap: 8px; }
  .brand { flex: 1 1 auto; }
  .brand-kicker { display: none; }
  .status-cluster { order: 3; flex: 1 1 100%; justify-content: space-between; gap: 8px; }
  .topbar-right { gap: 6px; }
  .topbar-right .btn span { display: none; }
  .topbar-right .btn { width: 34px; padding: 0; }
  .topbar-right .btn-primary { width: 38px; }
  .console { grid-template-areas: "left" "main" "right"; grid-template-columns: minmax(0, 1fr); padding-top: 12px; gap: 12px; }
  .rail-left { position: static; display: grid; grid-template-columns: 1fr; }
  .rail-left .history-card { order: 2; }
  .rail-right { display: block; }
  .rail-right .feed-card { height: 320px; }
  .status-stage { max-width: 140px; }
  .progress-inline { width: 120px; flex-basis: 120px; }
  .run-strip { flex-wrap: wrap; }
  .run-strip-right { width: 100%; justify-content: space-between; }
  .empty-state { min-height: auto; padding: 40px 18px 42px; }
  .empty-features { grid-template-columns: 1fr; max-width: 420px; }
  .empty-rings span:nth-child(3) { display: none; }
  .duo-grid { grid-template-columns: 1fr; }
  .chart-canvas { height: 200px; }
  .convo-list { height: 330px; }
  .modal-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .lb-table { min-width: 600px; }
}
@media (max-width: 640px) {
  .topbar { gap: 8px; }
  .brand-name { font-size: 15px; }
  .brand-mark { width: 32px; height: 32px; }
  .topbar-right .health-chip { display: none; }
  .status-cluster { flex-direction: column; align-items: stretch; gap: 6px; }
  .status-pill { justify-content: flex-start; width: 100%; }
  .progress-inline { width: 100%; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-grid .kpi-card:nth-child(n+3) { display: none; }
  .eval-tiles { grid-template-columns: 1fr 1fr; }
  .console { padding-left: 12px; padding-right: 12px; }
  .card { padding: 15px 14px 14px; border-radius: 15px; }
  .card-body.no-pad { margin: 0 -14px -14px; }
  .card-head { flex-wrap: wrap; }
  .head-controls { width: 100%; justify-content: space-between; }
  .artifacts-grid { grid-template-columns: 1fr; }
  .eval-grid { grid-template-columns: 1fr; }
  .release-facts { width: 100%; justify-content: space-between; }
  .empty-stage-track i { display: none; }
  .empty-stage-track span { font-size: 8px; }
  .run-strip { padding: 9px 11px; }
  .modal-inner { padding: 18px 16px 16px; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-actions { justify-content: flex-end; }
  .toast-host { left: 12px; right: 12px; max-width: none; }
  .lb-table { min-width: 560px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .progress-fill::after { display: none; }
}

/* ---------- supplemental (v1.1) ---------- */
.run-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 22px 12px 24px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, .13);
  background: rgba(148, 163, 184, .018);
  font-size: 10px;
  color: var(--text-3);
  text-align: center;
}
.run-empty .icon { width: 18px; height: 18px; opacity: .35; margin-bottom: 2px; }
.run-empty .dim { font-size: 8.5px; color: var(--text-4); }
.prob-row.is-top .prob-val { color: #a5f3fc; }


/* ---------- supplemental (v1.2) ---------- */
.kpi-value--split { font-size: clamp(21px, 1.55vw, 26px); }
.volume-compare .volume-badge { position: static; display: inline-block; margin-top: 7px; }
.model-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--hairline); }
.model-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.model-meta span { font-size: 7px; letter-spacing: .1em; color: var(--text-4); }
.model-meta b { font-family: var(--font-mono); font-size: 9px; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ---------- supplemental (v1.3 — lead review fixes) ---------- */
/* feed rows: two-line layout, full-width body, never squeezed */
.feed-item {
  display: block;
  padding: 6px 7px 6px 8px;
  border-radius: 6px;
  border-left: 2px solid var(--tc, rgba(148, 163, 184, .3));
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 5%, transparent), transparent 70%);
}
.feed-top { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; flex-wrap: wrap; }
.feed-time { font-family: var(--font-mono); font-size: 7px; color: var(--text-4); letter-spacing: .02em; }
.feed-agent { font-family: var(--font-mono); font-size: 7.5px; font-weight: 600; color: color-mix(in srgb, var(--tc) 75%, #fff); }
.feed-type { font-family: var(--font-mono); font-size: 6.5px; letter-spacing: .06em; padding: 0 4px; border-radius: 3px; color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); background: color-mix(in srgb, var(--tc) 8%, transparent); }
.feed-stage { font-size: 7px; color: var(--text-4); margin-left: auto; font-family: var(--font-mono); white-space: nowrap; }
.feed-content {
  font-size: 9.5px; line-height: 1.5; color: #9fb0c6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; word-break: normal; min-width: 0;
}
/* toasts: bottom-right so they never cover the live feed header */
.toast-host { top: auto; bottom: 22px; }
.toast { min-width: 250px; max-width: 360px; }
.toast-main { flex: 1 1 auto; min-width: 180px; }
.toast-title { white-space: normal; }
/* pipeline: compact iteration chip + nowrap agent line */
.stage-name { min-width: 0; flex-wrap: nowrap; }
.stage-iter { font-size: 7.5px; line-height: 1.35; padding: 0 3px; flex: 0 0 auto; }
.stage-sub { white-space: nowrap; overflow: hidden; min-width: 0; }
.stage-sub .stage-agent-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stage-sub .stage-sep { flex: 0 0 auto; opacity: .5; }
.stage-sub .stage-state { flex: 0 0 auto; }
.stage-meta { min-width: 26px; }
.stage-iter + .stage-name { margin-left: 4px; }


/* ---------- supplemental (v1.4) ---------- */
.stage-sub { letter-spacing: .04em; }
.stage-sub .stage-agent-name { max-width: 94px; }
.chart-live-hint {
  fill: rgba(148, 163, 184, .42);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
}


/* ---------- supplemental (v1.5 — stopped/failed state consistency) ---------- */
.stage-row.is-stopped {
  background: linear-gradient(90deg, rgba(251, 191, 36, .055), rgba(251, 191, 36, .01) 60%, transparent);
  border-color: rgba(251, 191, 36, .18);
  opacity: .92;
}
.stage-row.is-stopped .stage-node {
  color: var(--amber);
  border-color: rgba(251, 191, 36, .45);
  background: rgba(251, 191, 36, .08);
}
.stage-row.is-stopped .stage-node .icon { width: 9px; height: 9px; }
.stage-row.is-stopped .stage-state { color: rgba(251, 191, 36, .9); }
.stage-pause { display: grid; place-items: center; }
.lb-status-tag.is-stopped { color: #fde68a; border-color: rgba(251, 191, 36, .25); background: rgba(251, 191, 36, .07); }


/* ---------- supplemental (v1.6 — final polish a/b) ---------- */
.loop-note.is-result {
  border-style: solid;
  border-color: rgba(52, 211, 153, .22);
  background: linear-gradient(90deg, rgba(52, 211, 153, .07), rgba(34, 211, 238, .025) 60%, transparent);
  color: var(--text-2);
}
.loop-note.is-result .icon { color: #6ee7b7; opacity: 1; }
.loop-note.is-result b { font-family: var(--font-mono); font-weight: 600; color: #eaf7f0; letter-spacing: .01em; }
.loop-note .loop-verdict { color: #6ee7b7; font-weight: 600; margin-left: 2px; }
.loop-note.is-miss { border-color: rgba(251, 191, 36, .25); background: linear-gradient(90deg, rgba(251, 191, 36, .06), transparent 70%); }
.loop-note.is-miss .icon { color: var(--amber); }
.loop-note.is-miss .loop-verdict { color: #fde68a; }

/* ============================================================
   v2 — navigation / collapse / multi-metric / dual eval / views
   ============================================================ */
:root { --subbar-h: 50px; }

/* topbar now host only brand + actions; status cluster moved to subbar */
.topbar { gap: 12px; }
.topbar-right { margin-left: auto; }
.btn-only-icon { width: 34px; padding: 0; }
.btn-only-icon.is-active { color: #a5f3fc; border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .1); }

/* subbar: view nav + run status */
.subbar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--subbar-h);
  padding: 6px var(--gutter);
  background: rgba(5, 7, 13, .72);
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.subbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .2) 30%, rgba(139, 92, 246, .22) 70%, transparent);
  pointer-events: none;
}
.view-nav { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .12); background: rgba(4, 7, 12, .5); flex: 0 0 auto; }
.view-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 7px;
  color: var(--text-3); font-size: 11.5px; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
  transition: color .2s, background .2s, border-color .2s;
}
.view-nav-btn .icon { width: 13px; height: 13px; opacity: .8; }
.view-nav-btn .view-nav-en { font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); }
.view-nav-btn:hover { color: var(--text-2); background: rgba(148, 163, 184, .06); }
.view-nav-btn.is-active { color: #e8fdff; background: linear-gradient(135deg, rgba(34, 211, 238, .14), rgba(139, 92, 246, .12)); border-color: rgba(34, 211, 238, .26); box-shadow: 0 0 14px -6px rgba(34, 211, 238, .55); }
.view-nav-btn.is-active .view-nav-en { color: rgba(165, 243, 252, .65); }
.subbar .status-cluster { flex: 1 1 auto; justify-content: flex-end; gap: 12px; min-width: 0; }
.subbar .progress-inline { flex: 0 1 170px; width: 170px; }

/* sticky offsets now include the subbar */
.rail-left { top: calc(var(--topbar-h) + var(--subbar-h) + 14px); max-height: calc(100vh - var(--topbar-h) - var(--subbar-h) - 28px); }
.rail-right { top: calc(var(--topbar-h) + var(--subbar-h) + 14px); height: calc(100vh - var(--topbar-h) - var(--subbar-h) - 28px); }
.empty-state { min-height: calc(100vh - var(--topbar-h) - var(--subbar-h) - 46px); }

/* ---------- left rail collapse ---------- */
.console { transition: grid-template-columns .34s var(--ease); }
.rail-collapsed { display: none; flex-direction: column; align-items: center; gap: 8px; padding: 8px 6px 10px; border-radius: 16px; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(148, 163, 184, .06), rgba(148, 163, 184, .02)), var(--panel-fill); box-shadow: var(--shadow-card); }
body.is-rail-collapsed .console { grid-template-columns: 64px minmax(0, 1fr) 300px; }
body.is-rail-collapsed .rail-left { overflow: visible; }
body.is-rail-collapsed .rail-left .pipeline-card,
body.is-rail-collapsed .rail-left .history-card { display: none; }
body.is-rail-collapsed .rail-collapsed { display: flex; }
.rail-collapsed-top { display: flex; justify-content: center; }
.rail-collapse-btn { width: 30px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: var(--text-3); border: 1px solid rgba(148, 163, 184, .14); background: rgba(148, 163, 184, .05); }
.rail-collapse-btn:hover { color: #a5f3fc; border-color: rgba(34, 211, 238, .3); }
.rail-rotate { transform: rotate(90deg); width: 12px; height: 12px; }
.rail-collapsed-stages { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 2px; }
.rail-icon { position: relative; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; border: 1px solid rgba(148, 163, 184, .12); background: rgba(148, 163, 184, .035); transition: border-color .2s, background .2s, transform .2s; }
.rail-icon:hover { border-color: rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .06); transform: translateY(-1px); }
.rail-icon-avatar { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 8px; font-weight: 700; color: #04121a; background: var(--agent-color, #22d3ee); }
.rail-icon-dot { position: absolute; right: 5px; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 6px currentColor; border: 1px solid rgba(5, 7, 13, .9); }
.rail-collapsed-bottom { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--hairline); width: 100%; display: flex; justify-content: center; }
.rail-history-icon { width: 38px; height: 34px; flex-direction: column; gap: 1px; font-size: 7px; }
.rail-history-badge { font-size: 7.5px; color: var(--text-4); }

/* ---------- Agent Collaboration collapse ---------- */
.collapse-btn { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--text-3); border: 1px solid rgba(148, 163, 184, .14); background: rgba(148, 163, 184, .04); transition: color .2s, border-color .2s, transform .2s; }
.collapse-btn:hover { color: #a5f3fc; border-color: rgba(34, 211, 238, .3); }
.convo-card.is-collapsed .collapse-btn .icon { transform: rotate(-90deg); }
.convo-collapsed-summary { display: none; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(34, 211, 238, .13); background: linear-gradient(90deg, rgba(34, 211, 238, .05), rgba(139, 92, 246, .03)); color: var(--text-3); font-size: 10.5px; }
.convo-collapsed-summary .icon { width: 13px; height: 13px; color: var(--cyan); opacity: .8; }
.convo-collapsed-summary b { color: #dcebfa; font-weight: 600; }
.convo-card.is-collapsed { padding-bottom: 16px; }
.convo-card.is-collapsed .agent-filters,
.convo-card.is-collapsed .convo-wrap { display: none; }
.convo-card.is-collapsed .convo-collapsed-summary { display: flex; }

/* ---------- C. multi-metric chips + loss stats ---------- */
.metric-chips { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .12); background: rgba(4, 7, 12, .45); flex-wrap: wrap; }
.metric-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid transparent; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-4); transition: color .2s, background .2s, border-color .2s, opacity .2s; white-space: nowrap; }
.metric-chip i { width: 6px; height: 6px; border-radius: 2px; opacity: .55; flex: 0 0 auto; }
.metric-chip:hover:not(:disabled) { color: var(--text-2); background: rgba(148, 163, 184, .06); }
.metric-chip.is-on { color: #eaf7ff; background: rgba(148, 163, 184, .08); border-color: rgba(148, 163, 184, .18); }
.metric-chip.is-on i { opacity: 1; }
.metric-chip:disabled { opacity: .32; cursor: not-allowed; }
.loss-stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 2px; }
.loss-stat { display: flex; align-items: baseline; gap: 7px; padding: 7px 11px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .09); background: rgba(148, 163, 184, .025); min-width: 0; }
.loss-stat-label { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); white-space: nowrap; }
.loss-stat b { font-size: 15px; font-weight: 600; letter-spacing: -.02em; color: #e9f5ff; }
.loss-stat:nth-child(1) b { color: #a5f3fc; }
.loss-stat:nth-child(2) b { color: #c4b5fd; }
.loss-stat.is-best { border-color: rgba(251, 191, 36, .2); background: rgba(251, 191, 36, .04); }
.loss-stat.is-best b { color: #fde68a; }
.loss-stat-sub { margin-left: auto; font-family: var(--font-mono); font-size: 7.5px; color: var(--text-4); white-space: nowrap; }
.chart-card .chart-canvas { height: 226px; }

/* ---------- D. dual evaluation ---------- */
.eval-card .eval-tiles { grid-template-columns: repeat(auto-fit, minmax(102px, 1fr)); }
.eval-card .eval-value { font-size: 16.5px; }
.dual-eval-card { border-color: rgba(139, 92, 246, .16); }
.dual-eval-card .card-head { margin-bottom: 12px; }
.degrade-banner { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(139, 92, 246, .2); background: linear-gradient(100deg, rgba(139, 92, 246, .09), rgba(34, 211, 238, .04) 55%, transparent); margin-bottom: 14px; }
.degrade-banner.is-bad { border-color: rgba(251, 113, 133, .25); background: linear-gradient(100deg, rgba(251, 113, 133, .08), transparent 70%); }
.degrade-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; border: 1px solid rgba(167, 139, 250, .3); background: rgba(139, 92, 246, .1); color: #ddd6fe; flex: 0 0 auto; }
.degrade-banner.is-bad .degrade-icon { border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .08); color: #fecdd3; }
.degrade-main { min-width: 0; flex: 1; }
.degrade-kicker { font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; color: #a5b4fc; }
.degrade-main p { margin-top: 2px; font-size: 10.5px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
.degrade-verdict { font-family: var(--font-mono); font-size: 9px; padding: 2px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; flex: 0 0 auto; }
.degrade-verdict.is-ok { color: #a7f3d0; border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .08); }
.degrade-verdict.is-bad { color: #fecdd3; border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .08); }
.dual-eval-empty { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 12px; border: 1px dashed rgba(148, 163, 184, .16); background: rgba(148, 163, 184, .02); color: var(--text-3); }
.dual-eval-empty > .icon { width: 20px; height: 20px; opacity: .5; margin-top: 2px; flex: 0 0 auto; }
.dual-eval-empty h4 { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.dual-eval-empty p { font-size: 10px; line-height: 1.55; color: var(--text-4); }
.dual-legacy { display: flex; gap: 14px; margin-top: 9px; flex-wrap: wrap; }
.dual-legacy-item { display: inline-flex; align-items: baseline; gap: 6px; font-size: 9.5px; color: var(--text-3); }
.dual-legacy-item b { color: #dce8f7; font-size: 10px; }
.dual-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 16px; }
.dual-panel { min-width: 0; }
.dual-subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 10px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.dual-subhead .mono { font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); font-weight: 500; }
.dual-subhead-mt { margin-top: 13px; }
.dual-table { border-radius: 9px; border: 1px solid rgba(148, 163, 184, .09); overflow: hidden; }
.dual-tr { display: grid; grid-template-columns: minmax(92px, 1.15fr) minmax(54px, .8fr) minmax(54px, .8fr) minmax(72px, .9fr); gap: 4px; align-items: center; padding: 5.5px 9px; font-size: 10px; }
.dual-tr + .dual-tr { border-top: 1px solid rgba(148, 163, 184, .06); }
.dual-th { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .08em; color: var(--text-4); text-transform: uppercase; background: rgba(148, 163, 184, .04); }
.dual-th span:not(:first-child) { text-align: right; }
.dual-td-label { display: flex; align-items: center; gap: 6px; color: #c6d5e8; font-size: 9.5px; min-width: 0; }
.dual-td-label .mono { font-size: 7px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dual-td-label .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--class-color, #22d3ee); box-shadow: 0 0 6px -1px var(--class-color, #22d3ee); flex: 0 0 auto; }
.dual-td { text-align: right; font-size: 9.5px; color: var(--text-3); white-space: nowrap; }
.dual-td.is-int8 { color: #dcf5fa; }
.dual-delta { text-align: right; }
.delta-metric { font-size: 9px; letter-spacing: .01em; white-space: nowrap; }
.delta-metric.is-drop { color: #fda4af; }
.delta-metric.is-gain { color: #6ee7b7; }
.delta-metric.is-flat { color: var(--text-4); }
.dual-matrix-box { padding: 8px 9px 7px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .09); background: rgba(148, 163, 184, .02); }
.dual-matrix-label { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; color: #a5f3fc; margin-bottom: 6px; }
.dual-matrix-label.is-int8 { color: #c4b5fd; }
.dual-matrix-label .icon { width: 11px; height: 11px; }
.dual-matrices { display: flex; flex-direction: column; gap: 8px; }
.matrix-grid.is-compact { grid-template-columns: 32px repeat(4, minmax(0, 1fr)); gap: 2px; }
.matrix-grid.is-compact .matrix-head { font-size: 6.5px; }
.matrix-grid.is-compact .matrix-rowlabel { font-size: 6.5px; padding-right: 2px; }
.matrix-grid.is-compact .matrix-cell { aspect-ratio: 1.75; border-radius: 4px; font-size: 8.5px; }
.matrix-grid.is-compact .matrix-corner { font-size: 5.5px; }
.dual-foot { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 8.5px; color: var(--text-4); }
.dual-foot .icon { width: 11px; height: 11px; opacity: .5; }

/* ---------- E. experiments view ---------- */
.view-panel { position: relative; z-index: 1; max-width: 1920px; margin: 0 auto; padding: 20px var(--gutter) 56px; display: flex; flex-direction: column; gap: 14px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 4px 2px 2px; }
.view-head-main { min-width: 0; max-width: 720px; }
.view-head-main h1 { margin-top: 6px; font-size: clamp(24px, 2.2vw, 32px); font-weight: 660; letter-spacing: -.025em; background: linear-gradient(112deg, #f5fbff 15%, #b8f4ff 60%, #c9baff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.view-head-main p { margin-top: 7px; font-size: 12px; line-height: 1.7; color: var(--text-3); }
.view-stats { display: flex; align-items: stretch; gap: 9px; flex-wrap: wrap; }
.exp-stat { display: flex; flex-direction: column; gap: 1px; padding: 9px 13px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .1); background: rgba(148, 163, 184, .03); min-width: 104px; }
.exp-stat-label { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); }
.exp-stat b { font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: #eaf5ff; }
.exp-stat b.is-live { color: #6ee7b7; text-shadow: 0 0 12px rgba(52, 211, 153, .4); }
.exp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(148, 163, 184, .1); background: rgba(148, 163, 184, .025); }
.exp-filters { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .12); background: rgba(4, 7, 12, .45); }
.exp-filter { height: 27px; padding: 0 12px; border-radius: 6px; font-size: 10.5px; font-weight: 500; color: var(--text-3); border: 1px solid transparent; transition: color .2s, background .2s, border-color .2s; white-space: nowrap; }
.exp-filter:hover { color: var(--text-2); background: rgba(148, 163, 184, .06); }
.exp-filter.is-active { color: #dffbff; background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .25); }
.exp-toolbar-right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.exp-select-hint { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .04em; color: var(--text-4); }
.exp-select-hint.is-active { color: #a5f3fc; }
.exp-sort { height: 28px; padding: 0 9px; border-radius: 7px; border: 1px solid rgba(148, 163, 184, .14); background: rgba(5, 8, 14, .8); color: var(--text-2); font-size: 10.5px; font-family: var(--font-ui); }
.exp-sort:focus { outline: none; border-color: rgba(34, 211, 238, .4); }
.exp-table-card { padding: 0; overflow: hidden; }
.exp-table-wrap { overflow-x: auto; }
.exp-table { width: 100%; border-collapse: collapse; min-width: 1020px; }
.exp-table thead th { text-align: left; padding: 10px 10px 9px; font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--text-4); font-weight: 500; border-bottom: 1px solid rgba(148, 163, 184, .1); background: rgba(148, 163, 184, .03); white-space: nowrap; }
.exp-table thead th:first-child { width: 36px; padding-right: 0; }
.exp-table tbody td { padding: 9px 10px; border-bottom: 1px solid rgba(148, 163, 184, .055); font-size: 10.5px; color: var(--text-3); vertical-align: middle; white-space: nowrap; }
.exp-table tbody tr { cursor: pointer; transition: background .18s; }
.exp-table tbody tr:hover { background: rgba(34, 211, 238, .035); }
.exp-table tbody tr.is-selected { background: rgba(139, 92, 246, .07); box-shadow: inset 2px 0 0 rgba(139, 92, 246, .55); }
.exp-table tbody tr:last-child td { border-bottom: 0; }
.exp-check-cell { width: 36px; padding-right: 0 !important; }
.exp-check { appearance: none; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(148, 163, 184, .3); background: rgba(4, 7, 12, .6); display: inline-grid; place-content: center; cursor: pointer; transition: border-color .2s, background .2s; }
.exp-check:hover { border-color: rgba(34, 211, 238, .5); }
.exp-check:checked { border-color: rgba(34, 211, 238, .7); background: linear-gradient(135deg, #22d3ee, #8b5cf6); }
.exp-check:checked::after { content: ""; width: 7px; height: 4px; border-left: 1.5px solid #04121a; border-bottom: 1.5px solid #04121a; transform: rotate(-45deg) translateY(-1px); }
.exp-check:disabled { opacity: .3; cursor: not-allowed; }
.exp-id { display: block; color: #d7e4f3; font-size: 10px; letter-spacing: .01em; }
.exp-date { display: block; font-size: 8px; color: var(--text-4); margin-top: 1px; }
.exp-num { text-align: right; }
.exp-num.is-strong { color: #dcf5fa; font-weight: 600; }
.exp-release { font-size: 8.5px; color: #b9c8dc; }
.exp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 34px 18px; color: var(--text-3); font-size: 11px; }
.exp-empty .icon { width: 22px; height: 22px; opacity: .35; }
.exp-empty .dim { font-size: 9px; color: var(--text-4); }
.status-tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, .16); color: var(--text-3); background: rgba(148, 163, 184, .04); }
.status-tag i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-tag.is-completed { color: #a5f3fc; border-color: rgba(34, 211, 238, .22); background: rgba(34, 211, 238, .06); }
.status-tag.is-running { color: #a7f3d0; border-color: rgba(52, 211, 153, .25); background: rgba(52, 211, 153, .07); }
.status-tag.is-stopped { color: #fde68a; border-color: rgba(251, 191, 36, .24); background: rgba(251, 191, 36, .07); }
.status-tag.is-failed { color: #fecdd3; border-color: rgba(251, 113, 133, .24); background: rgba(251, 113, 133, .07); }
.exp-compare { padding: 16px 18px 14px; }
.cmp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.cmp-head h3 { margin-top: 3px; font-size: 14px; font-weight: 600; color: #eaf1fb; }
.cmp-best { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: #a5f3fc; }
.cmp-best .icon { width: 13px; height: 13px; color: var(--amber); }
.cmp-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr); gap: 18px; }
.cmp-chart-wrap { min-width: 0; }
.cmp-legend-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.cmp-legend { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-3); }
.cmp-legend i { width: 7px; height: 7px; border-radius: 2px; }
.cmp-chart { width: 100%; height: auto; display: block; }
.cmp-grid { stroke: rgba(148, 163, 184, .1); stroke-width: 1; }
.cmp-axis { fill: #5f7089; font-family: var(--font-mono); font-size: 8px; }
.cmp-value { fill: #cfe0f2; font-family: var(--font-mono); font-size: 7.5px; }
.cmp-group { fill: var(--text-3); font-size: 9px; font-family: var(--font-ui); }
.cmp-config { min-width: 0; }
.cmp-config-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.cmp-config-head .mono { font-size: 7.5px; letter-spacing: .1em; color: var(--text-4); font-weight: 500; }
.cmp-config-grid { border-radius: 9px; border: 1px solid rgba(148, 163, 184, .09); overflow: hidden; }
.cmp-config-row { display: grid; grid-template-columns: minmax(92px, 1.2fr) repeat(var(--cols, 2), minmax(0, 1fr)); gap: 4px; padding: 6px 10px; font-size: 9.5px; color: var(--text-3); }
.cmp-config-row + .cmp-config-row { border-top: 1px solid rgba(148, 163, 184, .06); }
.cmp-config-row span { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-config-row .cmp-config-key { text-align: left; color: var(--text-4); font-size: 8px; }
.cmp-config-row.is-diff { background: rgba(139, 92, 246, .06); }
.cmp-config-row.is-diff span:not(.cmp-config-key) { color: #ddd6fe; }
.cmp-config-row.is-head { background: rgba(148, 163, 184, .04); font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .08em; }
.cmp-hint { display: flex; gap: 5px; margin-top: 8px; font-size: 8.5px; color: var(--text-4); line-height: 1.5; }
.cmp-hint .icon { width: 11px; height: 11px; margin-top: 1px; flex: 0 0 auto; opacity: .55; }
.view-foot-note { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .03em; color: var(--text-4); padding: 0 2px; line-height: 1.6; }

/* ---------- F. models view ---------- */
.models-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px; }
.models-toolbar-title { font-size: 11px; color: var(--text-2); font-weight: 600; }
.models-toolbar-title .mono { font-size: 10px; color: #a5f3fc; margin-left: 4px; }
.models-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.model-card { display: flex; flex-direction: column; gap: 11px; padding: 16px; }
.model-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.model-card-version { min-width: 0; }
.model-card-version h3 { margin-top: 3px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: #f0f8ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-card-run { display: block; margin-top: 2px; font-size: 8px; color: var(--text-4); }
.model-target { font-family: var(--font-mono); font-size: 8px; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, .16); color: var(--text-4); white-space: nowrap; flex: 0 0 auto; }
.model-target.is-met { color: #a7f3d0; border-color: rgba(52, 211, 153, .28); background: rgba(52, 211, 153, .08); }
.model-target.is-miss { color: #fde68a; border-color: rgba(251, 191, 36, .25); background: rgba(251, 191, 36, .07); }
.model-card-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.model-metric { padding: 7px 8px 6px; border-radius: 8px; border: 1px solid rgba(148, 163, 184, .08); background: rgba(148, 163, 184, .025); min-width: 0; }
.model-metric span { display: block; font-size: 6.5px; letter-spacing: .08em; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-metric b { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: #e8f4ff; letter-spacing: -.02em; }
.model-card-volume { padding: 9px 10px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .08); background: rgba(148, 163, 184, .02); }
.model-vol-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 62px; gap: 7px; align-items: center; padding: 2px 0; }
.model-vol-row > span { font-size: 8px; color: var(--text-4); }
.model-vol-row > span:last-child { text-align: right; color: var(--text-2); }
.model-vol-bar { height: 6px; border-radius: 99px; background: rgba(148, 163, 184, .09); overflow: hidden; }
.model-vol-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(139, 92, 246, .85), rgba(167, 139, 250, .55)); }
.model-vol-bar.is-int8 i { background: linear-gradient(90deg, #22d3ee, rgba(34, 211, 238, .5)); }
.model-card-badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.model-card-badges .tag { font-size: 7px; padding: 1px 6px; }
.model-drop { display: inline-flex; align-items: center; gap: 4px; font-size: 7.5px; color: var(--text-4); margin-left: auto; white-space: nowrap; }
.model-card-params { display: flex; flex-direction: column; gap: 2px; font-size: 9px; color: var(--text-3); }
.model-card-params .mono { font-size: 8px; color: var(--text-4); }
.model-card-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; padding-top: 9px; border-top: 1px solid var(--hairline); }
.model-dl { display: inline-flex; align-items: center; gap: 4px; height: 27px; padding: 0 8px; border-radius: 7px; border: 1px solid rgba(148, 163, 184, .13); background: rgba(148, 163, 184, .04); font-size: 9px; color: var(--text-2); transition: color .2s, border-color .2s, background .2s; }
.model-dl:hover { color: #a5f3fc; border-color: rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .07); }
.model-dl .icon { width: 11px; height: 11px; }
.model-dl-size { font-size: 7px; color: var(--text-4); }
.model-view-run { margin-left: auto; }

/* ---------- v2 responsive ---------- */
@media (max-width: 1560px) {
  .models-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1439px) {
  .view-nav-btn .view-nav-en { display: none; }
  .subbar { gap: 10px; }
  .subbar .progress-inline { flex-basis: 120px; width: 120px; }
}
@media (max-width: 1280px) {
  body.is-rail-collapsed .console { grid-template-columns: 64px minmax(0, 1fr); }
  .cmp-body { grid-template-columns: 1fr; }
  .dual-grid { grid-template-columns: 1fr; }
  .models-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subbar .status-stage { display: none; }
  .subbar .status-pill { height: 30px; }
}
@media (max-width: 1100px) {
  .models-grid { grid-template-columns: 1fr; }
  .view-stats { width: 100%; }
  .loss-stat-sub { display: none; }
}
@media (max-width: 900px) {
  .subbar { flex-wrap: wrap; row-gap: 6px; padding-top: 7px; padding-bottom: 7px; }
  .view-nav { flex: 1 1 100%; }
  .view-nav-btn { flex: 1; justify-content: center; }
  .subbar .status-cluster { flex: 1 1 100%; justify-content: space-between; }
  .subbar .progress-inline { flex: 1 1 auto; width: auto; }
  body.is-rail-collapsed .console { grid-template-columns: minmax(0, 1fr); }
  body.is-rail-collapsed .rail-left { display: none; }
  .rail-collapsed { flex-direction: row; align-items: center; overflow-x: auto; padding: 6px 8px; }
  .rail-collapsed-stages { flex-direction: row; margin-top: 0; }
  .rail-collapsed-bottom { margin-top: 0; margin-left: auto; padding-top: 0; border-top: 0; border-left: 1px solid var(--hairline); padding-left: 8px; width: auto; }
  .view-panel { padding-top: 14px; gap: 12px; }
  .view-head-main h1 { font-size: 24px; }
  .exp-toolbar { flex-direction: column; align-items: stretch; }
  .exp-toolbar-right { justify-content: space-between; }
  .loss-stats-row { grid-template-columns: 1fr; }
  .metric-chips { width: 100%; justify-content: flex-start; }
  .head-controls { width: 100%; align-items: flex-start; }
  .dual-tr { grid-template-columns: minmax(82px, 1.1fr) minmax(48px, .8fr) minmax(48px, .8fr) minmax(64px, .9fr); }
  .degrade-banner { flex-wrap: wrap; }
  .degrade-verdict { margin-left: auto; }
  .model-card-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- v2.1 production / name polish ---------- */
.model-card-badges-top { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.prod-badge { font-family: var(--font-mono); font-size: 7px; letter-spacing: .1em; color: #04121a; background: linear-gradient(135deg, #67e8f9, #a78bfa); padding: 2px 7px; border-radius: 999px; font-weight: 700; box-shadow: 0 0 12px -4px rgba(34, 211, 238, .8); }
.model-promote { color: #c4b5fd !important; border-color: rgba(139, 92, 246, .28) !important; background: rgba(139, 92, 246, .08) !important; }
.model-promote:hover { color: #e9d5ff !important; border-color: rgba(139, 92, 246, .5) !important; }
.exp-table .exp-id { font-family: var(--font-mono); }


/* ---------- P1 experiment management ---------- */
.exp-th-actions { text-align: right !important; width: 76px; }
.exp-actions { text-align: right; white-space: nowrap; }
.exp-act { width: 24px; height: 24px; margin-left: 3px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid rgba(148, 163, 184, .12); background: rgba(148, 163, 184, .04); color: var(--text-4); transition: color .18s, border-color .18s, background .18s; }
.exp-act .icon { width: 11px; height: 11px; }
.exp-act:hover { color: #a5f3fc; border-color: rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .07); }
.exp-delete:hover { color: #fecdd3; border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .08); }
.exp-rename-input { width: 100%; height: 27px; padding: 0 7px; border-radius: 6px; border: 1px solid rgba(34, 211, 238, .45); background: rgba(4, 7, 12, .7); color: #eaf7ff; font-size: 10.5px; outline: none; box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }

/* ============================================================
   v3 — radar comparison + Agent/LLM settings
   ============================================================ */
/* decision-engine entry */
.chip-engine-btn { cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.chip-engine-btn:hover { color: #e8fdff; border-color: rgba(139, 92, 246, .4); background: rgba(139, 92, 246, .1); }
.chip-engine-btn .chip-gear { width: 11px; height: 11px; opacity: .5; margin-left: 1px; }
.chip-engine-btn:hover .chip-gear { opacity: .9; }

/* compare view tabs */
.cmp-view-tabs { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .12); background: rgba(4, 7, 12, .45); align-self: flex-start; margin-bottom: 8px; }
.cmp-tab { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 10px; border-radius: 6px; font-size: 10px; font-weight: 500; color: var(--text-3); border: 1px solid transparent; transition: color .2s, background .2s, border-color .2s; }
.cmp-tab .icon { width: 11px; height: 11px; opacity: .75; }
.cmp-tab:hover { color: var(--text-2); background: rgba(148, 163, 184, .06); }
.cmp-tab.is-active { color: #dffbff; background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .25); }
.cmp-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.cmp-normalize-note { font-size: 7.5px; letter-spacing: .08em; color: var(--text-4); }
.radar-wrap { position: relative; display: flex; justify-content: center; align-items: center; min-height: 300px; }
.radar-chart { width: 100%; max-width: 430px; height: auto; overflow: visible; }
.radar-ring { fill: none; stroke: rgba(148, 163, 184, .1); stroke-width: 1; }
.radar-ring:first-child { fill: rgba(148, 163, 184, .012); }
.radar-axis-line { stroke: rgba(148, 163, 184, .14); stroke-width: 1; stroke-dasharray: 2 4; }
.radar-label { fill: #7d8da5; font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; }
.radar-polygon { fill-opacity: .1; stroke-width: 1.7; stroke-linejoin: round; transition: fill-opacity .2s; }
.radar-wrap:hover .radar-polygon { fill-opacity: .14; }
.radar-point { cursor: crosshair; transition: r .15s; }
.radar-point:hover { r: 6; }
.radar-tip { position: fixed; z-index: 95; pointer-events: none; padding: 6px 9px; border-radius: 7px; border: 1px solid rgba(148, 163, 184, .22); background: rgba(6, 10, 17, .95); color: #e8f3ff; font-family: var(--font-mono); font-size: 9px; letter-spacing: .02em; box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .9); backdrop-filter: blur(8px); white-space: nowrap; }
.cmp-radar-hint { display: flex; align-items: flex-start; gap: 5px; margin-top: 6px; font-size: 8.5px; color: var(--text-4); line-height: 1.5; }
.cmp-radar-hint .icon { width: 11px; height: 11px; margin-top: 1px; flex: 0 0 auto; opacity: .55; }

/* settings modal */
.settings-modal .modal-inner { width: min(660px, calc(100vw - 28px)); }
.settings-mode { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 13px; border-radius: 11px; border: 1px solid rgba(139, 92, 246, .18); background: linear-gradient(100deg, rgba(139, 92, 246, .07), rgba(34, 211, 238, .03) 65%, transparent); margin-top: 14px; }
.settings-mode-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, .2); color: var(--text-2); background: rgba(148, 163, 184, .06); white-space: nowrap; }
.settings-mode-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text-4); }
.settings-mode-pill.is-llm { color: #ddd6fe; border-color: rgba(139, 92, 246, .4); background: rgba(139, 92, 246, .13); }
.settings-mode-pill.is-llm::before { background: #a78bfa; box-shadow: 0 0 7px rgba(139, 92, 246, .9); }
.settings-mode-desc { font-size: 10px; color: var(--text-3); }
.settings-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; padding: 9px 11px; border-radius: 9px; border: 1px dashed rgba(148, 163, 184, .16); background: rgba(148, 163, 184, .025); font-size: 9.5px; line-height: 1.6; color: var(--text-3); }
.settings-note .icon { width: 12px; height: 12px; margin-top: 1px; color: var(--cyan); opacity: .7; flex: 0 0 auto; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 16px 0 4px; }
.settings-enable-row { grid-column: 1 / -1; }
.settings-input { width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(148, 163, 184, .16); background: rgba(4, 7, 12, .55); color: var(--text); font-size: 11px; transition: border-color .2s, box-shadow .2s; }
.settings-input::placeholder { color: var(--text-4); }
.settings-input:focus { outline: none; border-color: rgba(34, 211, 238, .5); box-shadow: 0 0 0 3px rgba(34, 211, 238, .09); }
.settings-status { display: flex; align-items: flex-start; gap: 7px; margin: 12px 0 2px; padding: 9px 11px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .16); background: rgba(148, 163, 184, .04); font-size: 10px; line-height: 1.55; color: var(--text-2); }
.settings-status .settings-status-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; background: var(--text-4); }
.settings-status.is-ok { border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .07); color: #a7f3d0; }
.settings-status.is-ok .settings-status-dot { background: var(--emerald); box-shadow: 0 0 7px rgba(52, 211, 153, .9); }
.settings-status.is-error { border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .07); color: #fecdd3; }
.settings-status.is-error .settings-status-dot { background: var(--rose); box-shadow: 0 0 7px rgba(251, 113, 133, .9); }
.settings-status.is-warn { border-color: rgba(251, 191, 36, .28); background: rgba(251, 191, 36, .06); color: #fde68a; }
.settings-status.is-warn .settings-status-dot { background: var(--amber); }
.settings-status.is-loading .settings-status-dot { background: var(--cyan); animation: thinkBounce 1.1s infinite; }
@media (max-width: 900px) {
  .settings-form { grid-template-columns: 1fr; }
  .radar-wrap { min-height: 260px; }
  .cmp-chart-head { flex-direction: column; align-items: flex-start; }
}

/* v3 narrow-header: keep the decision-engine entry reachable below 1280px */
@media (max-width: 1280px) {
  .topbar-right .chip-engine { display: inline-flex; }
}
@media (max-width: 900px) {
  .topbar-right .chip-engine { padding: 0 8px; }
  .topbar-right .chip-engine #decisionText { display: none; }
  .topbar-right .chip-engine .chip-gear { display: none; }
}

/* ============================================================
   v4 — provider templates + decision-source badges
   ============================================================ */
.settings-select {
  width: 100%;
  height: 34px;
  padding: 0 30px 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: rgba(4, 7, 12, .55);
  color: var(--text);
  font-size: 11px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8da5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.settings-select:focus { outline: none; border-color: rgba(34, 211, 238, .5); box-shadow: 0 0 0 3px rgba(34, 211, 238, .09); }
.settings-select option { background: #0a0f18; color: #dbe8f7; }
.settings-provider-info {
  display: flex;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid rgba(139, 92, 246, .18);
  background: linear-gradient(100deg, rgba(139, 92, 246, .06), rgba(34, 211, 238, .02) 65%, transparent);
}
.provider-info-icon { width: 20px; height: 20px; display: grid; place-items: center; color: #c4b5fd; flex: 0 0 auto; margin-top: 1px; }
.provider-info-icon .icon { width: 13px; height: 13px; }
.provider-info-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.provider-info-main b { font-size: 10.5px; color: #dbe8f7; font-weight: 600; }
.provider-info-main span { font-size: 9.5px; line-height: 1.5; color: var(--text-3); }
.provider-info-main a { font-family: var(--font-mono); font-size: 8.5px; color: #67e8f9; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.provider-info-main a:hover { text-decoration: underline; }
.source-badge {
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: .08em;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid;
  white-space: nowrap;
  cursor: help;
  line-height: 1.5;
}
.source-badge.is-llm { color: #ddd6fe; border-color: rgba(139, 92, 246, .38); background: rgba(139, 92, 246, .13); box-shadow: 0 0 10px -4px rgba(139, 92, 246, .6); }
.source-badge.is-rule { color: var(--text-4); border-color: rgba(148, 163, 184, .2); background: rgba(148, 163, 184, .06); }
.msg-meta .source-badge { margin-left: -1px; }
@media (max-width: 900px) {
  .settings-provider-info { flex-direction: row; }
}
