/* ClaudeBridge console — liquid glass design system.
   Dark, cursor-reactive, animated. All selectors used by index.html + app.js. */
:root {
  --bg: #060a14;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-solid: #0d1424;
  --ink: #e9effb;
  --muted: #93a4c4;
  --line: rgba(255, 255, 255, 0.14);
  --primary: #6d8bff;
  --primary-ink: #ffffff;
  --warn: #fbbf24;
  --danger: #fb7185;
  --ok: #4ade80;
  --a: #7c8cff;
  --b: #22d3ee;
  --c: #c084fc;
  --bg-elev: #111a30;
  --border: rgba(255, 255, 255, 0.14);
  --muted-ink: #b9c6e2;
  --radius: 16px;
  --radius-lg: 20px;
  --t-fast: 0.18s;
  --t-med: 0.28s;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.2, 0.9, 0.2, 1);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --px: 0;
  --py: 0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font-sans);
  font-size: calc(15px * var(--font-scale, 1));
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

/* ---------- living background ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: -2; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.75;
  will-change: transform;
  animation: drift 20s ease-in-out infinite alternate;
}
.o1 { width: 52vmax; height: 52vmax; left: -16vmax; top: -18vmax; background: radial-gradient(circle at 35% 35%, #6d7bff, #3a2fd0 55%, transparent 72%); translate: calc(var(--px) * 70px) calc(var(--py) * 70px); }
.o2 { width: 44vmax; height: 44vmax; right: -14vmax; bottom: -16vmax; background: radial-gradient(circle at 60% 40%, #22d3ee, #0b7aa6 55%, transparent 72%); translate: calc(var(--px) * -90px) calc(var(--py) * -90px); animation-duration: 26s; animation-delay: -6s; }
.o3 { width: 30vmax; height: 30vmax; left: 38%; top: 46%; background: radial-gradient(circle at 50% 50%, #c084fc, #7a2fd0 55%, transparent 72%); opacity: 0.5; translate: calc(var(--px) * 40px) calc(var(--py) * -60px); animation-duration: 23s; animation-delay: -12s; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(5vmax, -4vmax, 0) scale(1.12); } }

.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 3px 3px;
}
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 460px; height: 460px; margin: -230px 0 0 -230px;
  border-radius: 50%; pointer-events: none; z-index: 0; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(150, 175, 255, 0.28), rgba(34, 211, 238, 0.1) 45%, transparent 68%);
  transform: translate(var(--cx, 50vw), var(--cy, 50vh));
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 13, 26, 0.66);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 22px; height: 12px;
  border: 3px solid var(--ink);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, var(--a), var(--b));
  border-color: transparent;
  background-clip: padding-box;
  box-shadow: 0 0 16px rgba(124, 140, 255, 0.7);
  animation: markGlow 4s ease-in-out infinite;
}
@keyframes markGlow { 50% { box-shadow: 0 0 26px rgba(34, 211, 238, 0.85); } }
.brand-name {
  font-size: 17px;
  background: linear-gradient(100deg, #fff 10%, #b9c6ff 45%, #7ee7ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-link {
  position: relative;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: color 0.25s, background 0.25s, border-color 0.25s, transform 0.25s;
}
.nav-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); text-decoration: none; transform: translateY(-1px); }
.nav-link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.32), rgba(34, 211, 238, 0.24));
  border-color: rgba(190, 210, 255, 0.45);
  box-shadow: 0 4px 18px rgba(80, 110, 255, 0.35);
}

/* ---------- shell + signature bridge span ---------- */
.shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.span {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(var(--glass-blur, 24px)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur, 24px)) saturate(170%);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
  animation: rise 0.7s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.span::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.2), transparent 62%);
}
.span:hover::before { opacity: 1; }
.span-node { display: flex; flex-direction: column; gap: 2px; position: relative; }
.span-node-end { text-align: right; }
.span-label {
  font-weight: 700;
  font-size: 16px;
  background: linear-gradient(100deg, #fff 20%, #b9c6ff 60%, #7ee7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.span-sub { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.span-cable { position: relative; height: 28px; display: flex; align-items: center; justify-content: center; }
.span-cable::before {
  content: "";
  position: absolute; inset: 50% 0 auto 0; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(147, 164, 196, 0.7) 0 8px, transparent 8px 14px);
}
.span-cable[data-state="live"]::before {
  background: repeating-linear-gradient(90deg, var(--primary) 0 8px, transparent 8px 14px);
  background-size: 28px 2px;
  animation: flow 0.9s linear infinite;
  box-shadow: 0 0 12px rgba(109, 139, 255, 0.8);
}
.span-cable[data-state="error"]::before { background: var(--danger); }
.span-status {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(8, 12, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.span-cable[data-state="live"] .span-status { border-color: var(--primary); box-shadow: 0 0 14px rgba(109, 139, 255, 0.5); }
.span-cable[data-state="error"] .span-status { border-color: var(--danger); box-shadow: 0 0 14px rgba(251, 113, 133, 0.5); }
@keyframes flow { to { background-position: 28px 0; } }

/* Settings → Glass strength drives --glass-blur (default 24px in the blur declarations below). */
html[data-glass="subtle"] { --glass-blur: 12px; }
html[data-glass="standard"] { --glass-blur: 24px; }
html[data-glass="strong"] { --glass-blur: 36px; }

/* ---------- glass panels ---------- */
.panel {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.028));
  -webkit-backdrop-filter: blur(var(--glass-blur, 24px)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur, 24px)) saturate(170%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
  animation: rise 0.7s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.panel:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 140, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.panel::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 62%);
}
.panel:hover::before { opacity: 1; }
.panel > * { position: relative; }
#view-connected { display: flex; flex-direction: column; gap: 20px; }

.panel-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  background: linear-gradient(100deg, #fff 10%, #b9c6ff 45%, #7ee7ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.panel-subtitle { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.panel-lede { margin: 0; color: var(--muted); font-size: 15px; }
.panel-narrow { max-width: 560px; }

.hint { margin: 0; color: var(--muted); font-size: 13px; }
.hint a { color: var(--b); }
.hint-inline { color: var(--muted); font-weight: 400; font-size: 12px; }
.hint.warn { color: var(--warn); }
.hint.ok { color: var(--ok); }
.hint code { background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 6px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row input { flex: 1; min-width: 0; }
.input-row .btn { flex: none; }

input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  outline: none;
  background: rgba(8, 12, 28, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
  font-size: 14px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; cursor: pointer; }
select option { background: var(--surface-solid); color: var(--ink); }
input:focus, select:focus {
  border-color: rgba(140, 170, 255, 0.85);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(124, 140, 255, 0.22);
}
input::placeholder { color: rgba(147, 164, 196, 0.55); }

/* Item 13: appearance & behaviour preferences (html[data-*] set from app.js; CSS only). */
html[data-theme="light"] {
  --bg: #eef2fa;
  --surface: rgba(13, 26, 51, 0.05);
  --surface-solid: #ffffff;
  --ink: #101a2e;
  --muted: #51617f;
  --line: rgba(16, 26, 46, 0.16);
  --warn: #b45309;
  --danger: #be123c;
  --ok: #15803d;
  color-scheme: light;
}
html[data-theme="light"] body { background: var(--bg); }
html[data-theme="light"] input, html[data-theme="light"] select { box-shadow: inset 0 1px 4px rgba(16, 26, 46, 0.08); }
html[data-theme="light"] input:focus, html[data-theme="light"] select:focus {
  border-color: rgba(109, 139, 255, 0.85);
  box-shadow: inset 0 1px 4px rgba(16, 26, 46, 0.08), 0 0 0 4px rgba(109, 139, 255, 0.2);
}

html[data-density="compact"] body { font-size: 14px; line-height: 1.45; }
html[data-density="compact"] .panel { padding: 16px 20px; }

html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after {
  animation: none !important;
  transition: none !important;
}
html[data-motion="reduced"] { scroll-behavior: auto; }

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.35);
  animation: shake 0.4s ease-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); text-transform: none; letter-spacing: 0; cursor: pointer; }
.check-row input[type="checkbox"] {
  appearance: none;
  flex: none;
  width: 20px; height: 20px;
  padding: 0;
  margin: 2px 0 0;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(8, 12, 28, 0.5);
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.check-row input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--a), var(--b));
  border-color: transparent;
  box-shadow: 0 0 12px rgba(124, 140, 255, 0.6);
}
.check-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-row span b { font-weight: 650; }

/* segmented mode toggle */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: none; margin: 0; padding: 0; }
.seg legend { padding: 0; margin-bottom: 8px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.seg-opt span {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 28, 0.35);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s;
  font-size: 14px;
}
.seg-opt span b { display: block; font-weight: 650; }
.seg-opt span small { color: var(--muted); font-size: 12px; }
.seg-opt span:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.06); }
.seg-opt input:checked + span {
  border-color: rgba(190, 210, 255, 0.6);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.25), rgba(34, 211, 238, 0.16));
  box-shadow: 0 0 0 1px rgba(124, 140, 255, 0.4), 0 8px 24px rgba(80, 110, 255, 0.28);
}
.seg-opt input:focus-visible + span { outline: 2px solid var(--a); outline-offset: 2px; }

.flag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.advanced-services, .advanced-controls {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(8, 12, 28, 0.3);
  padding: 14px 18px;
}
.advanced-services > summary, .advanced-controls > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.advanced-services > summary::-webkit-details-marker, .advanced-controls > summary::-webkit-details-marker { display: none; }
.advanced-services > summary::before, .advanced-controls > summary::before {
  content: "›";
  display: inline-block;
  color: var(--b);
  font-size: 18px;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.advanced-services[open] > summary::before, .advanced-controls[open] > summary::before { transform: rotate(90deg); }
.advanced-services > summary:hover, .advanced-controls > summary:hover { color: #fff; }
.advanced-services > :not(summary), .advanced-controls > :not(summary) { animation: rise 0.45s cubic-bezier(0.2, 0.9, 0.2, 1) both; }

.local-pc {
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.05);
  padding: 16px 18px;
}
.local-pc h3 { margin: 0 0 6px; font-size: 15px; }

/* ---------- ngrok settings (Local PC anywhere) ---------- */
.ngrok-step { margin: 18px 0 6px; font-size: 15px; }
.ngrok-cmd {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(8, 12, 28, 0.55);
  border: 1px solid rgba(34, 211, 238, 0.25);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 22px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease-out, box-shadow 0.25s, filter 0.25s, opacity 0.25s;
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 30px rgba(80, 110, 255, 0.35); }
.btn:active { transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: default; filter: none; }
.btn-primary {
  border-color: rgba(190, 210, 255, 0.55);
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.9), rgba(34, 211, 238, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 30px rgba(70, 110, 255, 0.45);
}
.btn-ghost { background: rgba(255, 255, 255, 0.04); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-danger {
  border-color: rgba(251, 113, 133, 0.5);
  color: #ffd4da;
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.28), rgba(190, 40, 80, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px rgba(251, 113, 133, 0.25);
}
.btn-link { border: none; background: none; box-shadow: none; color: var(--muted); text-decoration: underline; padding: 8px 4px; }
.btn-link:hover { color: var(--ink); filter: none; box-shadow: none; }
.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.45);
  animation: rippleAnim 0.65s ease-out forwards;
}
@keyframes rippleAnim { to { transform: scale(1); opacity: 0; } }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- credentials + meta ---------- */
.creds { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.cred {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(8, 12, 28, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.cred:hover { border-color: rgba(140, 170, 255, 0.5); box-shadow: 0 0 24px rgba(124, 140, 255, 0.15); }
.cred dt { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cred dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cred code {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}
.cred-actions { display: flex; gap: 8px; flex: none; }
.is-masked { filter: blur(7px); transition: filter 0.25s; user-select: none !important; }

.meta-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(8, 12, 28, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.25s, border-color 0.25s;
}
.meta:hover { transform: translateY(-2px); border-color: rgba(140, 170, 255, 0.45); }
.meta-k { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.meta-v { font-family: var(--font-mono); font-size: 13px; word-break: break-word; }
.meta-sub { font-size: 11px; color: var(--b); font-family: var(--font-mono); }

/* ---------- logs + provider rows ---------- */
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.log li, .log:empty::before {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(8, 12, 28, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: rise 0.35s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  word-break: break-word;
}
.log:empty::before { content: "No activity yet. Press Test bridge."; color: var(--muted); }
.log .ok { color: var(--ok); }
.log .err { color: var(--danger); }
.log .warn { color: var(--warn); }
.log .info { color: var(--b); }

.provider-list { max-height: none; }
.provider-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "badge meta del";
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(8, 12, 28, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.provider-row:hover {
  transform: translateX(3px);
  border-color: rgba(140, 170, 255, 0.45);
  box-shadow: 0 6px 20px rgba(80, 110, 255, 0.2);
}
.provider-badge {
  grid-area: badge;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 2px 10px rgba(124, 140, 255, 0.4);
}
.provider-meta { grid-area: meta; font-size: 13px; color: var(--ink); min-width: 0; word-break: break-word; }
.provider-id { grid-area: id; font-family: var(--font-mono); font-size: 11px; color: var(--muted); max-width: 100%; }
@media (max-width: 560px) {
  .provider-list li.provider-row { grid-template-areas: "badge badge" "meta meta" "id del"; grid-template-columns: 1fr auto; }
  .provider-list li.provider-row > .provider-badge { grid-area: badge; }
  .provider-list li.provider-row > .provider-meta { grid-area: meta; }
  .provider-list li.provider-row > .provider-id { grid-area: id; max-width: 100%; }
  .provider-list li.provider-row > button { grid-area: del; justify-self: start; }
}

/* ---------- dialog + toast ---------- */
.dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(19, 27, 50, 0.92), rgba(10, 15, 30, 0.92));
  -webkit-backdrop-filter: blur(var(--glass-blur, 24px)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur, 24px)) saturate(170%);
  color: var(--ink);
  padding: 26px;
  max-width: 440px;
  width: calc(100vw - 40px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.dialog::backdrop { background: rgba(4, 7, 15, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog[open] { animation: dialogIn 0.35s cubic-bezier(0.2, 0.9, 0.2, 1); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(18px) scale(0.96); filter: blur(4px); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 50;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(19, 27, 50, 0.9), rgba(10, 15, 30, 0.9));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), 0 0 24px rgba(124, 140, 255, 0.2);
  animation: toastIn 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
  max-width: calc(100vw - 40px);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(0.95); } }

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 1;
  padding: 18px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(9, 13, 26, 0.4);
}

/* ---------- entrance ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
.fx-in { opacity: 0; transform: translateY(16px) scale(0.99); transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1); }
.fx-in.fx-ready { opacity: 1; transform: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.28); }
::selection { background: rgba(124, 140, 255, 0.45); color: #fff; }

@media (max-width: 720px) {
  .topbar { flex-direction: column; gap: 10px; padding: 14px 16px; }
  .topbar-actions { justify-content: center; }
  .shell { padding: 22px 14px 40px; }
  .panel { padding: 20px 18px; }
  .span { grid-template-columns: 1fr; gap: 10px; text-align: center; }
  .span-node-end { text-align: center; }
  .cred { grid-template-columns: 1fr; }
  .big-actions .btn { width: 100%; }
}

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

/* ==========================================================================
   EXTENDED PROVIDERS — collapsed-by-default grid (expand/collapse animated)
   ========================================================================== */
.extended-providers {
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  overflow: hidden;
  transition: box-shadow var(--t-med), border-color var(--t-med), transform var(--t-med);
}
.extended-providers:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  box-shadow: var(--shadow-soft);
}
.extended-providers > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: var(--ink);
  user-select: none;
  position: relative;
  overflow: hidden;
  list-style: none;
}
.extended-providers > summary::-webkit-details-marker { display: none; }
/* sheen sweep across the summary row on hover */
.extended-providers > summary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, color-mix(in srgb, var(--primary) 14%, transparent) 50%, transparent 68%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease-out);
  pointer-events: none;
}
.extended-providers > summary:hover::after { transform: translateX(120%); }
.ep-title { flex: 1; }
.ep-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #9333ea));
  box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 45%, transparent);
  animation: ep-pulse 2.6s ease-in-out infinite;
}
@keyframes ep-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.ep-arrow {
  font-size: 12px;
  color: var(--muted-ink);
  transition: transform var(--t-med) var(--ease-spring);
}
.extended-providers[open] > summary .ep-arrow { transform: rotate(90deg); }
.extended-providers[open] { box-shadow: var(--shadow-lift); }
.extended-grid { padding: 4px 18px 18px; }
.ext-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted-ink);
}
.ext-sid { margin-top: 8px; }

/* staggered pop-in for the provider fields when the block opens */
details[open] > [data-stagger] > [data-stagger-item],
details[open] > * > [data-stagger-item] {
  animation: stagger-in 0.5s var(--ease-spring) both;
}
details[open] > [data-stagger] > [data-stagger-item]:nth-child(1) { animation-delay: 0.02s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(2) { animation-delay: 0.05s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(3) { animation-delay: 0.08s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(4) { animation-delay: 0.11s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(5) { animation-delay: 0.14s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(6) { animation-delay: 0.17s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(7) { animation-delay: 0.20s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(8) { animation-delay: 0.23s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(9) { animation-delay: 0.26s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(10) { animation-delay: 0.29s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(11) { animation-delay: 0.32s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(12) { animation-delay: 0.35s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(13) { animation-delay: 0.38s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(14) { animation-delay: 0.41s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(15) { animation-delay: 0.44s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(16) { animation-delay: 0.47s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(17) { animation-delay: 0.50s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(18) { animation-delay: 0.53s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(19) { animation-delay: 0.56s; }
details[open] > [data-stagger] > [data-stagger-item]:nth-child(20) { animation-delay: 0.59s; }
@keyframes stagger-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* filled extended fields get a "sealed" glow */
.ext-field input:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.ext-field.is-filled input {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

/* ==========================================================================
   ANIMATION UPGRADES — keyframes, reveals, nav glow, sheens
   ========================================================================== */
@keyframes float-slow {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33% { transform: translate3d(18px, -22px, 0) rotate(1.5deg); }
  66% { transform: translate3d(-14px, 12px, 0) rotate(-1deg); }
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes shimmer-x {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}
@keyframes pop-check {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); opacity: 1; }
}

/* view reveal — every route switch cascades in */
.view-enter { animation: view-in 0.45s var(--ease-out) both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.view-enter .panel { animation: panel-in 0.55s var(--ease-spring) both; }
.view-enter .panel:nth-child(1) { animation-delay: 0.03s; }
.view-enter .panel:nth-child(2) { animation-delay: 0.07s; }
.view-enter .panel:nth-child(3) { animation-delay: 0.11s; }
.view-enter .panel:nth-child(4) { animation-delay: 0.15s; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* nav links: animated underline glow + magnetic hover */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), #9333ea);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 70%, transparent);
}
.nav-link:hover { transform: translateY(-1px); }

/* buttons: sheen sweep + press physics */
.btn { position: relative; overflow: hidden; transition: transform 0.18s var(--ease-spring), box-shadow 0.25s ease, filter 0.25s ease; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-130%);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(130%); transition: transform 0.7s var(--ease-out); }
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(0) scale(0.97); }

/* panels: cursor tilt handled by fx.js; smooth shadow lift on hover */
.panel { transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease; }
.panel:hover { box-shadow: var(--shadow-lift); }

/* progress bars / meters shimmer while active */
.progress-fill[aria-busy="true"],
.progress-fill.is-busy {
  background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: shimmer-x 1.4s linear infinite;
}

/* success flash for status pills */
.span-ok.flash, .is-success-flash { animation: pop-check 0.5s var(--ease-spring) both; }

/* section header aurora text */
.panel-subtitle { background-clip: text; -webkit-background-clip: text; }
.panel-subtitle.aurora {
  background-image: linear-gradient(90deg, var(--primary), #9333ea, #06b6d4, var(--primary));
  background-size: 300% 100%;
  animation: aurora-slide 7s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes aurora-slide {
  to { background-position: 300% 0; }
}

/* toast: springier entrance */
.toast { animation: toast-spring 0.5s var(--ease-spring) both; }
@keyframes toast-spring {
  0% { opacity: 0; transform: translateY(16px) scale(0.92); }
  65% { opacity: 1; transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* details/summary base animation for the bundled-services block too */
details.advanced-services > summary { cursor: pointer; transition: color var(--t-fast); }
details.advanced-services > summary:hover { color: var(--primary); }

/* ---------- Multi-key & Live MCP Control Portal styles ---------- */
.multi-pat-details { margin-top: 8px; }
.multi-pat-details summary { cursor: pointer; user-select: none; }
.multi-pat-details textarea,
#service-token,
#ctrl-keys {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.24));
  background: var(--bg-elev, rgba(15, 23, 42, 0.6));
  color: inherit;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  resize: vertical;
}
.ctrl-divider {
  border: 0;
  border-top: 1px solid var(--border, rgba(148, 163, 184, 0.18));
  margin: 20px 0;
}
.portal-body .portal-main { max-width: 1120px; margin: 24px auto 64px; padding: 0 18px; }
.portal-hero { margin-bottom: 18px; }
.portal-hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.portal-url-bar { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.portal-url-bar .input { flex: 1; min-width: 240px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.portal-form { display: grid; gap: 10px; margin-top: 10px; }
.portal-row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.portal-checks, .portal-toggles { display: grid; gap: 8px; margin: 6px 0; }
.check-inline { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }
.portal-actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.portal-pools { display: grid; gap: 12px; margin-top: 10px; }
.portal-pool-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  background: rgba(15, 23, 42, 0.35);
}
.portal-pool-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.portal-key-list { display: grid; gap: 6px; }
.portal-key-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}
.portal-key-actions { display: flex; gap: 6px; }
.portal-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  margin-left: 6px;
}
.portal-chip-ok { border-color: rgba(16, 185, 129, 0.55); color: #34d399; }
.portal-chip-warn { border-color: rgba(245, 158, 11, 0.65); color: #fbbf24; }
.portal-alert {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-size: 0.9rem;
}
.portal-alert[data-kind="ok"] { border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
.portal-alert[data-kind="error"] { border-color: rgba(239, 68, 68, 0.6); color: #fca5a5; }
.portal-pre {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.65);
  max-height: 220px;
  overflow: auto;
  font-size: 0.8rem;
}
.portal-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.btn-xs { padding: 4px 8px; font-size: 0.76rem; }
.btn-sm { padding: 6px 12px; font-size: 0.84rem; }
.input-sm { padding: 4px 8px; font-size: 0.82rem; width: auto; }


/* ==========================================================================
   MOBILE / LITE PERFORMANCE (audit M-01, M-08)
   ==========================================================================
   `html[data-lite="on"]` is set by js/fx.js for low-end / touch / save-data
   devices and by the Settings toggle. It removes the effects that keep the GPU
   busy on a phone: blurred orbs, grain, backdrop-filter, entrance animations
   and the cursor glow. Content off-screen is skipped entirely. */

@media (max-width: 720px) {
  /* Cheaper glass on small screens: still frosted, far less to blur. */
  .panel, .topbar, .dialog, .toast { -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); }
  .orb { filter: blur(48px); }
}

html[data-lite="on"] .bg,
html[data-lite="on"] .grain,
html[data-lite="on"] .cursor-glow { display: none !important; }

html[data-lite="on"] .topbar,
html[data-lite="on"] .panel,
html[data-lite="on"] .dialog,
html[data-lite="on"] .toast,
html[data-lite="on"] .extended-providers,
html[data-lite="on"] .cred,
html[data-lite="on"] .meta,
html[data-lite="on"] .provider-row {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

/* Opaque surfaces so removing the blur does not hurt legibility. */
html[data-lite="on"] .panel,
html[data-lite="on"] .dialog,
html[data-lite="on"] .toast { background: var(--surface-solid); }
html[data-lite="on"] .topbar { background: var(--bg); }

/* No 3D tilt, no magnetic translate, no entrance animation. */
html[data-lite="on"] .panel,
html[data-lite="on"] .span,
html[data-lite="on"] .btn { transform: none !important; }
html[data-lite="on"] .panel,
html[data-lite="on"] .span,
html[data-lite="on"] .advanced-services > :not(summary),
html[data-lite="on"] .advanced-controls > :not(summary) { animation: none !important; }
html[data-lite="on"] .fx-in { opacity: 1 !important; transform: none !important; transition: none !important; }
html[data-lite="on"] .brand-mark { animation: none !important; }
html[data-lite="on"] .span-cable[data-state="live"] .span-status { animation: none !important; }

/* System fonts: skip the two Google font downloads in lite mode. */
html[data-lite="on"] { --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* Skip layout/paint of far-off-screen panels until they are scrolled to. */
.panel, .span { content-visibility: auto; contain-intrinsic-size: auto 520px; }

#live-active-tools-container { margin-top: 1rem; }

/* Agent collaboration console (#/collab, js/collab-panel.js) */
.collab-gap { margin-top: 10px; }
.collab-block { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.collab-block > .panel-subtitle { margin-bottom: 2px; }
.collab-block textarea { width: 100%; min-height: 4.5em; resize: vertical; }
.collab-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.collab-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.collab-card-head b { overflow-wrap: anywhere; }
.collab-card .btn-xs { align-self: flex-start; }
.collab-chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.collab-chip.is-stale { color: var(--warn); border-color: var(--warn); }
.collab-msg.is-urgent { border-left: 2px solid var(--danger); }
.collab-sub { margin: 8px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.collab-progress { display: flex; flex-direction: column; gap: 8px; }
.collab-progress-row { display: flex; flex-direction: column; gap: 4px; }
.collab-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.collab-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--b), var(--ok)); transition: width 0.4s var(--ease-out); }
.collab-feed { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding: 4px; }
.collab-msg { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); overflow-wrap: anywhere; font-size: 14px; }
.collab-msg.is-progress { color: var(--muted); border-left: 2px solid var(--b); }
.collab-compose { display: flex; flex-direction: column; gap: 8px; }
.collab-compose .input-row label.hint { margin: 0; align-self: center; }
@media (prefers-reduced-motion: reduce) { .collab-bar > span { transition: none; } }
