/* =========================================================================
   SendSquared × Claude MCP — Animated demo
   Drop-in: include this file + animations.jsx + app.jsx in any page.
   The whole demo lives under .ss-demo so it can't pollute host styles.
   ========================================================================= */

.ss-demo {
  /* Brand tokens */
  --ss-orange: #FA8400;
  --ss-orange-soft: #FFE6CC;
  --ss-navy-1: #01183f;
  --ss-navy-2: #233a6b;
  --ss-navy-3: #515d8f;
  --ss-gold:  #fed867;

  /* Light theme (default) */
  --ss-bg-color:  #ffffff;
  --ss-bg:        #f6f4ef;
  --ss-bg-page:   #ffffff;
  --ss-surface:   #ffffff;
  --ss-surface-2: #f3efe6;
  --ss-line:      rgba(10, 24, 63, 0.10);
  --ss-line-soft: rgba(10, 24, 63, 0.06);
  --ss-text:      #0d1b3d;
  --ss-text-mute: #5b6477;
  --ss-text-dim:  #8a92a3;
  --ss-user-bubble: #f3efe6;
  --ss-claude-ink: #1a233f;

  /* UI */
  --ss-radius: 14px;
  --ss-radius-lg: 22px;
  --ss-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ss-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", monospace;

  font-family: var(--ss-font-sans);
  color: var(--ss-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ss-demo[data-theme="dark"] {
  --ss-bg-color:  rgb(0,0,0);
  --ss-bg:        #0a1024; 
  --ss-bg-page:   #060a1a; 
  --ss-surface:   #111a36;
  --ss-surface-2: #182446;
  --ss-line:      rgba(255, 255, 255, 0.10);
  --ss-line-soft: rgba(255, 255, 255, 0.05);
  --ss-text:      #eef1fa;
  --ss-text-mute: #9aa3bd;
  --ss-text-dim:  #6c7693;
  --ss-user-bubble: #182446;
  --ss-claude-ink: #eef1fa;
}

/* =========================================================================
   Page chrome (host page that wraps the embed)
   ========================================================================= */
/* host-scoped: removed global html/body reset (Astro embed) */
.ss-mcp-embed {
  background: var(--ss-bg-color, #fff);
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ss-text, #0d1b3d);
}
.ss-page {
  background: var(--ss-bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 4vw, 56px) 20px;
  gap: 28px;
  transition: background 240ms ease;
}
.ss-page[data-theme="dark"] {
  --ss-bg-page: #060a1a;
  --ss-bg-color: #000000;
  --ss-text: #eef1fa;
  background: var(--ss-bg-color);
  color: var(--ss-text);
}

.ss-pagehead {
  width: 100%;
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ss-pagehead-brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.ss-pagehead-brand img { width: 28px; height: 28px; display: block; }
.ss-pagehead-brand .sep {
  width: 1px; height: 18px; background: currentColor; opacity: 0.18;
  margin: 0 4px;
}
.ss-pagehead-brand .mcp {
  color: var(--ss-orange, #FA8400);
  font-family: var(--ss-font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--ss-orange);
  border-radius: 999px;
}

.ss-themetoggle {
  appearance: none;
  border: 1px solid rgba(10, 24, 63, 0.14);
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 120ms ease, border-color 120ms ease;
}
.ss-themetoggle:hover { background: rgba(10, 24, 63, 0.04); }
.ss-page[data-theme="dark"] .ss-themetoggle {
  border-color: rgba(255,255,255,0.16);
}
.ss-page[data-theme="dark"] .ss-themetoggle:hover { background: rgba(255,255,255,0.06); }
.ss-themetoggle svg { width: 14px; height: 14px; }

.ss-caption {
  width: 100%; max-width: 1180px;
  font-size: 14px;
  color: var(--ss-text-mute, #5b6477);
  line-height: 1.5;
}
.ss-caption strong { color: inherit; font-weight: 600; }

/* =========================================================================
   Embed container — switches between desktop browser and mobile phone
   ========================================================================= */
.ss-demo {
  width: 100%;
  max-width: 1180px;
  display: block;
}

.ss-frame-desktop { display: block; }
.ss-frame-mobile  { display: none; }

@media (max-width: 720px) {
  .ss-frame-desktop { display: none; }
  .ss-frame-mobile  { display: flex; justify-content: center; }
}

/* =========================================================================
   Desktop browser frame (macOS-style)
   ========================================================================= */
.ss-browser {
  background: var(--ss-surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 20px 50px rgba(10, 24, 63, 0.15),
    0 4px 10px rgba(10, 24, 63, 0.08);
  border: 1px solid var(--ss-line);
}
.ss-demo[data-theme="dark"] .ss-browser {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 20px 50px rgba(0,0,0,0.45);
}

.ss-browser-bar {
  height: 44px;
  background: var(--ss-surface-2);
  display: flex; align-items: center;
  padding: 0 14px;
  gap: 14px;
  border-bottom: 1px solid var(--ss-line-soft);
}
.ss-traffic {
  display: flex; gap: 8px;
}
.ss-traffic span {
  width: 12px; height: 12px; border-radius: 50%;
  display: block;
}
.ss-traffic span:nth-child(1) { background: #ff5f57; }
.ss-traffic span:nth-child(2) { background: #ffbd2e; }
.ss-traffic span:nth-child(3) { background: #28c940; }

.ss-tabs { display: flex; gap: 4px; align-items: flex-end; height: 100%; flex: 0 1 auto; }
.ss-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px 8px;
  background: var(--ss-surface);
  color: var(--ss-text);
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--ss-line-soft);
  border-bottom: none;
  position: relative; top: 1px;
  max-width: 220px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-tab .dot {
  width: 14px; height: 14px; flex-shrink: 0;
  background: url("assets/sendsquared-logo.svg") center/contain no-repeat;
}

.ss-url {
  flex: 1; min-width: 0;
  height: 28px;
  background: var(--ss-surface);
  border: 1px solid var(--ss-line);
  border-radius: 8px;
  display: flex; align-items: center;
  padding: 0 12px; gap: 8px;
  font-family: var(--ss-font-mono);
  font-size: 11.5px;
  color: var(--ss-text-mute);
  overflow: hidden;
}
.ss-url .lock {
  width: 11px; height: 11px;
  color: var(--ss-text-mute);
}
.ss-url .host { color: var(--ss-text); }

.ss-browser-actions {
  display: flex; gap: 6px; align-items: center;
  color: var(--ss-text-mute);
}
.ss-browser-actions .icn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.ss-browser-actions .icn:hover { background: rgba(10,24,63,0.06); }

.ss-stage-wrap {
  position: relative;
  width: 100%;
  background: var(--ss-bg);
  /* Aspect locked for desktop: 16:10 */
  aspect-ratio: 16 / 10;
}

/* =========================================================================
   Mobile phone frame
   ========================================================================= */
.ss-phone {
  width: 360px;
  max-width: 100%;
  background: var(--ss-navy-1);
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 30px 60px rgba(10,24,63,0.25),
    0 0 0 1px rgba(255,255,255,0.04) inset;
}
.ss-phone-screen {
  background: var(--ss-bg);
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  position: relative;
}
.ss-phone-notch {
  position: absolute;
  top: 8px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 22px;
  background: #000;
  border-radius: 14px;
  z-index: 5;
}
.ss-phone-status {
  position: absolute; top: 0; left: 0; right: 0;
  height: 38px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  font-family: var(--ss-font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ss-text);
  z-index: 4;
}
.ss-phone-status .time { padding-top: 2px; }
.ss-phone-status .indicators {
  display: flex; gap: 5px; align-items: center;
  padding-top: 2px;
}
.ss-phone-status .indicators svg { display: block; }

.ss-phone-stage {
  position: absolute;
  top: 44px; left: 0; right: 0; bottom: 0;
}

/* =========================================================================
   Stage host (the box react renders the animation into)
   ========================================================================= */
.ss-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ss-stage-canvas {
  position: absolute;
  top: 50%; left: 50%;
  transform-origin: center center;
  will-change: transform;
}

/* =========================================================================
   Chat surface (used inside both desktop + mobile)
   ========================================================================= */
.cl-app {
  position: absolute;
  inset: 0;
  background: var(--ss-bg);
  display: flex;
}
.cl-side {
  width: 220px;
  background: var(--ss-surface-2);
  border-right: 1px solid var(--ss-line-soft);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.cl-side-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.cl-side-brand img { width: 22px; height: 22px; }
.cl-side-tag {
  font-family: var(--ss-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ss-orange);
  background: var(--ss-orange-soft);
  padding: 3px 8px;
  border-radius: 999px;
  align-self: flex-start;
}
.ss-demo[data-theme="dark"] .cl-side-tag {
  background: rgba(250,132,0,0.14);
}
.cl-side-section {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ss-text-dim);
  margin-top: 4px;
}
.cl-side-item {
  font-size: 13px;
  color: var(--ss-text-mute);
  padding: 7px 10px;
  border-radius: 8px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cl-side-item.is-active {
  background: var(--ss-surface);
  color: var(--ss-text);
  font-weight: 500;
  box-shadow: 0 1px 0 var(--ss-line-soft);
}
.cl-side-item .ico {
  width: 14px; height: 14px;
  border-radius: 4px;
  background: var(--ss-orange);
  flex-shrink: 0;
  opacity: 0.65;
}
.cl-side-item.is-active .ico { opacity: 1; }

.cl-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  position: relative;
}
.cl-main-head {
  height: 52px;
  border-bottom: 1px solid var(--ss-line-soft);
  display: flex; align-items: center;
  padding: 0 22px;
  gap: 12px;
  font-size: 13px;
  color: var(--ss-text-mute);
}
.cl-main-head .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ss-surface-2);
  font-family: var(--ss-font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ss-text-mute);
}
.cl-main-head .pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #28c940;
  box-shadow: 0 0 0 3px rgba(40,201,64,0.18);
}

.cl-feed {
  flex: 1; min-height: 0;
  overflow: hidden;
  padding: 24px 28px 0;
  display: flex; flex-direction: column;
  gap: 18px;
  position: relative;
}

/* Empty / greeting state — centered hero before user sends */
.cl-hero {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}
.cl-hero-mark {
  width: 56px; height: 56px;
  background: url("assets/sendsquared-logo.svg") center/contain no-repeat;
  opacity: 0.95;
}
.cl-hero-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ss-text);
  line-height: 1.2;
}
.cl-hero-sub {
  font-size: 14px;
  color: var(--ss-text-mute);
  line-height: 1.45;
  max-width: 460px;
}
.cl-hero-chips {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-top: 6px;
}
.cl-hero-chip {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ss-line);
  background: var(--ss-surface);
  color: var(--ss-text-mute);
  font-family: var(--ss-font-mono);
  letter-spacing: 0.02em;
}
.cl-hero-chip.is-active {
  color: var(--ss-orange);
  border-color: rgba(250,132,0,0.35);
  background: var(--ss-orange-soft);
}
.ss-demo[data-theme="dark"] .cl-hero-chip.is-active {
  background: rgba(250,132,0,0.14);
}
.cl-app[data-compact="true"] .cl-hero-mark { width: 40px; height: 40px; }
.cl-app[data-compact="true"] .cl-hero-title { font-size: 16px; }
.cl-app[data-compact="true"] .cl-hero-sub { font-size: 12px; }
.cl-app[data-compact="true"] .cl-hero-chip { font-size: 10px; padding: 5px 9px; }

.cl-msg-user {
  align-self: flex-end;
  max-width: 78%;
  background: var(--ss-user-bubble);
  border: 1px solid var(--ss-line-soft);
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ss-text);
  white-space: pre-wrap;
}

.cl-msg-claude {
  align-self: flex-start;
  max-width: 92%;
  display: flex;
  gap: 12px;
}
.cl-msg-claude .av {
  width: 28px; height: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--ss-orange) 0%, #ff5f00 100%);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: var(--ss-font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cl-msg-claude .body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ss-claude-ink);
}
.cl-msg-claude .body strong { color: var(--ss-text); font-weight: 600; }
.cl-msg-claude .body .mcp-call {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ss-font-mono);
  font-size: 11.5px;
  color: var(--ss-orange);
  background: var(--ss-orange-soft);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.ss-demo[data-theme="dark"] .cl-msg-claude .body .mcp-call {
  background: rgba(250,132,0,0.14);
}

.cl-thinking { display: inline-flex; gap: 4px; align-items: center; }
.cl-thinking span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ss-text-dim);
  opacity: 0.4;
}
@keyframes cl-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40%           { opacity: 1;    transform: translateY(-3px); }
}
.cl-thinking span:nth-child(1) { animation: cl-pulse 1.1s ease-in-out infinite; }
.cl-thinking span:nth-child(2) { animation: cl-pulse 1.1s ease-in-out infinite 0.15s; }
.cl-thinking span:nth-child(3) { animation: cl-pulse 1.1s ease-in-out infinite 0.30s; }

/* Composer */
.cl-composer {
  padding: 14px 28px 22px;
  border-top: 1px solid var(--ss-line-soft);
  background: var(--ss-bg);
}
.cl-composer-box {
  background: var(--ss-surface);
  border: 1px solid var(--ss-line);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex; align-items: center;
  gap: 12px;
  box-shadow: 0 2px 0 rgba(10,24,63,0.03);
  font-size: 14.5px;
  color: var(--ss-text);
  min-height: 44px;
}
.cl-composer-box .prompt {
  flex: 1;
  white-space: pre;
  overflow: hidden;
}
.cl-composer-box .prompt .ph { color: var(--ss-text-dim); }
.cl-composer-box .caret {
  display: inline-block;
  width: 1.5px; height: 16px;
  background: var(--ss-orange);
  vertical-align: middle;
  transform: translateY(2px);
  animation: cl-caret 1s steps(2) infinite;
}
@keyframes cl-caret { 50% { opacity: 0; } }
.cl-composer-box .send {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ss-orange);
  color: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 120ms ease;
}
.cl-composer-box .send.is-armed { transform: scale(1.04); box-shadow: 0 4px 14px rgba(250,132,0,0.32); }

/* =========================================================================
   Report card primitives — bar chart, line chart, KPI grid, table
   ========================================================================= */
.rep-card {
  border: 1px solid var(--ss-line);
  background: var(--ss-surface);
  border-radius: var(--ss-radius);
  padding: 16px 18px;
  margin-top: 10px;
  position: relative;
}
.rep-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.rep-card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ss-text);
}
.rep-card-sub {
  font-family: var(--ss-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ss-text-dim);
}

/* Bar chart */
.rep-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  height: 110px;
}
.rep-bar-col {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  height: 100%;
}
.rep-bar-track {
  width: 100%;
  flex: 1;
  display: flex; flex-direction: column-reverse;
  position: relative;
}
.rep-bar-fill {
  background: linear-gradient(180deg, var(--ss-orange) 0%, #d96a00 100%);
  border-radius: 4px 4px 0 0;
  width: 100%;
  transition: height 60ms linear;
  position: relative;
}
.rep-bar-fill.is-muted {
  background: linear-gradient(180deg, var(--ss-navy-3) 0%, var(--ss-navy-2) 100%);
  opacity: 0.55;
}
.rep-bar-label {
  font-family: var(--ss-font-mono);
  font-size: 9.5px;
  color: var(--ss-text-dim);
  letter-spacing: 0.04em;
}

/* KPI strip */
.rep-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.rep-kpi {
  background: var(--ss-surface-2);
  border: 1px solid var(--ss-line-soft);
  border-radius: 10px;
  padding: 12px 14px;
}
.rep-kpi-label {
  font-family: var(--ss-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ss-text-dim);
  margin-bottom: 6px;
}
.rep-kpi-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ss-text);
  font-variant-numeric: tabular-nums;
}
.rep-kpi-delta {
  margin-top: 4px;
  font-family: var(--ss-font-mono);
  font-size: 11px;
  font-weight: 500;
}
.rep-kpi-delta.up   { color: #1d8a5b; }
.rep-kpi-delta.down { color: #c54545; }

/* Agent leaderboard */
.rep-rows { display: flex; flex-direction: column; gap: 8px; }
.rep-row {
  display: grid;
  grid-template-columns: 18px 1fr 70px 90px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ss-surface-2);
  font-size: 13px;
}
.rep-row .rank {
  font-family: var(--ss-font-mono);
  color: var(--ss-text-dim);
  font-size: 11px;
}
.rep-row .name {
  display: flex; align-items: center; gap: 8px;
  color: var(--ss-text);
  font-weight: 500;
}
.rep-row .avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px;
  font-weight: 600;
  flex-shrink: 0;
}
.rep-row .stat {
  font-family: var(--ss-font-mono);
  color: var(--ss-text-mute);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.rep-row .meter {
  height: 6px; border-radius: 3px;
  background: var(--ss-line-soft);
  position: relative;
  overflow: hidden;
}
.rep-row .meter-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--ss-orange), var(--ss-gold));
  border-radius: 3px;
}

/* Line chart for revenue */
.rep-line-wrap {
  height: 130px;
  position: relative;
}
.rep-line-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.rep-line-grid line { stroke: var(--ss-line-soft); stroke-width: 1; }
.rep-line-area { fill: url(#repGradient); opacity: 0.85; }
.rep-line-path {
  fill: none;
  stroke: var(--ss-orange);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rep-line-marker {
  fill: white;
  stroke: var(--ss-orange);
  stroke-width: 2.5;
}
.rep-line-label {
  font-family: var(--ss-font-mono);
  font-size: 9.5px;
  fill: var(--ss-text-dim);
  letter-spacing: 0.04em;
}

/* Big metric callout (for scene 3) */
.rep-callout {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--ss-orange-soft) 0%, rgba(255,230,204,0.4) 100%);
  border-radius: 12px;
  border: 1px solid rgba(250,132,0,0.25);
}
.ss-demo[data-theme="dark"] .rep-callout {
  background: linear-gradient(135deg, rgba(250,132,0,0.18) 0%, rgba(250,132,0,0.06) 100%);
  border-color: rgba(250,132,0,0.35);
}
.rep-callout-num {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ss-text);
  font-variant-numeric: tabular-nums;
}
.rep-callout-label {
  font-size: 13px;
  color: var(--ss-text-mute);
  line-height: 1.4;
}

/* =========================================================================
   Compact (phone) variant — same chat, no sidebar, tighter type
   ========================================================================= */
.cl-app[data-compact="true"] .cl-side { display: none; }
.cl-app[data-compact="true"] .cl-main-head {
  height: 40px;
  padding: 0 14px;
  font-size: 12px;
}
.cl-app[data-compact="true"] .cl-feed {
  padding: 12px 14px 0;
  gap: 12px;
}
.cl-app[data-compact="true"] .cl-msg-user {
  font-size: 13px;
  padding: 9px 12px;
  max-width: 86%;
  border-radius: 14px 14px 4px 14px;
}
.cl-app[data-compact="true"] .cl-msg-claude .av { width: 22px; height: 22px; font-size: 10.5px; }
.cl-app[data-compact="true"] .cl-msg-claude .body { font-size: 12.5px; }
.cl-app[data-compact="true"] .cl-msg-claude .body .mcp-call { font-size: 9.5px; padding: 2px 6px; margin-bottom: 6px; }
.cl-app[data-compact="true"] .cl-composer { padding: 10px 14px 16px; }
.cl-app[data-compact="true"] .cl-composer-box { padding: 9px 12px; font-size: 12.5px; min-height: 38px; }
.cl-app[data-compact="true"] .cl-composer-box .send { width: 28px; height: 28px; }
.cl-app[data-compact="true"] .rep-card { padding: 12px 12px; margin-top: 8px; }
.cl-app[data-compact="true"] .rep-card-title { font-size: 11.5px; }
.cl-app[data-compact="true"] .rep-card-sub  { font-size: 9px; }
.cl-app[data-compact="true"] .rep-kpi-value { font-size: 17px; }
.cl-app[data-compact="true"] .rep-kpi { padding: 9px 10px; }
.cl-app[data-compact="true"] .rep-row { padding: 6px 8px; font-size: 11.5px; gap: 8px; }
.cl-app[data-compact="true"] .rep-row .avatar { width: 18px; height: 18px; font-size: 9px; }
.cl-app[data-compact="true"] .rep-row .stat { font-size: 10.5px; }
.cl-app[data-compact="true"] .rep-callout { padding: 10px 12px; margin-top: 10px; gap: 8px; }
.cl-app[data-compact="true"] .rep-callout-num { font-size: 24px; }
.cl-app[data-compact="true"] .rep-callout-label { font-size: 11.5px; }
.cl-app[data-compact="true"] .rep-bar-label { font-size: 8.5px; }

/* =========================================================================
   Caret + typewriter helper
   ========================================================================= */
.cl-caret {
  display: inline-block;
  width: 7px; height: 1.05em;
  background: var(--ss-text);
  vertical-align: -2px;
  margin-left: 2px;
  opacity: 0.7;
  animation: cl-caret 0.9s steps(2) infinite;
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .cl-thinking span,
  .cl-caret,
  .cl-composer-box .caret { animation: none; }
}
