/* Readable controls, secondary labels, and restrained contrast on small screens. */
body { font-size: 16px; }
.section-label, .version, .workspace-note, .workspace-note small,
.profile-button small, .local-badge, .eyebrow, .view-caption,
.tab-count, .agent-description p, .agent-state, .text-button,
.context-section-title, .environment small, .tag, .context-help,
.index-link small, .quiet-note p, .welcome-foot, .composer-note,
.message-time, .message-kind, .message-actions button, .record-meta,
.source-button, .index-footnote, .task-heading time, .state-pill,
.task-open, .dialog-note, .checkbox-field, .settings-info p {
  font-size: 12px;
}
.project-button, .session-button, .profile-button, .topbar,
.button, .view-tab, .context-heading, .agent-description strong,
.environment strong, .index-link, .starter strong, .mode-select select,
.model-select select, .pane-title p, .segmented button, .search-box input,
.record-heading h3, .task-heading strong, .task-detail, .field,
.settings-info h3 { font-size: 14px; }
.welcome p, .composer textarea, .message-body, .record-body,
.empty-state, .field input, .field select, .field textarea,
dialog p { font-size: 16px; }
.starter small, .task-error, .job-status { font-size: 13px; }
.section-label, .breadcrumbs, .local-badge, .view-caption,
.agent-description p, .agent-state, .context-heading,
.context-section-title, .environment small, .context-help,
.index-link small, .quiet-note p, .welcome p, .welcome-foot,
.composer-note, .message-time, .message-kind, .message-actions button,
.record-meta, .index-footnote, .task-heading time, .task-detail,
dialog p, .dialog-note, .settings-info p, .checkbox-field {
  color: #6d7969;
}
.starter small, .profile-button small, .workspace-note small { color: #75816f; }
.agent-state { color: #5b714b; }
.state-pill { color: #526c40; }
.state-pill.failed, .state-pill.interrupted { color: #995b45; }
.state-pill.running, .state-pill.queued { color: #826321; }
.task-error { color: #9b614b; }
.context-section { margin-top: 22px; padding-top: 19px; }
.context-pane { padding-top: 24px; }
.agent-stack { gap: 20px; }
.context-section-title { line-height: 1.6; }
.agent-description p { line-height: 1.7; }
.text-button { padding-top: 2px; color: #806396; }
.environment small { margin-top: 3px; }
.tag { font-size: 11px; }
.starter { padding: 15px 12px; }
.starter-grid { gap: 12px; }
.starter strong { white-space: normal; }
.starter small { line-height: 1.7; }
.record-summary { color: #75866a; font-size: 14px; padding-top: 7px; overflow-wrap: anywhere; cursor: pointer; }
.record-body { line-height: 1.8; }
.index-link > span:nth-child(2) { min-width: 0; }
.index-link small { line-height: 1.6; }
.composer textarea::placeholder { color: #87917e; }
.search-box input::placeholder, .field input::placeholder,
.field textarea::placeholder { color: #89977f; }
.job-status { line-height: 1.7; }
.job-status.error { background: #fcf2ed; color: #945c46; }
.job-status.error .source-button { color: #945c46; margin-left: auto; white-space: nowrap; }
.task-error { border-left: 2px solid #dabaa8; padding-left: 10px; }
.quiet-note { background: #f3f7ed; }
.welcome h2 { font-size: 32px; }
.message-body pre { font-size: 14px; }
.message-body h3, .message-body h4 { font-size: 17px; }
.workspace-note { padding-left: 5px; padding-right: 5px; }
.sidebar .section-label { letter-spacing: .5px; }
.brand-en { font-size: 10px; }
@media (max-width: 1220px) {
  .context-pane { width: 260px; }
  .starter-grid { gap: 8px; }
  .starter { padding: 12px 10px; }
  .welcome h2 { font-size: 28px; }
  .welcome p { font-size: 14px; }
}
@media (max-width: 720px) {
  .topbar { font-size: 12px; }
  .breadcrumbs { font-size: 12px; }
  .view-tab, .page-heading .button, .pane-title .button { font-size: 14px; }
  .starter-grid { grid-template-columns: 1fr; text-align: left; margin-top: 23px; }
  .starter { display: grid; grid-template-columns: 22px 1fr; gap: 2px 9px; padding: 12px; }
  .starter > span { grid-row: span 2; align-self: center; margin: 0; }
  .starter small { margin: 0; }
  .welcome { padding-top: 20px; }
  .welcome-emblem { margin-bottom: 18px; }
  .welcome h2 { font-size: 26px; }
  .welcome p { font-size: 14px; }
  .welcome-foot { font-size: 12px; margin-top: 20px; }
  .mode-select select, .model-select select { font-size: 13px; }
  .mode-select select { max-width: 105px; }
  .model-select select { max-width: 155px; }
  .composer textarea, .message-body { font-size: 16px; }
  .composer-note { font-size: 12px; }
  .conversation:has(.welcome) { align-items: flex-start; }
  .pane-title { flex-direction: column; gap: 13px; }
}

/* Project / conversation hierarchy and a single, focused work surface. */
.brand { padding-bottom: 27px; letter-spacing: 1px; }
.brand > span:not(.version) { align-items: flex-start; flex-direction: column; gap: 0; line-height: 1.35; }
.brand-en { writing-mode: horizontal-tb; font-size: 10px; letter-spacing: 2px; }
.projects { flex: 1; min-height: 0; max-height: none; padding-bottom: 20px; overflow-y: auto; }
.project-group { margin-bottom: 5px; }
.project-button { gap: 9px; font-size: 14px; padding: 11px 12px; }
.project-chevron { margin-left: auto; color: #8c9d83; }
.project-chevron svg { width: 13px; height: 13px; }
.project-group.expanded .project-chevron { transform: rotate(90deg); }
.project-conversations { border-left: 1px solid #dce5d4; margin: 5px 0 12px 21px; padding: 2px 0 2px 10px; }
.project-conversations .session-button { font-size: 14px; padding: 8px 10px; gap: 9px; }
.new-conversation { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; color: #6e8063; border-radius: 6px; font-size: 13px; text-align: left; }
.new-conversation svg { width: 14px; height: 14px; }
.new-conversation:hover { background: #eaf0e5; color: #345d3c; }
.sidebar-bottom { flex: none; margin-top: 0; }
.sidebar-help { border-bottom: 1px solid #e1e7de; font-size: 12px; line-height: 1.9; color: #74816a; margin: 0; padding: 15px 10px; }
.profile-button { padding: 17px 9px; }
.profile-button > span:first-child { color: #748669; }
.profile-button > span:last-child svg { width: 14px; height: 14px; }
.profile-button small { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.topbar-end { gap: 16px; }
.runtime-button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 6px; color: #6d7e63; font-size: 13px; }
.runtime-button svg { width: 16px; height: 16px; }
.runtime-button:hover { background: #f1f5ec; }
.topbar-end { flex: none; }
.compact-check { padding: 6px 10px; font-size: 13px; }
.breadcrumbs #breadcrumb-project { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-tabs { padding-top: 9px; }
.workspace-layout { justify-content: center; }
.content-pane { max-width: 1120px; width: 100%; margin: 0 auto; }
.view-tabs { gap: 30px; }
.conversation { padding-top: 29px; padding-left: 10px; padding-right: 10px; }
.composer-area { padding-left: 10px; padding-right: 10px; }
.welcome { max-width: 720px; width: 100%; padding: 35px 12px 45px; }
.welcome h2 { font-size: 32px; letter-spacing: .4px; }
.welcome p { font-size: 15px; line-height: 1.9; }
.starter-grid { gap: 14px; }
.starter { min-height: 125px; padding: 18px 16px; }
.starter:disabled { cursor: default; opacity: .5; transform: none; }
.starter strong { font-size: 14px; }
.starter small { font-size: 12px; }
.privacy-controls { border: 1px solid #dfe7d7; border-radius: 10px; padding: 0 16px 13px; margin: 25px 0 0; }
.privacy-controls legend { font-size: 13px; font-weight: 550; color: #4b6441; padding: 0 6px; }
.switch-row { display: flex; align-items: center; gap: 18px; padding: 17px 0; cursor: pointer; }
.switch-row > span { flex: 1; min-width: 0; }
.switch-row strong { display: block; font-size: 15px; font-weight: 550; color: #405a36; }
.switch-row small { display: block; font-size: 13px; line-height: 1.8; color: #728267; margin-top: 5px; }
[data-ai-options] { border-top: 1px solid #e5ebde; }
[data-ai-options][hidden], [data-local-note][hidden] { display: none; }
.switch-row input[type="checkbox"] { appearance: none; flex: none; width: 40px; height: 24px; border: 1px solid #c3cdbb; border-radius: 14px; background: #e5eadf; position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch-row input[type="checkbox"]::before { content: ""; position: absolute; width: 18px; height: 18px; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #32462e20; transition: transform .15s; }
.switch-row input[type="checkbox"]:checked { background: #416b47; border-color: #416b47; }
.switch-row input[type="checkbox"]:checked::before { transform: translateX(16px); }
dialog .privacy-example { padding: 8px 11px; background: #f4f7ee; color: #667e55; border-radius: 6px; font-size: 12px; line-height: 1.8; margin: -2px 0 14px; overflow-wrap: anywhere; }
dialog .local-mode-note { padding: 12px; border-radius: 7px; background: #f0f4f7; color: #536f7b; font-size: 13px; line-height: 1.9; margin: 0 0 12px; }
.privacy-boundary { border-top: 1px solid #e5ebde; padding-top: 12px; font-size: 12px; color: #7e8b73; }
.privacy-boundary summary { cursor: pointer; line-height: 1.7; }
.privacy-boundary p { font-size: 12px; line-height: 1.9; margin: 9px 0 0; color: #7e8b73; }
.runtime-facts { margin: 0; }
.runtime-facts > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; border-bottom: 1px solid #e6ebdf; padding: 14px 0; }
.runtime-facts dt { font-size: 13px; color: #839477; }
.runtime-facts dd { font-size: 14px; color: #46633b; margin: 0; overflow-wrap: anywhere; }
dialog .runtime-explanation { font-size: 13px; line-height: 1.9; color: #7a8b6b; margin: 18px 0 0; }
@media (min-width: 1600px) {
  .content-pane { max-width: 1120px; margin: 0 auto; }
  .workspace-layout { padding-left: 44px; padding-right: 44px; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 14px; }
  .topbar-end { gap: 5px; }
  .runtime-button { font-size: 12px; padding: 5px; }
  .runtime-button svg { width: 14px; height: 14px; }
  .breadcrumbs strong { max-width: 105px; }
  .breadcrumbs { flex: 1; overflow: hidden; }
  .breadcrumbs #breadcrumb-project { max-width: 90px; }
  .breadcrumbs strong { min-width: 0; }
  .compact-check { padding: 6px; }
  .check-label { display: none; }
  .conversation, .composer-area { padding-left: 0; padding-right: 0; }
  .welcome { padding: 20px 0 30px; }
  .welcome h2 { font-size: 24px; }
  .welcome p { font-size: 14px; }
  .starter { min-height: auto; padding: 12px; }
  .starter-grid { gap: 8px; }
  .privacy-controls { padding-left: 13px; padding-right: 13px; }
  .switch-row { gap: 13px; }
}
/* Markdown tables, math and diagrams share the conversation width. */
.message, .message-content, .message-body { min-width: 0; }
.markdown-body { white-space: normal; line-height: 1.85; overflow-wrap: anywhere; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { color: #263d32; line-height: 1.5; margin: 1.5em 0 .6em; font-weight: 650; }
.markdown-body h1 { font-size: 1.5em; } .markdown-body h2 { font-size: 1.3em; } .markdown-body h3 { font-size: 1.13em; }
.markdown-body p { margin: .7em 0; white-space: normal; }
.markdown-body ul, .markdown-body ol { padding-left: 1.6em; margin: .7em 0; }
.markdown-body li { margin: .25em 0; }
.markdown-body li > p { margin: .3em 0; }
.markdown-body blockquote { margin: 1em 0; border-left: 3px solid #93ac85; padding: .25em 1em; background: #f5f8f2; color: #617355; }
.markdown-body hr { border: 0; border-top: 1px solid #e2e9dd; margin: 1.6em 0; }
.table-scroll { max-width: 100%; overflow: auto; border: 1px solid #dce5d5; border-radius: 10px; margin: 1em 0 1.3em; scrollbar-width: thin; }
.markdown-body table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .91em; line-height: 1.65; }
.markdown-body th, .markdown-body td { padding: 12px 15px; min-width: 115px; max-width: 420px; border-bottom: 1px solid #e3e9de; border-right: 1px solid #e9eee4; vertical-align: top; text-align: left; overflow-wrap: break-word; }
.markdown-body th { background: #eaf1e4; color: #314d3e; font-weight: 650; position: sticky; top: 0; }
.markdown-body tbody tr:nth-child(even) { background: #f7f9f4; }
.markdown-body tbody tr:hover { background: #eef4e8; }
.markdown-body tr:last-child td { border-bottom: 0; }
.markdown-body th:last-child, .markdown-body td:last-child { border-right: 0; }
.markdown-body pre { white-space: pre; overflow: auto; line-height: 1.65; max-width: 100%; background: #f3f6ef; color: #304432; padding: 16px; border: 1px solid #e1e7da; border-radius: 0 0 8px 8px; font-size: .88em; }
.markdown-body pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.code-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 7px 13px; background: #e9eee3; border-radius: 8px 8px 0 0; font: 12px system-ui; margin-top: 1em; color: #687d5b; }
.code-toolbar + pre { margin-top: 0; }
.code-toolbar button { color: #526e43; font-size: 12px; padding: 2px 5px; cursor: pointer; }
.markdown-body .katex-display { overflow-x: auto; overflow-y: hidden; padding: 12px 4px; margin: 1em 0; }
.diagram { margin: 1.2em 0; border: 1px solid #dfe7d8; border-radius: 10px; padding: 18px; background: #fbfcf9; max-width: 100%; }
.diagram-canvas { overflow: auto; text-align: center; }
.diagram-canvas svg { height: auto; max-width: 100%; }
.diagram-code { margin-top: 12px; color: #74866a; font-size: 12px; }
.diagram-code summary { cursor: pointer; }
.diagram figcaption { font-size: 13px; color: #986141; }
.diagram pre { border-radius: 7px; text-align: left; }
.composer-controls { flex-wrap: wrap; row-gap: 6px; }
.effort-select { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; color: #839175; font-size: 12px; }
.effort-select select { border: 0; outline: 0; color: #627d51; background: transparent; font-size: 13px; cursor: pointer; max-width: 130px; }
.model-select select { max-width: 250px; }
@media (max-width: 720px) { .model-select select { max-width: 170px; } .effort-select { margin-left: 4px; } .markdown-body th, .markdown-body td { padding: 9px 12px; min-width: 110px; } }
.diagram-canvas svg { width: 100%; height: auto; stroke: initial; fill: initial; stroke-width: initial; }
/* Account access has its own quiet entry screen. */
body:not(.authenticated) > .sidebar, body:not(.authenticated) > main, body:not(.authenticated) > .scrim { display: none; }
[hidden] { display: none !important; }
.auth-screen { width: 100%; min-height: 100dvh; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: radial-gradient(ellipse at top, #f0f5eb, #fafbf8 65%); }
.auth-card { width: 440px; max-width: 100%; margin: auto; background: #fff; border: 1px solid #e0e8d9; border-radius: 18px; padding: 32px 36px; box-shadow: 0 16px 70px #304a2d08; }
.auth-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; width: fit-content; color: #293f34; font-size: 25px; font-weight: 650; letter-spacing: 2px; }
.auth-brand small { display: block; font-size: 10px; letter-spacing: 3px; color: #7d8c75; }
.auth-card h1 { margin: 28px 0 6px; font-size: 25px; font-weight: 600; color: #293f34; }
.auth-card .auth-intro { margin: 0 0 24px; font-size: 14px; line-height: 1.8; color: #74816b; }
.auth-tabs { display: flex; gap: 24px; border-bottom: 1px solid #e3e9dd; }
.auth-tabs button { padding: 9px 0; margin-bottom: -1px; color: #8c9983; border-bottom: 2px solid transparent; font-size: 15px; }
.auth-tabs [aria-selected="true"] { border-color: #496f47; color: #355636; }
.auth-card .field { margin: 18px 0; }
.auth-card input { padding: 12px; background: #fdfefb; }
.auth-submit { display: block; width: 100%; justify-content: center; padding: 12px; margin-top: 22px; }
.auth-note, .auth-footnote { font-size: 12px; color: #8b9781; line-height: 1.8; }
.auth-footnote { margin: 22px 0 0; text-align: center; }
.auth-error { color: #a25d43; background: #fbf2ed; padding: 9px 12px; border-radius: 7px; font-size: 13px; line-height: 1.7; }
.auth-setup { background: #f3f7ee; border: 1px solid #e0e8d6; border-radius: 8px; padding: 12px; }
.auth-setup > p { color: #738568; font-size: 12px; margin: 0; line-height: 1.8; }
.auth-setup .field { margin-bottom: 0; }
.account-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid #e0e7d9; font-size: 12px; }
.account-row > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #536b48; }
.account-row button { color: #7a896e; font-size: 12px; padding: 3px 0; }
@media (max-width: 540px) { .auth-screen { padding: 20px 14px; align-items: flex-start; } .auth-card { padding: 26px 22px; border-radius: 13px; } }
.auth-text-button { display: block; margin: 14px auto 0; color: #637e53; font-size: 13px; }
.account-row > #account-name { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #536b48; }
#bind-email-status { font-size: 13px; line-height: 1.8; }
