/* The workspace keeps the existing Agenstry tokens; evidence and the user's
   question carry the visual hierarchy. No animation or chart library needed. */
body:has(.analyst-shell) .main { padding: 18px 0; }
body:has(.analyst-shell) .main > .wrap { max-width: 1480px; }
body:has(.analyst-shell) .footer { display: none; }
.analyst-shell { display: grid; grid-template-columns: 250px minmax(0,1fr); height: calc(100dvh - 118px); min-height: 480px; max-height: 1200px; border: 1px solid var(--c-border); border-radius: 18px; background: var(--c-bg-1); overflow: hidden; position: relative; }
.analyst-shell * { box-sizing: border-box; }
.analyst-shell [hidden] { display: none !important; }
.analyst-shell button { font: inherit; cursor: pointer; }
.analyst-shell button:disabled { opacity: .45; cursor: default; }
.analyst-shell :is(button,a,textarea):focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.analyst-sidebar { background: var(--c-bg); border-right: 1px solid var(--c-border); display: flex; flex-direction: column; min-height: 0; padding: 20px 12px 14px; }
.analyst-back { color: var(--c-fg-3); font-size: 12px; margin: 0 10px 24px; }
.analyst-sidebar-heading { display: flex; align-items: center; gap: 10px; margin: 0 10px 24px; font-size: 14px; }
.analyst-mark { width: 20px; height: 20px; border: 1px solid var(--c-pink-fg); border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; }
.analyst-mark::after { content: ''; width: 12px; height: 12px; border: 1.5px solid var(--c-accent-fg); border-radius: 50%; }
.analyst-newchat { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 10px 12px; color: var(--c-fg); background: var(--c-bg-1); border: 1px solid var(--c-border-strong); border-radius: 9px; font-size: 12px !important; }
.analyst-newchat kbd { color: var(--c-fg-3); font: 9px var(--font-mono); white-space: nowrap; }
.analyst-section-label { font: 10px var(--font-mono); color: var(--c-fg-3); letter-spacing: .07em; text-transform: uppercase; }
.analyst-sidebar > .analyst-section-label { margin: 26px 10px 10px; }
.analyst-chats { flex: 1; min-height: 0; overflow-y: auto; }
.analyst-chat-empty { font-size: 12px; line-height: 1.7; color: var(--c-fg-3); padding: 10px; }
.analyst-chat-item { display: flex; align-items: center; border-radius: 9px; margin: 3px 0; }
.analyst-chat-item.is-active { background: var(--c-accent-bg); }
.analyst-chat-select { flex: 1; min-width: 0; text-align: left; color: var(--c-fg-2); background: transparent; border: 0; padding: 12px 10px; font-size: 12px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 44px; }
.analyst-chat-item.is-active .analyst-chat-select { color: var(--c-accent-fg); }
.analyst-chat-delete { width: 44px; height: 44px; border: 0; background: none; color: var(--c-fg-3); display: grid; place-items: center; flex-shrink: 0; }
.analyst-sidebar-foot { border-top: 1px solid var(--c-border); padding: 14px 10px 0; color: var(--c-fg-3); font-size: 11px; line-height: 1.6; }
.analyst-sidebar-foot p { margin: 0 0 10px; }
.analyst-sidebar-foot a { display: inline-block; margin-right: 10px; color: var(--c-fg-2); padding: 5px 0; }
.analyst-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.analyst-topbar { min-height: 75px; display: flex; align-items: center; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--c-border); }
.analyst-title { flex: 1; min-width: 0; }
.analyst-title h1 { font-size: 14px; line-height: 1.6; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analyst-quiet-button, .analyst-icon-button { background: transparent; color: var(--c-fg-2); border: 1px solid var(--c-border); border-radius: 8px; min-height: 44px; padding: 8px 12px; font-size: 11px !important; }
.analyst-mobile { display: none; }
.analyst-thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 32px clamp(18px,4vw,56px); scrollbar-gutter: stable; }
.analyst-welcome { max-width: 790px; margin: 8px auto 24px; }
.analyst-eyebrow { font: 10px var(--font-mono); letter-spacing: .06em; color: var(--c-accent-fg); margin: 0 0 20px; }
.analyst-welcome h2 { font-size: clamp(29px,3.3vw,46px); font-weight: 550; line-height: 1.12; letter-spacing: -.045em; }
.analyst-welcome h2 .serif { color: var(--c-pink-fg); font-size: 1.12em; }
.analyst-welcome > p { color: var(--c-fg-2); line-height: 1.7; font-size: 14px; max-width: 580px; margin: 20px 0; }
.analyst-capabilities { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 22px 0; color: var(--c-fg-3); font-size: 11px; }
.analyst-suggestions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.analyst-suggestion { text-align: left; padding: 18px; border-radius: 11px; border: 1px solid var(--c-border); background: var(--c-bg); color: var(--c-fg); transition: border-color 140ms ease, background 140ms ease; }
.analyst-suggestion:hover { border-color: var(--c-accent-border); background: var(--c-accent-bg); }
.analyst-suggestion span { display: block; font: 9px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--c-fg-3); margin-bottom: 12px; }
.analyst-suggestion strong { display: block; font-size: 13px; font-weight: 550; line-height: 1.5; }
.analyst-suggestion small { display: block; font-size: 11px; color: var(--c-fg-3); line-height: 1.6; margin-top: 6px; }
.analyst-welcome > .analyst-boundary { font-size: 11px; margin-bottom: 0; color: var(--c-fg-3); }
.analyst-composer { padding: 12px clamp(18px,4vw,56px) 14px; background: var(--c-bg-1); }
.analyst-composer-box { border: 1px solid var(--c-border-strong); border-radius: 13px; padding: 14px; max-width: 880px; margin: auto; background: var(--c-bg); }
.analyst-composer-box:focus-within { border-color: var(--c-accent-border); box-shadow: 0 0 0 3px var(--c-accent-bg); }
.analyst-composer textarea { display: block; width: 100%; min-height: 48px; max-height: 170px; padding: 0; resize: none; border: 0; outline: 0; border-radius: 0; background: transparent; color: var(--c-fg); font: 14px/1.6 Geist,system-ui,sans-serif; }
.analyst-composer textarea:focus-visible { outline: 0; }
.analyst-composer textarea::placeholder { color: var(--c-fg-3); }
.analyst-composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
#analyst-status { color: var(--c-fg-3); font-size: 10px; line-height: 1.6; }
.analyst-send, .analyst-stop { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; min-height: 44px; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--c-accent-border); background: var(--c-accent-bg); color: var(--c-accent-fg); font-size: 12px !important; font-weight: 600 !important; }
.analyst-stop { border-color: var(--c-border-strong); background: var(--c-bg-2); color: var(--c-fg); }
.analyst-disclaimer { margin: 9px auto 0; max-width: 880px; text-align: center; color: var(--c-fg-3); font-size: 10px; line-height: 1.6; }
.analyst-msg { max-width: 880px; margin: 0 auto 34px; }
.analyst-msg-user { padding: 14px 18px; border: 1px solid var(--c-border); background: var(--c-bg); border-radius: 12px; margin-left: auto; max-width: 780px; }
.analyst-msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 11px; font-weight: 600; color: var(--c-fg-2); }
.analyst-msg-head .analyst-quiet-button { margin-left: auto; min-height: 32px; padding: 5px 9px; border: 0; font-size: 10px !important; }
.analyst-msg-content { color: var(--c-fg-1); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.analyst-msg-content p { margin: 0 0 12px; }
.analyst-msg-content :is(h2,h3) { margin: 24px 0 12px; font-size: 18px; line-height: 1.4; }
.analyst-msg-content h3 { font-size: 15px; }
.analyst-msg-content :is(ul,ol) { padding-left: 22px; }
.analyst-msg-content pre { max-width: 100%; white-space: pre-wrap; }
.analyst-msg-content .analyst-table-scroll { overflow-x: auto; }
.analyst-msg-content table { border-collapse: collapse; width: 100%; font-size: 12px; }
.analyst-msg-content :is(th,td) { border-bottom: 1px solid var(--c-border); padding: 10px; text-align: left; vertical-align: top; min-width: 100px; }
.analyst-msg-content th { color: var(--c-fg-2); font-weight: 600; }
.analyst-msg-content blockquote { border-left: 2px solid var(--c-accent-border); margin: 14px 0; padding-left: 16px; color: var(--c-fg-2); }
.analyst-tool { border-bottom: 1px solid var(--c-border); margin-bottom: 8px; font-size: 11px; color: var(--c-fg-3); }
.analyst-tool summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 0; cursor: pointer; list-style: none; }
.analyst-tool summary::-webkit-details-marker { display: none; }
.analyst-tool summary::before { content: ''; width: 6px; height: 6px; border: 1px solid var(--c-accent-fg); border-radius: 50%; flex-shrink: 0; }
.analyst-tool[data-state=done] summary::before { background: var(--c-accent-fg); }
.analyst-tool[data-state=error] summary::before { border-color: var(--c-danger); }
.analyst-tool-name { color: var(--c-fg-2); }
.analyst-tool-summary { margin-left: auto; max-width: 45%; text-align: right; overflow-wrap: anywhere; }
.analyst-tool pre { font-size: 11px; max-height: 180px; overflow: auto; }
.analyst-sources { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.analyst-source { font-size: 10px; line-height: 1.5; color: var(--c-fg-2); border: 1px solid var(--c-border); border-radius: 6px; padding: 7px 10px; overflow-wrap: anywhere; }
.analyst-chart { border: 1px solid var(--c-border); border-radius: 10px; padding: 16px; margin: 16px 0 0; color: var(--c-fg); min-width: 0; }
.analyst-chart strong { display: block; font-size: 12px; margin-bottom: 12px; }
/* Preserve readable axis labels on narrow screens; pan the plot, never the page. */
.analyst-chart-plot { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.analyst-chart svg { display: block; width: 100%; min-width: 600px; height: auto; }
.analyst-artifact { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--c-accent-border); background: var(--c-accent-bg); border-radius: 10px; margin-top: 12px; color: var(--c-fg); text-decoration: none; }
.analyst-artifact strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.analyst-artifact small { display: block; margin-top: 4px; color: var(--c-fg-3); font-size: 10px; }
.analyst-artifact-label { font: 10px var(--font-mono); color: var(--c-accent-fg); }
.analyst-notice { padding: 12px 14px; border: 1px solid var(--c-border-strong); border-radius: 8px; font-size: 12px; color: var(--c-fg-2); line-height: 1.7; margin-top: 14px; }
.analyst-retry { margin-top: 12px; }
.analyst-followups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.analyst-followups button { background: none; color: var(--c-fg-2); border: 1px solid var(--c-border); padding: 8px 12px; border-radius: 7px; min-height: 44px; font-size: 11px; text-align: left; }
.analyst-jump { position: absolute; bottom: 185px; left: 50%; transform: translateX(-50%); background: var(--c-bg-2); border: 1px solid var(--c-border-strong); color: var(--c-fg); border-radius: 20px; padding: 10px 16px; box-shadow: var(--s-shadow-lg); font-size: 11px !important; z-index: 2; }
.analyst-noscript { padding: 14px; font-size: 13px; }
.analyst-intro { max-width: 1120px; margin: 48px auto 72px; }
.analyst-intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.analyst-intro h1 { font-size: clamp(36px,5vw,62px); line-height: 1.06; max-width: 620px; margin: 22px 0; }
.analyst-intro p { color: var(--c-fg-2); line-height: 1.8; }
.analyst-intro-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 16px; }
.analyst-preview { background: var(--c-bg-1); border: 1px solid var(--c-border-strong); border-radius: 16px; padding: 28px; }
.analyst-preview ol { list-style: none; padding: 0; counter-reset: steps; }
.analyst-preview li { counter-increment: steps; border-bottom: 1px solid var(--c-border); padding: 22px 0 22px 34px; position: relative; }
.analyst-preview li::before { content: '0' counter(steps); position: absolute; left: 0; top: 25px; font: 10px var(--font-mono); color: var(--c-accent-fg); }
.analyst-preview strong { display: block; font-size: 14px; }
.analyst-preview small { display: block; color: var(--c-fg-3); font-size: 12px; line-height: 1.7; margin-top: 6px; }
.analyst-intro-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; border-top: 1px solid var(--c-border); padding-top: 32px; margin-top: 64px; }
.analyst-intro-features h2 { font-size: 16px; }
.analyst-intro-features p { font-size: 13px; }
@media(max-width:1050px) { .analyst-shell { grid-template-columns: 220px minmax(0,1fr); } .analyst-suggestion { padding: 14px; } .analyst-newchat kbd { display: none; } }
@media(max-width:840px) {
 body:has(.analyst-shell) .main > .wrap { padding: 0 12px; }
 .analyst-shell { grid-template-columns: minmax(0,1fr); height: calc(100dvh - 118px); border-radius: 12px; }
 .analyst-sidebar { position: absolute; inset: 0 auto 0 0; width: min(300px,88%); z-index: 60; visibility: hidden; transform: translateX(-100%); transition: transform 160ms ease, visibility 160ms; }
 .analyst-shell.is-sidebar-open .analyst-sidebar { visibility: visible; transform: none; }
 .analyst-scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .5); border: 0; z-index: 59; }
 .analyst-mobile { display: inline-flex; align-items: center; justify-content: center; }
 .analyst-sidebar-heading { margin-right: 0; gap: 8px; }
 #analyst-sidebar-close { margin-left: auto; font-size: 10px !important; padding: 6px; }
 .analyst-topbar { padding: 12px 14px; min-height: 70px; }
 .analyst-topbar .analyst-quiet-button { max-width: 90px; padding: 7px; font-size: 10px !important; }
 .analyst-thread { padding: 24px 18px; }
 .analyst-welcome h2 { font-size: clamp(28px,6vw,40px); }
 .analyst-welcome > p { font-size: 13px; }
 .analyst-composer { padding: 10px 14px; }
 .analyst-composer textarea { font-size: 16px; }
 .analyst-intro-grid { grid-template-columns: 1fr; gap: 28px; }
 .analyst-intro { margin-top: 28px; }
}
@media(max-width:480px) { .analyst-suggestions { grid-template-columns: 1fr; } .analyst-capabilities { gap: 7px 12px; } .analyst-composer-bar { align-items: flex-end; gap: 8px; } #analyst-status { max-width: 48%; } .analyst-send { padding: 9px 12px; } .analyst-disclaimer { font-size: 9px; } .analyst-intro-features { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; } }
@media(prefers-reduced-motion:reduce) { .analyst-shell *, .analyst-shell *::before { transition: none !important; animation: none !important; } }
