/* ============================================================
   London — GTM Intelligence Platform
   Design tokens + base + components
   Aesthetic: 70% Linear / 20% Palantir / 10% Stripe
   Light enterprise · violet accent · Geist + mono
   ============================================================ */

:root {
  /* ---- Canvas & surfaces ---- */
  --bg:            #F7F7F9;
  --bg-2:          #FBFBFC;
  --surface:       #FFFFFF;
  --surface-2:     #FCFCFD;
  --surface-sunken:#F4F4F6;
  --glass:         rgba(255,255,255,0.72);

  /* ---- Lines ---- */
  --border:        #ECECEF;
  --border-strong: #E0E0E4;
  --border-faint:  #F2F2F4;
  --ring:          rgba(91,43,217,0.30);

  /* ---- Text ---- */
  --ink:           #15151B;
  --ink-2:         #5B5B66;
  --ink-3:         #8C8C97;
  --ink-4:         #B4B4BD;

  /* ---- Brand violet ---- */
  --violet:        #5B2BD9;
  --violet-600:    #6A3AE6;
  --violet-500:    #7B52F0;
  --violet-50:     #F1ECFE;
  --violet-100:    #E6DCFC;
  --violet-tint:   #F6F2FE;

  /* ---- Semantic ---- */
  --green:   #0E9F6E;
  --green-bg:#E6F6EF;
  --amber:   #D98A0B;
  --amber-bg:#FBF1DE;
  --red:     #E0353F;
  --red-bg:  #FCEBEC;
  --blue:    #2563EB;
  --blue-bg: #E8EFFE;
  --cyan:    #0E8F9F;
  --cyan-bg: #E2F4F6;

  /* ---- Shadows ---- */
  --shadow-xs: 0 1px 2px rgba(20,20,30,0.04);
  --shadow-sm: 0 1px 2px rgba(20,20,30,0.05), 0 1px 1px rgba(20,20,30,0.03);
  --shadow-md: 0 4px 14px -4px rgba(20,20,30,0.10), 0 2px 6px -2px rgba(20,20,30,0.06);
  --shadow-lg: 0 18px 40px -12px rgba(20,20,30,0.18), 0 6px 14px -6px rgba(20,20,30,0.08);
  --shadow-violet: 0 8px 24px -8px rgba(91,43,217,0.40);

  /* ---- Radius ---- */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 24px;

  /* ---- Type ---- */
  --sans: "Geist", "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shell-sidebar: 244px;
  --shell-topbar: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 1, "cv01" 1;
  letter-spacing: -0.01em;
}

#root { height: 100%; }

::selection { background: var(--violet-100); color: var(--violet); }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #DEDEE3; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #C9C9D0; background-clip: content-box; }

/* ============================================================
   Typography helpers
   ============================================================ */
.mono { font-family: var(--mono); font-feature-settings: "ss01" 1; }
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.tnum { font-variant-numeric: tabular-nums; font-family: var(--mono); }

h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }

/* ============================================================
   App shell
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--shell-sidebar) 1fr;
  height: 100%;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(91,43,217,0.05), transparent 60%),
    var(--bg);
}

/* ---- Sidebar ---- */
.sidebar {
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #FBFBFC, #F7F7F9);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
  z-index: 20;
}
.side-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 0 18px;
  height: var(--shell-topbar);
  border-bottom: 1px solid var(--border-faint);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(150deg, var(--violet-600), var(--violet) 70%);
  box-shadow: var(--shadow-violet), inset 0 1px 0 rgba(255,255,255,0.25);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.brand-sub { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }

.side-section { padding: 16px 12px 6px; }
.side-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-4); padding: 0 10px 8px; font-weight: 500;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; position: relative;
  transition: background .15s ease, color .15s ease;
  user-select: none; white-space: nowrap;
}
.nav-item > span:first-of-type { overflow: hidden; text-overflow: ellipsis; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav-item:hover { background: rgba(20,20,30,0.04); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); border: 1px solid var(--border); }
.nav-item.active svg { color: var(--violet); opacity: 1; }
.nav-item .nav-badge {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  background: var(--violet-50); color: var(--violet); padding: 1px 6px; border-radius: 20px; font-weight: 500;
}
.nav-item .nav-dot { margin-left: auto; }

.side-spacer { flex: 1; }

.side-status {
  margin: 10px 12px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-top: 1px solid var(--border-faint);
}

/* ---- Topbar ---- */
.main { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.topbar {
  height: var(--shell-topbar);
  border-bottom: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; flex-shrink: 0;
  position: sticky; top: 0; z-index: 15;
}
.crumb { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.crumb .c-root { color: var(--ink-3); }
.crumb .c-sep { color: var(--ink-4); }
.crumb .c-page { color: var(--ink); font-weight: 600; }

.searchbox {
  display: flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 11px; min-width: 320px;
  background: var(--surface-sunken); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--ink-3); font-size: 13px;
  cursor: text; transition: border-color .15s, background .15s;
  white-space: nowrap;
}
.searchbox > span:not(.kbd) { overflow: hidden; text-overflow: ellipsis; }
.searchbox:hover { border-color: var(--border-strong); }
.searchbox .kbd {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 5px; color: var(--ink-3);
}

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s; position: relative;
}
.icon-btn:hover { background: var(--surface-sunken); color: var(--ink); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---- Content scroll area ---- */
.content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 26px 30px 60px;
}
.content-inner { max-width: 1360px; margin: 0 auto; }

.page-head { margin-bottom: 22px; }
.page-title { font-size: 23px; font-weight: 600; letter-spacing: -0.025em; }
.page-desc { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }

/* ============================================================
   Panels / cards
   ============================================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.panel-glass {
  background: var(--glass);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-faint);
}
.panel-title { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.panel-body { padding: 16px; }

.card-hover { transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease; }
.card-hover:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: var(--r-sm);
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-sunken); border-color: var(--border-strong); }
.btn-primary {
  background: linear-gradient(180deg, var(--violet-600), var(--violet));
  color: #fff; border-color: transparent; box-shadow: var(--shadow-violet);
}
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(180deg, var(--violet-600), var(--violet)); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(20,20,30,0.05); color: var(--ink); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* ============================================================
   Badges / chips / status
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  padding: 2px 7px; border-radius: 20px; letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red   { background: var(--red-bg); color: var(--red); }
.badge-blue  { background: var(--blue-bg); color: var(--blue); }
.badge-violet{ background: var(--violet-50); color: var(--violet); }
.badge-cyan  { background: var(--cyan-bg); color: var(--cyan); }
.badge-gray  { background: var(--surface-sunken); color: var(--ink-2); border-color: var(--border); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }
.dot-gray { background: var(--ink-4); }
.dot-violet { background: var(--violet); }

/* pulsing live dot */
.pulse-dot { position: relative; }
.pulse-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: currentColor; opacity: .35; animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(.6); opacity: .5; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { opacity: 0; }
}

.live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .04em;
  color: var(--green); background: var(--green-bg);
  padding: 3px 9px 3px 7px; border-radius: 20px; text-transform: uppercase;
}

/* ============================================================
   KPI cards
   ============================================================ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 17px 14px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi-top { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.kpi-ic {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--violet-tint); color: var(--violet);
}
.kpi-ic svg { width: 16px; height: 16px; }
.kpi-label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.kpi-val { font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.kpi-bottom { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 11px; }
.kpi-delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-delta-label { font-size: 11px; color: var(--ink-3); }

/* ============================================================
   Feed / timeline
   ============================================================ */
.feed-item {
  display: flex; gap: 12px; padding: 13px 16px;
  border-bottom: 1px solid var(--border-faint);
  transition: background .14s;
}
.feed-item:hover { background: var(--surface-2); }
.feed-item:last-child { border-bottom: none; }
.feed-ic {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; border: 1px solid var(--border);
  background: var(--surface-2);
}
.feed-ic svg { width: 16px; height: 16px; }
.feed-main { flex: 1; min-width: 0; }
.feed-title { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.4; }
.feed-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.feed-company { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.feed-time { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

@keyframes feed-in {
  from { opacity: 0; transform: translateY(-8px); background: var(--violet-tint); }
  to { opacity: 1; transform: translateY(0); }
}
.feed-enter { animation: feed-in .55s cubic-bezier(.16,1,.3,1); }

/* timeline */
.trace-row {
  display: flex; gap: 12px; padding: 11px 16px;
  border-bottom: 1px solid var(--border-faint);
}
.trace-row:last-child { border-bottom: none; }
.trace-rail { display: flex; flex-direction: column; align-items: center; padding-top: 3px; }
.trace-rail .line { width: 2px; flex: 1; background: var(--border); margin-top: 4px; min-height: 14px; }
.trace-avatar {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: #fff;
}

/* ============================================================
   Tables
   ============================================================ */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
  text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); white-space: nowrap;
}
.tbl tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border-faint); font-size: 13px; vertical-align: middle; }
.tbl tbody tr { transition: background .14s; cursor: pointer; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.cell-co { display: flex; align-items: center; gap: 10px; }
.co-logo {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff;
  font-family: var(--mono);
}

/* confidence bar */
.conf { display: flex; align-items: center; gap: 9px; }
.conf-track { width: 54px; height: 5px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
.conf-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--violet-500), var(--violet)); }
.conf-num { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }

/* ============================================================
   Mini stat rows (right rail)
   ============================================================ */
.stat-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border-faint); }
.stat-row:last-child { border-bottom: none; }
.stat-row .l { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.stat-row .v { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink); }

.health-bar { height: 6px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
.health-fill { height: 100%; border-radius: 4px; }

/* ============================================================
   Charts
   ============================================================ */
.spark { display: block; width: 100%; }
.chart-grid line { stroke: var(--border-faint); stroke-width: 1; }
.axis-label { font-family: var(--mono); font-size: 9.5px; fill: var(--ink-3); }

/* ============================================================
   Skeleton loaders
   ============================================================ */
.sk { background: linear-gradient(90deg, #EEEEF1 25%, #F5F5F7 50%, #EEEEF1 75%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   Page transition
   ============================================================ */
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: page-in .42s cubic-bezier(.16,1,.3,1); }

@keyframes stagger-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.stagger > * { animation: stagger-in .5s cubic-bezier(.16,1,.3,1) backwards; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .17s; }
.stagger > *:nth-child(5) { animation-delay: .22s; }
.stagger > *:nth-child(6) { animation-delay: .27s; }

/* count-up flash */
@keyframes tick-flash { 0% { color: var(--violet); } 100% { color: inherit; } }
.tick { animation: tick-flash .6s ease; }

/* utility */
.row { display: flex; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.ml-auto { margin-left: auto; }
.muted { color: var(--ink-3); }
.divider { height: 1px; background: var(--border-faint); }
.grow { flex: 1; }
.clickable { cursor: pointer; }

/* segmented control */
.segmented { display: inline-flex; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.segmented button {
  border: none; background: transparent; font-family: var(--sans); font-size: 12px; font-weight: 500;
  color: var(--ink-2); padding: 4px 11px; border-radius: 6px; cursor: pointer; transition: all .14s; white-space: nowrap;
}
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.segmented button:hover:not(.on) { color: var(--ink); }

/* ============================================================
   Workspace (conversational hero)
   ============================================================ */
.workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative;
  background:
    radial-gradient(900px 460px at 50% -8%, rgba(91,43,217,0.055), transparent 62%),
    var(--bg); }
.ws-scroll { flex: 1; overflow-y: auto; }
.ws-col { max-width: 768px; margin: 0 auto; padding: 46px 28px 28px; }

/* messages */
.msg { display: flex; gap: 13px; margin-bottom: 24px; animation: msg-in .45s cubic-bezier(.16,1,.3,1); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.msg-av {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(150deg, var(--violet-600), var(--violet) 70%);
  box-shadow: var(--shadow-violet), inset 0 1px 0 rgba(255,255,255,0.25);
  display: grid; place-items: center; margin-top: 1px;
}
.msg-body { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.65; color: var(--ink); padding-top: 3px; }
.msg-body p { margin: 0 0 10px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-name { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; font-family: var(--mono); letter-spacing: .02em; }

.msg-user { justify-content: flex-end; }
.msg-user .msg-bubble {
  background: var(--violet); color: #fff; padding: 10px 15px;
  border-radius: 16px 16px 5px 16px; max-width: 78%; font-size: 14px; line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

/* hero greeting */
.ws-hero h2 { font-size: 27px; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 10px; }
.ws-hero .lede { font-size: 15.5px; color: var(--ink); margin-bottom: 6px; }
.ws-caps { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; margin: 14px 0 4px; }
.ws-cap { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.ws-cap span.ic { width: 24px; height: 24px; border-radius: 7px; background: var(--violet-tint); color: var(--violet); display: grid; place-items: center; flex-shrink: 0; }

/* suggested prompts */
.ws-suggest { display: flex; flex-wrap: wrap; gap: 9px; margin: 4px 0 8px 43px; }
.ws-prompt {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  padding: 9px 13px; cursor: pointer; transition: all .15s ease; box-shadow: var(--shadow-xs);
}
.ws-prompt:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-tint); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.ws-prompt svg { color: var(--violet); }

/* quick-reply chips */
.ws-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ws-chip {
  font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px;
  padding: 7px 14px; cursor: pointer; transition: all .14s ease;
}
.ws-chip:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-tint); }

/* typing indicator */
.typing { display: inline-flex; gap: 5px; align-items: center; padding: 7px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); animation: blink 1.3s infinite both; }
.typing span:nth-child(2) { animation-delay: .18s; }
.typing span:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* composer */
.ws-composer-wrap { border-top: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); }
.ws-composer { max-width: 768px; margin: 0 auto; padding: 14px 28px 18px; }
.composer-box {
  display: flex; align-items: flex-end; gap: 10px;
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface);
  padding: 9px 9px 9px 16px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.composer-box:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px var(--ring); }
.composer-box textarea {
  flex: 1; border: none; outline: none; resize: none; background: transparent;
  font-family: var(--sans); font-size: 14.5px; line-height: 1.5; color: var(--ink);
  max-height: 132px; padding: 6px 0; letter-spacing: -0.01em;
}
.composer-box textarea::placeholder { color: var(--ink-3); }
.send-btn {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--violet-600), var(--violet)); color: #fff;
  border: none; display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-violet); transition: filter .15s, opacity .15s;
}
.send-btn:hover { filter: brightness(1.07); }
.send-btn:disabled { opacity: .4; cursor: default; box-shadow: none; }
.ws-hint { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 9px; font-family: var(--mono); }

/* recommendation artifact */
.rec-card { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-md); overflow: hidden; margin-top: 4px; }
.rec-hero { padding: 18px 18px 16px; background: linear-gradient(180deg, var(--violet-tint), var(--surface)); border-bottom: 1px solid var(--border-faint); }
.rec-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border-faint); }
.rec-stat { padding: 13px 16px; border-right: 1px solid var(--border-faint); }
.rec-stat:last-child { border-right: none; }
.rec-agent { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-faint); }
.rec-agent:last-child { border-bottom: none; }

/* nav locked */
.nav-item.locked { opacity: .5; cursor: default; }
.nav-item.locked:hover { background: transparent; color: var(--ink-2); }
.nav-item .nav-lock { margin-left: auto; color: var(--ink-4); display: flex; }
.nav-unlock { animation: nav-pop .5s cubic-bezier(.16,1,.3,1); }
@keyframes nav-pop { from { background: var(--violet-tint); } to { background: transparent; } }
