:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  font-size: 14px;
  color: var(--ink);
  background: var(--warm);
  --ink: #263b31;
  --assistant-width: 360px;
  --muted: #59685f;
  --green: #285a45;
  --green-hover: #204a38;
  --pale: #eaf1e9;
  --warm: #f7f7f2;
  --paper: #fffefb;
  --line: #dfe5dc;
  --danger: #9b4343;
  --shadow: 0 20px 80px #263b311c, 0 4px 18px #263b310a;
}
.document-image { display: inline-flex; flex-direction: column; max-width: 100%; vertical-align: middle; margin: 8px 0; }
.document-image img { max-width: 100%; height: auto; object-fit: contain; border-radius: 4px; }
.document-image-status { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.document-image-status:empty { display: none; }
.word-dialog { width: min(620px, calc(100vw - 24px)); }
.word-dialog form { display: flex; flex-direction: column; gap: 14px; }
.word-conversion-note { padding: 12px 14px; background: var(--pale); border-radius: 8px; font-size: 13px; margin: 0; }
.word-warnings { padding-left: 22px; line-height: 1.8; font-size: 13px; overflow-wrap: anywhere; max-height: 35vh; overflow-y: auto; }
@media (max-width: 600px) { .document-actions { flex-wrap: wrap; justify-content: flex-end; gap: 4px; } .document-actions button { padding: 7px 8px; font-size: 12px; } }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { outline-offset: 4px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); padding: 9px 13px; min-height: 36px; transition: background .15s, border-color .15s, box-shadow .15s; }
button:hover:not(:disabled) { background: #f0f3ec; border-color: #cbd5c8; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--green); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
button.primary:hover:not(:disabled) { background: var(--green-hover); border-color: var(--green-hover); }
button.danger { color: var(--danger); border-color: #e6cfc9; }
input, select, textarea { border: 1px solid #d5ded3; border-radius: 8px; background: var(--paper); padding: 11px 12px; min-width: 0; color: var(--ink); font-weight: 400; }
input::placeholder, textarea::placeholder { color: #879087; }
input:focus, textarea:focus, select:focus { outline: 2px solid #93ad99; outline-offset: 1px; }
input[type="checkbox"] { accent-color: var(--green); }
.dialog-content .pdf-import-choice { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; margin: 12px 0; cursor: pointer; }
.pdf-import-choice input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 500; }
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: 18px; }
p { line-height: 1.75; }
a { color: var(--green); text-underline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background: #dce9d6; color: #1d3e2d; }
.ui-icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 8px; }
.row > input { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { color: #70806f; font-size: 10px; font-weight: 650; letter-spacing: 1.7px; }
.brand { display: inline-flex; align-items: baseline; width: fit-content; font-size: 40px; text-decoration: none; font-weight: 750; letter-spacing: -4px; color: #24432f; }
.brand > span { color: #91a17d; }
.brand small { margin-left: 18px; font-size: 15px; font-weight: 600; letter-spacing: -.35px; }
.brand.compact { font-size: 30px; }
.brand.compact small { font-size: 13px; margin-left: 14px; }
.icon-button { border: 1px solid transparent; background: transparent; padding: 6px; width: 30px; min-height: 30px; line-height: 1; color: var(--muted); }
.icon-button .ui-icon { width: 16px; height: 16px; }
.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.text-button { border: 0; background: transparent; color: var(--green); padding: 10px 0; }
.empty { color: var(--muted); font-size: 13px; padding: 16px 12px; line-height: 1.8; }
.error { color: var(--danger); font-size: 13px; white-space: pre-wrap; }
/* Sign in */
.auth-screen { min-height: 100dvh; display: grid; grid-template-columns: 1.08fr 1fr; }
.auth-story { background: #ecf0e6; padding: 48px 10%; display: flex; flex-direction: column; justify-content: space-between; min-height: 100dvh; position: relative; overflow: hidden; }
.auth-story::after { content: ''; position: absolute; width: 420px; height: 420px; border: 1px solid #d7e0cd; border-radius: 50%; right: -210px; bottom: -170px; box-shadow: 0 0 0 48px #e6ecdf, 0 0 0 49px #dce4d3, 0 0 0 98px #e9eee2; pointer-events: none; }
.auth-story > * { position: relative; z-index: 1; }
.auth-story h1 { font-size: clamp(30px, 3.3vw, 49px); font-weight: 550; letter-spacing: -1.5px; line-height: 1.5; margin: 24px 0; }
.auth-story p { color: #5e725f; font-size: 16px; line-height: 1.95; }
.auth-foot { color: #647b61; font-size: 12px; letter-spacing: .6px; }
.auth-form-wrap { display: flex; justify-content: center; align-items: center; padding: 44px; background: var(--paper); }
.auth-form { max-width: 370px; width: 100%; display: flex; flex-direction: column; gap: 24px; }
.auth-form h2 { font-size: 30px; font-weight: 550; margin: 0; }
.auth-form p { margin: 0; }
.auth-form .muted { margin-top: -12px; }
.auth-form input { padding: 14px; }
.auth-form .large { justify-content: space-between; padding: 14px 16px; }
.fine-print { color: var(--muted); font-size: 12px; }
/* Workspace shell */
.workspace { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 68px; display: flex; align-items: center; padding: 0 26px; gap: 22px; border-bottom: 1px solid var(--line); background: var(--paper); flex-shrink: 0; }
.top-divider { height: 20px; width: 1px; background: var(--line); }
.workspace-label { font-size: 12px; color: var(--muted); }
.top-actions { display: flex; gap: 16px; align-items: center; margin-left: auto; }
.cloud-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.cloud-badge .ui-icon { width: 16px; height: 16px; }
.avatar { width: 33px; min-height: 33px; padding: 0; border-radius: 50%; background: var(--pale); color: var(--green); border-color: #dce5d5; font-size: 12px; font-weight: 650; }
.workspace-body { display: flex; min-height: 0; flex: 1; }
.file-sidebar { width: 232px; min-width: 210px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--warm); flex-shrink: 0; }
.project-picker { padding: 26px 18px 22px; }
.project-picker .row { margin: 11px 0 10px; background: #eff2e9; border: 1px solid #e1e6da; padding: 6px 7px 6px 11px; border-radius: 9px; gap: 2px; }
.project-picker select { width: 100%; background: transparent; border: 0; padding: 4px 0; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.project-picker .small { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.project-picker .small::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #8ba27d; }
.sidebar-heading { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px 7px 20px; }
.sidebar-heading h2 { font-size: 12px; font-weight: 550; margin: 0; color: var(--muted); }
.sidebar-heading .row { gap: 0; }
.file-tree { padding: 5px 11px 16px; overflow: auto; flex: 1; min-height: 90px; scrollbar-width: thin; }
.file-tree details { padding-left: 13px; }
.file-tree > details { padding-left: 0; }
.file-tree summary { padding: 10px 8px; cursor: pointer; font-size: 12px; color: #526752; list-style-position: inside; white-space: nowrap; }
.tree-file { display: flex; width: 100%; align-items: center; justify-content: flex-start; gap: 9px; border: 0; text-align: left; background: transparent; border-radius: 7px; padding: 10px 9px; color: #586a5c; font-size: 12px; min-height: 38px; }
.tree-file > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-file.selected { background: #e5eddf; color: #315638; font-weight: 600; }
.tree-file.located { outline: 2px solid #8ba679; outline-offset: -2px; }
.file-glyph { font-size: 9px; font-weight: 600; letter-spacing: -.3px; color: #66805a; border: 1px solid #cbd8c2; padding: 2px 3px; border-radius: 3px; min-width: 24px; text-align: center; flex-shrink: 0; }
.sidebar-bottom { border-top: 1px solid var(--line); padding: 16px 12px 18px; }
.nav-label { display: block; padding: 0 9px 7px; color: #75806d; font-size: 10px; letter-spacing: 1px; }
.collaboration-label { margin-top: 15px; }
.sidebar-action { width: 100%; background: transparent; border: 0; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #576c5a; padding: 10px 9px; min-height: 39px; }
.sidebar-action > span:nth-child(2) { flex: 1; text-align: left; }
.sidebar-action > .ui-icon { width: 17px; height: 17px; color: #72836a; }
.nav-arrow { color: #8c9986; font-size: 13px; }
.count { background: #dde8d6; color: #42623a; border-radius: 5px; padding: 2px 6px; font-size: 10px; min-width: 20px; }
.count:empty { display: none; }
/* Document editor */
.document-workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--paper); }
.document-header { min-height: 95px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 21px 28px; gap: 14px; }
.document-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.document-title > div { min-width: 0; }
.document-title h1 { font-size: 16px; font-weight: 600; margin: 0 0 7px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.document-title .small { font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-icon { display: grid; place-items: center; width: 38px; height: 42px; border-radius: 9px; color: #69825c; background: #f0f3e9; flex-shrink: 0; }
.file-icon .ui-icon { width: 21px; height: 21px; }
.document-actions { flex-shrink: 0; }
.document-actions button { font-size: 12px; padding: 8px 11px; }
.document-actions .ui-icon { width: 15px; height: 15px; }
.editor-toolbar { min-height: 51px; border-top: 1px solid #eff0e9; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 7px 26px; flex-shrink: 0; }
.segmented { display: flex; gap: 2px; background: #f0f2eb; border-radius: 7px; padding: 3px; flex-shrink: 0; }
.segmented button { border: 0; background: transparent; font-size: 11px; color: #687764; padding: 5px 10px; min-height: 28px; border-radius: 5px; white-space: nowrap; }
.segmented button.selected { color: #355b35; background: var(--paper); box-shadow: 0 1px 4px #283e2112; }
.format-tools { display: flex; gap: 2px; border-left: 1px solid var(--line); padding-left: 13px; }
.format-tools button { background: transparent; border: 0; color: #64725e; padding: 4px 6px; width: 28px; min-height: 29px; font-size: 12px; }
.format-tools .ui-icon { width: 16px; height: 16px; }
#word-count { margin-left: auto; white-space: nowrap; font-size: 11px; }
.editor-empty { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 42px 24px; text-align: center; background: radial-gradient(ellipse at 50% 40%, #f6f7ed70, transparent 60%); }
.welcome-illustration { width: 126px; height: 130px; position: relative; margin-bottom: 29px; flex-shrink: 0; }
.paper-back { position: absolute; top: 3px; left: 8px; width: 86px; height: 112px; background: #e7ecdf; border: 1px solid #d7e0cc; border-radius: 9px; transform: rotate(-10deg); }
.paper-front { position: absolute; top: 11px; left: 23px; width: 87px; height: 113px; border: 1px solid #cbd7bd; border-radius: 9px; background: var(--paper); box-shadow: 0 9px 22px #4c67421a; padding: 15px 14px; transform: rotate(5deg); text-align: left; }
.paper-mark { font-family: Georgia, serif; color: #7d9466; font-size: 31px; line-height: 1.2; letter-spacing: -2px; }
.paper-front i { display: block; height: 3px; background: #e0e7d5; border-radius: 3px; margin-top: 10px; }
.paper-front i:last-child { width: 65%; }
.paper-spark { position: absolute; right: -4px; top: -3px; width: 36px; height: 36px; display: grid; place-items: center; border: 5px solid var(--paper); border-radius: 50%; color: #688c57; background: #e4ecd9; }
.paper-spark .ui-icon { width: 19px; height: 19px; }
.editor-empty h2 { font-size: clamp(22px, 2vw, 29px); font-weight: 500; letter-spacing: -.7px; margin: 16px 0 15px; }
.editor-empty > p { font-size: 13px; line-height: 1.95; color: var(--muted); margin-bottom: 23px; }
.welcome-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.welcome-actions button { padding: 11px 15px; font-size: 12px; }
.welcome-features { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 19px; margin-top: 38px; color: #78856d; }
.welcome-features > span { display: flex; align-items: center; gap: 5px; font-size: 10px; }
.welcome-features .ui-icon { width: 13px; height: 13px; }
.editor-surface { display: flex; flex: 1; min-height: 0; }
.source-pane, .preview-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; overflow: auto; scrollbar-width: thin; }
.source-pane { border-right: 1px solid var(--line); background: #fafbf6; }
.preview-pane { background: var(--paper); }
.pane-label { font-size: 10px; font-weight: 500; letter-spacing: .6px; color: #78856d; padding: 18px 26px 8px; flex-shrink: 0; }
#source-editor { border: 0; outline: 0; resize: none; flex: 1; min-height: 160px; width: 100%; border-radius: 0; padding: 12px 26px 40px; font: 13px/2 "SFMono-Regular", Consolas, "Microsoft YaHei", monospace; tab-size: 2; background: transparent; color: #465b43; white-space: pre-wrap; }
#source-editor:read-only { color: #64705c; }
#source-editor.latex-source { white-space: pre; overflow-wrap: normal; }
.source-heading { display: flex; align-items: center; justify-content: space-between; padding-right: 16px; gap: 8px; flex-shrink: 0; min-height: 40px; }
.source-heading .pane-label { padding-top: 10px; margin: 0; white-space: nowrap; }
#document-outline { min-width: 0; max-width: 52%; border: 0; background: transparent; padding: 5px; font-size: 11px; color: var(--muted); }
.explain-selection { min-height: 31px; padding: 5px 9px; font-size: 11px; white-space: nowrap; }
.explain-selection .ui-icon { width: 14px; height: 14px; }
.editor-status-right { display: flex; gap: 14px; white-space: nowrap; }
#focus-editor { min-height: 31px; padding: 5px 9px; font-size: 11px; white-space: nowrap; }
#focus-editor[aria-pressed="true"] { background: var(--pale); color: var(--green); border-color: #b7cbb9; }
.markdown .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.markdown .math-block { max-width: 100%; overflow-x: auto; }
@media (min-width: 901px) { .focus-editor .file-sidebar, .focus-editor .assistant-sidebar { display: none; } }
@media (max-width: 900px) { #focus-editor { display: none; } }
.source-located { animation: source-flash 1.4s ease-out; }
@keyframes source-flash { from { box-shadow: inset 3px 0 var(--green); background: #eaf1e9; } to { box-shadow: inset 0 0 transparent; } }
.editor-surface.source .preview-pane, .editor-surface.preview .source-pane { display: none; }
.editor-surface.source .source-pane { border: 0; }
.editor-surface.preview .markdown { width: 100%; max-width: 840px; margin: 0 auto; padding: 24px 50px 70px; }
.editor-status { min-height: 32px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); font-size: 10px; color: #78836e; padding: 0 20px; gap: 12px; flex-shrink: 0; }
#editor-state { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Research assistant */
.assistant-sidebar { width: var(--assistant-width); flex-shrink: 0; background: #f6f7f0; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.assistant-title { margin: 0; padding: 12px 14px 3px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: #355b35; background: #fbfcf7; }
.assistant-tabs { display: flex; padding: 0 18px; border-bottom: 1px solid var(--line); height: 42px; gap: 21px; flex-shrink: 0; }
.assistant-tabs button { border: 0; border-radius: 0; background: transparent; color: #6b7a64; padding: 0 3px; font-size: 12px; gap: 7px; }
.assistant-tabs button .ui-icon { width: 15px; height: 15px; }
.assistant-tabs button.active { color: #355b35; border-bottom: 2px solid #66885b; font-weight: 600; }
.chat-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-messages { flex: 1; min-height: 100px; overflow: auto; padding: 28px 23px; scrollbar-width: thin; }
.assistant-welcome { margin-top: 10px; }
.sparkle { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #dce6ce; border-radius: 11px; background: #edf2e4; color: #7a9562; margin-bottom: 19px; }
.sparkle .ui-icon { width: 21px; height: 21px; }
.assistant-welcome h2 { font-size: 15px; font-weight: 550; margin-bottom: 12px; }
.assistant-welcome p { font-size: 12px; color: #6e7d64; line-height: 1.95; }
.prompt-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; margin-top: 25px; }
.prompt-chips button { justify-content: space-between; width: 100%; padding: 9px 11px; font-size: 11px; border-color: #dfe6d5; color: #5c7551; background: #fafbf5; }
.prompt-chips .prompt-arrow { color: #8a9e79; }
.chat-composer { margin: 14px 14px 0; border: 1px solid #d5e0c9; background: var(--paper); border-radius: 12px; padding: 12px; box-shadow: 0 3px 10px #35462a06; }
.chat-composer:focus-within { border-color: #90a780; box-shadow: 0 0 0 3px #dfe9d75c; }
.context-tag { font-size: 10px; color: #738467; border-bottom: 1px solid #e9eee1; padding-bottom: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-composer textarea { resize: vertical; max-height: 220px; min-height: 90px; border: 0; padding: 13px 0; width: 100%; outline: 0; background: transparent; font-size: 12px; line-height: 1.8; }
.chat-composer .row { justify-content: space-between; }
.chat-composer .small { font-size: 10px; }
.chat-composer .primary { padding: 6px; width: 32px; min-height: 32px; border-radius: 8px; }
.chat-note { font-size: 10px; color: #748368; text-align: center; padding: 0 20px; margin: 12px 0 17px; line-height: 1.7; }
.chat-message { margin-bottom: 22px; font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; }
.chat-message.user { background: #e9efdf; padding: 13px; border-radius: 10px 10px 3px 10px; white-space: pre-wrap; }
.chat-message.assistant .markdown { font-size: 13px; padding: 0; }
.chat-save-status { padding: 10px 12px; border-left: 3px solid var(--accent, #647f53); background: #f1f4ec; border-radius: 4px; font-size: 12px; }
.chat-message .message-label { display: block; font-size: 10px; color: #647f53; margin-bottom: 8px; }
.outputs-panel { padding: 25px 20px; overflow: auto; }
.outputs-panel h2 { font-size: 16px; font-weight: 550; }
.outputs-panel form { margin: 23px 0; }
.outputs-panel form label { font-size: 12px; margin-bottom: 9px; }
.outputs-panel input { width: 100%; font-size: 12px; }
.outputs-panel form button { font-size: 12px; }
.output-list h3 { font-size: 12px; margin: 24px 0 12px; }
.output-card { padding: 14px; border: 1px solid var(--line); border-radius: 9px; margin: 10px 0; background: var(--paper); }
.output-card p { font-size: 11px; color: var(--muted); margin: 8px 0 14px; }
.output-card .row { flex-wrap: wrap; }
.output-card button { font-size: 11px; padding: 6px 8px; min-height: 30px; }
.output-card .output-filename { display: block; border: 0; padding: 0; min-height: 0; text-align: left; color: var(--green); font-size: 13px; overflow-wrap: anywhere; line-height: 1.6; background: transparent; }
.output-card .output-filename:hover { text-decoration: underline; }
/* Paper typography */
.markdown { padding: 16px 30px 55px; color: #3d4e38; font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.markdown h1 { font-size: 27px; margin: 12px 0 25px; line-height: 1.5; font-weight: 600; letter-spacing: -.5px; }
.markdown h2 { font-size: 20px; margin: 32px 0 16px; line-height: 1.5; font-weight: 600; }
.markdown h3 { font-size: 16px; margin: 26px 0 12px; }
.markdown p { margin: 0 0 18px; }
.markdown ul, .markdown ol { padding-left: 24px; }
.markdown blockquote { border-left: 3px solid #aabe95; margin: 22px 0; padding: 6px 17px; color: #69795f; background: #f5f7ef; }
.markdown pre { background: #f0f3e9; border: 1px solid #e4e9db; border-radius: 8px; padding: 15px; overflow: auto; font: 12px/1.8 Consolas, monospace; white-space: pre; overflow-wrap: normal; }
.markdown code { font-family: Consolas, monospace; background: #edf2e4; border-radius: 4px; padding: 2px 4px; font-size: .9em; }
.markdown pre code { padding: 0; background: transparent; }
.markdown table { border-collapse: collapse; width: 100%; font-size: 12px; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 9px 11px; }
.markdown th { background: #f1f5e9; text-align: left; }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
/* Shared dialogs and feedback */
.workspace-dialog { width: min(780px, 92vw); max-height: 88dvh; border: 1px solid #d7dfce; border-radius: 16px; padding: 0; box-shadow: var(--shadow); color: inherit; background: var(--paper); }
.workspace-dialog[open] { display: flex; flex-direction: column; }
.workspace-dialog::backdrop { background: #253a2d4d; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 25px; border-bottom: 1px solid var(--line); flex-shrink: 0; margin: 0; }
.dialog-heading h2 { margin: 0; font-size: 18px; font-weight: 550; }
.dialog-heading .icon-button { border: 1px solid var(--line); border-radius: 8px; width: 32px; min-height: 32px; }
.dialog-content { padding: 25px; overflow: auto; }
.dialog-content form { display: flex; flex-direction: column; gap: 18px; }
.dialog-content .row { flex-wrap: wrap; }
.dialog-content .row > input { min-width: 150px; }
.dialog-content label { line-height: 1.6; }
.dialog-content p { font-size: 13px; }
.dialog-content pre { max-height: 300px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f2f5ea; padding: 15px; font: 12px/1.8 Consolas, monospace; border-radius: 8px; }
.history-item, .review-item, .member-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.history-item:first-child, .review-item:first-child { padding-top: 0; }
.history-item strong, .review-item strong { font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.history-item .meta, .review-item .meta, .member-item .meta { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 13px; }
.review-item button, .history-item button, .member-item button { font-size: 12px; padding: 7px 11px; }
.review-detail { background: #f8faf3; border: 1px solid var(--line); padding: 15px; margin-top: 14px; border-radius: 9px; }
.review-detail summary { cursor: pointer; font-size: 12px; overflow-wrap: anywhere; }
.review-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-diff section { min-width: 0; }
.review-diff pre { font-size: 11px; }
.badge { display: inline-block; background: #ebf0e2; color: #60754b; font-size: 11px; font-weight: 400; border-radius: 5px; padding: 3px 7px; margin-left: 8px; }
.notifications { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(520px, 90vw); pointer-events: none; }
.notification { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; background: #2c4936; color: #fff; border-radius: 10px; box-shadow: 0 5px 22px #15341e24; font-size: 13px; line-height: 1.7; white-space: pre-wrap; pointer-events: auto; }
.notification > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notification-close { flex-shrink: 0; width: 30px; min-height: 30px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 21px; }
.notification-close:hover { background: #ffffff20; }
.notification.error { background: #813f3f; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.binary-preview { padding: 32px; color: var(--muted); font-size: 13px; text-align: center; }
.binary-preview img { max-width: 100%; max-height: 60vh; }
.binary-preview a { display: inline-block; padding: 10px; }
.mobile-nav { display: none; }
@media (min-width: 1650px) {
  .file-sidebar { width: 250px; }
  .workspace { --assistant-width: 380px; }
  .document-header { padding: 23px 34px; }
  .markdown { padding: 23px 40px 60px; }
  #source-editor { padding: 17px 32px; }
}
@media (min-width: 901px) and (max-width: 1220px) {
  .file-sidebar { width: 210px; }
  .workspace { --assistant-width: 320px; }
  .document-header { min-height: 110px; padding: 17px 19px; flex-wrap: wrap; }
  .document-actions { margin-left: auto; }
  .editor-toolbar { padding: 7px 12px; gap: 8px; flex-wrap: wrap; }
  .format-tools { padding-left: 6px; }
  .format-tools button { width: 25px; }
  #word-count { display: none; }
  .markdown { padding: 16px 20px; }
  #source-editor { padding: 12px 18px 35px; }
  .pane-label { padding-left: 18px; }
  .chat-messages { padding: 24px 18px; }
}
@media (max-width: 900px) {
  .workspace-body { overflow: hidden; }
  .file-sidebar, .document-workspace, .assistant-sidebar { display: none; width: 100%; min-width: 0; height: 100%; border: 0; }
  .workspace[data-panel="files"] .file-sidebar, .workspace[data-panel="editor"] .document-workspace, .workspace[data-panel="assistant"] .assistant-sidebar { display: flex; }
  .mobile-nav { display: flex; flex-shrink: 0; border-top: 1px solid var(--line); padding: 6px 14px max(7px, env(safe-area-inset-bottom)); background: var(--paper); gap: 8px; }
  .mobile-nav button { flex: 1; min-height: 46px; border: 0; background: transparent; flex-direction: column; gap: 4px; color: var(--muted); font-size: 10px; padding: 6px; }
  .mobile-nav button[aria-selected="true"] { color: var(--green); background: var(--pale); }
  .mobile-nav .ui-icon { width: 18px; height: 18px; }
  .topbar { height: 60px; padding: 0 18px; gap: 15px; }
  .top-actions { gap: 8px; }
  .cloud-badge { display: none; }
  .project-picker { padding: 20px 20px 10px; }
  .file-tree { padding: 6px 15px 20px; }
  .tree-file, .sidebar-action, .file-tree summary { font-size: 14px; min-height: 42px; }
  .sidebar-bottom { padding: 15px 16px; }
  .sidebar-heading { padding: 8px 20px; }
  .sidebar-heading h2 { font-size: 13px; }
  .sidebar-action .ui-icon { width: 19px; height: 19px; }
  .document-header { min-height: 90px; padding: 19px 22px; }
  .editor-toolbar { padding: 8px 20px; }
  .assistant-tabs { padding: 0 24px; }
  .assistant-tabs button { font-size: 14px; }
  .assistant-welcome { max-width: 480px; }
  .assistant-welcome h2 { font-size: 19px; }
  .assistant-welcome p { font-size: 14px; }
  .prompt-chips { max-width: 360px; }
  .prompt-chips button { font-size: 13px; min-height: 42px; }
  .chat-composer { margin: 12px 20px 0; }
  .chat-composer textarea { font-size: 16px; }
  .notifications { bottom: 81px; }
}
@media (max-width: 600px) {
  .auth-screen { display: block; }
  .auth-story { min-height: 0; padding: 25px; background: var(--warm); }
  .auth-story > div, .auth-foot, .auth-story::after { display: none; }
  .auth-form-wrap { padding: 34px 28px; min-height: calc(100dvh - 110px); align-items: flex-start; }
  .auth-form { gap: 23px; }
  input, select, textarea { font-size: 16px; }
  .topbar { padding: 0 15px; gap: 10px; }
  .brand.compact { font-size: 29px; }
  .brand.compact small { font-size: 11px; margin-left: 11px; }
  .workspace-label, .top-divider { display: none; }
  .top-actions { gap: 4px; }
  .quiet { font-size: 11px; padding: 7px; }
  .document-header { min-height: 118px; padding: 17px 18px 13px; gap: 12px; flex-wrap: wrap; }
  .document-title { width: 100%; gap: 10px; }
  .document-title h1 { font-size: 15px; margin-bottom: 5px; }
  .document-title .small { font-size: 10px; }
  .file-icon { width: 33px; height: 36px; }
  .document-actions { margin-left: auto; }
  .document-actions button { min-height: 34px; font-size: 11px; padding: 7px 11px; }
  .editor-toolbar { min-height: 88px; flex-wrap: wrap; gap: 7px 10px; padding: 9px 15px; }
  .segmented { flex: 0 0 100%; width: 100%; }
  .segmented button { flex: 1; min-height: 29px; font-size: 11px; }
  .format-tools { border: 0; padding: 0; }
  .format-tools button { width: 31px; min-height: 28px; }
  #word-count { display: block; font-size: 10px; }
  .editor-surface.split { flex-direction: column; }
  .editor-surface.split .source-pane { flex: 1; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .editor-surface.split .preview-pane { flex: 1; min-height: 0; }
  #source-editor { font-size: 16px; line-height: 1.85; padding: 10px 20px 30px; min-height: 90px; }
  .pane-label { padding: 15px 20px 4px; font-size: 10px; }
  .markdown, .editor-surface.preview .markdown { font-size: 15px; padding: 17px 22px 40px; }
  .markdown h1 { font-size: 25px; }
  .editor-empty { padding: 20px 23px 25px; justify-content: safe center; }
  .welcome-illustration { transform: scale(.8); margin-bottom: 8px; height: 122px; }
  .editor-empty .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .editor-empty h2 { font-size: 23px; margin-top: 12px; }
  .editor-empty > p { font-size: 12px; margin-bottom: 20px; }
  .welcome-actions { gap: 8px; }
  .welcome-actions button { font-size: 11px; padding: 11px; min-height: 42px; }
  .welcome-features { gap: 11px; margin-top: 25px; }
  .welcome-features > span { font-size: 9px; }
  .editor-status { font-size: 10px; padding: 0 14px; }
  .editor-status > span:last-child { display: none; }
  .chat-note { font-size: 10px; }
  .chat-messages { padding: 25px 23px; }
  .chat-message { font-size: 14px; }
  .workspace-dialog { width: calc(100vw - 24px); max-height: 90dvh; }
  .dialog-heading { padding: 17px 18px; }
  .dialog-heading h2 { font-size: 17px; }
  .dialog-content { padding: 20px 18px; }
  .review-diff { grid-template-columns: 1fr; }
  .notifications { width: calc(100vw - 30px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* The same assistant element is docked into the workflow inspector. */
.wf-shared-assistant { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.workspace[data-app-view="workflow"] .wf-shared-assistant .assistant-sidebar { display: flex !important; width: 100%; height: 100%; border: 0; }
.wf-shared-assistant .chat-messages { padding: 18px 16px; }
.wf-shared-assistant .chat-composer { margin: 8px 12px 0; }
.chat-edit { display: block; font-size: 11px; margin: 5px 0 0 auto; padding: 2px 4px; min-height: 24px; }
.chat-file-status { color: var(--green); font-size: 12px; border-left: 3px solid var(--green); padding-left: 8px; }
#chat-mode { width: 100%; font-size: 12px; padding: 6px 8px; margin-bottom: 7px; }
.editor-toolbar { flex-wrap: wrap; gap: 8px; }
.format-tools { flex-wrap: wrap; gap: 3px; padding-left: 8px; }
.format-tools select { padding: 3px; height: 29px; font-size: 12px; max-width: 82px; }
.rich-editor { flex: 1; min-height: 100px; width: 100%; overflow: auto; outline: none; padding: 30px; font-size: 16px; line-height: 1.9; }
.rich-editor:focus { box-shadow: inset 0 0 0 1px #dbe5d5; }
.rich-editor table { border-collapse: collapse; width: 100%; }
.rich-editor th, .rich-editor td { border: 1px solid var(--line); padding: 8px; }
.editor-surface.rich .preview-pane { display: none; }
.editor-surface.rich .source-pane { width: 100%; }
.find-panel { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 15px; border-bottom: 1px solid var(--line); }
.find-panel input { max-width: 180px; padding: 6px 8px; }
.format-tools [data-format="bold"] { font-weight: 700; }
.format-tools [data-format="italic"] { font-style: italic; }
.format-tools [data-format="underline"] { text-decoration: underline; }
.format-tools [data-format="strike"] { text-decoration: line-through; }
.format-tools [data-format="math"] { width: auto; white-space: nowrap; padding-inline: 8px; }
.chat-message.assistant > button { margin-right: 8px; margin-bottom: 6px; }
@media (max-width: 900px) {
  .wf-shared-assistant { height: 520px; flex: 0 0 520px; }
  .find-panel input { max-width: 100%; flex: 1 1 120px; }
}

/* Compact, grouped controls and calmer conversation hierarchy. */
.editor-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0 22px; background: #fffefb; }
.editor-view-row, .editor-format-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.editor-view-row { justify-content: space-between; min-height: 48px; padding: 7px 0; border-bottom: 1px solid #eef0e9; }
.editor-view-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.editor-view-actions #word-count { color: #889181; font-size: 11px; margin-left: 5px; }
.editor-format-row { padding: 7px 0; justify-content: space-between; }
.format-tools { border: 0; padding: 0; gap: 5px; flex: 1; min-width: 0; }
.format-group { display: inline-flex; align-items: center; gap: 2px; padding-right: 7px; border-right: 1px solid #e6eae1; }
.format-tools button { width: 29px; height: 29px; min-height: 29px; border-radius: 5px; font-size: 14px; }
.format-tools button:hover:not(:disabled) { background: #eaf0e4; color: #285a45; }
.format-tools #heading-level { border-color: transparent; background: #f2f5ed; min-width: 74px; border-radius: 5px; }
.format-more { position: relative; font-size: 12px; color: #64725e; }
.format-more > summary { cursor: pointer; border-radius: 5px; padding: 6px 8px; }
.format-more > summary:hover { background: #eef2e8; }
.format-more-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: flex; flex-direction: column; gap: 3px; min-width: 155px; padding: 6px; background: #fffefb; border: 1px solid #dce3d7; border-radius: 10px; box-shadow: 0 8px 28px #263b311a; }
.format-more-menu button { width: 100%; justify-content: flex-start; gap: 12px; padding: 6px 10px; font-size: 12px; }
#find-open { border: 0; font-size: 12px; color: #657660; min-height: 29px; padding: 5px 8px; white-space: nowrap; }
.editor-view-actions #focus-editor, .editor-view-actions #explain-selection { min-height: 30px; padding: 5px 9px; font-size: 12px; }
#format-toggle { display: none; }
#save-document:disabled { opacity: 1; background: #f1f5ee; color: #6c8165; border-color: #e1e8dc; }
.editor-surface.rich .source-pane { background: #fffefb; }
.rich-editor { padding: 32px clamp(18px, 5%, 54px); font-size: 16px; line-height: 1.9; }
.rich-editor > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.rich-editor:focus { box-shadow: inset 0 0 0 1px #e5ebdf; }
.assistant-sidebar { background: #f7f9f3; }
.assistant-tabs { background: #fbfcf7; border-bottom-color: #e2e8db; }
.chat-messages { padding: 22px 18px; }
.chat-message { margin-bottom: 20px; line-height: 1.8; }
.chat-message.user { width: fit-content; max-width: 94%; margin-left: auto; background: #edf2e6; border: 1px solid #e0e8d6; border-radius: 12px 12px 3px 12px; padding: 11px 13px; }
.chat-edit { min-height: 21px; font-size: 10px; opacity: .75; margin-top: 5px; }
.chat-edit:hover, .chat-edit:focus-visible { opacity: 1; }
.chat-message.assistant .message-label { font-size: 11px; letter-spacing: .02em; display: flex; align-items: center; gap: 6px; color: #58724b; }
.chat-message.assistant .message-label::before { content: '✧'; width: 19px; height: 19px; display: inline-grid; place-items: center; background: #eaf0e2; border-radius: 6px; font-size: 15px; }
.chat-message.assistant > button { min-height: 25px; padding: 3px 6px; border-radius: 5px; font-size: 11px; }
.chat-message.assistant > button:hover { background: #edf3e7; }
.chat-file-status { display: block; background: #f0f5e9; padding: 7px 9px; border: 1px solid #dce7d2; border-radius: 7px; font-size: 11px; line-height: 1.6; }
.chat-file-status.approved::before { content: '✓ '; }
.chat-file-status.pending { background: #faf5e8; border-color: #e9dfc2; color: #8b713b; }
.chat-file-status.pending::before { content: '◷ '; }
.chat-composer { border-radius: 13px; border-color: #dce5d4; box-shadow: 0 2px 10px #263b3106; }
.chat-composer:focus-within { border-color: #97b18c; box-shadow: 0 0 0 2px #eaf0e2; }
.chat-composer textarea { line-height: 1.7; }
.chat-composer #chat-mode { border-radius: 7px; background: #f8faf4; color: #52674b; }
.chat-note { font-size: 10px; line-height: 1.7; color: #8b9583; }
@media (max-width: 900px) {
  .editor-toolbar { padding: 0 12px; }
  .editor-view-row { flex-wrap: wrap; gap: 6px; }
  .editor-view-actions #word-count { display: none; }
  .editor-format-row { align-items: flex-start; gap: 5px; }
  .format-tools { gap: 3px; }
  .format-group { padding-right: 3px; }
  .format-tools button { width: 27px; }
}
.format-more:not([open]) .format-more-menu { display: none; }
@media (max-width: 900px) {
  .editor-format-row { position: relative; }
  .format-more { position: static; }
  .format-more-menu { left: auto; right: 0; top: calc(100% + 6px); }
}
@media (max-width: 600px) {
  .document-header { min-height: 0; padding: 12px 14px; gap: 8px; }
  .editor-toolbar { min-height: 0; }
  .editor-view-row { border-bottom: 0; padding: 6px 0; }
  #format-toggle { display: inline-flex; min-height: 32px; padding: 5px 11px; font-size: 12px; }
  #format-toggle[aria-expanded="true"] { background: var(--pale); color: var(--green); border-color: #b7cbb9; }
  .editor-toolbar:not(.format-open) .editor-format-row { display: none; }
  .format-open .editor-format-row { border-top: 1px solid #eef0e9; }
  .source-heading { min-height: 34px; }
  .rich-editor { padding-top: 18px; }
  .rich-editor h1 { font-size: 23px; margin-top: 0; }
  .notification { font-size: 12px; padding: 8px 10px 8px 12px; gap: 6px; }
}
.project-settings-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; justify-items: start; }
.project-settings-section.danger strong { color: var(--danger); }
/* Every window and panel closes from the same top-right corner (see window-close.js). */
.window-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 8px; font-size: 20px; line-height: 1; color: var(--muted, #5f6b5c); background: transparent; border-color: transparent; }
.window-close:hover, .window-close:focus-visible { background: var(--paper-2, #f1f4ef); border-color: var(--line); color: var(--ink); }
/* Keep the title and actions clear of the corner button. */
:has(> .window-close) { padding-right: 48px; }
.model-setup-banner { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #fff6e0; border-bottom: 1px solid #ecd9a5; color: var(--ink); font-size: 14px; }
.model-setup-banner[hidden] { display: none; }
.model-setup-list { display: grid; gap: 6px; margin: 8px 0 16px; }
.model-setup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.model-setup-picks .model-setup-row { grid-template-columns: minmax(0, 1fr) auto; }
.model-setup-name { display: grid; gap: 2px; min-width: 0; }
.model-setup-name strong, .model-setup-name span { overflow-wrap: anywhere; line-height: 1.4; }
.model-setup-row select { width: auto; min-width: 5.5em; }
.model-setup-default { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.model-setup-row .danger.text-button { white-space: nowrap; }
@media (max-width: 520px) { .model-setup-row { grid-template-columns: minmax(0, 1fr) auto; } .model-setup-name { grid-column: 1 / -1; } }
.model-setup-form { display: grid; gap: 8px; margin-top: 12px; }
.cloud-service { display: grid; gap: 10px; margin: 0 0 20px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.cloud-service.unavailable { border-style: dashed; opacity: .6; }
.cloud-service p { margin: 0; }
.cloud-service-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cloud-service-form { display: grid; gap: 8px; }
.cloud-service-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cloud-service-mode { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.cloud-service-mode[aria-checked="true"] { border-color: var(--green); background: var(--pale); }
.cloud-service-balance { display: flex; align-items: baseline; gap: 8px; } .cloud-service-balance strong { font-size: 22px; }
.cloud-service .cloud-service-redeem { display: flex; flex-direction: row; gap: 8px; } .cloud-service-redeem button { flex: none; width: auto; } .cloud-service-redeem input { flex: 1; min-width: 0; }
.cloud-service-charges table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.cloud-service-charges th, .cloud-service-charges td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.cloud-service-topup { display: grid; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.cloud-service-amounts { display: flex; flex-wrap: wrap; gap: 6px; } .cloud-service-amounts input { flex: 1; min-width: 8em; }
.cloud-service-amount { border: 1px solid var(--line); background: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; flex: none; width: auto; }
.cloud-service-amount[aria-checked="true"] { border-color: var(--green); background: var(--pale); font-weight: 600; }
.cloud-service-qr { width: 180px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.cloud-service-code { font-family: ui-monospace, monospace; font-size: 16px; user-select: all; }
.cloud-service-table { overflow-x: auto; max-width: 100%; }
.cloud-service { min-width: 0; } .cloud-service > * { min-width: 0; }
@media (max-width: 520px) { .cloud-service-modes { grid-template-columns: 1fr; } }

/* Project list: Codex / Claude style rows with a hover "…" menu. */
.project-picker .row { justify-content: space-between; align-items: center; background: none; border: 0; padding: 0; margin: 0 0 4px; }
.project-picker .row #project-create { margin-left: auto; }
.project-list { list-style: none; margin: 6px 0 10px; padding: 0; max-height: 38vh; overflow-y: auto; }
.project-row { position: relative; display: flex; align-items: center; border-radius: 7px; }
.project-row:hover, .project-row:focus-within { background: #eff2e9; }
.project-row.active { background: #e3e9da; }
.project-row-name { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 7px 10px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.project-row.active .project-row-name { font-weight: 600; }
.project-row-more { opacity: 0; background: none; border: 0; padding: 4px 8px; border-radius: 6px; cursor: pointer; letter-spacing: 1px; }
.project-row:hover .project-row-more, .project-row:focus-within .project-row-more, .project-row-more:focus-visible { opacity: 1; }
.project-row-more:hover { background: #d8e0cd; }
.project-row-rename { flex: 1; margin: 2px 4px; padding: 5px 7px; font-size: 14px; }
.project-menu { position: absolute; right: 4px; top: 100%; z-index: 30; display: flex; flex-direction: column; min-width: 150px; padding: 4px; background: #fff; border: 1px solid #dfe4d8; border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.project-menu button { text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.project-menu button:hover:not(:disabled) { background: #eff2e9; }
.project-menu button:disabled { opacity: .45; cursor: not-allowed; }
.project-menu button.danger { color: #b3261e; }
.thread-list { list-style: none; margin: 2px 0 6px 14px; padding: 0 0 0 8px; border-left: 1px solid var(--line, #dfe3d8); }
.thread-row { width: 100%; text-align: left; background: none; border: 0; padding: 5px 8px; border-radius: 6px; font-size: 13px; color: #4b5649; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.thread-row:hover { background: #eff2e9; }
.thread-row.active { background: #e3e9da; color: inherit; font-weight: 600; }
.thread-new { color: #6b7868; }
.chat-thread-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 12px; border-bottom: 1px solid var(--line, #dfe3d8); }
.chat-thread-bar:empty { display: none; }
.chat-thread-pick { max-width: 180px; font-size: 13px; padding: 3px 6px; border-radius: 6px; }
.chat-thread-bar .text-button { font-size: 12px; }
.chat-usage { margin-left: auto; cursor: help; }
.model-setup-prices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; } .model-setup-prices input { min-width: 0; } .model-setup-prices > span { grid-column: 1 / -1; }
.model-setup-overview { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 10px; margin-bottom: 8px; border-radius: 8px; background: #f2f5ee; font-size: 13px; }
.model-setup-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.model-setup-kind { border: 1px solid var(--line, #dfe3d8); background: none; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.model-setup-kind[aria-checked="true"] { border-color: #3c5a44; background: #e7efe4; font-weight: 600; }
.account-personal { display: grid; gap: 6px; margin: 12px 0; }
.account-personal textarea { width: 100%; box-sizing: border-box; }
.mentor-project-ai { display: grid; gap: 8px; }
.account-personal button { justify-self: start; }
.model-setup-row label.model-setup-default { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; margin: 0; } .model-setup-row label.model-setup-default input { width: auto; min-height: 0; margin: 0; }
.tex-checks { font-size: 11px; color: var(--muted, #667); margin: 4px 0; }
.tex-checks summary { cursor: pointer; }
.tex-checks.has-problems summary { color: #9a5b00; }
.tex-checks p { margin: 3px 0 0 14px; }
