/* =========================================================
   TRIBAL · BIO — platform design system
   Palette + typography pulled from the pitch deck.
   ========================================================= */

:root {
  --cream:        #FFFFFF;
  --cream-2:      #FAFAFA;
  --cream-card:   #F5F5F7;
  --cream-deep:   #EDEDF0;
  --cream-line:   #E5E5EA;

  --ink:          #1D1D1F;
  --ink-soft:     #3A3A3C;
  --ink-mute:     #6E6E73;

  --orange:       #0071E3;
  --orange-soft:  #4D9FFF;
  --sage:         #0071E3;

  --terminal:     #141310;
  --terminal-2:   #1C1B17;
  --terminal-line:#2A2822;
  --terminal-text:#E8E1D0;
  --terminal-mute:#8B8475;

  --serif:  "Instrument Serif", "EB Garamond", Georgia, serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:   "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --radius:     14px;
  --radius-sm:  10px;
  --radius-lg:  20px;

  --shadow-card: 0 1px 0 rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.06);
  --shadow-soft: 0 8px 30px rgba(0,0,0,0.06);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

em {
  font-style: normal;
  color: var(--sage);
  font-weight: 500;
}

/* =========================================================
   Atoms
   ========================================================= */
.eyebrow,
.card-eyebrow,
.side-label,
.greeting-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-weight: 400;
}
.side-label {
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.greeting-eyebrow { color: var(--ink-mute); margin-bottom: 14px; }

.dot {
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* =========================================================
   Top bar + footer (landing + login)
   ========================================================= */
.top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 48px 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.brand-wifi { color: var(--ink); }
.brand-text { line-height: 1; }
.brand-dot { color: var(--orange); margin: 0 2px; }

.top-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  font-size: 11px;
}
.back-home { color: var(--ink-mute); }
.back-home:hover { color: var(--ink); }

.bottom-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 48px 28px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.1;
}
.foot-page { text-align: right; }

/* =========================================================
   LANDING
   ========================================================= */
.landing-nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.landing-nav a {
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.landing-nav a:hover { color: var(--ink); }
.landing-nav .nav-active {
  color: var(--ink);
  border-color: var(--orange);
}
.landing-nav .nav-mute { color: var(--ink-mute); }
.landing-nav .nav-cta {
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 6px 12px;
  border-radius: 999px;
  border-bottom: 1px solid var(--orange);
}
.landing-nav .nav-cta:hover {
  background: var(--orange);
  color: var(--cream);
}

.page-landing .landing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding: 56px 64px 48px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.landing-hero { max-width: 920px; }

.hero-display {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  color: var(--ink);
}
.hero-display em { color: var(--sage); }

.hero-sub {
  max-width: 56ch;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* ----- Feature card with gradient artwork ----- */
.feature-card {
  display: block;
  width: 100%;
  color: var(--ink);
  transition: transform .2s ease;
}
.feature-card:hover { transform: translateY(-2px); }
.feature-card:hover .feature-link .arrow { transform: translateX(3px); }

.feature-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  border-radius: 22px;
  overflow: hidden;
  background: #07060A;
  box-shadow: var(--shadow-soft);
}

/* Gradient blobs, softly blurred */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.95;
  pointer-events: none;
}
.blob-orange {
  width: 42%;
  height: 70%;
  top: -10%;
  left: -8%;
  background: radial-gradient(circle, #2E8DFF 0%, rgba(46,141,255,0) 70%);
}
.blob-pink {
  width: 55%;
  height: 90%;
  top: -10%;
  left: 24%;
  background: radial-gradient(circle, #E36AB3 0%, rgba(227,106,179,0) 65%);
}
.blob-blue {
  width: 40%;
  height: 75%;
  top: -8%;
  right: 6%;
  background: radial-gradient(circle, #4A8BD9 0%, rgba(74,139,217,0) 68%);
}
.blob-sage {
  width: 32%;
  height: 60%;
  bottom: -12%;
  right: -6%;
  background: radial-gradient(circle, #7FA474 0%, rgba(127,164,116,0) 70%);
}

/* Grain / noise overlay */
.feature-art .noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: overlay;
  opacity: 0.55;
  pointer-events: none;
}

.feature-overlay {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 28px;
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: #F6EFE1;
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.feature-overlay em { color: #F4C08A; }

.feature-meta {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  padding: 26px 4px 0;
  align-items: start;
}
.feature-title {
  font-family: var(--sans);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
  max-width: 26ch;
}
.feature-meta-right { display: flex; flex-direction: column; gap: 10px; }
.feature-kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}
.feature-kicker .orange-text { color: var(--orange); font-weight: 500; }
.feature-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}
.feature-link {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 6px 0 0;
}
.feature-link .arrow { display: inline-block; transition: transform .2s; margin-left: 4px; }

/* ----- Value grid ----- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-top: 8px;
  border-top: 1px dashed var(--cream-line);
}
.value-item { padding-top: 22px; }
.value-num {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin: 0 0 10px;
}
.value-head {
  font-family: var(--sans);
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 8px;
}
.value-body {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 36ch;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  background: var(--orange);
  color: var(--cream);
  border: none;
  padding: 14px 22px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: background .15s, transform .05s;
}
.btn-primary:hover { background: #0058B8; }
.btn-primary:active { transform: translateY(1px); }
.btn-arrow { font-size: 16px; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 13px 22px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

/* =========================================================
   LOGIN (solo)
   ========================================================= */
.page-login .login-solo-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  padding: 44px 44px 36px;
  box-shadow: var(--shadow-card);
}
.login-card.solo { box-shadow: var(--shadow-soft); }

.card-title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

.login-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--cream-line);
  padding: 10px 2px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
}
.field input::placeholder { color: var(--ink-mute); }
.field input:focus { border-color: var(--orange); }

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.remember { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.remember input { accent-color: var(--orange); }
.forgot:hover { color: var(--ink); }

.sso-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-mute);
  font-size: 10px;
  letter-spacing: 0.2em;
  margin: 12px 0 4px;
}
.sso-divider::before,
.sso-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--cream-line);
}

.tiny-note {
  margin-top: 18px;
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.5;
}
.tiny-note a { color: var(--orange); }

/* =========================================================
   APP SHELL (console + project pages)
   ========================================================= */
.page-console,
.page-project {
  background: var(--cream);
  overflow: hidden;
  height: 100vh;
}

.app-shell {
  flex: 1;
  display: grid;
  min-height: 0;
  height: 100vh;
}

.page-console .app-shell { grid-template-columns: 300px 1fr; }
.page-project .app-shell { grid-template-columns: 280px 1fr; }

/* ----- Left rail (shared) ----- */
.app-side {
  background: var(--cream-2);
  border-right: 1px solid var(--cream-line);
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.side-brand { padding: 0 4px 6px; }

.btn-new-project {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 11px 14px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: background .15s;
  width: 100%;
  text-align: left;
}
.btn-new-project:hover { background: #2a2620; }
.btn-new-project.as-link {
  background: transparent;
  color: var(--ink-soft);
  border: 1px dashed var(--cream-line);
}
.btn-new-project.as-link:hover {
  background: rgba(20,17,12,0.04);
  color: var(--ink);
  border-style: solid;
}
.btn-new-project .plus {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1;
  width: 14px;
  text-align: center;
}

.side-section { display: flex; flex-direction: column; gap: 4px; }
.side-section-foot { margin-top: 4px; }

.project-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

.project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 10px;
  transition: background .15s;
  color: var(--ink);
}
.project-item:hover { background: rgba(20,17,12,0.05); }
.project-item.active { background: var(--cream); }

.project-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.marker-orange { background: var(--orange); }
.marker-sage   { background: var(--sage); }

.project-meta { display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.project-name-sm {
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-sub-sm {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item {
  display: block;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.recent-item:hover { background: rgba(20,17,12,0.04); color: var(--ink); }

.side-account {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 10px;
  border-top: 1px solid var(--cream-line);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  flex-shrink: 0;
}
.account-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.account-name {
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.account-signout,
.account-restart {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-mute);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .15s;
}
.account-signout:hover { color: var(--orange); }
.account-restart:hover { color: #C8362A; }
.account-sep {
  color: var(--cream-line);
  font-size: 10px;
  user-select: none;
}

/* =========================================================
   CONSOLE (Claude-style)
   ========================================================= */
.console-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.console-topline {
  padding: 18px 36px;
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--cream-line);
}
.crumb-mono { font-family: var(--mono); }

.console-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 36px 80px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

.greeting {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  text-align: center;
}
.greeting-sub {
  max-width: 48ch;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 36px;
}

.prompt-box {
  width: 100%;
  background: var(--cream-card);
  border: 1px solid var(--cream-line);
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-soft);
  transition: border-color .15s, box-shadow .15s;
}
.prompt-box:focus-within {
  border-color: var(--orange);
  box-shadow: 0 8px 30px rgba(200,86,42,0.12);
}

.prompt-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  min-height: 68px;
}
.prompt-input::placeholder { color: var(--ink-mute); }

.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.prompt-hints { display: flex; gap: 8px; flex-wrap: wrap; }
.hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--cream-line);
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hint-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--orange);
}

.btn-send-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--orange);
  color: #fff;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .05s;
}
.btn-send-round:hover { background: #0058B8; }
.btn-send-round:active { transform: translateY(1px); }

.suggestion-grid {
  margin-top: 36px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.suggestion-card {
  background: var(--cream-card);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 18px 18px 16px;
  text-align: left;
  transition: border-color .15s, transform .1s, background .15s;
}
.suggestion-card:hover { border-color: var(--orange); background: var(--cream-deep); }
.suggestion-tag {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin: 0 0 8px;
}
.suggestion-title {
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}
.suggestion-title em { color: var(--sage); }

/* =========================================================
   PROJECT WORKSPACE (Slack-style)
   ========================================================= */
.channel-rail {
  background: var(--cream-card);
  border-right: 1px solid var(--cream-line);
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
}

/* Top row: brand + small "back to console" link, sit on the same line */
.channel-rail .rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 4px;
}
.back-to-console {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 5px 8px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.back-to-console:hover { background: rgba(0,113,227,0.06); color: var(--orange); }

/* Account section pinned to the bottom of the rail */
.channel-rail .side-account { margin-top: auto; }

.project-head {
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--cream-line);
}
.project-tag {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin: 0 0 6px;
  text-transform: uppercase;
}
.project-name {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  margin: 0 0 10px;
  color: var(--ink);
}
.project-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(139,155,122,0.28);
}

.channel-list { display: flex; flex-direction: column; gap: 2px; }
.channel-item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s;
}
.channel-item:hover { background: rgba(20,17,12,0.05); color: var(--ink); }
.channel-item.active {
  background: var(--ink);
  color: var(--cream);
}
.channel-item.active .hash { color: var(--orange); }
.hash { color: var(--ink-mute); font-weight: 500; }

.member-list { display: flex; flex-direction: column; gap: 4px; }
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .15s;
}
.member-row:hover { background: rgba(20,17,12,0.04); }
.member-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}
.member-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}
.member-info .member-name {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}
.member-info .member-role {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.presence {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 2px rgba(139,155,122,0.3);
}

/* ----- Main channel pane ----- */
.channel-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--cream);
}

.channel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--cream-line);
  background: var(--cream);
}
.channel-title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 28px;
  margin: 0;
  color: var(--ink);
}
.channel-title .hash { color: var(--orange); margin-right: 2px; }
.channel-topic {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-mute);
  max-width: 70ch;
}

.channel-actions { display: flex; gap: 8px; }
.channel-actions .chip {
  background: transparent;
  border: 1px solid var(--cream-line);
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color .15s, color .15s;
}
.channel-actions .chip:hover { border-color: var(--orange); color: var(--ink); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.chip-arrow { color: var(--orange); }

.message-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 32px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.api-error-banner {
  margin: 12px 32px 0;
  padding: 12px 14px 14px;
  border: 1px solid #E5484D;
  background: #FFF1F1;
  color: #5A1116;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: 0 1px 0 rgba(229, 72, 77, 0.15);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}
.api-error-banner__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.api-error-banner__tag {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 10.5px;
  color: #FFFFFF;
  background: #E5484D;
  padding: 2px 8px;
  border-radius: 3px;
}
.api-error-banner__time {
  font-size: 11px;
  color: #8A2A2F;
  margin-right: auto;
}
.api-error-banner__close {
  background: transparent;
  border: 0;
  color: #5A1116;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.api-error-banner__close:hover { background: rgba(229, 72, 77, 0.15); }
.api-error-banner__row { margin: 2px 0; }
.api-error-banner__row b { font-weight: 600; }
.api-error-banner__msg {
  white-space: pre-wrap;
  word-break: break-word;
}
.api-error-banner__hint {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(229, 72, 77, 0.10);
  border-left: 3px solid #E5484D;
  border-radius: 0 4px 4px 0;
  color: #4A0E12;
}
.api-error-banner__details {
  margin-top: 8px;
}
.api-error-banner__details summary {
  cursor: pointer;
  color: #8A2A2F;
  font-size: 11.5px;
  user-select: none;
}
.api-error-banner__details pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: #2C0B0E;
  color: #FFD3D5;
  border-radius: 6px;
  font-size: 11.5px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.api-error-banner__foot {
  margin-top: 8px;
  font-size: 11.5px;
  color: #8A2A2F;
}
.api-error-banner__foot code {
  background: rgba(229, 72, 77, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.msg-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.msg-body { flex: 1; min-width: 0; }
.msg-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 3px;
}
.msg-who {
  font-family: var(--sans);
  font-size: 18px;
  color: var(--ink);
}
.msg-time {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.msg-followup {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(0, 113, 227, 0.10);
  color: #0071E3;
  border: 1px solid rgba(0, 113, 227, 0.22);
}
.msg-followup-row[title*="Blocked"] .msg-followup,
.msg-followup-row .msg-followup[title*="Blocked"] {
  background: rgba(200, 86, 42, 0.10);
  color: var(--orange);
  border-color: rgba(200, 86, 42, 0.22);
}
.msg-crosspost {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(20, 17, 12, 0.05);
  color: var(--ink-mute);
  border: 1px dashed rgba(20, 17, 12, 0.18);
}
.msg-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}
/* ---- Collapsible team-discussion block (the debate behind an answer) ---- */
.thought-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 2px solid var(--cream-line);
  padding-left: 16px;
}
.thought-group.is-collapsed { gap: 0; }
.thought-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream-card);
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  transition: background 120ms ease, border-color 120ms ease;
}
.thought-toggle:hover { background: var(--cream-deep); border-color: var(--ink-mute); }
.thought-caret { font-size: 10px; color: var(--ink-mute); }
.thought-label { color: var(--ink-soft); }
.thought-action { color: var(--orange); font-weight: 500; letter-spacing: 0.01em; }
.thought-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.thought-group.is-collapsed .thought-body { display: none; }

/* ---- Synthesised final answer — the message the user keeps ---- */
.msg-row.msg-synthesis {
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.05), rgba(0, 113, 227, 0.015));
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
}
.msg-synth-badge {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(0, 113, 227, 0.12);
  color: var(--orange);
  border: 1px solid rgba(0, 113, 227, 0.25);
}

.msg-text strong { color: var(--orange); font-weight: 600; }
.msg-text em     { color: var(--ink-soft); font-style: italic; }
.msg-text a      { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }
.msg-text a:hover { color: var(--orange-soft); }

/* Tight vertical rhythm — first/last child shouldn't push the bubble. */
.msg-text > :first-child { margin-top: 0; }
.msg-text > :last-child  { margin-bottom: 0; }

.msg-text p {
  margin: 0 0 8px;
}

.msg-text h1,
.msg-text h2,
.msg-text h3,
.msg-text h4 {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin: 14px 0 6px;
  letter-spacing: -0.005em;
}
.msg-text h1 { font-size: 16px; }
.msg-text h2 { font-size: 14.5px; }
.msg-text h3 { font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-mute); }
.msg-text h4 { font-size: 13px;   color: var(--ink-soft); }

.msg-text ul,
.msg-text ol {
  margin: 6px 0 10px;
  padding-left: 22px;
}
.msg-text li        { margin: 3px 0; }
.msg-text li > p    { margin: 0 0 4px; }
.msg-text ul ul,
.msg-text ol ol,
.msg-text ul ol,
.msg-text ol ul     { margin: 4px 0; }

.msg-text ul li::marker { color: var(--orange); }
.msg-text ol li::marker { color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* Task-list checkboxes (GFM) */
.msg-text ul li input[type="checkbox"] {
  margin-right: 6px;
  vertical-align: -1px;
  accent-color: var(--orange);
}

.msg-text blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--orange);
  background: rgba(0, 113, 227, 0.04);
  color: var(--ink-soft);
  border-radius: 0 6px 6px 0;
}
.msg-text blockquote > :last-child { margin-bottom: 0; }

.msg-text code {
  font-family: var(--mono, "SF Mono", "Menlo", "Monaco", "Consolas", monospace);
  font-size: 12px;
  background: var(--cream-deep);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--cream-line);
}

.msg-text pre {
  margin: 8px 0 12px;
  padding: 12px 14px;
  background: var(--cream-deep);
  border: 1px solid var(--cream-line);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.55;
}
.msg-text pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--ink);
}

.msg-text hr {
  border: none;
  border-top: 1px solid var(--cream-line);
  margin: 14px 0;
}

/* GFM tables — the "beautifully formatted" bit. Border-collapsed, zebra
   striped, rounded outer corners, monospaced numerics in body cells. */
.msg-text table {
  width: 100%;
  max-width: 100%;
  margin: 10px 0 12px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--cream-line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 12.5px;
  background: var(--cream);
}
.msg-text table th,
.msg-text table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--cream-line);
  vertical-align: top;
}
.msg-text table th {
  background: var(--cream-card);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--cream-line);
}
.msg-text table tbody tr:nth-child(even) td {
  background: var(--cream-2);
}
.msg-text table tbody tr:last-child td { border-bottom: none; }
.msg-text table td {
  font-variant-numeric: tabular-nums;
}
.msg-text table td:first-child,
.msg-text table th:first-child { padding-left: 14px; }
.msg-text table td:last-child,
.msg-text table th:last-child  { padding-right: 14px; }

/* Agent-generated graph panels, matched to the live Tribal platform charts. */
.msg-graphs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.agent-chart {
  display: block;
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: 14px;
  padding: 0;
  max-width: 580px;
  box-shadow: 0 1px 0 rgba(20,17,12,0.04);
  overflow: hidden;
  animation: msg-fade-in 220ms ease-out;
}
.chart-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--cream-card);
  border-bottom: 1px solid var(--cream-line);
  font-family: var(--sans);
}
.chart-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  flex: 0 0 auto;
}
.chart-label {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-author {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.chart-svg {
  display: block;
  width: 100%;
  height: 220px;
  padding: 10px 14px 6px;
  background: var(--cream);
  box-sizing: border-box;
}
.chart-axis {
  stroke: var(--ink-mute);
  stroke-width: 1;
}
.chart-grid {
  stroke: var(--cream-line);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.chart-marker {
  stroke: var(--ink-mute);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0;
  transition: opacity .35s ease 1.8s;
}
.agent-chart.is-shown .chart-marker { opacity: 0.55; }
.chart-marker-label {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink-mute);
  opacity: 0;
  transition: opacity .35s ease 1.9s;
}
.agent-chart.is-shown .chart-marker-label { opacity: 1; }
.chart-tick {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  fill: var(--ink-mute);
  text-anchor: middle;
}
.chart-tick-y { text-anchor: end; }
.chart-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.chart-line-1 { stroke: #0071E3; }
.chart-line-2 { stroke: #D62828; }
.chart-line-3 { stroke: #8B9B7A; }
.agent-chart.is-shown .chart-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s cubic-bezier(.5,.1,.2,1) 0.2s;
}
.agent-chart.is-shown .chart-line-2 { transition-delay: 0.55s; }
.agent-chart.is-shown .chart-line-3 { transition-delay: 0.9s; }
.chart-dot {
  fill: #0071E3;
  opacity: 0;
}
.chart-dot-2 { fill: #D62828; }
.chart-dot-3 { fill: #8B9B7A; }
.agent-chart.is-shown .chart-dot {
  opacity: 1;
  transition: opacity .35s ease 1.7s;
}
.agent-chart.is-shown .chart-dot-2 { transition-delay: 2.05s; }
.agent-chart.is-shown .chart-dot-3 { transition-delay: 2.25s; }
.chart-bar {
  opacity: 0;
  transform: scaleY(0.2);
  transform-box: fill-box;
  transform-origin: bottom;
}
.chart-bar-1 { fill: #0071E3; }
.chart-bar-2 { fill: #D62828; }
.chart-bar-3 { fill: #8B9B7A; }
.agent-chart.is-shown .chart-bar {
  opacity: 0.9;
  transform: scaleY(1);
  transition: opacity .35s ease .25s, transform .7s cubic-bezier(.5,.1,.2,1) .25s;
}
.agent-chart.is-shown .chart-bar-2 { transition-delay: .4s; }
.agent-chart.is-shown .chart-bar-3 { transition-delay: .55s; }
.chart-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 18px 14px;
  border-top: 1px solid var(--cream-line);
  background: var(--cream-card);
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-soft);
}
.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.legend-swatch {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.chart-legend-1 .legend-swatch,
.legend-swatch.chart-legend-1 { background: #0071E3; }
.chart-legend-2 .legend-swatch,
.legend-swatch.chart-legend-2 { background: #D62828; }
.chart-legend-3 .legend-swatch,
.legend-swatch.chart-legend-3 { background: #8B9B7A; }
.chart-note {
  flex: 1 1 100%;
  color: var(--ink-mute);
  line-height: 1.45;
}
@media (max-width: 640px) {
  .chart-head { padding: 11px 12px; }
  .chart-label { white-space: normal; line-height: 1.3; }
  .chart-author { display: none; }
  .chart-svg { height: 190px; padding-left: 6px; padding-right: 6px; }
  .chart-foot { padding: 9px 12px 12px; }
}

.msg-mine .msg-avatar { background: var(--ink) !important; }

.channel-composer {
  padding: 14px 32px 20px;
  background: var(--cream);
  border-top: 1px solid var(--cream-line);
}
.composer-inner {
  background: var(--cream-card);
  border: 1px solid var(--cream-line);
  border-radius: 14px;
  padding: 12px 14px 10px;
  transition: border-color .15s;
}
.composer-inner:focus-within { border-color: var(--orange); }

.channel-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  min-height: 22px;
  max-height: 200px;
}
.channel-input::placeholder { color: var(--ink-mute); }

.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.composer-ico {
  background: transparent;
  border: 1px solid var(--cream-line);
  color: var(--ink-mute);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 15px;
  transition: color .15s, border-color .15s;
}
.composer-ico:hover { color: var(--ink); border-color: var(--ink); }

.btn-send {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background .15s;
}
.btn-send:hover { background: #0058B8; }

.composer-hint {
  margin: 8px 2px 0;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.how-main {
  flex: 1;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 64px 60px;
  display: flex;
  flex-direction: column;
  gap: 88px;
}

.how-intro { max-width: 920px; }
.how-display {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  color: var(--ink);
}
.how-display em { color: var(--sage); }
.how-sub {
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

.section-head {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  color: var(--ink);
}
.section-head em { color: var(--sage); }

/* ----- The stack diagram ----- */
.stack-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 960px;
}
.stack-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  border-radius: var(--radius);
  padding: 28px 30px;
  align-items: start;
}
.stack-top {
  background: var(--terminal);
  color: var(--terminal-text);
  border: 1px solid var(--terminal-line);
}
.stack-top h3 { color: var(--cream); }
.stack-top p  { color: var(--terminal-mute); }

.stack-bottom {
  background: var(--cream-card);
  color: var(--ink);
}
.stack-bottom p { color: var(--ink-soft); }

.stack-row h3 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 30px;
  margin: 0 0 8px;
  line-height: 1.1;
}
.stack-row p {
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
  max-width: 62ch;
}
.stack-tag {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  padding-top: 10px;
}
.stack-tag.mute { color: var(--ink-mute); }

.stack-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.stack-divider::before,
.stack-divider::after {
  content: "";
  height: 1px;
  flex: 0 0 80px;
  background: var(--cream-line);
  margin: 0 14px;
}

/* ----- Capabilities grid ----- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cap-card {
  background: var(--cream-card);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
}
.cap-num {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin: 0 0 14px;
}
.cap-card h3 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 12px;
  line-height: 1.15;
}
.cap-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* ----- Stage row ----- */
.stage-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}
.stage-card {
  background: var(--cream-card);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stage-tag {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin: 0;
}
.stage-card h4 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 22px;
  margin: 0;
  line-height: 1.15;
}
.stage-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.stage-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 26px;
  color: var(--orange);
  padding: 0 4px;
}

/* ----- Vision dark card ----- */
.vision-card {
  background: var(--terminal);
  color: var(--terminal-text);
  border-radius: var(--radius-lg);
  padding: 54px 56px 50px;
  position: relative;
  overflow: hidden;
}
.vision-card::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  top: -150px;
  right: -120px;
  background: radial-gradient(circle, rgba(200,86,42,0.35) 0%, rgba(200,86,42,0) 65%);
  filter: blur(60px);
  pointer-events: none;
}
.vision-card::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  bottom: -160px;
  left: -100px;
  background: radial-gradient(circle, rgba(139,155,122,0.3) 0%, rgba(139,155,122,0) 70%);
  filter: blur(55px);
  pointer-events: none;
}
.card-eyebrow.light { color: var(--orange-soft); }
.vision-head {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  color: var(--cream);
  position: relative;
}
.vision-head em { color: var(--sage); }
.vision-body {
  max-width: 66ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--terminal-mute);
  margin: 0 0 32px;
  position: relative;
}
.vision-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}
.btn-primary.on-dark { background: var(--orange); }
.btn-primary.on-dark:hover { background: var(--orange-soft); }
.btn-ghost.on-dark {
  border-color: var(--terminal-mute);
  color: var(--terminal-text);
}
.btn-ghost.on-dark:hover {
  background: var(--terminal-text);
  color: var(--terminal);
}

/* =========================================================
   PLATFORM PAGE
   ========================================================= */
.platform-main {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 64px 60px;
  display: flex;
  flex-direction: column;
  gap: 88px;
}

.platform-hero { max-width: 960px; }

/* Hero image — the apothecary jar */
.jar-section { width: 100%; }
.jar-figure {
  margin: 0;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
  background:
    linear-gradient(180deg, #E9E0CB 0%, #D8C9A7 55%, #B89A6C 100%);
  aspect-ratio: 16 / 9;
}
.jar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Graceful fallback if assets/tribal-jar.jpg isn't present yet */
.jar-image.is-missing {
  visibility: hidden;
}
.jar-figure::after {
  content: "DROP IMAGE AT  assets/tribal-jar.jpg";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(20,17,12,0.35);
  text-align: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
}
.jar-figure:has(.jar-image.is-missing)::after { opacity: 1; }

.jar-caption {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.jar-cap-mono {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ----- Onboarding / intake chat ----- */
.onboard-head { max-width: 920px; margin-bottom: 40px; }

.intake-chat {
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 920px;
}

.intake-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.intake-row.mine { flex-direction: row-reverse; }
.intake-row.mine .intake-body { text-align: left; }

.intake-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.intake-avatar.tribal { background: var(--orange); }
.intake-avatar.you    { background: var(--ink); }

.intake-body {
  background: var(--cream);
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 70%;
  box-shadow: 0 1px 0 rgba(20,17,12,0.04);
}
.intake-row.mine .intake-body { background: var(--ink); color: var(--cream); }
.intake-row.mine .intake-body .intake-who { color: var(--orange-soft); }
.intake-row.mine .intake-body .intake-time { color: rgba(242,237,225,0.5); }
.intake-row.mine .intake-body p { color: var(--cream); }

.intake-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 4px;
}
.intake-who {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}
.intake-time {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.intake-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}
.intake-body p strong { color: var(--orange); font-weight: 500; }
.intake-row.mine .intake-body p strong { color: var(--orange-soft); }

.intake-questions {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.intake-questions li::marker { color: var(--orange); }
.intake-questions strong { color: var(--orange); font-weight: 500; }

/* ----- Team formation grid ----- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.role-card {
  background: var(--cream-card);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background .15s, transform .1s;
}
.role-card:hover { background: var(--cream-deep); }

.role-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
}

.role-card h3 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
.role-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* Always-on metrics strip */
.always-on-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 26px 0 0;
  border-top: 1px dashed var(--cream-line);
}
.ao-item { padding-top: 8px; }
.ao-num {
  font-family: var(--sans);
  font-size: 44px;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 8px;
}
.ao-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
  max-width: 28ch;
}

/* ----- Training / moat dark card ----- */
.training-card {
  background: var(--terminal);
  color: var(--terminal-text);
  border-radius: var(--radius-lg);
  padding: 54px 56px 50px;
  position: relative;
  overflow: hidden;
}
.training-card::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(200,86,42,0.28) 0%, rgba(200,86,42,0) 65%);
  filter: blur(60px);
  pointer-events: none;
}

.training-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 48px;
  position: relative;
}
.train-row {
  display: grid;
  grid-template-columns: 190px 1fr 60px;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: var(--terminal-text);
}
.train-row > span:first-child { color: var(--terminal-text); }
.train-row .bar {
  height: 6px;
  background: var(--terminal-line);
  border-radius: 3px;
  overflow: hidden;
}
.train-row .bar > span {
  display: block;
  height: 100%;
  background: var(--orange);
}
.train-row .num {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  color: var(--terminal-mute);
}

/* Term-only training tags (no metrics) — used inside the dark training card */
.training-tags {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.training-tags li {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--terminal-text);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--terminal-line);
  background: rgba(255, 255, 255, 0.03);
  transition: background .15s, border-color .15s, color .15s;
}
.training-tags li:hover {
  background: rgba(0, 113, 227, 0.12);
  border-color: var(--orange);
  color: #FFFFFF;
}

.train-foot {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--terminal-line);
  font-size: 13px;
  line-height: 1.65;
  color: var(--terminal-mute);
  max-width: 72ch;
  position: relative;
}

/* ----- Final CTA ----- */
.platform-cta {
  text-align: center;
  padding: 20px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.platform-cta .section-head { margin: 0; }

/* =========================================================
   CASE STUDIES
   ========================================================= */
.cs-main {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 64px 60px;
  display: flex;
  flex-direction: column;
  gap: 76px;
}

.cs-hero { max-width: 960px; }

/* ----- Stats strip ----- */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--cream-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cs-stat {
  background: var(--cream-card);
  padding: 26px 28px 22px;
}
.cs-stat-num {
  font-family: var(--sans);
  font-size: 44px;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 10px;
}
.cs-stat-num em { color: var(--orange); font-style: italic; }
.cs-stat-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}

/* ----- Portfolio three-card ----- */
.cs-portfolio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cs-asset-card {
  background: #EAF2FF;
  border: 1px solid #D6E4FF;
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .15s, transform .15s, border-color .15s;
}
.cs-asset-card:hover { background: #D9E8FF; border-color: #B9CFFF; transform: translateY(-2px); }

.cs-asset-tag {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin: 0;
  text-transform: uppercase;
}
.cs-asset-card h3 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.cs-asset-card h3 em { color: var(--sage); }
.cs-asset-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.cs-asset-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 6px 0 0;
  padding-top: 14px;
  border-top: 1px dashed #C2D5FF;
}
.cs-asset-meta div { display: flex; flex-direction: column; gap: 2px; }
.cs-asset-meta dt {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.cs-asset-meta dd {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.cs-asset-meta dd.hot { color: var(--orange); }

.cs-asset-open {
  margin-top: 6px;
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}
.cs-asset-open:hover { background: var(--ink); color: var(--cream); }

/* ----- Tab bar ----- */
.cs-tabbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--cream-card);
  border-radius: 14px 14px 0 0;
  border-bottom: 1px solid var(--cream-line);
  overflow: hidden;
}
.cs-tab {
  background: transparent;
  border: none;
  padding: 20px 22px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: background .15s, border-color .2s, color .15s;
  position: relative;
}
.cs-tab + .cs-tab { border-left: 1px solid var(--cream-line); }
.cs-tab:hover { background: var(--cream-deep); color: var(--ink); }
.cs-tab.active {
  background: var(--cream);
  color: var(--ink);
  border-bottom-color: var(--orange);
}
.cs-tab-index {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--orange);
}
.cs-tab-title {
  font-family: var(--sans);
  font-size: 22px;
  line-height: 1.15;
}
.cs-tab-sub {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.cs-tab.active .cs-tab-sub { color: var(--orange); }

/* ----- Panel ----- */
.cs-panel {
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: 36px 40px 40px;
}
.cs-panel[hidden] { display: none; }

/* Enter animation — runs once per activation. Uses transform/opacity only. */
@keyframes cs-enter-anim {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cs-panel.cs-enter { animation: cs-enter-anim 260ms ease-out both; }

.cs-panel-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.cs-panel-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--orange);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.cs-panel-title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  color: var(--ink);
}
.cs-panel-title em { color: var(--sage); }

.cs-block { margin: 0 0 28px; }
.cs-block h4 {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 12px;
}
.cs-block p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
  max-width: 62ch;
}

/* Roles list */
.cs-roles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-roles li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.cs-role-body {
  flex: 1;
  min-width: 0;
}
.cs-role-body strong { color: var(--ink); font-weight: 500; margin-right: 2px; }
.cs-role-body em     { color: var(--sage); }

.role-chip {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--c, var(--orange));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

/* Timeline */
.cs-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.cs-timeline li {
  background: var(--cream-card);
  border-radius: 10px;
  padding: 14px 14px 12px;
  border-left: 3px solid var(--cream-line);
  transition: border-color .15s, background .15s, transform .1s;
  cursor: default;
}
.cs-timeline li:hover {
  background: var(--cream-deep);
  border-left-color: var(--orange);
  transform: translateY(-1px);
}
.cs-tl-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.cs-tl-tag.hot { color: var(--orange); }
.cs-timeline li p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
}
.cs-timeline li p strong { color: var(--orange); font-weight: 500; }

/* Callout */
.cs-callout {
  margin: 28px 0 0;
  padding: 22px 26px;
  background: var(--terminal);
  color: var(--terminal-text);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.cs-callout::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  top: -110px;
  right: -80px;
  background: radial-gradient(circle, rgba(200,86,42,0.28) 0%, rgba(200,86,42,0) 70%);
  filter: blur(40px);
  pointer-events: none;
}
.cs-callout p {
  margin: 0;
  position: relative;
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.35;
  color: var(--cream);
  max-width: 56ch;
}
.cs-callout p em { color: var(--sage); font-style: italic; }

/* Right rail metrics */
.cs-panel-right { position: sticky; top: 24px; }
.cs-metrics {
  background: var(--cream-card);
  border-radius: var(--radius);
  padding: 24px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-metrics-eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cs-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--cream-line);
}
.cs-metric:last-child { border-bottom: none; }
.cs-metric dt {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.cs-metric dd {
  margin: 0;
  font-family: var(--sans);
  font-size: 22px;
  color: var(--ink);
  text-align: right;
}
.cs-metric dd em { color: var(--orange); font-style: italic; }
.cs-metric dd.hot { color: var(--orange); }

/* Cross-asset learnings */
.cs-learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.cs-learn {
  background: var(--cream-card);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-learn-num {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin: 0;
}
.cs-learn h4 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.cs-learn p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .page-project .app-shell { grid-template-columns: 240px 1fr; }

  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-meta { grid-template-columns: 1fr; gap: 18px; }
  .stage-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .stage-arrow { display: none; }

  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .training-grid { grid-template-columns: 1fr; gap: 10px; }
  .always-on-strip { grid-template-columns: repeat(2, 1fr); }

  .cs-panel-grid { grid-template-columns: 1fr; gap: 28px; }
  .cs-panel-right { position: static; }
  .cs-stats { grid-template-columns: repeat(2, 1fr); }
  .cs-portfolio { grid-template-columns: 1fr; }
  .cs-learn-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .top-bar, .bottom-bar { padding-left: 24px; padding-right: 24px; }
  .landing-nav { gap: 16px; font-size: 10.5px; }
  .landing-nav .nav-mute { display: none; }

  .page-landing .landing-main { padding: 40px 24px; gap: 48px; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; gap: 10px; }
  .cap-grid { grid-template-columns: 1fr; }
  .stage-row { grid-template-columns: 1fr; }

  .how-main { padding: 32px 24px; gap: 56px; }
  .stack-row { grid-template-columns: 1fr; padding: 22px; }
  .vision-card { padding: 36px 28px; }

  .platform-main { padding: 32px 24px; gap: 56px; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .train-row { grid-template-columns: 130px 1fr 48px; }
  .training-card { padding: 36px 28px; }
  .intake-chat { padding: 22px; }
  .intake-body { max-width: 85%; }
  .ao-num { font-size: 32px; }

  .cs-main { padding: 32px 24px; gap: 52px; }
  .cs-stats { grid-template-columns: 1fr 1fr; }
  .cs-stat-num { font-size: 34px; }
  .cs-tabbar { grid-template-columns: 1fr; }
  .cs-tab + .cs-tab { border-left: none; border-top: 1px solid var(--cream-line); }
  .cs-panel { padding: 24px 22px 28px; }
  .cs-callout p { font-size: 17px; }

  .feature-overlay {
    left: 22px;
    right: 22px;
    bottom: 20px;
    font-size: clamp(28px, 7vw, 44px);
  }

  .page-console .app-shell { grid-template-columns: 1fr; }
  .page-project .app-shell { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .page-console .channel-rail { display: none; }
  /* On project page, keep the rail visible on mobile (it IS the only sidebar) */
  .console-topline { padding: 14px 20px; }
  .console-center { padding: 40px 20px 60px; }
  .channel-head, .message-feed, .channel-composer { padding-left: 20px; padding-right: 20px; }
  .login-card { padding: 28px; }
  .card-title { font-size: 34px; }
}

/* =========================================================
   Display headings — OpenAI / Apple weight + tracking
   (overrides the legacy serif weight/letter-spacing)
   ========================================================= */
.hero-display,
.feature-overlay,
.feature-title,
.card-title,
.greeting,
.project-name,
.channel-title,
.how-display,
.section-head,
.stack-row h3,
.cap-card h3,
.stage-card p,
.vision-head,
.ao-num,
.cs-stat-num,
.cs-asset-card h3,
.cs-panel-title {
  font-weight: 600;
  letter-spacing: -0.022em;
}

.hero-display,
.feature-overlay,
.how-display {
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.04;
}

/* =========================================================
   New virtual biotech modal
   ========================================================= */
.project-empty {
  margin: 6px 8px 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-mute);
}
.project-empty strong { color: var(--ink); font-weight: 600; }

.recent-list { display: flex; flex-direction: column; gap: 2px; }
.recent-empty {
  margin: 2px 8px 0;
  font-size: 11.5px;
  color: var(--ink-mute);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 36, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 999;
  animation: modal-fade-in 160ms ease-out;
}
.modal-backdrop[hidden] { display: none; }

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-dialog {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--cream-line);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px 32px 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.06);
  animation: modal-pop-in 200ms ease-out;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--ink-mute);
  font-size: 22px;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--cream-deep); color: var(--ink); }

.modal-header { margin-bottom: 22px; }
.modal-eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-weight: 500;
}
.modal-title {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--ink);
}
.modal-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 44ch;
}

.modal-form { display: flex; flex-direction: column; gap: 20px; }

.modal-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-legend {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-optional {
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-mute);
  font-size: 11px;
  font-style: italic;
}
.modal-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-mute);
}

.modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-chips .chip {
  position: relative;
  cursor: pointer;
  user-select: none;
  display: inline-block;
}
.modal-chips .chip input { position: absolute; opacity: 0; pointer-events: none; }
.modal-chips .chip span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--cream-line);
  background: #FFFFFF;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  color: var(--ink-soft);
  transition: background .15s, border-color .15s, color .15s;
}
.modal-chips .chip:hover span { border-color: #B9CFFF; color: var(--ink); }
.modal-chips .chip input:checked + span {
  background: #EAF2FF;
  border-color: var(--orange);
  color: var(--orange);
  font-weight: 500;
}
.modal-chips .chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18); }

.modal-textarea {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--cream-line);
  border-radius: 10px;
  padding: 12px 14px;
  resize: vertical;
  min-height: 56px;
  transition: border-color .15s, box-shadow .15s;
}
.modal-textarea::placeholder { color: var(--ink-mute); }
.modal-textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16);
}

.modal-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 18px;
  border: 1.5px dashed #B9CFFF;
  background: #F4F8FF;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: background .15s, border-color .15s;
}
.modal-dropzone:hover,
.modal-dropzone.is-dragover {
  background: #E5EFFF;
  border-color: var(--orange);
}
.dropzone-icon { color: var(--orange); display: inline-flex; }
.dropzone-text { font-size: 13px; color: var(--ink-soft); }
.dropzone-text strong { color: var(--ink); font-weight: 600; }
.dropzone-hint {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.dropzone-filename {
  margin-top: 4px;
  font-size: 12px;
  color: var(--orange);
  font-weight: 500;
  word-break: break-all;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}
.modal-actions .btn-ghost,
.modal-actions .btn-primary {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 11px 20px;
  border-radius: 999px;
  text-transform: none;
}

/* Loading state */
.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 8px 8px;
  animation: modal-fade-in 200ms ease-out;
}
.modal-loading[hidden] { display: none; }

.spinner-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #E5EFFF;
  border-top-color: var(--orange);
  animation: spin 900ms linear infinite;
  margin-bottom: 18px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-status {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  min-height: 22px;
}

.loading-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  align-self: stretch;
  max-width: 360px;
  margin: 4px auto 0;
}
.loading-steps li {
  font-size: 12.5px;
  color: var(--ink-mute);
  padding: 8px 12px;
  border-radius: 8px;
  background: #F5F5F7;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .2s, color .2s;
}
.loading-steps li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cream-line);
  flex-shrink: 0;
  transition: background .2s, transform .2s;
}
.loading-steps li.is-active {
  background: #EAF2FF;
  color: var(--ink);
  font-weight: 500;
}
.loading-steps li.is-active::before {
  background: var(--orange);
  transform: scale(1.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}
.loading-steps li.is-done {
  color: var(--ink-soft);
}
.loading-steps li.is-done::before {
  background: var(--orange);
}

@media (max-width: 600px) {
  .modal-dialog { padding: 24px 22px 22px; border-radius: 14px; }
  .modal-title { font-size: 22px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
}

/* =========================================================
   Channel — typing indicator + message attachment
   ========================================================= */
.msg-typing,
.msg-reviewing { animation: msg-fade-in 180ms ease-out; }
@keyframes msg-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: #F5F5F7;
  border-radius: 14px;
  margin-top: 4px;
}
.typing-bubble span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-mute);
  opacity: 0.5;
  animation: typing-pulse 1.2s ease-in-out infinite;
}
.typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-pulse {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-3px); opacity: 1; }
}

.review-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(560px, 100%);
  padding: 8px 12px;
  background: #F5F5F7;
  border: 1px solid var(--cream-line);
  border-radius: 14px;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}
.review-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.22);
  animation: review-pulse 1.35s ease-in-out infinite;
}
.msg-reviewing-passed .review-dot {
  background: var(--ink-mute);
  animation: none;
}
.msg-reviewing-answering .review-dot {
  background: #2F8F5B;
  animation: none;
}
.msg-reviewing-error .review-dot {
  background: #E5484D;
  animation: none;
}
@keyframes review-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.22); }
  70%  { box-shadow: 0 0 0 6px rgba(0, 113, 227, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); }
}

/* ---- Agent-generated downloadable files ---- */
.msg-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.msg-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--cream-card);
  border: 1px solid var(--cream-line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.msg-file:hover {
  border-color: rgba(0, 113, 227, 0.45);
  background: var(--cream);
  box-shadow: 0 1px 3px rgba(20, 17, 12, 0.05);
}

.msg-file .file-ext {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 8px;
  font-family: var(--mono, "SF Mono", "Menlo", "Monaco", "Consolas", monospace);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--orange);
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 6px;
  text-transform: uppercase;
}

.msg-file .file-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.msg-file .file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-file .file-summary {
  font-size: 11.5px;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-file .file-size {
  flex: 0 0 auto;
  font-family: var(--mono, "SF Mono", "Menlo", "Monaco", "Consolas", monospace);
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
}

.msg-file .file-download {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 7px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.msg-file .file-download:hover  { background: var(--orange); }
.msg-file .file-download:active { transform: translateY(1px); }
.msg-file .file-download svg    { opacity: 0.9; }

.msg-attachment {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  background: #F4F8FF;
  border: 1px solid #D6E4FF;
  border-radius: 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
  max-width: 460px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.msg-attachment:hover {
  background: #E5EFFF;
  border-color: var(--orange);
  transform: translateY(-1px);
}
.att-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #D6E4FF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
}
.att-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.att-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-sub {
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.att-arrow {
  color: var(--orange);
  font-size: 16px;
  transition: transform .15s;
}
.msg-attachment:hover .att-arrow { transform: translateX(3px); }

/* Pending / generating attachment */
.msg-attachment.is-pending {
  cursor: progress;
  background: #F8FBFF;
  border-style: dashed;
  border-color: #C5DBFF;
  animation: att-pulse 2.2s ease-in-out infinite;
}
.msg-attachment.is-pending:hover {
  transform: none;
  background: #F8FBFF;
  border-color: #C5DBFF;
}
.msg-attachment.is-pending .att-icon {
  background: transparent;
  border-color: transparent;
}
.att-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #DDE9FF;
  border-top-color: var(--orange);
  animation: spin 0.95s linear infinite;
}
.att-status {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--orange);
  font-weight: 500;
  white-space: nowrap;
}
@keyframes att-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.06); }
}

/* "Ready" flash when generation completes */
.msg-attachment.is-just-ready {
  animation: att-ready 1.6s ease-out;
}
@keyframes att-ready {
  0%   { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.35); border-color: var(--orange); background: #E5EFFF; }
  60%  { box-shadow: 0 0 0 8px rgba(0, 113, 227, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); border-color: #D6E4FF; background: #F4F8FF; }
}

/* =========================================================
   Email draft (in-channel preview / approval)
   ========================================================= */
.email-draft {
  margin-top: 12px;
  background: #FFFFFF;
  border: 1px solid var(--cream-line);
  border-radius: 12px;
  padding: 14px 16px 12px;
  max-width: 560px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  animation: msg-fade-in 220ms ease-out;
}

.email-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cream-line);
}
.email-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange);
}
.email-status {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mute);
  padding: 3px 9px;
  border-radius: 999px;
  background: #F5F5F7;
}
.email-draft.is-pending  .email-status { color: var(--orange);   background: #EAF2FF; }
.email-draft.is-sent     .email-status { color: #1F8A4C;          background: #E6F6EC; }
.email-draft.is-declined .email-status { color: #B23A2A;          background: #FBEAE6; }

.email-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
}
.email-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.4;
}
.email-row dt {
  color: var(--ink-mute);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding-top: 2px;
}
.email-row dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}
.email-row:nth-child(3) dd { font-weight: 500; }

.email-body {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #F8F9FB;
  border: 1px solid var(--cream-line);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

.email-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.email-actions .btn-ghost,
.email-actions .btn-primary {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  border-radius: 999px;
  text-transform: none;
}

.email-draft.is-sent .email-body,
.email-draft.is-declined .email-body {
  opacity: 0.75;
}

/* =========================================================
   Channel + team activity indicators
   ========================================================= */
.channel-item,
.member-row {
  position: relative;
}
.channel-item .ch-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.ch-indicator {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  display: inline-block;
}
.ch-busy {
  border: 2px solid rgba(0, 113, 227, 0.22);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.95s linear infinite;
}
.ch-awaiting {
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.45);
  animation: awaiting-pulse 1.6s ease-out infinite;
}
@keyframes awaiting-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(0, 113, 227, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); }
}
.ch-unread {
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: unread-pulse 1.6s ease-out infinite;
}
@keyframes unread-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Team row becomes a clickable button (DM entry point) */
button.member-row {
  background: transparent;
  border: none;
  padding: 8px 8px;
  margin: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .15s;
}
button.member-row:hover { background: rgba(0, 113, 227, 0.06); }
button.member-row.active {
  background: #EAF2FF;
}
button.member-row.active .member-name { color: var(--orange); font-weight: 600; }

/* =========================================================
   Batch email (KOL outreach — N drafts + one template)
   ========================================================= */
.batch-email {
  margin-top: 12px;
  background: #FFFFFF;
  border: 1px solid var(--cream-line);
  border-radius: 12px;
  padding: 14px 16px 12px;
  max-width: 620px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  animation: msg-fade-in 220ms ease-out;
}
.batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cream-line);
}
.batch-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange);
}
.batch-status {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mute);
  padding: 3px 9px;
  border-radius: 999px;
  background: #F5F5F7;
}
.batch-email.is-pending  .batch-status { color: var(--orange); background: #EAF2FF; }
.batch-email.is-sent     .batch-status { color: #1F8A4C;       background: #E6F6EC; }
.batch-email.is-declined .batch-status { color: #B23A2A;       background: #FBEAE6; }

.batch-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 10px;
}

.batch-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  border: 1px solid var(--cream-line);
  border-radius: 10px;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}
.batch-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--cream-line);
  transition: background .15s;
}
.batch-row:last-child { border-bottom: none; }
.batch-row:hover { background: #F8FBFF; }
.batch-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}
.batch-recipient { display: flex; flex-direction: column; min-width: 0; }
.batch-name { font-weight: 600; color: var(--ink); }
.batch-meta { font-size: 11px; color: var(--ink-mute); }
.batch-email-addr {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.batch-template {
  background: #F8F9FB;
  border: 1px solid var(--cream-line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.batch-tmpl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
  font-weight: 600;
}
.batch-tmpl-cc {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 500;
  color: var(--orange);
  font-size: 11px;
}
.batch-tmpl-subject {
  font-size: 12.5px;
  color: var(--ink);
  margin-bottom: 8px;
}
.batch-tmpl-body {
  margin: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}

.batch-email.is-sent .batch-list,
.batch-email.is-declined .batch-list,
.batch-email.is-sent .batch-template,
.batch-email.is-declined .batch-template { opacity: 0.78; }

@media (max-width: 720px) {
  .batch-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .batch-num { display: none; }
  .batch-email-addr { font-size: 10.5px; }
}

/* =========================================================
   New-project generation experience (in-page)
   ========================================================= */
.gen-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: gen-fade-in 220ms ease-out;
}
.gen-overlay.is-leaving { animation: gen-fade-out 320ms ease-in forwards; }
@keyframes gen-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes gen-fade-out { from { opacity: 1; } to { opacity: 0; } }

.gen-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.gen-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid #E5EFFF;
  border-top-color: var(--orange);
  animation: spin 0.95s linear infinite;
}
.gen-overlay.is-ready .gen-spinner {
  border: 3px solid var(--orange);
  animation: none;
  position: relative;
}
.gen-overlay.is-ready .gen-spinner::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-right: 3px solid var(--orange);
  border-bottom: 3px solid var(--orange);
  transform: rotate(45deg) translate(-2px, -3px);
  border-radius: 1px;
}
.gen-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
  margin: 4px 0 0;
}
.gen-status {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  min-height: 26px;
}
.gen-steps {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  width: 100%;
  max-width: 380px;
}
.gen-steps li {
  font-size: 12.5px;
  color: var(--ink-mute);
  padding: 9px 14px;
  border-radius: 9px;
  background: #F5F5F7;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .25s, color .25s;
}
.gen-steps li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cream-line);
  flex-shrink: 0;
  transition: background .25s, transform .25s, box-shadow .25s;
}
.gen-steps li.is-active {
  background: #EAF2FF;
  color: var(--ink);
  font-weight: 500;
}
.gen-steps li.is-active::before {
  background: var(--orange);
  transform: scale(1.4);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}
.gen-steps li.is-done {
  color: var(--ink-soft);
}
.gen-steps li.is-done::before {
  background: var(--orange);
}

/* ----- Skeleton placeholders in the rails during generation ----- */
@keyframes skeleton-shimmer {
  0%   { background-position: -120px 0; }
  100% { background-position: 360px 0; }
}
.skeleton-avatar,
.skeleton-line,
.skeleton-spinner {
  background: linear-gradient(90deg, #EFF1F4 0%, #F8F9FB 50%, #EFF1F4 100%);
  background-size: 240px 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: 6px;
  display: inline-block;
}

.member-skeleton {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}
.member-skeleton .skeleton-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}
.member-skeleton .skeleton-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.member-skeleton .skeleton-line-1 {
  width: 60%;
  height: 10px;
}
.member-skeleton .skeleton-line-2 {
  width: 38%;
  height: 7px;
}
.member-skeleton .skeleton-spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #E5EFFF;
  border-top-color: var(--orange);
  background: none;
  animation: spin 0.95s linear infinite;
}

.channel-skeleton {
  background: transparent !important;
  cursor: default;
}
.channel-skeleton .skeleton-line-channel {
  display: block;
  width: 70%;
  height: 10px;
  background: linear-gradient(90deg, #EFF1F4 0%, #F8F9FB 50%, #EFF1F4 100%);
  background-size: 240px 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: 5px;
}

/* Item reveal — gentle slide-in when a real member/channel replaces a skeleton */
@keyframes item-reveal {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.reveal-anim {
  animation: item-reveal 320ms ease-out both;
}

/* =========================================================
   HOME (Google-style minimal landing for the dashboard)
   ========================================================= */
body.page-home {
  background: #FFFFFF;
  display: block;
  min-height: 100vh;
}

.home-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-mute);
}
.home-top-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
}
.home-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.home-top-actions .account-name {
  color: var(--ink-soft);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-top-actions .account-signout,
.home-top-actions .account-restart {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.avatar-mini {
  width: 28px;
  height: 28px;
  font-size: 11px;
  margin-left: 4px;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: clamp(48px, 12vh, 140px) 24px 80px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  margin-bottom: 6px;
}
.home-brand .brand-text {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 38px;
  letter-spacing: -0.018em;
  line-height: 1;
}
.home-brand .brand-dot { color: var(--orange); margin: 0 3px; }

.btn-new-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange);
  color: #FFFFFF;
  border: none;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 113, 227, 0.18), 0 6px 18px rgba(0, 113, 227, 0.18);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-new-home:hover {
  background: #0058B8;
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0, 113, 227, 0.22), 0 10px 26px rgba(0, 113, 227, 0.22);
}
.btn-new-home:active { transform: translateY(0); }
.btn-new-home .plus {
  font-size: 18px;
  line-height: 1;
  width: 14px;
  text-align: center;
}

.home-search-form {
  position: relative;
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
}
.home-search {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 46px;
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  background: #FFFFFF;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.home-search::placeholder { color: var(--ink-mute); }
.home-search:hover {
  border-color: #B9CFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.home-search:focus {
  outline: none;
  border-color: var(--orange);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16);
}
.home-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  pointer-events: none;
  display: inline-flex;
}

.home-projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  max-width: 720px;
}
.project-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--cream-line);
  background: #FFFFFF;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.project-chip:hover {
  background: #EAF2FF;
  border-color: #B9CFFF;
  color: var(--ink);
  transform: translateY(-1px);
}
.chip-marker {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
.chip-name { font-weight: 600; color: var(--ink); }
.chip-tag {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.project-chip:hover .chip-tag { color: var(--orange); }

.home-empty,
.home-no-match {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-mute);
}
.home-empty strong { color: var(--ink); font-weight: 600; }

@media (max-width: 600px) {
  .home-top { padding: 14px 16px; }
  .home-top-actions .account-name { display: none; }
  .home-brand .brand-text { font-size: 30px; }
  .btn-new-home { padding: 12px 22px; font-size: 13.5px; }
}

/* =========================================================
   Workflow card (sub-agents working on a deliverable)
   ========================================================= */
.workflow-card {
  margin-top: 12px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
  border: 1px solid #D6E4FF;
  border-radius: 14px;
  padding: 14px 16px 14px;
  max-width: 580px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  animation: msg-fade-in 220ms ease-out;
  position: relative;
}
.workflow-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(0,113,227,0.06) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: workflow-shine 3.4s linear infinite;
}
@keyframes workflow-shine {
  0%   { background-position: 220% 0; }
  100% { background-position: -120% 0; }
}

.workflow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.workflow-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange);
}
.workflow-progress {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--orange);
  background: #EAF2FF;
  padding: 2px 8px;
  border-radius: 999px;
}
.workflow-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 2px 0 2px;
}
.workflow-subtitle {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 12px;
}

.workflow-bar {
  position: relative;
  height: 5px;
  background: #E5EFFF;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 8px;
}
.workflow-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange) 0%, #4D9FFF 100%);
  border-radius: 999px;
  position: relative;
  transition: width 600ms ease-out;
}
.workflow-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  animation: workflow-bar-shimmer 1.6s linear infinite;
}
@keyframes workflow-bar-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.workflow-status {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.workflow-subagents {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 8px;
}
.subagent {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #FFFFFF;
  border: 1px solid var(--cream-line);
  border-radius: 10px;
}
.subagent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.subagent-avatar .subagent-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  animation: spin 0.95s linear infinite;
}
.subagent-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.subagent-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.subagent-doing {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-mute);
}
.subagent-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.subagent-status span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.4;
  animation: typing-pulse 1.4s ease-in-out infinite;
}
.subagent-status span:nth-child(2) { animation-delay: 0.18s; }
.subagent-status span:nth-child(3) { animation-delay: 0.36s; }

.workflow-foot {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  font-style: italic;
}

/* =========================================================
   CONSOLE — Benchling-style multi-panel workspace
   (dashboard.html · body.page-console)
   ========================================================= */
body.page-console {
  background: var(--cream-2);
  display: block;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.console-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  height: 100vh;
}

/* ----- Left rail ----- */
.console-rail {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-right: 1px solid var(--cream-line);
  padding: 18px 14px 10px;
  height: 100vh;
  overflow-y: auto;
}
.console-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
}
.console-brand .brand-text { font-size: 14px; font-weight: 600; }

.rail-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0,113,227,0.18), 0 6px 16px rgba(0,113,227,0.16);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.rail-new:hover { background: #0058B8; transform: translateY(-1px); }
.rail-new:active { transform: translateY(0); }
.rail-new .plus { font-size: 16px; line-height: 1; }

.rail-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.rail-group-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 16px 10px 6px;
  font-weight: 600;
}
.rail-group-label:first-child { margin-top: 4px; }
.rail-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  background: none;
  border: none;
  padding: 9px 10px;
  border-radius: 9px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: left;
  transition: background .14s, color .14s;
}
.rail-link svg { color: var(--ink-mute); flex-shrink: 0; transition: color .14s; }
.rail-link span:nth-child(2) { flex: 1; }
.rail-link:hover { background: var(--cream-card); color: var(--ink); }
.rail-link.is-active {
  background: #EAF2FF;
  color: var(--orange);
  font-weight: 500;
}
.rail-link.is-active svg { color: var(--orange); }
.rail-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}
.rail-link.is-active .rail-count { background: #D5E6FF; color: var(--orange); }
.rail-dot-badge {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #E0683C;
  border-radius: 999px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.rail-account {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 8px 6px;
  border-top: 1px solid var(--cream-line);
}

/* ----- Main surface ----- */
.console-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
}
.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--cream-line);
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(10px);
}
.topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.topbar-sub { color: var(--ink-mute); font-weight: 400; }
.console-search-form { position: relative; width: min(420px, 42vw); }
.console-search {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  background: var(--cream-2);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.console-search::placeholder { color: var(--ink-mute); }
.console-search:focus {
  outline: none;
  background: #fff;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.14);
}
.console-search-icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  display: inline-flex;
  pointer-events: none;
}

.console-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 30px 32px 64px;
}

/* ----- Panels ----- */
.panel { display: none; max-width: 1160px; margin: 0 auto; }
.panel.is-active { display: block; animation: panelIn .22s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.panel-title {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 6px;
}
.panel-sub { font-size: 14px; color: var(--ink-mute); margin: 0; max-width: 620px; }
.panel-empty {
  font-size: 13.5px;
  color: var(--ink-mute);
  background: #fff;
  border: 1px dashed var(--cream-line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.panel-empty strong { color: var(--ink); font-weight: 600; }

/* Console row-style header (title + note/link in a row). Scoped to <div> so it
   does not clobber the marketing <h2 class="section-head"> page headings. */
div.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 14px;
}
.section-title { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.section-note { font-size: 12px; color: var(--ink-mute); }
.link-btn {
  background: none; border: none; padding: 0;
  font-size: 12.5px; color: var(--orange); font-weight: 500;
  transition: opacity .15s;
}
.link-btn:hover { opacity: 0.7; }

.btn-pill-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,113,227,0.16);
  transition: background .15s, transform .15s;
}
.btn-pill-primary:hover { background: #0058B8; transform: translateY(-1px); }
.btn-pill-primary .plus { font-size: 15px; line-height: 1; }

/* ----- KPI strip ----- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.stat-label { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 8px; font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.02em; line-height: 1; }
.stat-sub { font-size: 12px; color: var(--ink-mute); margin: 6px 0 0; }

/* ----- Biotech cards ----- */
.biotech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.biotech-grid-compact { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.biotech-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  padding: 16px 17px 14px;
  box-shadow: var(--shadow-card);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.biotech-card:hover {
  border-color: #B9CFFF;
  box-shadow: 0 6px 22px rgba(0,113,227,0.10);
  transform: translateY(-2px);
}
.biotech-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.biotech-avatar {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--c) 16%, #fff);
  color: var(--c);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}
.biotech-tag {
  font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
  background: var(--cream-card); border-radius: 999px; padding: 3px 9px;
}
.biotech-name { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 3px; letter-spacing: -0.01em; }
.biotech-sub { font-size: 12.5px; color: var(--ink-mute); margin: 0 0 14px; flex: 1; }
.biotech-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--cream-line); }
.biotech-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-soft); }
.biotech-open { font-size: 12px; color: var(--orange); font-weight: 500; opacity: 0; transition: opacity .15s; }
.biotech-card:hover .biotech-open { opacity: 1; }

/* ----- Overview two-column ----- */
.overview-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; margin-top: 6px; }
.overview-col { min-width: 0; }

.pulse-list { display: flex; flex-direction: column; gap: 8px; }
.pulse-item {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border: 1px solid var(--cream-line); border-radius: 11px;
  padding: 11px 13px; text-align: left; width: 100%;
  transition: border-color .15s, background .15s;
}
.pulse-item:hover { border-color: #B9CFFF; background: #FAFCFF; }
.pulse-title { flex: 1; font-size: 12.5px; color: var(--ink); line-height: 1.35; }
.pulse-date { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }

.quicktool-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quicktool {
  display: flex; flex-direction: column; gap: 3px;
  background: #fff; border: 1px solid var(--cream-line); border-radius: 11px;
  padding: 13px; text-align: left;
  transition: border-color .15s, transform .15s;
}
.quicktool:hover { border-color: #B9CFFF; transform: translateY(-1px); }
.quicktool-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.quicktool-cat { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); font-weight: 600; }

/* ----- Filter row + pills ----- */
.filter-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.filter-pills { display: inline-flex; flex-wrap: wrap; gap: 7px; }
.pill {
  background: #fff; border: 1px solid var(--cream-line);
  border-radius: 999px; padding: 6px 13px;
  font-size: 12.5px; color: var(--ink-soft);
  transition: all .14s;
}
.pill:hover { border-color: #B9CFFF; color: var(--ink); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.inline-search {
  height: 36px; min-width: 220px; flex: 0 1 280px;
  padding: 0 14px;
  border: 1px solid var(--cream-line); border-radius: 999px;
  background: #fff; font-family: var(--sans); font-size: 13px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.inline-search::placeholder { color: var(--ink-mute); }
.inline-search:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }

/* ----- Feed (FDA / IP results) ----- */
.feed-list { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: grid; grid-template-columns: 110px 1fr; gap: 18px;
  background: #fff; border: 1px solid var(--cream-line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-card);
  transition: border-color .15s, box-shadow .15s;
}
.feed-item:hover { border-color: #D9E5F5; box-shadow: var(--shadow-soft); }
.feed-side { display: flex; flex-direction: column; gap: 8px; }
.feed-type {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; align-self: flex-start;
}
.type-guidance   { background: #EAF2FF; color: #0058B8; }
.type-approval   { background: #E7F6EC; color: #1E7A43; }
.type-enforcement{ background: #FCEBE6; color: #C8362A; }
.type-industry   { background: #F3EEFB; color: #6B4BB0; }
.feed-date { font-size: 11.5px; color: var(--ink-mute); font-family: var(--mono); }
.feed-title { font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 0 0 6px; line-height: 1.35; }
.feed-text { font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.5; }
.feed-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feed-source { font-size: 11.5px; color: var(--ink-mute); font-weight: 500; }
.feed-impact {
  font-size: 11px; color: var(--orange); font-weight: 500;
  background: #EAF2FF; border-radius: 999px; padding: 3px 10px;
}

/* ----- CDMO cards ----- */
.cdmo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cdmo-card {
  background: #fff; border: 1px solid var(--cream-line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cdmo-card:hover { border-color: #B9CFFF; box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.cdmo-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cdmo-name { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0; }
.cdmo-rating { font-size: 13px; color: #E0A02C; letter-spacing: 1px; }
.cdmo-region { font-size: 12px; color: var(--ink-mute); margin: 4px 0 12px; }
.cdmo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cdmo-chip {
  font-size: 10.5px; color: var(--ink-soft); background: var(--cream-card);
  border-radius: 999px; padding: 3px 9px; font-weight: 500;
}
.cdmo-note { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 14px; line-height: 1.5; flex: 1; }
.cdmo-specs { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-mute); padding: 12px 0; border-top: 1px solid var(--cream-line); }
.cdmo-specs strong { color: var(--ink-soft); font-weight: 600; margin-right: 6px; }
.cdmo-quote {
  background: var(--cream-card); border: 1px solid var(--cream-line);
  border-radius: 9px; padding: 9px; font-size: 12.5px; font-weight: 500; color: var(--orange);
  transition: background .15s, border-color .15s;
}
.cdmo-quote:hover { background: #EAF2FF; border-color: #B9CFFF; }
.cdmo-quote.is-done { color: #1E7A43; background: #E7F6EC; border-color: #BfE5CC; cursor: default; }

/* ----- IP intelligence ----- */
.ip-tools { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 6px; }
.ip-search-card, .ip-stat-card {
  background: #fff; border: 1px solid var(--cream-line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-card);
}
.ip-search-form { display: flex; gap: 10px; margin-top: 6px; }
.ip-query {
  flex: 1; height: 42px; padding: 0 16px;
  border: 1px solid var(--cream-line); border-radius: 10px;
  background: var(--cream-2); font-family: var(--sans); font-size: 13.5px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ip-query:focus { outline: none; background: #fff; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }
.ip-hint { font-size: 12px; color: var(--ink-mute); margin: 12px 0 0; }
.ip-stat-card { display: flex; flex-direction: column; justify-content: center; }
.ip-stat-num { font-size: 38px; font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.02em; line-height: 1; }
.ip-stat-label { font-size: 12px; color: var(--ink-mute); margin: 8px 0 12px; line-height: 1.4; }
.ip-bar { height: 6px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; }
.ip-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-soft)); border-radius: 999px; }

.ip-watch-table {
  background: #fff; border: 1px solid var(--cream-line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.ip-row {
  display: grid; grid-template-columns: 1.1fr 2.2fr 1.1fr 1fr 0.8fr; gap: 14px;
  padding: 13px 18px; align-items: center; border-top: 1px solid var(--cream-line);
  font-size: 12.5px;
}
.ip-row:first-child { border-top: none; }
.ip-row-head { background: var(--cream-2); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.ip-assignee { font-weight: 600; color: var(--ink); }
.ip-title { color: var(--ink-soft); line-height: 1.4; }
.ip-number { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); }
.ip-status { color: var(--ink-soft); }
.ip-date { display: block; font-style: normal; font-size: 10.5px; color: var(--ink-mute); margin-top: 2px; }
.ip-risk { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 9px; border-radius: 999px; text-align: center; }
.risk-low { background: #E7F6EC; color: #1E7A43; }
.risk-med { background: #FFF3E0; color: #B5701A; }
.risk-high { background: #FCEBE6; color: #C8362A; }
.ip-results { margin-top: 12px; }

/* ----- Computational biology tools ----- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool-card {
  background: #fff; border: 1px solid var(--cream-line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tool-card:hover { border-color: #B9CFFF; box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.tool-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tool-cat { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); font-weight: 700; }
.tool-meta { font-size: 10.5px; color: var(--ink-mute); font-family: var(--mono); background: var(--cream-card); border-radius: 6px; padding: 2px 7px; }
.tool-name { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.tool-desc { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 14px; line-height: 1.5; flex: 1; }
.tool-run {
  align-self: flex-start;
  background: var(--cream-card); border: 1px solid var(--cream-line);
  border-radius: 8px; padding: 8px 16px; font-size: 12.5px; font-weight: 500; color: var(--orange);
  transition: background .15s, border-color .15s;
}
.tool-run:hover { background: #EAF2FF; border-color: #B9CFFF; }
.tool-run.is-done { color: #1E7A43; background: #E7F6EC; border-color: #BfE5CC; }

/* ----- Responsive ----- */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-cols { grid-template-columns: 1fr; }
  .ip-tools { grid-template-columns: 1fr; }
  .ip-row { grid-template-columns: 1fr 1.6fr 1fr; }
  .ip-row > span:nth-child(4), .ip-row > span:nth-child(5),
  .ip-row-head > span:nth-child(4), .ip-row-head > span:nth-child(5) { display: none; }
}
@media (max-width: 820px) {
  .console-shell { grid-template-columns: 1fr; }
  .console-rail {
    flex-direction: row; align-items: center; height: auto;
    overflow-x: auto; padding: 10px 14px; gap: 10px;
  }
  .console-brand { padding: 0 8px 0 0; }
  .rail-new { width: auto; }
  .rail-nav { flex-direction: row; margin-top: 0; gap: 4px; }
  .rail-group-label { display: none; }
  .rail-link span:nth-child(2) { display: none; }
  .rail-account { display: none; }
  .console-main { height: calc(100vh - 60px); }
  .console-topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .console-search-form { width: 100%; }
  .console-scroll { padding: 20px 18px 48px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .feed-item { grid-template-columns: 1fr; gap: 10px; }
  .feed-side { flex-direction: row; align-items: center; gap: 12px; }
}

/* =========================================================
   CONSOLE — Search & evaluation (AI workflow + opportunities)
   ========================================================= */
.rail-pill-new {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  color: #fff; background: linear-gradient(90deg, var(--orange), var(--orange-soft));
  border-radius: 999px; padding: 2px 6px;
}

/* ----- AI workflow runner ----- */
.eval-runner {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
  border: 1px solid #D6E4FF;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-card);
}
.eval-runner-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.eval-runner-head .card-eyebrow { margin: 0; }
.eval-runner-status { font-size: 12px; color: var(--ink-mute); font-family: var(--mono); }
.eval-thesis-form { display: flex; gap: 10px; margin: 14px 0 18px; flex-wrap: wrap; }
.eval-select, .eval-scope {
  height: 42px; padding: 0 14px;
  border: 1px solid var(--cream-line); border-radius: 10px;
  background: #fff; font-family: var(--sans); font-size: 13.5px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.eval-select { flex: 1 1 280px; cursor: pointer; }
.eval-scope { flex: 1 1 240px; }
.eval-select:focus, .eval-scope:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }

/* Pipeline */
.eval-pipeline { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.eval-stage {
  flex: 1 1 0; min-width: 130px;
  display: flex; flex-direction: column; gap: 4px;
  background: #fff; border: 1px solid var(--cream-line); border-radius: 12px;
  padding: 12px 13px; position: relative;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.eval-stage-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--cream-deep); color: var(--ink-mute);
  transition: background .2s, color .2s;
}
.eval-stage-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.eval-stage-detail { font-size: 11px; color: var(--ink-mute); line-height: 1.35; }
.eval-stage.is-active {
  border-color: var(--orange); background: #F4F9FF;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.10);
}
.eval-stage.is-active .eval-stage-dot { background: var(--orange); color: #fff; animation: evalPulse 1s ease-in-out infinite; }
.eval-stage.is-done .eval-stage-dot { background: #1E7A43; color: #fff; }
.eval-stage.is-done { border-color: #BfE5CC; }
.eval-stage-arrow { align-self: center; color: var(--ink-mute); font-size: 14px; flex: 0 0 auto; }
@keyframes evalPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(0,113,227,0.4); } 50% { box-shadow: 0 0 0 5px rgba(0,113,227,0); } }

/* ----- Opportunity cards ----- */
.opp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.opp-card {
  background: #fff; border: 1px solid var(--cream-line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.opp-card:hover { border-color: #B9CFFF; box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.opp-top { display: flex; gap: 14px; margin-bottom: 12px; }
.opp-gauge {
  width: 58px; height: 58px; border-radius: 14px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.opp-gauge span { font-size: 21px; font-weight: 700; line-height: 1; }
.opp-gauge em { font-style: normal; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; opacity: 0.8; }
.score-high { background: #E7F6EC; color: #1E7A43; }
.score-mid  { background: #EAF2FF; color: #0058B8; }
.score-low  { background: #FFF3E0; color: #B5701A; }
.opp-headings { min-width: 0; }
.opp-thesis { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); font-weight: 700; }
.opp-title { font-size: 15.5px; font-weight: 600; color: var(--ink); margin: 3px 0 2px; line-height: 1.3; }
.opp-mech { font-size: 12px; color: var(--ink-mute); margin: 0; }
.opp-rationale { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 14px; flex: 1; }
.opp-meta { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-mute); padding: 12px 0; border-top: 1px solid var(--cream-line); }
.opp-meta strong { color: var(--ink-soft); font-weight: 600; margin-right: 6px; }
.opp-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.opp-flag { font-size: 10.5px; color: var(--ink-soft); background: var(--cream-card); border-radius: 999px; padding: 3px 9px; font-weight: 500; }
.opp-actions { display: flex; gap: 8px; }
.opp-build {
  flex: 1; background: var(--orange); color: #fff; border: none;
  border-radius: 9px; padding: 9px; font-size: 12.5px; font-weight: 500;
  transition: background .15s;
}
.opp-build:hover { background: #0058B8; }
.opp-memo {
  background: var(--cream-card); border: 1px solid var(--cream-line);
  border-radius: 9px; padding: 9px 14px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft);
  transition: background .15s, border-color .15s;
}
.opp-memo:hover { border-color: #B9CFFF; color: var(--orange); }
.opp-memo.is-done { color: #1E7A43; background: #E7F6EC; border-color: #BfE5CC; }

@media (max-width: 1080px) {
  .opp-grid { grid-template-columns: 1fr; }
  .eval-stage-arrow { display: none; }
  .eval-stage { flex: 1 1 140px; }
}

/* =========================================================
   CONSOLE — live openFDA status indicator
   ========================================================= */
.live-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--ink-mute);
  background: #fff; border: 1px solid var(--cream-line);
  border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.live-status .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-mute); flex-shrink: 0;
}
.live-status[data-state="loading"] .live-dot { background: #E0A02C; animation: liveBlink 1s ease-in-out infinite; }
.live-status[data-state="live"] { color: #1E7A43; border-color: #BfE5CC; background: #F2FBF5; }
.live-status[data-state="live"] .live-dot { background: #1E7A43; animation: liveBlink 2.4s ease-in-out infinite; }
.live-status[data-state="offline"] { color: #B5701A; border-color: #F0D9B5; background: #FFF8EE; }
.live-status[data-state="offline"] .live-dot { background: #B5701A; }
@keyframes liveBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.live-refresh {
  background: none; border: none; padding: 0; margin-left: 2px;
  color: inherit; font-size: 14px; line-height: 1; cursor: pointer; opacity: 0.7;
  transition: opacity .15s, transform .3s;
}
.live-refresh:hover { opacity: 1; transform: rotate(180deg); }

.feed-live {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  color: #1E7A43; background: #E7F6EC; border-radius: 999px;
  padding: 2px 7px; align-self: flex-start;
}
.feed-source-link { color: var(--orange); transition: opacity .15s; }
.feed-source-link:hover { opacity: 0.7; }

/* =========================================================
   CONSOLE — Search & evaluation (agentic strategy search)
   ========================================================= */
.strat-composer {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
  border: 1px solid #D6E4FF;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.strat-composer .card-eyebrow { margin: 0 0 12px; }
.strat-input {
  width: 100%;
  border: 1px solid var(--cream-line);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.strat-input::placeholder { color: var(--ink-mute); }
.strat-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }

.strat-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.strat-ex-label { font-size: 11.5px; color: var(--ink-mute); margin-right: 2px; }
.strat-ex {
  background: #fff; border: 1px solid var(--cream-line); border-radius: 999px;
  padding: 5px 12px; font-size: 12px; color: var(--ink-soft);
  transition: border-color .14s, color .14s, background .14s;
}
.strat-ex:hover { border-color: #B9CFFF; color: var(--orange); background: #F4F9FF; }

.strat-sources-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; margin: 18px 0 9px; }
.strat-sources { display: flex; flex-wrap: wrap; gap: 7px; }
.src-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--cream-line); border-radius: 9px;
  padding: 6px 11px; font-size: 12px; color: var(--ink-mute);
  transition: all .14s; opacity: 0.55;
}
.src-chip .src-tick { font-size: 10px; color: transparent; }
.src-chip .src-name { color: var(--ink-soft); font-weight: 500; }
.src-chip.is-on { opacity: 1; border-color: #C7D9F5; background: #fff; }
.src-chip.is-on .src-tick { color: var(--orange); }
.src-chip:hover { border-color: #B9CFFF; }
.src-live {
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.05em;
  color: #1E7A43; background: #E7F6EC; border-radius: 999px; padding: 1px 6px;
}
.src-kind {
  font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-mute); background: var(--cream-card); border-radius: 999px; padding: 1px 6px;
}

.strat-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.strat-hint { font-size: 11.5px; color: var(--ink-mute); max-width: 540px; line-height: 1.4; }

/* ----- Agent activity stream ----- */
.agent-run {
  background: #14110C;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}
.agent-run-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.agent-run-title { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: #F4EFE2; }
.agent-spin {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--orange-soft);
}
.agent-spin.spinning { animation: agentSpin .8s linear infinite; }
@keyframes agentSpin { to { transform: rotate(360deg); } }
.agent-elapsed { font-family: var(--mono); font-size: 12px; color: #8B8475; }

.agent-criteria { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.crit-label { font-size: 11px; color: #8B8475; margin-right: 4px; }
.crit-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #E8E1D0;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; padding: 3px 10px;
}
.crit-chip em { font-style: normal; font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange-soft); }

.agent-stream {
  font-family: var(--mono); font-size: 12px; line-height: 1.5;
  max-height: 280px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.agent-line { display: flex; align-items: baseline; gap: 9px; padding: 3px 0; color: #C9C2B0; }
.agent-line-ico {
  width: 11px; height: 11px; flex-shrink: 0; border-radius: 50%; align-self: center;
  border: 1.5px solid #6f685b; position: relative;
}
.agent-line.is-running .agent-line-ico { border-color: var(--orange-soft); border-top-color: transparent; animation: agentSpin .7s linear infinite; }
.agent-line.is-done .agent-line-ico { border-color: #2E7D4F; background: #2E7D4F; }
.agent-line.is-done .agent-line-ico::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 8px; display: flex; align-items: center; justify-content: center; }
.agent-line-src { flex-shrink: 0; min-width: 150px; font-weight: 500; }
.agent-line-src.k-public   { color: #7FD89B; }
.agent-line-src.k-commercial { color: #E0A85C; }
.agent-line-src.k-compute  { color: #9DBBE8; }
.agent-line-src.k-plan     { color: #D6CFBE; }
.agent-line-msg { color: #8B8475; }
.agent-hits { color: #F4EFE2; font-weight: 600; }

/* ----- Live evidence banner ----- */
.evidence-bar {
  background: #F2FBF5; border: 1px solid #BfE5CC; border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 20px;
}
.ev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ev-sub { font-size: 12px; color: var(--ink-mute); }
.ev-stats { display: flex; flex-wrap: wrap; gap: 22px; }
.ev-stat { display: flex; flex-direction: column; }
.ev-num { font-size: 24px; font-weight: 700; color: #1E7A43; letter-spacing: -0.02em; line-height: 1; }
.ev-lbl { font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; }
.ev-stat:hover .ev-lbl { color: var(--orange); }
.ev-samples { margin-top: 14px; padding-top: 12px; border-top: 1px solid #BfE5CC; }
.ev-samples-label { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; margin: 0 0 8px; }
.ev-trial { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid rgba(0,0,0,0.04); }
.ev-trial:first-of-type { border-top: none; }
.ev-trial-meta { font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute); font-family: var(--mono); }
.ev-trial-title { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.ev-trial:hover .ev-trial-title { color: var(--orange); }

/* opportunity card additions */
.opp-evidence {
  font-size: 11.5px; color: #1E7A43; background: #F2FBF5;
  border-left: 2px solid #2E7D4F; border-radius: 0 6px 6px 0;
  padding: 7px 10px; margin: 0 0 12px; line-height: 1.4;
}
.opp-match {
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--orange); background: #EAF2FF; border-radius: 999px; padding: 2px 7px; margin-left: 6px;
}

@media (max-width: 820px) {
  .agent-line-src { min-width: 110px; }
  .strat-actions { flex-direction: column; align-items: stretch; }
}

/* =========================================================
   CONSOLE — beta / under-development notices
   ========================================================= */
.beta-notice {
  display: flex; align-items: center; gap: 11px;
  background: #FFF8EE; border: 1px solid #F0DDB5; border-radius: 12px;
  padding: 11px 15px; margin-bottom: 20px;
  font-size: 12.5px; color: #8A6516; line-height: 1.45;
}
.beta-notice .beta-tag {
  flex-shrink: 0;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em;
  color: #fff; background: #C98A18; border-radius: 999px; padding: 3px 8px;
}
.beta-notice-partial { background: #F2FBF5; border-color: #BfE5CC; color: #1E5C38; }
.beta-notice-partial .beta-tag { background: #2E7D4F; }

/* Disabled computational-biology tool buttons (preview only) */
.tool-run:disabled,
.tool-run[disabled] {
  cursor: not-allowed;
  color: var(--ink-mute);
  background: var(--cream-card);
  border-color: var(--cream-line);
  opacity: 0.6;
}
.tool-run:disabled:hover,
.tool-run[disabled]:hover {
  background: var(--cream-card);
  border-color: var(--cream-line);
}
.tool-card:has(.tool-run:disabled) { opacity: 0.94; }
