/* A quiet workspace panel; the linked-square robot is the brand signature. */
.ai-launcher { color: var(--magenta); border-color: #f1b8ce; background: var(--magenta-pale); }
.ai-launcher[aria-expanded="true"] { background: var(--magenta); color: white; border-color: var(--magenta); }
.ai-launcher svg { width: 23px; height: 23px; }
.topbar-start { flex: 1; min-width: 0; margin-right: 12px; }
.topbar-actions { flex-shrink: 0; }
.topbar .breadcrumb strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-panel { position: fixed; z-index: 75; top: 68px; right: 16px; bottom: 16px; width: min(452px, calc(100vw - 32px)); display: flex; flex-direction: column; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-float); overflow: hidden; font-family: var(--font-body); }
.ai-panel[hidden], .ai-panel [hidden], .ai-scrim[hidden] { display: none !important; }
.ai-panel.is-wide { width: min(820px, calc(100vw - 32px)); }
.ai-header { display: flex; align-items: center; gap: 10px; padding: 15px 16px 12px; flex-shrink: 0; }
.ai-mark { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; color: var(--magenta); border-radius: 11px; background: var(--magenta-pale); }
.ai-mark svg { width: 26px; height: 26px; }
.ai-heading { flex: 1; min-width: 0; }
.ai-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.3px; }
.ai-heading p { margin: 1px 0 0; color: var(--ink-faint); font-size: 11px; }
.ai-tools { display: flex; gap: 3px; }
.ai-tools .icon-button { width: 28px; height: 28px; border: 0; }
.ai-tools svg { width: 16px; height: 16px; }
.ai-context { display: flex; gap: 6px; align-items: center; padding: 0 16px 12px; color: var(--ink-soft); font-size: 12px; flex-shrink: 0; }
.ai-context-dot { width: 6px; height: 6px; background: var(--magenta); border-radius: 50%; flex-shrink: 0; }
#ai-context-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-context small { color: var(--ink-faint); margin-left: auto; white-space: nowrap; font-size: 10px; }
.ai-settings { padding: 0 16px; border-block: 1px solid var(--border); flex-shrink: 0; }
.ai-settings summary { cursor: pointer; padding: 10px 0; color: var(--ink-soft); font-size: 12px; }
.ai-model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 10px; }
.ai-model-grid label { display: grid; gap: 4px; font-size: 11px; color: var(--ink-faint); min-width: 0; }
.ai-model-grid select { width: 100%; min-width: 0; height: 32px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; background: white; }
#ai-account-note { font-size: 11px; color: var(--ink-faint); margin: 0 0 10px; }
.ai-history { padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--canvas); flex-shrink: 0; }
.ai-history label { font-size: 11px; color: var(--ink-faint); display: grid; gap: 5px; }
.ai-history select { width: 100%; height: 32px; font-size: 12px; }
.ai-messages { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 18px 12px; scroll-behavior: smooth; }
.ai-welcome { padding: 28px 4px 16px; }
.ai-welcome .ai-mark { width: 46px; height: 46px; margin-bottom: 16px; }
.ai-welcome h3 { font-size: 21px; letter-spacing: -.6px; margin: 0 0 8px; }
.ai-welcome p { color: var(--ink-faint); font-size: 13px; margin: 0 0 18px; max-width: 340px; }
.ai-suggestions { display: grid; gap: 7px; }
.ai-suggestions button { text-align: left; display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; background: white; font-size: 12px; color: var(--ink-soft); }
.ai-suggestions button:hover { border-color: #f1b8ce; background: var(--magenta-pale); color: var(--magenta); }
.ai-message { margin-bottom: 22px; min-width: 0; }
.ai-message-label { font-size: 10px; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.ai-message-label svg { width: 15px; height: 15px; color: var(--magenta); }
.ai-message-label small { margin-left: auto; font-family: var(--font-data); font-size: 9px; }
.ai-message-text { font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.ai-message-user .ai-message-text { padding: 11px 13px; background: var(--canvas); border-radius: 11px 11px 3px 11px; }
.ai-message-text pre { padding: 10px; border-radius: 7px; overflow: auto; background: var(--canvas); font: 11px/1.6 var(--font-data); white-space: pre; }
.ai-message-text code { font-family: var(--font-data); font-size: 11px; background: var(--canvas); padding: 1px 3px; border-radius: 3px; }
.ai-message-text a { color: var(--magenta-dark); }
.ai-message-text strong { font-weight: 650; }
.ai-file-receipt { font-size: 11px; padding: 6px 8px; margin-top: 6px; border: 1px solid var(--border); border-radius: 6px; overflow-wrap: anywhere; }
.ai-file-receipt small { display: block; color: var(--ink-faint); font-size: 10px; }
.ai-message-error { color: var(--red); font-size: 12px; margin: 8px 0 0; }
.ai-generating { color: var(--magenta); font-size: 12px; }
.ai-generating::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: ai-pulse 1.2s ease-in-out infinite; }
.ai-action { padding: 12px; border: 1px solid #f1b8ce; border-radius: 10px; margin-top: 10px; background: #fffafd; }
.ai-action-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ai-action-head svg { width: 15px; height: 15px; color: var(--magenta); flex-shrink: 0; }
.ai-action-head span { margin-left: auto; color: var(--ink-faint); font-size: 10px; white-space: nowrap; }
.ai-action p { color: var(--ink-faint); font-size: 11px; margin: 6px 0 9px; line-height: 1.6; }
.ai-action button { border: 1px solid #f1b8ce; background: white; color: var(--magenta-dark); padding: 5px 10px; border-radius: 6px; font-size: 11px; }
.ai-action.is-error { border-color: var(--border); }
.ai-action.is-error p { color: var(--red); }
.ai-composer { margin: 0 12px 10px; padding: 10px 11px 8px; border: 1px solid var(--border-strong); border-radius: 12px; flex-shrink: 0; background: white; }
.ai-composer:focus-within { border-color: var(--magenta); box-shadow: 0 0 0 2px var(--magenta-pale); }
.ai-composer textarea { display: block; width: 100%; border: 0; resize: none; outline: 0; padding: 2px; min-height: 60px; max-height: 150px; font: 13px/1.6 var(--font-body); background: transparent; }
.ai-composer-row { display: flex; align-items: center; gap: 8px; }
.ai-composer-row .icon-button { width: 30px; height: 30px; border: 0; }
.ai-composer-row .icon-button svg { width: 17px; height: 17px; }
.ai-composer-row small { flex: 1; font-size: 10px; color: var(--ink-faint); }
#ai-send { border: 0; border-radius: 8px; color: white; background: var(--magenta); width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; }
#ai-send svg { width: 18px; height: 18px; }
#ai-send:disabled { opacity: .4; }
.ai-attachments { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 6px; }
.ai-attachment { display: flex; gap: 5px; align-items: center; max-width: 100%; border: 1px solid var(--border); padding: 4px 6px; border-radius: 6px; background: var(--canvas); font-size: 10px; }
.ai-attachment img { width: 26px; height: 26px; object-fit: cover; border-radius: 3px; }
.ai-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.ai-attachment button { border: 0; background: transparent; padding: 0 3px; color: var(--ink-faint); font-size: 16px; }
.ai-footnote { font-size: 9px; color: var(--ink-faint); margin: 0 16px 12px; text-align: center; flex-shrink: 0; }
.ai-error { color: var(--red); background: var(--red-pale); font-size: 11px; margin: 0 12px 8px; padding: 7px 9px; border-radius: 6px; flex-shrink: 0; }
.ai-drop { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; border: 2px dashed var(--magenta); border-radius: 15px; background: rgba(253,232,240,.96); color: var(--magenta-dark); pointer-events: none; z-index: 3; }
.ai-drop strong { font-size: 20px; }
.ai-drop span { font-size: 12px; }
.ai-scrim { display: none; }
.ai-panel button:focus-visible, .ai-panel summary:focus-visible, .ai-panel select:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }
@keyframes ai-pulse { 50% { opacity: .25; } }
@media (max-width: 780px) {
  .project-identity > div { min-width: 0; }
  .eyebrow-row { flex-wrap: wrap; }
  #client-title { overflow-wrap: anywhere; }
  .ai-panel, .ai-panel.is-wide { top: 64px; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; }
  .ai-scrim { display: block; position: fixed; inset: 0; z-index: 74; border: 0; background: rgba(23,23,28,.25); }
  #ai-expand { display: none; }
  .ai-context small { display: none; }
  .ai-settings[open] .ai-model-grid { gap: 5px; }
  .ai-welcome { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .ai-generating::before { animation: none; } .ai-messages { scroll-behavior: auto; } }
