@charset "UTF-8";

:root {
  color-scheme: dark;
  --canvas: #000000;
  --surface: #1c1c1e;
  --sidebar: #0d0d0f;
  --ink: #f5f5f7;
  --muted: #8e8e93;
  --line: #2c2c2e;
  --accent: #0a84ff;
  --accent-dark: #0071e3;
  --accent-soft: rgba(10,132,255,.14);
  --teal: #f5f5f7;
  --teal-soft: #2c2c2e;
  --red: #ff453a;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, sans-serif;
  letter-spacing: -0.01em;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; height: 100%; }
body { overflow: hidden; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
a { color: inherit; }
button svg, .source-pill svg, .context-source-icon svg { width: 18px; height: 18px; flex: 0 0 auto; }
svg { display: block; width: 18px; height: 18px; flex: 0 0 auto; }
button:disabled { cursor: not-allowed; opacity: .48; }
::selection { background: #373330; color: var(--ink); }
:focus-visible { outline: 3px solid #0a85ff; outline-offset: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 2px; }
button { -webkit-appearance: none; appearance: none; }

.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; gap: 0; min-height: 0; overflow-y: auto; padding: 31px 18px 17px; background: var(--sidebar); border-right: 1px solid var(--line); z-index: 30; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-bottom: 37px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 34px; color: var(--teal); flex-shrink: 0; }
.brand-mark svg { width: 30px; height: 34px; }
.brand-copy { font-size: 17px; font-weight: 720; letter-spacing: -.6px; line-height: 1.05; }
.brand-copy span, .brand-copy small { display: block; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 1.1px; text-transform: uppercase; }
.sidebar-section-label { margin: 0 10px 10px; color: #9fa09f; font-size: 10px; font-weight: 700; letter-spacing: 1.45px; text-transform: uppercase; }
.project-switcher { position: relative; margin-bottom: 27px; }
.project-select { width: 100%; min-height: 53px; border: 1px solid #2d2e2c; border-radius: 10px; padding: 12px 29px 12px 13px; color: var(--ink); background-color: #10100f; font-size: 12px; font-weight: 650; letter-spacing: -.1px; }
.project-switcher > svg { position: absolute; right: 13px; top: 18px; width: 16px; height: 16px; pointer-events: none; color: var(--muted); }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 11px 12px; border: 1px solid transparent; border-radius: 8px; color: #aaacab; background: none; text-decoration: none; text-align: left; font-size: 12px; font-weight: 550; transition: background .16s, color .16s; }
.nav-item svg { width: 17px; height: 17px; opacity: .88; }
.nav-item:hover { background: #232322; color: var(--ink); }
.nav-item.active { color: #cacecc; background: #262725; border-color: #2e2f2d; font-weight: 650; }
.nav-item .nav-count { margin-left: auto; padding: 1px 6px; color: #aaacaa; background: #252524; border-radius: 5px; font-size: 10px; }
.sidebar-expert { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 17px 8px 19px; border-bottom: 1px solid #2b2c2a; }
.expert-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--teal); background: #262725; flex: 0 0 auto; }
.expert-icon svg { width: 18px; height: 18px; }
.sidebar-expert strong { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 650; }
.expert-role { display: block; color: #9fa09e; font-size: 10px; line-height: 1.5; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 15px 9px 0; color: #a0a1a0; font-size: 10px; line-height: 1.4; }
.demo-dot { display: inline-block; width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); }

.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar { flex: 0 0 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; padding: 0 32px; background: var(--canvas); border-bottom: 1px solid var(--line); z-index: 10; }
.breadcrumb { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--muted); font-size: 11px; white-space: nowrap; }
.breadcrumb svg { width: 14px; height: 14px; flex: 0 0 auto; color: #636463; }
.breadcrumb strong { overflow: hidden; color: #c6c7c6; font-weight: 600; text-overflow: ellipsis; }
.breadcrumb .breadcrumb-separator { color: #50504f; }
.topbar-actions { display: flex; align-items: center; gap: 17px; flex: 0 0 auto; }
.demo-label { display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--red); font-size: 19px; line-height: 1; font-weight: 850; letter-spacing: 1.5px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 11px; line-height: 1.2; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { border-color: #3b3c3a; background: #171716; }
.button:active, .scenario-card:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--accent); border-color: var(--accent); }
.button-primary:hover { color: white; background: var(--accent-dark); border-color: var(--accent-dark); }
.button-ghost { background: transparent; border-color: transparent; color: #a8a9a8; }
.button-ghost:hover { background: #1c1c1b; border-color: transparent; }
.button-subtle { background: #141413; color: #b6b8b6; }
.button-small { min-height: 31px; padding: 7px 10px; font-size: 10px; }
.button-small svg { width: 14px; height: 14px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 33px; height: 33px; padding: 0; flex: 0 0 auto; border: 1px solid transparent; border-radius: 7px; color: #a3a4a2; background: transparent; transition: background .15s; }
.icon-button:hover { background: #1f201e; color: var(--ink); }
.mobile-menu-button, .context-toggle { display: none; }

.workspace-body { display: grid; grid-template-columns: minmax(0, 1fr) 288px; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.conversation-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.conversation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 85px; padding: 19px 38px; border-bottom: 1px solid var(--line); background: rgba(28,28,30,.45); flex: 0 0 auto; }
.expert-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.expert-avatar { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; color: #131413; background: var(--teal); flex: 0 0 auto; }
.expert-avatar svg { width: 20px; height: 20px; }
.expert-heading h1, .expert-heading h2, .expert-heading strong { display: block; margin: 0 0 5px; font-size: 13px; font-weight: 650; letter-spacing: -.15px; }
.status-text { display: flex; align-items: center; gap: 5px; margin: 0; color: #9ea09e; font-size: 10px; line-height: 1.3; }
.status-text::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #7b7e79; }
.demo-mode-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid #252624; border-radius: 5px; color: #9fa09e; background: #161615; font-size: 9px; font-weight: 550; white-space: nowrap; }
.demo-mode-chip svg { width: 11px; height: 11px; }
.conversation-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 39px 38px 28px; scrollbar-width: thin; scrollbar-color: #333432 transparent; }
.empty-state { max-width: 840px; margin: 17px auto 10px; animation: enter .35s ease-out both; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin: 0 0 21px; color: #a3a19f; font-size: 9px; line-height: 1.4; letter-spacing: 1.7px; font-weight: 700; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 19px; height: 1px; background: #409cff; }
.hero-title { max-width: 610px; margin: 0 0 20px; color: #d7d9d8; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 3.6vw, 54px); line-height: 1.04; font-weight: 400; letter-spacing: -1.8px; }
.hero-title em { color: #999b99; font-weight: 400; }
.hero-description { max-width: 540px; margin: 0; color: #9fa09e; font-size: 12px; line-height: 1.85; }
.scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.scenario-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 198px; padding: 18px 16px 15px; text-align: left; border: 1px solid #282927; border-radius: 11px; background: #0a0a0a; transition: border-color .18s, transform .18s, box-shadow .18s; }
.scenario-card:hover { border-color: #4d4f4b; transform: translateY(-3px); box-shadow: 0 8px 22px #28402109; }
.scenario-icon { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 17px; border-radius: 8px; color: #a2a4a1; background: #1a1b19; }
.scenario-icon svg { width: 16px; height: 16px; }
.scenario-number { position: absolute; top: 21px; right: 16px; color: #5a5b59; font-size: 9px; letter-spacing: 1px; }
.scenario-title { display: block; margin: 0 0 9px; color: #c9cac8; font-size: 12px; line-height: 1.4; font-weight: 650; letter-spacing: -.1px; }
.scenario-description { display: block; margin: 0 0 18px; color: #7c7d7b; font-size: 10px; line-height: 1.7; }
.scenario-link { display: flex; align-items: center; gap: 5px; margin-top: auto; color: #0a85ff; font-size: 10px; font-weight: 600; }
.scenario-link svg { width: 13px; height: 13px; }
.starter-suggestions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 24px; color: #757674; font-size: 10px; }
.starter-suggestions > span, .starter-suggestions > p { margin: 0 2px 0 0; }
.suggestion-chip { display: inline-flex; align-items: center; min-height: 27px; padding: 6px 9px; border: 1px solid #272826; border-radius: 5px; background: #171816; color: #a1a2a0; font-size: 9px; line-height: 1.35; text-align: left; transition: background .15s, border-color .15s; }
.suggestion-chip:hover { background: #20211e; border-color: #3e3f3c; color: #c0c2bf; }

.message-list { display: flex; flex-direction: column; gap: 27px; max-width: 840px; margin: 0 auto; }
.message { min-width: 0; animation: enter .24s ease-out both; }
.message-user { align-self: flex-end; max-width: 86%; }
.message-user .message-meta { justify-content: flex-end; }
.message-meta { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: #757673; font-size: 10px; }
.message-meta strong { color: #b7b9b7; font-weight: 650; }
.message-meta .expert-avatar { width: 23px; height: 23px; border-radius: 6px; }
.message-meta .expert-avatar svg { width: 13px; height: 13px; }
.message-user .message-body { padding: 14px 17px; border: 1px solid #272726; border-radius: 12px 12px 3px 12px; color: #cbcdcb; background: #1c1d1b; font-size: 13px; line-height: 1.7; }
.message-expert { width: 100%; }
.message-expert .message-body { padding: 22px 23px; border: 1px solid #282827; border-radius: 3px 12px 12px; background: var(--surface); }
.message-body h2, .message-body h3 { margin: 0 0 13px; color: #cfd1cf; font-size: 15px; line-height: 1.5; font-weight: 650; letter-spacing: -.2px; }
.message-content { color: #abacaa; font-size: 12px; line-height: 1.9; }
.message-content p { margin: 0 0 12px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content strong { color: #c9cbc8; font-weight: 650; }
.message-bullets { display: grid; gap: 8px; margin: 19px 0; padding: 16px 17px 16px 30px; border-radius: 8px; background: #161715; color: #adafac; font-size: 11px; line-height: 1.6; }
.message-bullets li { padding-left: 2px; }
.message-bullets li::marker { color: #666864; }
.message-follow-up { margin: 19px 0 0; padding: 13px 15px; border-left: 2px solid #409cff; background: #131210; color: #b2afad; font-size: 12px; line-height: 1.7; }
.message-follow-up strong, .message-follow-up span { display: block; }
.message-follow-up strong { margin-bottom: 5px; color: #a19d9a; font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.message-sources { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.message-sources > span { color: #6c6d6b; font-size: 9px; margin-right: 2px; }
.source-pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 26px; padding: 5px 7px; border: 1px solid #272826; border-radius: 5px; background: #0f0f0e; color: #9fa09d; font-size: 9px; line-height: 1.35; text-align: left; }
.source-pill:hover { border-color: #494b47; color: #c0c2be; background: #181917; }
.source-pill svg { width: 11px; height: 11px; }
.message-actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.message-actions .icon-button { width: 28px; height: 28px; color: #6a6b68; }
.message-actions .icon-button svg { width: 14px; height: 14px; }
.message-actions .button { margin-left: auto; }
.typing-indicator { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 8px 0; }
.typing-indicator span { width: 5px; height: 5px; border-radius: 50%; background: #757773; animation: breathe 1s ease-in-out infinite; }
.typing-indicator span:nth-child(2) { animation-delay: .15s; }
.typing-indicator span:nth-child(3) { animation-delay: .3s; }

.composer-wrap { padding: 15px 38px 16px; flex: 0 0 auto; background: var(--canvas); border-top: 1px solid transparent; }
.composer { max-width: 840px; margin: 0 auto; border: 1px solid #2c2d2a; border-radius: 12px; background: var(--surface); box-shadow: 0 3px 10px #314a2204; transition: border-color .16s, box-shadow .16s; }
.composer:focus-within { border-color: #585a56; box-shadow: 0 0 0 3px #627c4510; }
.composer-input { display: block; width: 100%; min-height: 61px; max-height: 170px; resize: none; padding: 17px 17px 8px; border: 0; border-radius: 12px; outline: 0; color: #cacbc9; background: transparent; font-size: 12px; line-height: 1.65; }
.composer-input::placeholder { color: #656663; }
.composer-input:focus-visible { outline: none; }
.composer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 45px; padding: 0 10px 10px 15px; }
.composer-toolbar > div { display: flex; align-items: center; gap: 7px; }
.composer-hint { color: #626361; font-size: 9px; line-height: 1.5; }
.composer-hint kbd { padding: 2px 4px; border: 1px solid #232321; border-radius: 3px; background: #111210; font-family: inherit; font-size: 9px; }
.composer-submit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 32px; height: 32px; flex: 0 0 auto; padding: 0; border: 1px solid var(--accent); border-radius: 7px; color: white; background: var(--accent); transition: background .15s; }
.composer-submit:hover { background: var(--accent-dark); }
.composer-submit svg { width: 15px; height: 15px; }
.composer-footnote { max-width: 840px; margin: 9px auto 0; text-align: center; color: #6e6f6d; font-size: 8px; line-height: 1.5; }
.composer-footnote strong { font-weight: 600; color: #9c9d9b; }

.context-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 21px 20px; border-left: 1px solid var(--line); background: #0d0e0c; scrollbar-width: thin; scrollbar-color: #323431 transparent; }
.context-header { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 26px; }
.context-header h2, .context-header strong { margin: 0; color: #b8b9b7; font-size: 11px; font-weight: 650; }
.context-header svg { width: 14px; height: 14px; color: #6d6e6b; }
.context-header .icon-button { width: 25px; height: 25px; }
.context-project { margin-bottom: 23px; padding: 16px 13px; border: 1px solid #272826; border-radius: 9px; background: #141412; }
.context-label { display: block; margin: 0 0 9px; color: #737471; font-size: 8px; line-height: 1.5; letter-spacing: 1.2px; font-weight: 700; text-transform: uppercase; }
.context-project h3, .context-project strong { display: block; margin: 0 0 6px; color: #bcbebb; font-size: 13px; line-height: 1.5; font-weight: 650; }
.context-project p { margin: 0; color: #747572; font-size: 10px; line-height: 1.65; }
.context-project .preview-pill { margin-top: 11px; }
.context-section { margin-bottom: 25px; }
.context-title { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 0 0 12px; color: #9b9d9a; font-size: 9px; font-weight: 650; letter-spacing: 1.1px; text-transform: uppercase; }
.context-title span { color: #656663; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.context-copy { margin: 0; color: #797b77; font-size: 10px; line-height: 1.85; }
.context-source { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 11px 0; text-align: left; border: 0; border-bottom: 1px solid #1d1e1c; background: transparent; }
.context-source:last-child { border-bottom: 0; }
.context-source:hover .context-source-text { color: #c5c9c3; }
.context-source-icon { display: grid; place-items: center; width: 27px; height: 31px; flex: 0 0 auto; color: #61635f; background: #191a17; border: 1px solid #212220; border-radius: 5px; }
.context-source-icon svg { width: 13px; height: 13px; }
.context-source-text { display: block; padding-top: 1px; color: #a7a9a5; font-size: 10px; line-height: 1.55; transition: color .15s; }
.context-source-meta { display: block; margin-top: 3px; color: #5f615e; font-size: 8px; line-height: 1.5; }
.principle-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.principle-list li { display: flex; gap: 7px; color: #9b9c99; font-size: 10px; line-height: 1.65; }
.principle-list svg { width: 12px; height: 12px; flex: 0 0 auto; margin-top: 2px; color: #5e5f5b; }
.principle-list li::marker { color: #676965; }
.context-bottom { margin-top: auto; padding-top: 20px; }
.control-preview { display: block; width: 100%; padding: 13px; text-align: left; border: 1px dashed #31322f; border-radius: 8px; color: #9d9e9b; background: #111110; font-size: 10px; line-height: 1.65; }
.control-preview:hover { border-color: #585a55; background: #1a1b19; }
.control-preview strong { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; color: #acafaa; font-size: 10px; font-weight: 600; }
.control-preview p { margin: 0; }
.control-preview svg { width: 13px; height: 13px; }

.content-view { width: 100%; max-width: 840px; margin: 8px auto 20px; animation: enter .25s ease-out both; }
.view-heading { margin: 0 0 12px; color: #d2d3d2; font-family: Georgia, "Times New Roman", serif; font-size: 35px; line-height: 1.15; font-weight: 400; letter-spacing: -1px; }
.view-description { max-width: 580px; margin: 0 0 27px; color: #7c7d7b; font-size: 12px; line-height: 1.8; }
.brief-form { padding: 23px; border: 1px solid #292927; border-radius: 12px; background: var(--surface); }
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.form-label { color: #b0b2af; font-size: 11px; line-height: 1.5; font-weight: 600; }
.form-input, .form-textarea { width: 100%; padding: 11px 12px; border: 1px solid #2b2c2a; border-radius: 7px; color: #bbbeba; background: #0e0f0d; font-size: 12px; line-height: 1.6; }
.form-textarea { min-height: 100px; resize: vertical; }
.form-input::placeholder, .form-textarea::placeholder { color: #5e5f5c; }
.form-note { margin: 0; color: #656663; font-size: 9px; line-height: 1.65; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 5px; }
.sources-grid { display: grid; gap: 12px; }
.source-card { display: flex; gap: 14px; padding: 20px; border: 1px solid #292a27; border-radius: 10px; background: var(--surface); }
.source-card h3 { margin: 0 0 7px; color: #b9bbb7; font-size: 13px; font-weight: 600; }
.source-card p { margin: 0 0 8px; color: #787a76; font-size: 11px; line-height: 1.8; }
.source-card .context-source-icon { width: 34px; height: 40px; }
.source-card .button { margin-top: 10px; }
.saved-note { padding: 20px 21px; margin-bottom: 13px; border: 1px solid #272826; border-radius: 10px; background: var(--surface); }
.saved-note-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.saved-note-header h3 { margin: 0; color: #b5b7b3; font-size: 13px; line-height: 1.5; font-weight: 600; }
.saved-note-header span { color: #646662; font-size: 9px; }
.saved-note p { margin: 0 0 10px; color: #9a9b98; font-size: 11px; line-height: 1.85; }
.saved-note p:last-child { margin-bottom: 0; }

.dialog { width: min(620px, calc(100vw - 40px)); max-height: min(720px, calc(100dvh - 50px)); padding: 0; overflow: hidden; border: 1px solid #2b2c2a; border-radius: 16px; color: var(--ink); background: #0d0e0c; box-shadow: 0 24px 100px #15201130; }
.dialog[open] { display: flex; flex-direction: column; animation: enter .2s ease-out both; }
.dialog::backdrop { background: #1e29275c; backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 26px 21px; border-bottom: 1px solid #242523; flex: 0 0 auto; }
.dialog-title { margin: 5px 0 0; color: #cccfcc; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 400; letter-spacing: -.6px; line-height: 1.3; }
.dialog-close { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 7px; background: #191a18; color: #71736f; }
.dialog-close:hover { color: #bfc2bd; background: #252623; }
.dialog-close svg { width: 16px; height: 16px; }
.dialog-body { padding: 23px 26px 26px; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.dialog-footer { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 17px 26px; border-top: 1px solid #242523; background: #121311; flex: 0 0 auto; }
.dialog-tag { display: inline-flex; padding: 4px 7px; border: 1px solid #312f2c; border-radius: 4px; color: #9f9c98; background: #191815; font-size: 8px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.dialog-copy { margin: 0 0 16px; color: #9b9d99; font-size: 12px; line-height: 1.85; }
.dialog-copy:last-child { margin-bottom: 0; }
.dialog-list { display: grid; gap: 10px; margin: 19px 0 0; padding: 0; list-style: none; }
.dialog-item { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid #252724; border-radius: 8px; background: var(--surface); color: #7c7e7b; font-size: 11px; line-height: 1.75; }
.dialog-item strong { display: block; margin-bottom: 4px; color: #b3b6b2; font-size: 11px; font-weight: 600; }
.dialog-item p { margin: 0; }
.dialog-item > svg { width: 17px; height: 17px; flex: 0 0 auto; color: #686b65; }
.control-list { display: grid; gap: 0; margin-top: 20px; border: 1px solid #272826; border-radius: 9px; overflow: hidden; }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border-bottom: 1px solid #212220; background: var(--surface); color: #aaaca8; font-size: 11px; line-height: 1.5; }
.control-row:last-child { border-bottom: 0; }
.control-row strong { font-size: 11px; font-weight: 600; }
.control-row p { margin: 4px 0 0; color: #666864; font-size: 10px; }
.preview-pill { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 4px 6px; border: 1px solid #393734; border-radius: 4px; color: #a19e9a; background: #1b1a17; font-size: 8px; font-weight: 550; letter-spacing: .1px; }
.toast { position: fixed; left: calc(50% + 116px); bottom: 30px; z-index: 100; display: flex; align-items: center; gap: 9px; max-width: min(420px, calc(100vw - 40px)); transform: translateX(-50%); padding: 13px 18px; border: 1px solid #c2c5c3; border-radius: 9px; color: #121311; background: #cacdcc; box-shadow: 0 8px 30px #18291c20; font-size: 12px; line-height: 1.5; animation: toast-enter .2s ease-out both; }
.toast svg { width: 16px; height: 16px; color: #4b4d48; flex: 0 0 auto; }
.mobile-backdrop { display: none; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.is-hidden, [hidden] { display: none !important; }

/* Keep even the quiet supporting copy readable against the pale surfaces. */
.sidebar-section-label, .brand-copy small, .expert-role, .sidebar-footer,
.status-text, .demo-mode-chip, .hero-description, .scenario-description,
.starter-suggestions, .suggestion-chip, .message-meta, .message-sources > span,
.source-pill, .composer-hint, .composer-footnote, .context-label,
.context-project p, .context-title, .context-title span, .context-copy,
.context-source-meta, .principle-list li, .control-preview,
.view-description, .form-note, .source-card p, .saved-note-header span,
.saved-note p, .dialog-copy, .dialog-item, .control-row p {
  color: #abacaa;
}
.scenario-number { color: #a8a9a7; }
.composer-input::placeholder, .form-input::placeholder, .form-textarea::placeholder { color: #a4a4a3; opacity: 1; }
.eyebrow { color: #adacaa; }
.dialog-tag, .preview-pill { color: #b7b5b1; }
.button-primary, .composer-submit { background: #0a85ff; border-color: #0a85ff; }

/* Components rendered by the interactive workspace. */
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-divider { height: 21px; width: 1px; background: #2b2c2a; }
.breadcrumb-divider { color: #666764; }
.breadcrumb #current-view-label { color: #b9bab8; font-weight: 550; }
.brand-mark { position: relative; height: 34px; width: 29px; }
.brand-mark > span { position: absolute; left: 1px; width: 25px; height: 7px; border-radius: 1px; transform: skewY(-23deg); background: #bec4c3; }
.brand-mark > span:nth-child(1) { top: 5px; }
.brand-mark > span:nth-child(2) { top: 14px; background: #9fa2a0; }
.brand-mark > span:nth-child(3) { top: 23px; background: #62635f; }
.brand-copy > span { margin-top: 7px; color: #acadab; font-size: 9px; font-weight: 450; letter-spacing: 0; line-height: 1.4; }
.project-switcher-icon { display: block; position: absolute; z-index: 1; left: 12px; top: 18px; color: #9c9e9b; pointer-events: none; }
.project-switcher-icon svg { width: 15px; height: 15px; }
.project-select { padding-left: 34px; padding-right: 15px; font-size: 11px; }
.sidebar-expert { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 10px; align-items: start; margin-top: auto; padding: 26px 8px 21px; }
.sidebar-expert > .sidebar-section-label { grid-column: 1 / -1; margin: 0 0 13px; font-size: 9px; letter-spacing: 1px; }
.sidebar-expert > .expert-icon { grid-column: 1; grid-row: 2 / 4; margin-top: 2px; }
.sidebar-expert > strong { grid-column: 2; margin: 2px 0 0; font-size: 11px; line-height: 1.5; }
.sidebar-expert > .expert-role { grid-column: 2; font-size: 10px; line-height: 1.7; }
.sidebar-expert > .button { grid-column: 1 / -1; justify-self: start; padding-left: 0; margin-top: 10px; font-size: 10px; }
.sidebar-footer { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 18px 4px 0; }
.demo-info-button { display: flex; align-items: flex-start; gap: 7px; width: 100%; padding: 0; border: 0; color: #b1b3b0; background: none; text-align: left; font-size: 10px; line-height: 1.5; }
.demo-info-button .demo-dot { margin-top: 5px; }
.demo-info-button > span:nth-child(2) { flex: 1; }
.demo-info-button > span:nth-child(2) > span { display: block; margin-top: 4px; color: #abacaa; font-size: 9px; line-height: 1.5; }
.demo-info-button > span:last-child { margin-top: 1px; color: #9b9c99; }
.demo-info-button svg { width: 12px; height: 12px; }
.sidebar-person { display: flex; align-items: center; gap: 9px; border-top: 1px solid #2b2c2a; padding-top: 15px; }
.person-avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid #31322f; border-radius: 50%; color: #aeb0ac; background: #272825; font-size: 10px; font-weight: 650; }
.sidebar-person > span:nth-child(2) { flex: 1; color: #b7b9b5; font-size: 10px; font-weight: 550; }
.sidebar-person > span:nth-child(2) > span { display: block; margin-top: 4px; color: #abacaa; font-size: 9px; font-weight: 400; }
.workspace-initials { color: #abacaa; font-size: 9px; letter-spacing: .8px; }
.conversation-toolbar-actions { display: flex; align-items: center; gap: 9px; }
.status-text { font-size: 10px; }
.status-text::before { content: none; }
.status-indicator { width: 4px; height: 4px; border-radius: 50%; background: #7c7f7a; }
.welcome-project { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 20px; color: #aaaba9; font-size: 10px; line-height: 1.6; }
.welcome-project svg { width: 13px; height: 13px; color: #747672; }
.welcome-project-divider { margin: 0 2px; color: #5d5e5c; }
.welcome-project > span:last-child { color: #abacaa; }
.starter-suggestions .suggestion-chip { gap: 8px; font-size: 10px; }
.starter-suggestions .suggestion-chip svg { width: 12px; height: 12px; }
.context-type { padding: 4px 6px; border: 1px solid #2c2d2a; border-radius: 4px; color: #a5a7a4; font-size: 9px; line-height: 1.2; }
.context-header > .context-label { margin: 0; }
.context-project-mark { display: grid; place-items: center; width: 29px; height: 29px; margin-bottom: 12px; color: #9a9d98; background: #20211e; border-radius: 7px; }
.context-project-mark svg { width: 15px; height: 15px; }
.context-project h2 { margin: 0 0 5px; color: #c2c4c1; font-size: 13px; font-weight: 650; line-height: 1.5; letter-spacing: -.2px; }
.context-section > .context-copy { margin-bottom: 13px; font-size: 11px; line-height: 1.8; }
.context-title > .context-label { margin: 0; }
.context-source-arrow { margin-left: auto; padding-top: 3px; color: #5d5f5b; }
.context-source-arrow svg { width: 11px; height: 11px; }
.context-source-text { font-size: 11px; }
.context-source-meta { font-size: 9px; }
.principle-list li { font-size: 11px; }
.context-bottom > .control-preview { display: flex; align-items: flex-start; gap: 9px; padding: 0; border: 0; background: none; }
.control-preview > span { color: #6f716c; padding-top: 2px; }
.control-preview > div { min-width: 0; }
.control-preview strong { display: block; font-size: 11px; }
.control-preview p { font-size: 10px; }
.context-bottom > .button { margin-top: 9px; padding-left: 0; }
.message-expert { display: flex; align-items: flex-start; gap: 12px; }
.message-expert > .expert-avatar { width: 31px; height: 31px; border-radius: 9px; margin-top: 1px; }
.message-expert > .expert-avatar svg { width: 17px; height: 17px; }
.expert-message-main { flex: 1; min-width: 0; padding: 20px 22px; border: 1px solid #282827; border-radius: 2px 12px 12px; background: var(--surface); }
.expert-message-main > .message-meta { margin-bottom: 16px; color: #babcb8; font-size: 11px; font-weight: 650; }
.expert-message-main > .message-meta > span { margin-left: auto; color: #abacaa; font-size: 9px; font-weight: 400; }
.message-user .message-body p { margin: 0; }
.message-bullets { list-style: none; padding: 15px; }
.message-bullets li { display: flex; align-items: flex-start; gap: 8px; padding: 0; font-size: 11px; }
.message-bullets li > svg { width: 13px; height: 13px; margin-top: 3px; color: #999c97; }
.message-bullets li > span { min-width: 0; }
.message-follow-up > .eyebrow { display: block; margin: 0 0 7px; font-size: 8px; line-height: 1.5; letter-spacing: 1px; }
.message-follow-up > .eyebrow::before { content: none; }
.message-follow-up p { margin: 0; }
.message-actions { gap: 7px; margin-top: 13px; }
.message-actions .button { margin-left: 0; }
.followup-suggestion { display: flex; align-items: center; gap: 9px; width: fit-content; max-width: 100%; margin-top: 17px; padding: 9px 10px; font-size: 10px; line-height: 1.6; }
.followup-suggestion svg { width: 13px; height: 13px; }
.typing-message { align-items: center; }
.typing-message .message-meta { gap: 11px; font-size: 10px; }
.typing-message .message-meta > span { font-size: 9px; }
.typing-indicator i { width: 5px; height: 5px; border-radius: 50%; background: #757773; animation: breathe 1s ease-in-out infinite; }
.typing-indicator i:nth-child(2) { animation-delay: .15s; }
.typing-indicator i:nth-child(3) { animation-delay: .3s; }
.composer-hint { margin-left: auto; font-size: 9px; }
.composer-hint > span { padding: 0 3px; }
.composer-footnote { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 9px; }
.composer-footnote svg { display: inline-block; width: 10px; height: 10px; vertical-align: middle; }
.sources-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.source-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; padding: 22px 20px; }
.source-card-icon { display: grid; place-items: center; width: 35px; height: 41px; margin-bottom: 20px; color: #6d706b; background: #1a1b18; border: 1px solid #282926; border-radius: 6px; }
.source-card-icon svg { width: 18px; height: 18px; }
.source-card > .context-label { margin-bottom: 8px; font-size: 8px; }
.source-card h2 { margin: 0 0 10px; color: #b9bbb7; font-size: 14px; font-weight: 600; letter-spacing: -.2px; line-height: 1.5; }
.source-card p { flex: 1; margin: 0 0 13px; font-size: 11px; line-height: 1.8; }
.source-card > .button { margin: 0; padding-left: 0; font-size: 10px; }
.reference-disclaimer { display: flex; gap: 8px; margin-top: 20px; padding: 14px 15px; border: 1px solid #2e2e2b; border-radius: 7px; color: #afaeab; background: #171614; font-size: 10px; line-height: 1.8; }
.source-preview-id { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 16px; padding: 5px 8px; border: 1px solid #2c2e2a; border-radius: 5px; color: #a1a3a0; background: #191a18; font-size: 10px; font-weight: 600; }
.source-preview-id svg { width: 12px; height: 12px; }
.saved-note-header > span { display: flex; align-items: center; gap: 6px; color: #a7a9a5; font-size: 9px; letter-spacing: .6px; }
.saved-note-header > span svg { width: 11px; height: 11px; }
.saved-note h2 { margin: 0 0 15px; color: #bcbeba; font-size: 15px; font-weight: 600; letter-spacing: -.2px; line-height: 1.5; }
.saved-note p { font-size: 12px; }
.notes-empty { padding: 39px 25px; border: 1px dashed #323330; border-radius: 12px; background: #111210; text-align: center; }
.notes-empty-icon { display: grid; place-items: center; width: 43px; height: 43px; margin: 0 auto 18px; border: 1px solid #282926; border-radius: 11px; color: #686a65; background: #1c1d1a; }
.notes-empty h2 { margin: 0 0 12px; color: #b5b8b3; font-size: 16px; font-weight: 550; letter-spacing: -.25px; }
.notes-empty p { max-width: 360px; margin: 0 auto 22px; color: #abacaa; font-size: 12px; line-height: 1.8; }
.dialog-scenario { display: flex; align-items: flex-start; gap: 12px; width: 100%; margin-bottom: 10px; padding: 16px; border: 1px solid #2a2c29; border-radius: 9px; background: var(--surface); text-align: left; }
.dialog-scenario:last-child { margin-bottom: 0; }
.dialog-scenario:hover { background: #151613; border-color: #4c4e49; }
.dialog-scenario > span { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 7px; color: #999b97; background: #1c1d1a; }
.dialog-scenario > span svg { width: 15px; height: 15px; }
.dialog-scenario > div { flex: 1; min-width: 0; }
.dialog-scenario strong { display: block; margin: 1px 0 6px; color: #bbbdb9; font-size: 12px; line-height: 1.5; font-weight: 600; }
.dialog-scenario p { margin: 0; color: #abacaa; font-size: 11px; line-height: 1.75; }
.dialog-scenario > svg { width: 15px; height: 15px; margin-top: 7px; color: #676965; }
.dialog-list > li { padding: 12px 14px; border: 1px solid #272826; border-radius: 7px; color: #abacaa; background: #11120f; font-size: 11px; line-height: 1.8; }
.dialog-list + .dialog-copy { margin-top: 19px; }
.dialog-body > h3 { margin: 23px 0 9px; color: #b7b9b5; font-size: 12px; font-weight: 600; }
.dialog-body > p:not([class]) { color: #abacaa; font-size: 12px; line-height: 1.8; }
.dialog-footer > .dialog-close { width: auto; height: auto; padding: 9px 13px; background: transparent; }
.control-row > span:first-child { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; color: #6c6e6a; background: #191917; border-radius: 7px; }
.control-row > span:first-child svg { width: 15px; height: 15px; }
.control-row > div { flex: 1; min-width: 0; }
.skip-link:focus { position: fixed !important; z-index: 200; width: auto !important; height: auto !important; top: 10px; left: 10px; margin: 0 !important; padding: 10px 14px !important; clip: auto !important; background: #bec4c3; color: white; border-radius: 6px; }

/* Keep content readable even when a background tab pauses its animation. */
@keyframes enter { from { transform: translateY(7px); } to { transform: translateY(0); } }
@keyframes breathe { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
@keyframes toast-enter { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }

@media (min-width: 1600px) {
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .workspace-body { grid-template-columns: minmax(0, 1fr) 310px; }
  .sidebar { padding-left: 23px; padding-right: 23px; }
  .conversation-content { padding-top: 49px; }
  .empty-state { margin-top: 28px; }
  .scenario-card { min-height: 218px; padding: 22px 20px 18px; }
  .hero-title { font-size: 57px; }
  .toast { left: calc(50% + 125px); }
}

@media (max-width: 1249px) {
  .workspace-body { grid-template-columns: minmax(0, 1fr); }
  .context-panel { display: none; }
  .context-toggle { display: inline-flex; }
  .context-panel.is-open, .context-panel.is-visible, .context-panel.open,
  .context-open .context-panel { display: flex; position: fixed; top: 78px; right: 0; bottom: 0; width: 310px; z-index: 40; box-shadow: -15px 0 45px #263b2212; animation: enter .2s ease-out; }
  .empty-state { max-width: 770px; margin-top: 20px; }
  .conversation-toolbar { padding-left: 35px; padding-right: 35px; }
  .conversation-content { padding-left: 35px; padding-right: 35px; }
  .hero-title { font-size: 49px; max-width: 590px; }
  .hero-description { max-width: 500px; }
}

@media (max-width: 1020px) and (min-width: 760px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .brand { gap: 7px; }
  .brand-copy { font-size: 16px; }
  .topbar { padding: 0 24px; }
  .topbar-actions { gap: 11px; }
  .breadcrumb { gap: 7px; font-size: 10px; }
  .conversation-toolbar { padding-left: 26px; padding-right: 26px; }
  .conversation-content { padding: 32px 26px 25px; }
  .composer-wrap { padding-left: 26px; padding-right: 26px; }
  .hero-title { font-size: 43px; }
  .hero-description { font-size: 11px; }
  .scenario-grid { gap: 9px; margin-top: 29px; }
  .scenario-card { min-height: 210px; padding: 16px 12px 13px; }
  .scenario-title { font-size: 11px; }
  .scenario-description { font-size: 9px; }
  .starter-suggestions { gap: 6px; }
  .toast { left: calc(50% + 102px); }
}

@media (max-width: 759px) {
  body { font-size: 13px; }
  .app-shell { display: block; }
  .workspace { height: 100%; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 264px; padding: 29px 20px 19px; z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 8px 0 35px #13250d15; }
  .sidebar-open .sidebar, .sidebar.sidebar-open, .sidebar.is-open { transform: translateX(0); }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 50; border: 0; background: #1b2a204a; backdrop-filter: blur(2px); }
  .sidebar-open .mobile-backdrop, .mobile-backdrop.is-visible, .mobile-backdrop.is-open { display: block; }
  .topbar { min-height: 65px; flex-basis: 65px; gap: 9px; padding: 0 16px 0 11px; }
  .topbar-left { gap: 6px; }
  .topbar-divider { display: none; }
  .mobile-menu-button { display: inline-flex; }
  .breadcrumb { gap: 6px; margin-right: auto; font-size: 10px; }
  .breadcrumb > span:first-child, .breadcrumb .breadcrumb-separator, .breadcrumb > svg { display: none; }
  .breadcrumb > .breadcrumb-divider { display: none; }
  .topbar-actions { gap: 9px; }
  .topbar-actions > .button:not(.context-toggle) { display: none; }
  .demo-label { font-size: 17px; letter-spacing: 1.1px; }
  .context-toggle { width: 31px; height: 31px; min-height: 31px; padding: 0; font-size: 0; }
  .context-toggle svg { width: 16px; height: 16px; }
  .context-toggle span { display: none; }
  .conversation-toolbar { min-height: 75px; padding: 15px 19px; }
  .expert-avatar { width: 34px; height: 34px; border-radius: 10px; }
  .expert-heading { gap: 9px; }
  .expert-heading h1, .expert-heading h2, .expert-heading strong { font-size: 12px; }
  .status-text { font-size: 9px; }
  .demo-mode-chip { padding: 5px 6px; font-size: 8px; }
  .conversation-content { padding: 29px 21px 24px; }
  .empty-state { margin-top: 4px; }
  .eyebrow { margin-bottom: 17px; font-size: 8px; letter-spacing: 1.2px; }
  .hero-title { max-width: 490px; margin-bottom: 17px; font-size: clamp(35px, 8.5vw, 46px); line-height: 1.07; letter-spacing: -1.45px; }
  .hero-description { max-width: 480px; font-size: 11px; line-height: 1.8; }
  .scenario-grid { grid-template-columns: 1fr; gap: 9px; margin-top: 26px; }
  .scenario-card { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) 18px; align-items: center; column-gap: 12px; min-height: 87px; padding: 15px 14px; }
  .scenario-icon { grid-column: 1; grid-row: 1 / 3; margin: 0; }
  .scenario-title { grid-column: 2; grid-row: 1; margin: 0 0 4px; font-size: 12px; }
  .scenario-description { grid-column: 2; grid-row: 2; margin: 0; font-size: 10px; line-height: 1.55; }
  .scenario-link { grid-column: 3; grid-row: 1 / 3; margin: 0; font-size: 0; }
  .scenario-link svg { width: 15px; height: 15px; }
  .scenario-number { display: none; }
  .scenario-card:hover { transform: none; }
  .starter-suggestions { margin-top: 18px; gap: 6px; }
  .starter-suggestions > span, .starter-suggestions > p { width: 100%; margin-bottom: 3px; }
  .suggestion-chip { font-size: 9px; min-height: 28px; }
  .composer-wrap { padding: 9px 15px max(11px, env(safe-area-inset-bottom)); }
  .composer { border-radius: 11px; }
  .composer-input { min-height: 53px; padding: 14px 13px 5px; font-size: 13px; }
  .composer-toolbar { min-height: 40px; padding: 0 8px 8px 12px; }
  .composer-hint { font-size: 8px; }
  .composer-hint kbd { display: none; }
  .composer-submit { width: 31px; height: 31px; }
  .composer-footnote { margin-top: 7px; font-size: 7px; }
  .message-list { gap: 22px; }
  .message-user { max-width: 92%; }
  .message-user .message-body { padding: 11px 14px; font-size: 12px; }
  .message-expert .message-body { padding: 18px 17px; }
  .message-expert { gap: 8px; }
  .message-expert > .expert-avatar { width: 25px; height: 25px; border-radius: 7px; }
  .message-expert > .expert-avatar svg { width: 14px; height: 14px; }
  .expert-message-main { padding: 17px 15px; }
  .expert-message-main > .message-meta { align-items: flex-start; flex-direction: column; gap: 4px; margin-bottom: 13px; }
  .expert-message-main > .message-meta > span { margin-left: 0; }
  .message-content { font-size: 12px; line-height: 1.85; }
  .message-body h2, .message-body h3 { font-size: 14px; }
  .message-bullets { padding: 13px 13px 13px 26px; font-size: 10px; }
  .message-follow-up { padding: 12px; font-size: 11px; }
  .message-actions .button { max-width: 80%; white-space: normal; font-size: 9px; text-align: left; }
  .context-panel.is-open, .context-panel.is-visible, .context-panel.open,
  .context-open .context-panel { top: 65px; width: min(320px, calc(100vw - 35px)); z-index: 45; }
  .content-view { margin-top: 0; }
  .view-heading { font-size: 31px; }
  .view-description { font-size: 11px; margin-bottom: 21px; }
  .brief-form { padding: 18px; }
  .form-input, .form-textarea { font-size: 16px; }
  .form-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .form-actions .button { align-self: flex-end; }
  .source-card { padding: 16px; gap: 11px; }
  .sources-grid { grid-template-columns: 1fr; }
  .source-card { gap: 0; }
  .source-card h2 { font-size: 14px; }
  .source-card-icon { margin-bottom: 15px; }
  .source-card h3 { font-size: 12px; }
  .source-card p { font-size: 10px; }
  .saved-note { padding: 17px; }
  .saved-note-header { align-items: flex-start; }
  .saved-note-header h3 { font-size: 12px; }
  .dialog { width: calc(100vw - 26px); max-height: calc(100dvh - 30px); border-radius: 13px; }
  .dialog-header { padding: 20px 20px 17px; }
  .dialog-title { font-size: 24px; }
  .dialog-body { padding: 20px; }
  .dialog-footer { padding: 14px 20px; }
  .dialog-copy { font-size: 11px; }
  .dialog-scenario { gap: 9px; padding: 14px; }
  .control-row { align-items: flex-start; padding: 13px; }
  .toast { left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); max-width: calc(100vw - 30px); width: max-content; padding: 12px 15px; font-size: 11px; }
}

@media (max-width: 759px) and (max-height: 740px) {
  .conversation-toolbar { min-height: 65px; padding-top: 12px; padding-bottom: 12px; }
  .conversation-content { padding-top: 23px; }
  .hero-title { font-size: 34px; }
  .composer-input { min-height: 47px; }
}

@media (min-width: 760px) and (max-height: 850px) {
  .conversation-content { padding-top: 22px; padding-bottom: 16px; }
  .empty-state { margin-top: 0; margin-bottom: 6px; }
  .empty-state .eyebrow { margin-bottom: 12px; }
  .hero-title { font-size: 40px; margin-bottom: 12px; }
  .hero-description { font-size: 12px; line-height: 1.6; }
  .welcome-project { margin-top: 12px; }
  .scenario-grid { margin-top: 18px; }
  .scenario-card { position: relative; min-height: 140px; padding: 14px 14px 12px; }
  .scenario-icon { width: 26px; height: 26px; margin-bottom: 10px; }
  .scenario-number { position: absolute; top: 15px; right: 14px; }
  .scenario-title { margin-bottom: 6px; }
  .scenario-description { margin-bottom: 10px; line-height: 1.6; }
  .empty-state .starter-suggestions { display: none; }
  .sidebar { padding-top: 25px; }
  .brand { margin-bottom: 28px; }
  .sidebar-expert { padding-top: 22px; padding-bottom: 15px; }
}

@media (max-width: 379px) {
  .conversation-content { padding-left: 17px; padding-right: 17px; }
  .hero-title { font-size: 33px; }
  .demo-mode-chip { max-width: 80px; white-space: normal; line-height: 1.4; }
  .status-text { max-width: 145px; }
  .breadcrumb { max-width: 120px; }
  .scenario-card { column-gap: 9px; padding-left: 12px; padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Apple-style refinements */
.sidebar { background: rgba(13,13,15,.82); backdrop-filter: saturate(180%) blur(20px); border-color: var(--line) !important; }
.topbar { background: rgba(0,0,0,.72); backdrop-filter: saturate(180%) blur(20px); }
.view-heading, h1 { font-family: -apple-system, "SF Pro Display", "Helvetica Neue", sans-serif !important; font-weight: 600 !important; letter-spacing: -0.035em !important; }
.demo-label { color: var(--red) !important; letter-spacing: .08em; }
.composer, .scenario-card, .source-card, .context-project, .dialog { background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -20px rgba(0,0,0,.8) !important; }
.composer-submit { background: var(--accent) !important; color: #fff !important; border-radius: 999px !important; }
.nav-item.active { background: rgba(255,255,255,.08) !important; color: var(--ink) !important; }
.nav-item:hover { background: rgba(255,255,255,.05); }
.context-panel { background: var(--canvas); border-color: var(--line) !important; }
::selection { background: rgba(10,132,255,.4); color: #fff; }
:focus-visible { outline-color: var(--accent); }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(8px); }
select, option { background: var(--surface); color: var(--ink); }
.expert-avatar { background: linear-gradient(145deg,#0a84ff,#5e5ce6) !important; color: #fff !important; border-radius: 10px; }
.message-content, .message-content p { color: #d1d1d6 !important; }
.expert-message-main { border-radius: 18px !important; border-color: var(--line) !important; }
#sidebar-expert, .sidebar-footer { display: none !important; }

/* Customer-facing navigation and the shared project file browser. */
.sidebar-footer { display:flex !important; margin-top:auto; padding-top:24px; }
.sidebar-person { display:none; }
.interface-switcher { position:relative; display:flex; align-items:center; gap:7px; min-width:0; }
.interface-label { color:var(--muted); font-size:10px; }
.project-select,#interface-select { -webkit-appearance:none; appearance:none; }
.project-switcher::after,.interface-switcher::after { content:""; position:absolute; pointer-events:none; right:12px; top:50%; width:6px; height:6px; border-right:1.5px solid var(--ink); border-bottom:1.5px solid var(--ink); transform:translateY(-70%) rotate(45deg); }
#interface-select { max-width:185px; min-height:36px; padding:8px 29px 8px 11px; border:1px solid #6a6a75; border-radius:7px; color:var(--ink); background:var(--surface); font-size:11px; line-height:1.4; }
.file-shortcuts { display:none; margin:2px 0 9px 20px; padding-left:12px; border-left:1px solid var(--line); }
body[data-interface="windows"] .file-shortcuts { display:grid; gap:2px; }
.file-shortcuts button { display:flex; align-items:center; gap:8px; min-height:34px; padding:7px 9px; border:0; border-radius:5px; text-align:left; color:var(--muted); background:transparent; font-size:11px; }
.file-shortcuts button.active { background:var(--accent-soft); color:var(--ink); }
.file-shortcuts button:hover { background:var(--accent-soft); }
.file-shortcuts svg { width:15px; height:15px; color:#ac771a; fill:#ffd879; }
.hero-description { font-size:13px; line-height:1.85; }
.scenario-title { font-size:13px; }
.scenario-description { font-size:11px; line-height:1.8; }
.welcome-tools { display:flex; flex-wrap:wrap; gap:7px; margin-top:24px; }
.welcome-tools .button { font-size:11px; white-space:normal; text-align:left; }
.button-primary { background:#0071e3; border-color:#0071e3; color:#fff; }
.message-content { font-size:13px; line-height:1.85; }
.answer-label { font-size:10px; font-weight:650; color:var(--muted); letter-spacing:.6px; text-transform:uppercase; }
.message-bullets { margin-top:12px; margin-bottom:16px; }
.answer-details { margin:13px 0 17px; padding:12px 14px; border:1px solid var(--line); border-radius:7px; }
.answer-details summary { cursor:pointer; font-size:12px; line-height:1.6; color:var(--ink); }
.answer-details .message-content { padding-top:15px; }
.answer-details .message-content p:last-child { margin-bottom:0; }
.tour-steps { display:grid; gap:18px; padding-left:22px; margin:23px 0; color:var(--ink); }
.tour-steps li { padding-left:6px; font-size:13px; line-height:1.8; }
.tour-steps strong { display:block; font-weight:600; }
.tour-steps span { display:block; margin-top:4px; color:var(--muted); font-size:12px; }
.file-preview { overflow-wrap:anywhere; color:var(--ink); font-size:13px; line-height:1.85; }
.file-preview p { white-space:pre-line; }
.file-workspace { width:100%; max-width:1120px; margin:0 auto; }
.explorer-title { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.explorer-title .eyebrow { margin:0 0 10px; font-size:9px; }
.explorer-title .view-heading { margin:0; font-size:32px; line-height:1.3; }
.explorer-title .view-description { margin:10px 0 0; font-size:12px; line-height:1.8; max-width:520px; }
.explorer-title>.button { flex-shrink:0; }
.explorer-toolbar { display:flex; align-items:center; gap:9px; margin-top:26px; padding:12px; border:1px solid var(--line); border-radius:8px 8px 0 0; background:var(--surface); }
.explorer-navigation { display:flex; align-items:center; gap:3px; flex-shrink:0; }
.explorer-address { display:flex; align-items:center; gap:9px; min-width:0; min-height:37px; flex:1; padding:7px 10px; border:1px solid #6a6a75; border-radius:5px; }
.explorer-address>svg { color:var(--accent); width:16px; height:16px; }
.explorer-breadcrumb { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; font-size:11px; line-height:1.6; }
.explorer-breadcrumb button { min-height:24px; padding:0; border:0; background:transparent; color:var(--ink); text-align:left; }
.explorer-breadcrumb button:hover { text-decoration:underline; }
.explorer-breadcrumb>span { color:var(--muted); }
.explorer-search { position:relative; display:flex; align-items:center; flex:0 1 210px; min-width:130px; }
.explorer-search>svg { position:absolute; left:10px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:var(--muted); pointer-events:none; }
#file-search { width:100%; min-height:37px; padding:8px 9px; padding-left:33px !important; border:1px solid #6a6a75; border-radius:5px; background:var(--canvas); color:var(--ink); font-size:11px; }
#file-search::placeholder { color:var(--muted); opacity:1; }
.explorer-commandbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:10px 13px; border:1px solid var(--line); border-top:0; background:var(--surface); }
.explorer-summary { color:var(--muted); font-size:11px; }
.explorer-layout-options { display:flex; align-items:center; gap:4px; }
.explorer-layout-options [aria-pressed="true"] { background:var(--accent-soft); border-color:var(--accent); color:var(--ink); }
.explorer-table-head,.explorer-row { display:grid; grid-template-columns:minmax(0,1fr) 112px 135px 24px; align-items:center; gap:12px; width:100%; padding:11px 15px; }
.explorer-table-head { min-height:36px; color:var(--muted); background:var(--surface); border-left:1px solid var(--line); border-right:1px solid var(--line); font-size:10px; }
.explorer-table { border:1px solid var(--line); border-radius:0 0 8px 8px; overflow:hidden; }
.explorer-row { min-height:76px; border:0; border-bottom:1px solid var(--line); color:var(--ink); background:var(--canvas); text-align:left; }
.explorer-table:not(.explorer-grid)>[role="listitem"]:last-child .explorer-row { border-bottom:0; }
.explorer-row:hover,.explorer-row:focus-visible { background:var(--accent-soft); }
.explorer-row:focus-visible { outline-offset:-3px; }
.file-name { display:flex; align-items:center; gap:11px; min-width:0; }
.file-name>span:last-child { min-width:0; }
.file-icon { display:grid; place-items:center; width:31px; height:35px; flex-shrink:0; color:var(--accent); }
.file-icon svg { width:25px; height:25px; }
.file-kind-folder .file-icon svg { color:#dcae39; fill:#eebf4a33; }
.file-name strong { display:block; color:var(--ink); font-size:12px; font-weight:550; line-height:1.6; overflow-wrap:anywhere; }
.file-name small { display:block; margin-top:3px; color:var(--muted); font-size:10px; line-height:1.6; }
.file-type,.file-location { font-size:10px; color:var(--muted); line-height:1.7; overflow-wrap:anywhere; }
.file-action { color:var(--accent); }
.file-action svg { width:15px; height:15px; }
.explorer-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:11px; padding:14px; }
.explorer-grid .explorer-row { display:flex; flex-direction:column; align-items:center; gap:11px; height:100%; min-height:161px; padding:18px 12px; border:1px solid var(--line); border-radius:7px; text-align:center; }
.explorer-grid .file-name { flex-direction:column; gap:10px; }
.explorer-grid .file-icon { width:42px; height:44px; }
.explorer-grid .file-icon svg { width:38px; height:38px; }
.explorer-grid .file-type,.explorer-grid .file-location { display:none; }
.explorer-grid .file-action { margin-top:auto; }
.explorer-empty { grid-column:1/-1; padding:40px 22px; text-align:center; }
.explorer-empty>.file-icon { margin:0 auto 15px; }
.explorer-empty h2 { margin:0 0 10px; font-size:18px; font-weight:550; color:var(--ink); }
.explorer-empty p { margin:0 auto 20px; max-width:430px; color:var(--muted); font-size:12px; line-height:1.8; }
.explorer-status { margin:15px 0 0; font-size:10px; line-height:1.8; color:var(--muted); }
.explorer-quickstart { display:flex; align-items:start; gap:10px; padding:15px 17px; margin-top:23px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--muted); font-size:11px; line-height:1.9; }
.explorer-quickstart>svg { flex-shrink:0; margin-top:3px; }
.explorer-quickstart p { margin:0; }
.explorer-quickstart button { min-height:24px; padding:0; border:0; background:transparent; color:var(--ink); font-weight:600; text-decoration:underline; text-underline-offset:3px; }
body[data-interface="windows"][data-view="files"] .conversation-toolbar { display:none; }
@media(max-width:1100px) { .topbar .export-button { display:none; } }
@media(min-width:1021px) { .explorer-table:not(.explorer-grid) .file-name small { display:none !important; } }
@media(max-width:1020px) and (min-width:760px) { body[data-interface="windows"] .explorer-table-head>span:nth-child(3) { display:none; } }
@media(max-width:1020px) { .breadcrumb>#current-view-label,.breadcrumb>.breadcrumb-divider { display:none; } .topbar { gap:10px; flex:0 0 auto; flex-wrap:wrap; padding-top:10px; padding-bottom:10px; } .topbar-actions { gap:9px; } }
@media(max-width:759px) {
  .topbar { flex:0 0 auto; min-height:65px; flex-wrap:wrap; padding-top:9px; padding-bottom:9px; }
  #interface-select { max-width:144px; font-size:10px; }
  .welcome-tools .button { min-height:36px; font-size:10px; }
  .explorer-title { align-items:start; gap:12px; }
  .explorer-title .view-heading { font-size:27px; }
  .explorer-title .view-description { font-size:11px; }
  .explorer-title>.button { padding:9px 11px; font-size:10px; }
  .explorer-toolbar { flex-wrap:wrap; padding:10px; }
  .explorer-address { flex:1 1 160px; }
  .explorer-search { flex:1 1 100%; }
  .explorer-table-head { display:none; }
  .explorer-row { grid-template-columns:minmax(0,1fr) 20px; gap:8px; padding:13px; }
  .file-type,.file-location { display:none; }
  .explorer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:10px; }
  .explorer-grid .explorer-row { min-height:158px; padding:16px 10px; }
  .explorer-quickstart { font-size:10px; }
  .composer-footnote { line-height:1.7; font-size:9px; text-align:center; }
}
@media(max-width:480px) { #interface-select { max-width:132px; } .interface-label { display:none; } .topbar-actions { gap:6px; } .topbar-actions [data-action="reset"] { display:none; } .demo-label { font-size:15px; } .topbar .breadcrumb { max-width:70px; } }
.dialog-footer { flex-wrap:wrap; }
