/* Extra — design tokens v1.3 (17 octobre 2026) */
@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* Lampe à lave : les quatre lueurs de l'Aurore nuit dérivent lentement dans les boutons d'action.
   Propriétés enregistrées pour que le navigateur interpole leurs positions. */
@property --lava-a-x { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --lava-a-y { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --lava-b-x { syntax: '<percentage>'; inherits: false; initial-value: 75%; }
@property --lava-b-y { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --lava-c-x { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
@property --lava-c-y { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
@property --lava-d-x { syntax: '<percentage>'; inherits: false; initial-value: 6%; }
@property --lava-d-y { syntax: '<percentage>'; inherits: false; initial-value: 100%; }

:root {
  color-scheme: light;

  /* Neutres */
  --color-ink: #1D1D1F;
  --color-graphite: #424245;
  --color-slate: #4A4A4F;
  --color-muted: #6E6E73;
  --color-placeholder: #8A8A8F;
  --color-line: #E6E6EB;
  --color-line-soft: #EFEFF2;
  --color-stone: #F5F5F7;
  --color-stone-strong: #EFEFF2;
  --color-paper: #FFFFFF;

  /* Encre : surfaces fortes (menu, étiquette du héros, bandeau d'outils, appel final, pied de page) */
  --on-ink: #FFFFFF;
  --on-ink-muted: rgba(255, 255, 255, 0.72);
  --on-ink-faint: rgba(255, 255, 255, 0.6);
  --on-ink-line: rgba(255, 255, 255, 0.12);
  --on-ink-glass: rgba(255, 255, 255, 0.1);

  /* Accent et nuit */
  --color-accent: #4B3BD9;
  --color-accent-soft: #ECEAFB;
  --color-night: #12143F;
  --color-night-button: #14164A;

  /* Éclats */
  --spark-blue: #2E5BFF;
  --spark-indigo: #4B3BD9;
  --spark-violet: #8A3FFC;
  --spark-magenta: #C23CB0;
  --spark-rose: #E0457B;
  --spark-coral: #FF6A55;
  --spark-amber: #FF9F45;
  --spark-teal: #1FB5A8;

  /* Statuts */
  --status-pending-bg: #FFF1DD;  --status-pending-fg: #8A5300;
  --status-done-bg: #DDF3E3;     --status-done-fg: #1F6B45;
  --status-idle-bg: #EFEFF2;     --status-idle-fg: #4A4A4F;
  --status-error-bg: #FBE3DF;    --status-error-fg: #A32A1F;

  /* Agents : teinte / encre */
  --agent-marketing-tint: #DDF3E3;           --agent-marketing-ink: #1F6B45;
  --agent-seo-geo-tint: #DAF1F2;             --agent-seo-geo-ink: #13617A;
  --agent-website-builder-tint: #D9E8FC;     --agent-website-builder-ink: #2648A3;
  --agent-phone-support-tint: #E3E2FC;       --agent-phone-support-ink: #46359E;
  --agent-executive-assistant-tint: #EDE2FC; --agent-executive-assistant-ink: #71308F;
  --agent-finance-tint: #FCEBD3;             --agent-finance-ink: #8A5300;
  --agent-legal-tint: #FBDDD5;               --agent-legal-ink: #963A1C;
  --agent-reputation-tint: #FADDE7;          --agent-reputation-ink: #8E2443;

  /* Dégradés */
  --gradient-aurora:
    radial-gradient(70% 90% at 0% 0%, rgba(46, 91, 255, 0.95) 0%, rgba(46, 91, 255, 0) 60%),
    radial-gradient(60% 80% at 100% 0%, rgba(138, 63, 252, 0.9) 0%, rgba(138, 63, 252, 0) 62%),
    radial-gradient(65% 75% at 100% 100%, rgba(224, 69, 123, 0.85) 0%, rgba(224, 69, 123, 0) 60%),
    radial-gradient(55% 65% at 6% 100%, rgba(255, 128, 72, 0.7) 0%, rgba(255, 128, 72, 0) 60%),
    #12143F;
  --gradient-aurora-night:
    radial-gradient(90% 160% at 0% 0%, rgba(46, 91, 255, 0.95) 0%, rgba(46, 91, 255, 0) 60%),
    radial-gradient(70% 140% at 75% 0%, rgba(138, 63, 252, 0.85) 0%, rgba(138, 63, 252, 0) 60%),
    radial-gradient(90% 170% at 100% 100%, rgba(224, 69, 123, 0.8) 0%, rgba(224, 69, 123, 0) 55%),
    #14164A;
  --gradient-text: linear-gradient(100deg, #2E5BFF 0%, #8A3FFC 55%, #E0457B 100%);
  /* En mouvement (v1.3) : deux fois plus large que le mot, il glisse d'un bout à l'autre. */
  --gradient-text-flow: linear-gradient(100deg, #2E5BFF 0%, #8A3FFC 27%, #E0457B 50%, #FF6A55 75%, #8A3FFC 100%);
  --gradient-flow: linear-gradient(90deg, #2E5BFF, #8A3FFC, #E0457B, #FF6A55, #8A3FFC, #2E5BFF);
  /* Icône d'app (design/brand/app-icon) : anneau conique bleu, violet, rose, orange, cœur bleu nuit. */
  --gradient-icon:
    radial-gradient(64% 64% at 50% 50%, #12143F 0%, #12143F 20%, rgba(18, 20, 63, 0.55) 64%, rgba(18, 20, 63, 0.26) 100%),
    conic-gradient(from 315deg, #2E5BFF, #8A3FFC 25%, #E0457B 50%, #F27A4C 75%, #2E5BFF);

  /* Typographie */
  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-display: clamp(42px, 6.6vw, 96px);
  --text-closing: clamp(46px, 6.4vw, 96px);
  --text-h2: clamp(42px, 5.6vw, 80px);
  --text-h3-lg: 30px;
  --text-h3: 22px;
  --text-lead: clamp(19px, 1.8vw, 24px);
  --text-eyebrow: 19px;
  --text-body: 17px;
  --text-ui: 15px;
  --text-caption: 12.5px;
  --tracking-display: -0.05em;
  --tracking-h2: -0.048em;
  --tracking-h3: -0.04em;

  /* Espacement */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px;
  --space-9: 56px; --space-10: 64px;
  --space-section: clamp(88px, 10vw, 140px);
  --space-hero: clamp(64px, 8vw, 112px);
  --gutter: clamp(12px, 2vw, 22px);
  --container-text: 1100px;
  --container-nav: 1180px;
  --container-wide: 1320px;

  /* Rayons */
  --radius-pill: 999px;
  --radius-stage: 44px;
  --radius-tile: 32px;
  --radius-window: 24px;
  --radius-card: 16px;
  --radius-field: 14px;
  --radius-bubble: 20px;
  --radius-portrait: 31%;

  /* Ombres */
  --shadow-nav: 0 1px 2px rgba(0, 0, 0, 0.03), 0 12px 32px -16px rgba(20, 22, 60, 0.18);
  --shadow-card: 0 18px 40px -24px rgba(20, 22, 60, 0.25);
  --shadow-portrait: 0 16px 28px -16px rgba(30, 30, 60, 0.45);
  --shadow-window: 0 40px 100px -30px rgba(8, 8, 40, 0.6);
  --shadow-button: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 30px -12px rgba(70, 50, 190, 0.7);

  /* Mouvement */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 200ms;
  --duration-base: 240ms;
  --duration-reveal: 480ms;
  --ease-lava: cubic-bezier(0.45, 0, 0.55, 1);
  --focus-ring: 0 0 0 3px var(--color-paper), 0 0 0 5px var(--color-accent);
}

/* Utilitaires de base */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 28px; border: 0; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-button);
  color: #fff; font: 600 17px/1 var(--font-sans); text-decoration: none;
  transition: transform var(--duration-fast) var(--ease), filter var(--duration-fast) var(--ease);
}
/* Aurore nuit en lampe à lave. Par défaut, le dégradé immobile. La page pose la classe has-lava sur
   <html> seulement si le navigateur sait interpoler les propriétés enregistrées : alors les lueurs
   suivent --lava-*. Pas de valeur de secours dans var() : avec une valeur de secours, Chrome garde le
   dégradé figé à sa position de départ dans la propriété raccourcie `background`. */
.btn-primary, .lava {
  background: var(--gradient-aurora-night);
}
html.has-lava .btn-primary, html.has-lava .lava {
  background:
    radial-gradient(70% 140% at var(--lava-a-x) var(--lava-a-y), rgba(46, 91, 255, 0.95) 0%, rgba(46, 91, 255, 0) 62%),
    radial-gradient(60% 125% at var(--lava-b-x) var(--lava-b-y), rgba(138, 63, 252, 0.9) 0%, rgba(138, 63, 252, 0) 62%),
    radial-gradient(70% 145% at var(--lava-c-x) var(--lava-c-y), rgba(224, 69, 123, 0.85) 0%, rgba(224, 69, 123, 0) 60%),
    radial-gradient(55% 120% at var(--lava-d-x) var(--lava-d-y), rgba(255, 106, 85, 0.7) 0%, rgba(255, 106, 85, 0) 62%),
    var(--color-night-button);
}
html.has-lava .btn-primary, html.has-lava .lava {
  animation:
    lava-a 8s var(--ease-lava) infinite alternate,
    lava-b 10s var(--ease-lava) infinite alternate,
    lava-c 12s var(--ease-lava) infinite alternate,
    lava-d 9s var(--ease-lava) infinite alternate;
}
@keyframes lava-a { 50% { --lava-a-x: 60%; --lava-a-y: 100%; } 100% { --lava-a-x: 100%; --lava-a-y: 0%; } }
@keyframes lava-b { 50% { --lava-b-x: 10%; --lava-b-y: 80%; } 100% { --lava-b-x: 50%; --lava-b-y: 100%; } }
@keyframes lava-c { 50% { --lava-c-x: 35%; --lava-c-y: 0%; } 100% { --lava-c-x: 0%; --lava-c-y: 70%; } }
@keyframes lava-d { 50% { --lava-d-x: 90%; --lava-d-y: 90%; } 100% { --lava-d-x: 25%; --lava-d-y: 0%; } }
.btn-primary:hover { filter: brightness(1.08) saturate(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.text-aurora {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-aurora { color: var(--color-accent); background: none; }
}
.surface-aurora { position: relative; overflow: hidden; background: var(--gradient-aurora); color: #fff; }
.surface-aurora > .grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.22; mix-blend-mode: overlay; pointer-events: none; }
.field { display: grid; gap: var(--space-2); }
.field label { font: 500 var(--text-ui)/1.3 var(--font-sans); color: var(--color-ink); }
.field input, .field select {
  height: 52px; padding: 0 var(--space-4); border: 1px solid transparent; border-radius: var(--radius-field);
  background: var(--color-stone); color: var(--color-ink); font: 400 16px/1.2 var(--font-sans);
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}
.field input::placeholder { color: var(--color-placeholder); }
.field input:focus-visible, .field select:focus-visible {
  outline: none; background: var(--color-paper); border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(75, 59, 217, 0.15);
}
.field [aria-invalid="true"] { border-color: var(--status-error-fg); }
.field .field-error { font: 400 14px/1.4 var(--font-sans); color: var(--status-error-fg); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* Extra app — design system v1.3 (design/DESIGN-SYSTEM.md, « Fenêtre produit »).
   design/tokens.css is prepended to this file when it is served (scripts/styles.mjs): every value below comes from
   those tokens or from the app tokens defined here. The app sits on the Aurora like the site's product window:
   a glass sidebar with white text, and a card holding the conversation and the work panel. */

/* ---------- App tokens ---------- */
:root {
  color-scheme: light;
  --surface: var(--color-paper);
  --surface-sunken: var(--color-stone);
  --surface-strong: var(--color-stone-strong);
  --surface-raised: var(--color-paper);
  --surface-hover: #e6e6eb;
  --text: var(--color-ink);
  --text-2: var(--color-graphite);
  --text-muted: var(--color-muted);
  --text-faint: var(--color-placeholder);
  --line: var(--color-line);
  --line-soft: var(--color-line-soft);
  --accent: var(--color-accent);
  --accent-fill: var(--color-accent);
  --accent-soft: var(--color-accent-soft);
  --accent-on-soft: var(--color-accent);
  --focus: var(--color-accent);
  --focus-halo: 0 0 0 4px rgba(75, 59, 217, 0.15);
  --email-bg: #fafafb;
  --pending-bg: var(--status-pending-bg);
  --pending-fg: var(--status-pending-fg);
  --done-bg: var(--status-done-bg);
  --done-fg: var(--status-done-fg);
  --idle-bg: var(--status-idle-bg);
  --idle-fg: var(--status-idle-fg);
  --error-bg: var(--status-error-bg);
  --error-fg: var(--status-error-fg);
  --scrim: rgba(18, 20, 63, 0.42);
  --card-shadow: 0 1px 3px rgba(8, 8, 40, 0.2), 0 30px 80px -40px rgba(8, 8, 40, 0.55);
  --pop-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(20, 22, 60, 0.35);
  /* On the Aurora (sidebar, sign-in screen). Status dots of the design system: they only appear there. */
  --on-aurora: #fff;
  --on-aurora-muted: rgba(255, 255, 255, 0.78);
  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-hover: rgba(255, 255, 255, 0.2);
  --glass-border: rgba(255, 255, 255, 0.28);
  --dot-pending: #ffb547;
  --dot-done: #5fe0a0;
  /* The Aurora behind the app is the design system's, its four lights at 62 % over the night: white text on the
     sidebar keeps at least 4.5:1 wherever the lights drift. */
  --aurora-lights: 0.62;
  --radius-dialog: 28px;
  --gap: 8px;
  --sidebar-w: 252px;
  --work-w: clamp(360px, 31vw, 460px);
}
/* Dark theme of the app (the site has none). The Aurora stays; the card turns to ink. Contrasts are measured on
   --surface: text 16:1, muted 7:1, accent 6.9:1, focus ring 6.9:1. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #161618;
    --surface-sunken: #222225;
    --surface-strong: #2c2c30;
    --surface-raised: #1e1e21;
    --surface-hover: #37373c;
    --text: #f5f5f7;
    --text-2: #d2d2d7;
    --text-muted: #a1a1a6;
    --text-faint: #7c7c82;
    --line: #333338;
    --line-soft: #29292d;
    --accent: #9d93ff;
    --accent-soft: rgba(124, 110, 255, 0.2);
    --accent-on-soft: #c9c2ff;
    --focus: #9d93ff;
    --focus-halo: 0 0 0 4px rgba(157, 147, 255, 0.2);
    --email-bg: #1e1e21;
    --pending-bg: rgba(255, 159, 69, 0.18);
    --pending-fg: #ffc98a;
    --done-bg: rgba(95, 224, 160, 0.16);
    --done-fg: #8be8b5;
    --idle-bg: #2c2c30;
    --idle-fg: #c7c7cc;
    --error-bg: rgba(255, 106, 85, 0.16);
    --error-fg: #ff9c8c;
    --scrim: rgba(0, 0, 0, 0.6);
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 30px 80px -40px rgba(0, 0, 0, 0.8);
    --pop-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #161618;
  --surface-sunken: #222225;
  --surface-strong: #2c2c30;
  --surface-raised: #1e1e21;
  --surface-hover: #37373c;
  --text: #f5f5f7;
  --text-2: #d2d2d7;
  --text-muted: #a1a1a6;
  --text-faint: #7c7c82;
  --line: #333338;
  --line-soft: #29292d;
  --accent: #9d93ff;
  --accent-soft: rgba(124, 110, 255, 0.2);
  --accent-on-soft: #c9c2ff;
  --focus: #9d93ff;
  --focus-halo: 0 0 0 4px rgba(157, 147, 255, 0.2);
  --email-bg: #1e1e21;
  --pending-bg: rgba(255, 159, 69, 0.18);
  --pending-fg: #ffc98a;
  --done-bg: rgba(95, 224, 160, 0.16);
  --done-fg: #8be8b5;
  --idle-bg: #2c2c30;
  --idle-fg: #c7c7cc;
  --error-bg: rgba(255, 106, 85, 0.16);
  --error-fg: #ff9c8c;
  --scrim: rgba(0, 0, 0, 0.6);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 30px 80px -40px rgba(0, 0, 0, 0.8);
  --pop-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}

/* ---------- Agent colours: tint and ink of the design system ---------- */
[data-agent="marketing"] {
  --agent-tint: var(--agent-marketing-tint);
  --agent-ink: var(--agent-marketing-ink);
}
[data-agent="seo-geo"] {
  --agent-tint: var(--agent-seo-geo-tint);
  --agent-ink: var(--agent-seo-geo-ink);
}
[data-agent="website-builder"] {
  --agent-tint: var(--agent-website-builder-tint);
  --agent-ink: var(--agent-website-builder-ink);
}
[data-agent="phone-support"] {
  --agent-tint: var(--agent-phone-support-tint);
  --agent-ink: var(--agent-phone-support-ink);
}
[data-agent="executive-assistant"] {
  --agent-tint: var(--agent-executive-assistant-tint);
  --agent-ink: var(--agent-executive-assistant-ink);
}
[data-agent="finance"] {
  --agent-tint: var(--agent-finance-tint);
  --agent-ink: var(--agent-finance-ink);
}
[data-agent="legal"] {
  --agent-tint: var(--agent-legal-tint);
  --agent-ink: var(--agent-legal-ink);
}
[data-agent="reputation"] {
  --agent-tint: var(--agent-reputation-tint);
  --agent-ink: var(--agent-reputation-ink);
}
/* Label background and text: the tint with the ink on it; in dark, a deep shade of the ink with the tint on it. */
[data-agent] {
  --agent-bg: var(--agent-tint);
  --agent-fg: var(--agent-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-agent] {
    --agent-bg: color-mix(in oklab, var(--agent-ink) 45%, var(--surface));
    --agent-fg: var(--agent-tint);
  }
}
:root[data-theme="dark"] [data-agent] {
  --agent-bg: color-mix(in oklab, var(--agent-ink) 45%, var(--surface));
  --agent-fg: var(--agent-tint);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--color-night);
  color: var(--text);
  font: 400 15px / 1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
textarea {
  resize: none;
}
::placeholder {
  color: var(--text-faint);
  opacity: 1;
}
[hidden] {
  display: none !important;
}
.sprite,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.muted {
  color: var(--text-muted);
}
button,
.chat-link,
.artifact-link {
  transition:
    background-color var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease),
    filter var(--duration-fast) var(--ease);
}

/* ---------- Aurora (behind the whole app, and the sign-in screen) ---------- */
/* Its four lights sit on two layers larger than the screen, which drift by transforms only (cheap). They move more
   slowly than on the site: the app stays open all day. Still with reduced motion, or without registered properties. */
.aurora,
.session-gate {
  background: var(--color-night);
  isolation: isolate;
  overflow: hidden;
}
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.aurora::before,
.aurora::after,
.session-gate::before,
.session-gate::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  pointer-events: none;
  opacity: var(--aurora-lights);
}
.session-gate::before,
.session-gate::after {
  position: fixed;
  opacity: 1;
}
.aurora::before,
.session-gate::before {
  background:
    radial-gradient(44% 56% at 19% 19%, rgba(46, 91, 255, 0.95) 0%, rgba(46, 91, 255, 0) 60%),
    radial-gradient(41% 47% at 81% 81%, rgba(224, 69, 123, 0.85) 0%, rgba(224, 69, 123, 0) 60%);
}
.aurora::after,
.session-gate::after {
  background:
    radial-gradient(38% 50% at 81% 19%, rgba(138, 63, 252, 0.9) 0%, rgba(138, 63, 252, 0) 62%),
    radial-gradient(34% 41% at 22% 81%, rgba(255, 128, 72, 0.7) 0%, rgba(255, 128, 72, 0) 60%);
}
html.has-lava .aurora::before,
html.has-lava .session-gate::before {
  animation: aurora-a 18s var(--ease-lava) infinite alternate;
}
html.has-lava .aurora::after,
html.has-lava .session-gate::after {
  animation: aurora-b 24s var(--ease-lava) infinite alternate;
}
@keyframes aurora-a {
  50% {
    transform: translate(14%, 10%) rotate(14deg) scale(1.12);
  }
  100% {
    transform: translate(-12%, 8%) rotate(-10deg) scale(0.94);
  }
}
@keyframes aurora-b {
  50% {
    transform: translate(-13%, -9%) rotate(-16deg) scale(1.14);
  }
  100% {
    transform: translate(10%, -12%) rotate(10deg) scale(0.96);
  }
}
.grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.session-gate > .grain {
  position: fixed;
}

/* ---------- Shell ---------- */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}
.app-card {
  display: flex;
  min-width: 0;
  margin: var(--gap) var(--gap) var(--gap) 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

/* ---------- Sidebar: glass on the Aurora, white text ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 10px 10px 14px;
  color: var(--on-aurora);
}
.brand {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 6px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.225em;
  font: 600 21px / 1 var(--font-sans);
  letter-spacing: -0.045em;
}
.logo .prism {
  width: 1em;
  height: 1em;
  stroke: none;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.workspace > div {
  min-width: 0;
}
.workspace #ws-name {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.workspace small,
.sidebar-bottom small {
  display: block;
  color: var(--on-aurora-muted);
  font-size: 12px;
  font-weight: 500;
}
.workspace-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--glass-bg);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  color: var(--on-aurora);
  font-size: 14px;
  font-weight: 600;
}
.new-chat:hover {
  background: var(--glass-hover);
}
.new-chat:active {
  transform: scale(0.98);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin-top: 6px;
  padding: 0 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-aurora-muted);
}
.search svg {
  width: 16px;
  height: 16px;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--on-aurora);
  font-size: 14px;
}
.search input::placeholder {
  color: var(--on-aurora-muted);
}
.search:focus-within {
  box-shadow: 0 0 0 2px #fff;
}
.sidebar :focus-visible {
  outline-color: #fff;
}
.list-label {
  margin: 18px 10px 4px;
  color: var(--on-aurora-muted);
  font-size: 12px;
  font-weight: 600;
}
.chat-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  margin: 0 -4px;
  padding: 0 4px 4px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.chat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px 0 8px;
  border-radius: 11px;
  color: var(--on-aurora);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
}
.chat-link:hover {
  background: rgba(255, 255, 255, 0.1);
}
.chat-link[aria-current="true"] {
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}
.chat-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat-link .avatar.blank {
  display: grid;
  place-items: center;
  background: none;
  color: var(--on-aurora-muted);
}
.chat-status {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.chat-status.pending {
  background: var(--dot-pending);
}
.chat-status.working {
  background: #fff;
  animation: pulse 1.1s var(--ease) infinite;
}
.empty-search {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin: 4px 10px;
  color: var(--on-aurora-muted);
  font-size: 13px;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  background: var(--glass-bg);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  color: var(--on-aurora);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}
.sidebar-bottom:hover {
  background: var(--glass-hover);
}
.sidebar-bottom-label {
  flex: 1;
  min-width: 0;
}
.sidebar-bottom > svg {
  width: 16px;
  height: 16px;
  color: var(--on-aurora-muted);
}
.owner {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.owner svg {
  width: 16px;
  height: 16px;
}

/* ---------- Icon buttons ---------- */
.icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
}
.icon:hover:not(:disabled) {
  background: var(--surface-strong);
  color: var(--text);
}
.icon:disabled {
  opacity: 0.4;
}
.icon.active {
  background: var(--accent-soft);
  color: var(--accent-on-soft);
}
.sidebar .icon {
  color: var(--on-aurora);
}
.sidebar .icon:hover {
  background: var(--glass-hover);
  color: var(--on-aurora);
}

/* ---------- Buttons, pills, labels ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.btn.primary {
  color: #fff;
  box-shadow: var(--shadow-button);
}
.btn.primary:hover:not(:disabled) {
  filter: brightness(1.08) saturate(1.1);
  transform: translateY(-1px);
}
.btn.primary:active:not(:disabled) {
  transform: scale(0.98);
}
.btn.primary:disabled,
.send.lava:disabled {
  background: var(--surface-strong);
  color: var(--text-faint);
  box-shadow: none;
  animation: none;
}
.btn.quiet {
  background: var(--surface-strong);
  color: var(--text);
}
.btn.quiet:hover:not(:disabled) {
  background: var(--surface-hover);
}
.btn.quiet:disabled {
  color: var(--text-faint);
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.chip-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}
.chip-btn svg {
  width: 14px;
  height: 14px;
}
.chip-btn[disabled] {
  opacity: 0.55;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--idle-bg);
  color: var(--idle-fg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.pill.ok {
  background: var(--done-bg);
  color: var(--done-fg);
}
.pill.pending {
  background: var(--pending-bg);
  color: var(--pending-fg);
}
/* Specialists are always labelled as AI (EU AI Act art. 50). */
.ai-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-on-soft);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 17px;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}
.agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 3px 12px 3px 3px;
  border-radius: var(--radius-pill);
  background: var(--agent-bg);
  color: var(--agent-fg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Avatars: the 3D portraits as squircles ---------- */
.avatar {
  display: inline-block;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--surface-sunken) center / cover no-repeat;
}
.avatar.md {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}
.avatar.sm {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}
.avatar.xs {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}
.agent-chip .avatar.xs {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

/* ---------- Conversation ---------- */
.conversation {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.chat-header {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 12px 0 24px;
  border-bottom: 1px solid var(--line-soft);
}
.chat-header h1 {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.messages {
  flex: 1;
  padding: 28px 32px 24px;
  overflow: auto;
  scroll-behavior: smooth;
}
.message {
  max-width: 720px;
  margin: 0 auto 24px;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.message.user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.user-text {
  max-width: 76%;
  padding: 11px 16px;
  border-radius: var(--radius-bubble) var(--radius-bubble) 6px var(--radius-bubble);
  background: var(--accent-fill);
  color: #fff;
  white-space: pre-wrap;
}
.message.agent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.agent-body {
  flex: 1;
  min-width: 0;
}
.agent-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  min-height: 20px;
  margin: 1px 0 6px;
  font-size: 13px;
  font-weight: 600;
}
.agent-byline .ai-badge {
  margin-left: 0;
}
.byline-job {
  color: var(--text-muted);
  font-weight: 400;
}
.agent-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.agent-text > * {
  max-width: 100%;
}
.bubble {
  padding: 12px 16px;
  border-radius: 6px var(--radius-bubble) var(--radius-bubble) var(--radius-bubble);
  background: var(--surface-sunken);
}
.bubble > :first-child {
  margin-top: 0;
}
.bubble > :last-child {
  margin-bottom: 0;
}
.bubble p {
  margin: 0 0 12px;
}
.bubble strong {
  font-weight: 600;
}
.bubble h3,
.bubble h4,
.bubble h5 {
  margin: 16px 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.bubble ul,
.bubble ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
.bubble pre,
.art-text pre {
  padding: 12px;
  overflow-x: auto;
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
}
.bubble blockquote {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--text-2);
}
.empty-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}
.loading {
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 14px;
}
/* The specialist's steps, as on the site's demo: each one runs (ring, shimmering label), then gets its check. */
.live {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.steps {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 28px;
  padding: 3px 11px 3px 7px;
  border-radius: var(--radius-pill);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
}
.step.done {
  background: var(--accent-soft);
  box-shadow: none;
}
.step:not(.done) .step-label {
  background: linear-gradient(90deg, var(--text-muted) 30%, var(--text) 50%, var(--text-muted) 70%) 0 0 / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.6s linear infinite;
}
.tick {
  display: grid;
  place-items: center;
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
}
.tick svg {
  width: 10px;
  height: 10px;
  stroke-width: 3;
}
.spinner {
  flex: none;
  width: 13px;
  height: 13px;
  border: 1.6px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.step-count {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.working {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px 0 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-on-soft);
  font-size: 12.5px;
  font-weight: 600;
}
.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.1s var(--ease) infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}
.handover {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  margin: 4px auto 24px;
  color: var(--agent-fg);
  font-size: 12.5px;
  font-weight: 600;
}
.handover::before,
.handover::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}
.msg-actions {
  display: flex;
  gap: 6px;
}
.msg-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12.5px;
}
.msg-source svg {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}
.msg-source small {
  flex-basis: 100%;
  text-align: right;
}
audio {
  width: 100%;
  max-width: 420px;
  height: 36px;
}
.msg-source audio {
  max-width: 260px;
  height: 34px;
}
/* Result card in the conversation: opens the work panel. Takes the specialist's tint on hover. */
.artifact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 460px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
}
.artifact-link:hover {
  --artifact-meta: var(--agent-fg);
  background: var(--agent-bg);
  box-shadow: inset 0 0 0 1px transparent;
}
.artifact-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 13px;
  background: var(--agent-bg);
}
.artifact-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.artifact-text {
  flex: 1;
  min-width: 0;
}
.artifact-link strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.artifact-link small {
  display: block;
  margin-top: 2px;
  color: var(--artifact-meta, var(--text-muted));
  font-size: 12.5px;
}
.artifact-link > svg {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
}
/* Cards: decisions (the design system's validation card), connections, failures, notices. */
.card {
  width: 100%;
  max-width: 520px;
  margin: 0;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  line-height: 1.5;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.card b {
  display: block;
  color: var(--card-title, inherit);
  font-size: 15px;
  font-weight: 600;
}
.card-head b {
  margin: 0;
}
.card > b {
  margin-bottom: 4px;
}
.card p {
  margin: 0 0 12px;
  color: var(--card-text, var(--text-2));
}
.card p:last-child {
  margin-bottom: 0;
}
.card .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card.decision {
  box-shadow:
    inset 0 0 0 1px var(--line),
    var(--shadow-card);
}
.card.error {
  --card-title: var(--error-fg);
  --card-text: var(--text);
  background: var(--error-bg);
  box-shadow: none;
}
.card.conflict {
  --card-title: var(--pending-fg);
  outline: none;
  background: var(--pending-bg);
  box-shadow: none;
}
.err-code {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.load-error {
  margin: 0 auto;
}

/* ---------- Composer ---------- */
.composer-region {
  flex: none;
  padding: 8px 24px 18px;
}
.composer {
  position: relative;
  padding: 8px 8px 8px 14px;
  border: 1px solid transparent;
  border-radius: 26px;
  background: var(--surface-sunken);
  transition:
    background-color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
}
.composer:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--focus-halo);
}
.composer > textarea {
  display: block;
  width: 100%;
  min-height: 34px;
  max-height: 180px;
  padding: 6px 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.45;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}
.composer-spacer {
  flex: 1;
}
.agent-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 36px;
  padding: 0 10px 0 4px;
  border-radius: var(--radius-pill);
  background: var(--agent-bg);
  color: var(--agent-fg);
  font-size: 13.5px;
  font-weight: 600;
}
.agent-trigger:hover,
.agent-trigger[aria-expanded="true"] {
  filter: saturate(1.15) brightness(0.97);
}
.agent-trigger-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.agent-trigger-role {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  opacity: 0.85;
}
.agent-trigger > svg {
  width: 14px;
  height: 14px;
}
.send {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  margin-left: 4px;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff;
}
.send svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}
.send:hover:not(:disabled) {
  filter: brightness(1.08) saturate(1.1);
  transform: translateY(-1px);
}
.send:active:not(:disabled) {
  transform: scale(0.94);
}
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 6px;
  padding: 5px 6px 5px 11px;
  border-radius: 10px;
  background: var(--surface-strong);
  font-size: 12.5px;
  font-weight: 500;
}
.attachment span {
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.attachment button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.attachment button:hover {
  background: var(--surface-hover);
}
.attachment svg {
  width: 13px;
  height: 13px;
}
.attachment.uploading {
  opacity: 0.7;
}
.attachment.failed {
  background: var(--error-bg);
  color: var(--error-fg);
}
.transcript-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 0;
  color: var(--text-muted);
  font-size: 12.5px;
}
.transcript-note svg {
  width: 14px;
  height: 14px;
}
.transcript-note b {
  color: var(--text);
  font-weight: 600;
}
.recording {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 6px;
  font-size: 13.5px;
  font-weight: 500;
}
.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--error-fg);
  animation: pulse 1s ease-in-out infinite;
}
.rec-dot.waiting {
  background: var(--text-faint);
}
/* Specialist picker, above the composer */
.agent-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(340px, calc(100vw - 32px));
  max-height: min(500px, 70dvh);
  padding: 6px;
  overflow: auto;
  border-radius: 20px;
  background: var(--surface-raised);
  box-shadow: var(--pop-shadow);
  transform-origin: bottom left;
  animation: enter var(--duration-base) var(--ease);
}
.agent-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 10px 7px 7px;
  border-radius: 14px;
  text-align: left;
}
.agent-option:hover,
.agent-option:focus {
  outline: none;
  background: var(--surface-sunken);
}
.agent-option:focus-visible {
  box-shadow: inset 0 0 0 2px var(--focus);
}
.agent-option[aria-selected="true"] {
  --option-meta: var(--agent-fg);
  background: var(--agent-bg);
}
.agent-option strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.agent-option small {
  display: block;
  color: var(--option-meta, var(--text-muted));
  font-size: 12.5px;
}
.agent-option > svg {
  margin-left: auto;
  color: var(--agent-fg);
  stroke-width: 2.2;
}
/* Team strip under the composer of an empty conversation */
.team {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.team-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px 0 5px;
  border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
}
.team-chip .avatar.xs {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.team-chip:hover {
  background: var(--surface-sunken);
  color: var(--text);
}
.team-chip[aria-checked="true"] {
  background: var(--agent-bg);
  box-shadow: none;
  color: var(--agent-fg);
  font-weight: 600;
}
/* First job by choice: chips under the composer of an empty conversation (never sent by themselves) */
.first-jobs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  max-width: 760px;
  margin: 14px auto 0;
}
.first-jobs-label {
  color: var(--text-muted);
  font-size: 13.5px;
}
.first-job {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.first-job .avatar.xs {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.first-job:hover {
  background: var(--surface-strong);
}
.first-job[aria-pressed="true"],
.first-job[aria-pressed="true"]:hover {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
  color: var(--accent-on-soft);
}

/* ---------- Empty conversation ---------- */
.conversation.is-empty .messages {
  display: flex;
  flex-direction: column;
  justify-content: safe flex-end;
  padding-bottom: 28px;
}
.conversation.is-empty .composer-region {
  flex: 1 1 0;
  min-height: 0;
}
.empty-chat {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.hero-portrait {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: var(--radius-portrait);
  background: var(--agent-bg);
  object-fit: cover;
  box-shadow: var(--shadow-portrait);
}
.empty-chat h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.empty-chat .text-aurora {
  background: var(--gradient-text-flow) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: text-flow 7s var(--ease-lava) infinite alternate;
}
@keyframes text-flow {
  to {
    background-position: 100% 0;
  }
}
.hero-does {
  max-width: 48ch;
  margin: 12px auto 0;
  color: var(--text-muted);
  font-size: 16px;
  text-wrap: balance;
}

/* ---------- Work panel ---------- */
.work {
  display: flex;
  flex: none;
  flex-direction: column;
  width: var(--work-w);
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--line-soft);
  background: var(--surface);
}
.work-header {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 10px 0 22px;
  border-bottom: 1px solid var(--line-soft);
}
.work-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.work-title h2 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.work-meta {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.toolbar-actions {
  display: flex;
}
.work-scroll {
  flex: 1;
  overflow: auto;
}
.work-body {
  padding: 20px 22px 28px;
  font-size: 14.5px;
}
.work-body > .card {
  max-width: none;
  margin-bottom: 16px;
}
.work-footer {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}
.work-footer p {
  margin: 0 auto 0 0;
  color: var(--text-muted);
  font-size: 13px;
}
.work-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}
.edited-by,
.art-note {
  color: var(--text-muted);
  font-weight: 400;
}
.version-nav {
  margin: 14px 0 0;
}
.art-error {
  color: var(--text-muted);
  font-size: 13.5px;
}

/* Artifact readers */
.art-text,
.art-summary,
.art-structured {
  font-size: 14.5px;
  line-height: 1.6;
}
.art-text p,
.art-summary p {
  margin: 0 0 12px;
}
.art-summary {
  margin-bottom: 14px;
}
.md-table {
  margin: 10px 0;
  overflow-x: auto;
}
.md-table table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.md-table th,
.md-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.md-table th {
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}
.md-table td:first-child {
  font-weight: 500;
}
.bubble .md-table th,
.bubble .md-table td {
  border-color: var(--line);
}
.art-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.art-scope {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.art-paper {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--email-bg);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.art-label {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}
.art-reply {
  margin: 0 0 24px;
}
.art-reply h4 {
  margin: 2px 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.art-reply h4 .art-label {
  display: block;
}
.art-reply-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
}
.art-reply .row,
.art-paper + .row {
  display: flex;
  gap: 8px;
  margin: 8px 0 0;
}
.art-private {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: 13.5px;
}
.art-private b {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
}
.art-private ul {
  margin: 2px 0 8px;
  padding-left: 18px;
}
:where(.art-private) ul:last-child {
  margin-bottom: 0;
}
.art-check {
  margin: 12px 0 14px;
  background: var(--pending-bg);
}
.art-check b {
  color: var(--pending-fg);
}
.art-field {
  margin: 0 0 12px;
}
.art-field:last-child {
  margin-bottom: 0;
}
.art-field p {
  margin: 0 0 6px;
  white-space: pre-line;
}
.art-field ul {
  margin: 2px 0 0;
  padding-left: 18px;
}
.art-items {
  display: grid;
  gap: 12px;
}
.art-item {
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--surface-sunken);
}
.art-item h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.art-media {
  margin: 0 0 16px;
}
.art-media img,
.art-media video {
  display: block;
  width: 100%;
  border-radius: var(--radius-card);
  background: var(--surface-sunken);
}
.art-media-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 12.5px;
}
.art-site iframe {
  width: 100%;
  height: 520px;
  border: 0;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.art-site a {
  display: inline-block;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 500;
}
.art-external {
  color: var(--text-muted);
  font-size: 13.5px;
  word-break: break-all;
}
.art-transcript {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}
.turn b {
  display: block;
  color: var(--text-muted);
  font-size: 12.5px;
}
.art-files,
.art-sources,
.art-limits {
  margin-top: 18px;
  font-size: 13.5px;
}
.art-files b,
.art-sources b,
.art-limits b {
  font-weight: 600;
}
.art-files ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.art-files li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border-radius: 14px;
  background: var(--surface-sunken);
  overflow-wrap: anywhere;
}
/* Sources as the design system's pills: indigo soft, « Pennylane · 3 factures lues ». */
.art-sources ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.art-sources li {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-on-soft);
  font-size: 12.5px;
  font-weight: 500;
}
.art-sources li a {
  color: inherit;
}
.art-limits ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--text-2);
}
.art-section {
  margin: 12px 0;
  font-size: 13.5px;
}
.art-section summary,
.art-raw summary {
  display: flex;
  align-items: center;
  min-height: 32px;
  cursor: pointer;
}
.art-section summary {
  font-weight: 600;
}
.art-claims {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
  padding-left: 18px;
}
.art-claims small {
  display: block;
}
.art-claim-status {
  color: var(--text-2);
  font-weight: 600;
}
.art-raw {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 13px;
}
.art-raw pre {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.doc-gap {
  padding: 0 3px;
  border-radius: 4px;
  background: var(--pending-bg);
  color: var(--pending-fg);
}
.doc-format {
  margin: 8px 0 0;
  font-size: 12.5px;
}
.diff-legend {
  display: grid;
  gap: 4px;
  margin: 0 0 6px;
  font-size: 13px;
}
.diff-legend div {
  display: flex;
  gap: 8px;
}
.diff-legend dt {
  min-width: 42px;
  font-weight: 600;
}
.diff-legend dd {
  margin: 0;
  color: var(--text-2);
}
.art-diff {
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  line-height: 1.55;
}
.diff-line {
  display: grid;
  grid-template-columns: 22px 1fr;
  padding: 3px 10px 3px 0;
  overflow-wrap: anywhere;
}
.diff-mark {
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}
.diff-line del,
.diff-line ins {
  text-decoration: none;
}
.diff-line.del {
  background: var(--error-bg);
}
.diff-line.del del {
  text-decoration: line-through;
}
.diff-line.ins {
  background: var(--done-bg);
}
.diff-line.del .diff-mark {
  color: var(--error-fg);
}
.diff-line.ins .diff-mark {
  color: var(--done-fg);
}

/* Owner edits: the design system's form fields */
.edit-form {
  display: grid;
  gap: 14px;
}
.edit-form .art-field {
  margin: 0;
}
.edit-group {
  display: grid;
  gap: 12px;
}
.edit-group h4 {
  margin: 0;
}
.edit-input,
.edit-text {
  width: 100%;
  padding: 10px 14px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  resize: none;
  transition:
    background-color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease);
}
.edit-input {
  min-height: 48px;
  font-weight: 600;
}
.edit-input:focus,
.edit-text:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--focus-halo);
}
.art-field.changed .art-label::after {
  content: " · modifié";
  color: var(--accent);
}
.edit-conflict {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--pending-bg);
  color: var(--text);
  font-size: 13px;
  white-space: pre-line;
}
.edit-files {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 14px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface-sunken);
  font-size: 13.5px;
}
.edit-files legend {
  float: left;
  margin-bottom: 4px;
  padding: 0;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}
.edit-files p {
  clear: both;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.edit-files label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.edit-files input,
.g-opt input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--color-accent);
}

/* ---------- Dialog: connections and permissions ---------- */
dialog {
  width: calc(100% - 32px);
  max-width: 540px;
  max-height: calc(100dvh - 48px);
  padding: 32px;
  border: 0;
  border-radius: var(--radius-dialog);
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--pop-shadow);
}
dialog[open] {
  animation: enter var(--duration-base) var(--ease);
}
dialog::backdrop {
  background: var(--scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  background: var(--surface-strong);
  color: var(--text);
}
.settings h2 {
  margin: 0 48px 6px 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.settings h3 {
  margin: 26px 0 10px;
  font-size: 15px;
  font-weight: 600;
}
.settings h3 .pill {
  margin-left: 6px;
  vertical-align: 1px;
}
.settings ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.settings li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: var(--surface-sunken);
  font-size: 14px;
  font-weight: 500;
}
:where(.settings li, .wa-link-head) > span:first-child {
  flex: 1 1 160px;
  min-width: 0;
}
:where(.settings li) small {
  display: block;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 400;
}
:where(.settings li, .settings-foot) .btn {
  height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
}
:where(.settings li) .btn.quiet {
  background: var(--surface);
}
:where(.settings li) .btn.quiet:hover {
  background: var(--surface-hover);
}
.wa-note {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}
.settings-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.settings-foot .wa-note {
  flex: 1;
  margin: 0;
  font-size: 13px;
}
#google-section ul {
  margin-top: 8px;
}
:where(#google-section .google-row) .row {
  display: flex;
  gap: 6px;
}
.google-error {
  color: var(--error-fg);
}
.g-choose {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.g-choose fieldset {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
}
.g-choose legend {
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}
.g-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  font-size: 14px;
  cursor: pointer;
}
.g-opt input {
  margin: 0;
}
.g-opt input:disabled + span {
  color: var(--text-muted);
}
:where(.g-choose details) summary {
  display: flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-muted);
  font-size: 13.5px;
  cursor: pointer;
}
.g-choose .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* WhatsApp in Connexions: one block per paired contact (name row, reply switch, delivery evidence) */
.settings li.wa-link {
  display: block;
}
.wa-link-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wa-replies,
.wa-evidence:not(:empty) {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.wa-replies .loading {
  padding: 0;
}
.wa-replies .art-error {
  margin: 6px 0 0;
}
.wa-replies .row,
.wa-history .row,
.wa-refresh {
  margin-top: 8px;
}
.wa-last {
  margin: 0;
  font-size: 13.5px;
}
.wa-history {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 13px;
}
.wa-history summary {
  display: flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-muted);
  cursor: pointer;
}
.wa-history ol {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding-left: 18px;
}
.settings .wa-history li {
  display: list-item;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 13px;
  font-weight: 400;
}
.wa-history ul {
  display: block;
  margin: 2px 0 0;
  padding-left: 16px;
}
.wa-history small {
  display: block;
  color: var(--text-muted);
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  font-weight: 500;
}
.switch {
  position: relative;
  flex: none;
  width: 42px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--surface-hover);
}
.switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--duration-fast) var(--ease);
}
.switch[aria-checked="true"] {
  background: var(--color-accent);
}
.switch[aria-checked="true"] .knob {
  transform: translateX(16px);
}
.switch[disabled] {
  opacity: 0.55;
}
.switch::after {
  content: "";
  position: absolute;
  inset: -9px -2px;
}

/* ---------- Sign-in screen: a white card on the Aurora ---------- */
.session-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 32px 16px;
  overflow: auto;
  color: var(--text);
}
.gate-brand {
  color: var(--on-aurora);
}
.gate-brand .logo {
  font-size: 26px;
}
.session-gate .box {
  width: 100%;
  max-width: 480px;
  padding: 40px 36px 32px;
  border-radius: var(--radius-tile);
  background: var(--surface);
  box-shadow: var(--shadow-window);
  text-align: center;
}
.gate-faces {
  display: flex;
  justify-content: center;
}
.gate-faces img {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--surface);
}
.gate-faces img + img {
  margin-left: -8px;
}
.session-gate h1 {
  margin: 22px 0 10px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.session-gate p {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 15.5px;
}
.session-gate code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-sunken);
  font-size: 13px;
}
:where(.session-gate) .btn {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}
:where(.session-gate) .btn.primary {
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
}
:where(.session-gate) .btn.quiet {
  height: 40px;
  background: none;
  color: var(--accent);
  font-weight: 500;
}
:where(.session-gate) .btn.quiet:hover {
  background: var(--accent-soft);
}
.gate-note {
  color: var(--text-muted);
  font-size: 13.5px;
}
.session-gate p.gate-note {
  color: var(--text-muted);
  font-size: 13.5px;
}
.gate-error {
  color: var(--error-fg);
}
.session-gate p.gate-error {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--error-bg);
  color: var(--error-fg);
  font-size: 14px;
}
.gate-jobs {
  margin: 20px 0 22px;
}
.gate-jobs .gate-note {
  margin-bottom: 10px;
}
.gate-jobs .first-jobs {
  margin: 0;
}

/* ---------- Overlays ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 95;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--color-ink);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px var(--on-ink-line),
    var(--shadow-card);
  font-size: 14px;
  transform: translateX(-50%);
  animation: toast var(--duration-base) var(--ease);
}
.scrim {
  border: 0;
  padding: 0;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast {
  from {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ---------- Layout states ---------- */
.mobile-only {
  display: none;
}
.shell.work-closed .work {
  display: none;
}
.shell.work-closed .messages {
  padding-right: max(32px, calc((100% - 720px) / 2));
  padding-left: max(32px, calc((100% - 720px) / 2));
}
.shell.work-closed .composer-region {
  align-self: center;
  width: min(820px, 100%);
}

/* ---------- Responsive ---------- */
@media (min-width: 1550px) {
  :root {
    --sidebar-w: 268px;
    --work-w: 480px;
  }
}
/* Tablet: the work panel opens over the conversation, as a sheet on the right. */
@media (max-width: 1120px) and (min-width: 701px) {
  :root {
    --sidebar-w: 228px;
  }
  .work {
    position: fixed;
    top: var(--gap);
    right: var(--gap);
    bottom: var(--gap);
    z-index: 30;
    width: min(440px, calc(100vw - 2 * var(--gap)));
    border-left: 0;
    border-radius: var(--radius-card);
    box-shadow: var(--pop-shadow);
  }
  .agent-trigger-role,
  .agent-chip-job {
    display: none;
  }
}
/* Phone: the card fills the screen under a strip of Aurora; the conversations open as a drawer. */
@media (max-width: 700px) {
  .shell {
    display: block;
    padding-top: max(6px, env(safe-area-inset-top));
  }
  .app-card {
    height: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
  }
  .mobile-only {
    display: inline-grid;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: min(320px, 86vw);
    padding: max(14px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) 14px;
    overflow: hidden;
    background: linear-gradient(rgba(18, 20, 63, 0.38), rgba(18, 20, 63, 0.38)), var(--gradient-aurora);
    transform: translateX(-100%);
    transition: transform var(--duration-base) var(--ease);
  }
  .sidebar.is-open {
    box-shadow: var(--shadow-window);
    transform: translateX(0);
  }
  .brand {
    justify-content: space-between;
  }
  .scrim {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--scrim);
  }
  .chat-header {
    gap: 4px;
    height: 56px;
    padding: 0 6px;
  }
  .chat-header h1 {
    text-align: center;
  }
  .agent-chip {
    padding-right: 3px;
  }
  .agent-chip-job,
  .agent-chip > :not(.avatar) {
    display: none;
  }
  .agent-chip {
    font-size: 0;
  }
  .icon {
    width: 44px;
    height: 44px;
  }
  .messages,
  .shell.work-closed .messages {
    padding: 20px 14px 16px;
  }
  .message {
    margin-bottom: 20px;
  }
  .message.agent {
    gap: 10px;
  }
  .avatar.md {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  .user-text {
    max-width: 88%;
  }
  .composer-region {
    padding: 6px 10px max(10px, env(safe-area-inset-bottom));
  }
  .composer {
    border-radius: 24px;
  }
  .composer > textarea {
    font-size: 16px;
  }
  .composer-tools .icon {
    width: 40px;
    height: 40px;
  }
  .agent-trigger {
    height: 40px;
  }
  .agent-trigger-role {
    display: none;
  }
  .send {
    width: 40px;
    height: 40px;
  }
  .agent-picker {
    left: -2px;
    max-height: 65dvh;
  }
  .agent-option {
    min-height: 52px;
  }
  .team-chip {
    height: 40px;
  }
  .empty-chat h2 {
    font-size: 28px;
  }
  .hero-portrait {
    width: 96px;
    height: 96px;
    margin-bottom: 16px;
  }
  .hero-does {
    font-size: 15px;
  }
  /* The composer stays at the thumb; the hero centres in the space above, the team sits just over the composer. */
  .conversation.is-empty .messages {
    justify-content: safe center;
    padding-bottom: 8px;
  }
  .conversation.is-empty .composer-region {
    display: flex;
    flex: none;
    flex-direction: column;
  }
  .conversation.is-empty .team {
    order: -1;
    margin: 0 0 12px;
  }
  .first-jobs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .first-jobs-label {
    grid-column: 1 / -1;
    text-align: center;
  }
  .first-job {
    min-width: 0;
    height: auto;
    min-height: 44px;
    padding: 4px 12px 4px 5px;
    border-radius: 22px;
    font-size: 13.5px;
    line-height: 1.2;
    text-align: left;
  }
  .work {
    position: fixed;
    top: max(6px, env(safe-area-inset-top));
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: 100%;
    border: 0;
    border-radius: 20px 20px 0 0;
  }
  .work-header {
    padding: 0 6px 0 16px;
  }
  .work-body {
    padding: 16px 16px 24px;
  }
  .work-footer {
    flex-wrap: wrap;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  }
  .work-footer p {
    width: 100%;
    margin: 0 0 2px;
  }
  :where(.work-footer) .btn {
    flex: 1;
    height: 44px;
  }
  dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    border-radius: 0;
  }
  .dialog-close {
    top: max(14px, env(safe-area-inset-top));
    right: 12px;
  }
  :where(.settings li, .g-choose .row, #google-section) .btn {
    height: 44px;
  }
  .g-opt {
    min-height: 44px;
  }
  .g-choose .row {
    display: grid;
  }
  .settings-foot {
    flex-wrap: wrap;
  }
  .session-gate .box {
    padding: 32px 22px 24px;
  }
  .session-gate h1 {
    font-size: 26px;
  }
}
/* Touch screens keep no hover look after a tap. */
@media (hover: none) {
  .icon:hover:not(:disabled, .active) {
    background: none;
    color: var(--text-muted);
  }
  .sidebar .icon:hover {
    background: none;
    color: var(--on-aurora);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .step:not(.done) .step-label {
    background: none;
    color: var(--text-2);
  }
}
