:root {
  color-scheme: light;
  --canvas: #fbf9f4;
  --paper: #fffdf7;
  --rail: #f1ede4;
  --side: #f7f3eb;
  --line: #e5dfd2;
  --line-strong: #d8d0c1;
  --ink: #292a22;
  --muted: #67665b;
  --quiet: #747267;
  --olive: #393f32;
  --olive-soft: #e7e8dc;
  --clay: #765039;
  --clay-soft: #f4e7da;
  --error: #973e31;
  --radius: 9px;
  --sans: "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { color: var(--ink); background: var(--canvas); font: 14px/1.55 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
button:focus:not(:focus-visible), textarea:focus:not(:focus-visible) { outline: none; }
a { color: var(--clay); text-underline-offset: 3px; }
svg { flex: none; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; inset: 8px auto auto 8px; transform: translateY(-180%); z-index: 20;
  background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { transform: none; }
.preload, .auth-shell { min-height: 100vh; display: grid; place-items: center; }

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr) 306px; height: 100dvh; }
.shell.panel-closed { grid-template-columns: 248px minmax(0, 1fr); }
.left, .inspector, .workspace { min-height: 0; min-width: 0; }
.left {
  background: var(--rail); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px 12px;
}
.brand {
  background: none; border: 0; text-align: left; display: flex; align-items: center;
  gap: 10px; margin: 0 5px; padding: 0; width: max-content;
}
.left-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 23px; }
.brand img { width: 36px; height: 36px; }
.brand strong { display: block; font: 600 22px/1 var(--serif); letter-spacing: -.04em; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.new-chat {
  align-items: center; display: flex; text-align: left; gap: 8px; background: var(--olive);
  border: 1px solid var(--olive); color: var(--paper); width: 100%; padding: 9px 10px;
  font-size: 13px; font-weight: 600; border-radius: var(--radius); min-height: 43px;
}
.new-chat span { white-space: nowrap; }
.new-chat svg { width: 16px; height: 16px; }
.new-chat:hover, .primary:hover, .send:hover { background: #4b5141; }
.search-box {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong);
  margin: 11px 0 15px; padding: 6px 9px; border-radius: var(--radius); color: var(--quiet);
  background: #f8f5ed;
}
.search-box:focus-within { border-color: #9f8c79; }
.search-box input { border: 0; background: none; width: 100%; min-width: 0; padding: 2px 0; outline: 0; }
.search-box input:focus-visible { outline: none; }
kbd {
  padding: 0 4px; border: 1px solid currentColor; border-radius: 4px; color: inherit;
  font: 10px/1.65 var(--sans); opacity: .72; white-space: nowrap;
}
.new-chat kbd { margin-left: auto; }
.nav { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.nav button, .project-button, .chat-select, .tree-button, .list-button {
  text-align: left; width: 100%; border: 0; background: none; border-radius: 7px;
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.nav button { padding: 7px 9px; color: var(--muted); font-weight: 500; }
.nav button:hover, .project-button:hover, .chat-select:hover, .tree-button:hover, .list-button:hover, .icon-button:hover {
  background: #e9e3d7; color: var(--ink);
}
.nav button[aria-current="page"] { background: #e5e2d5; color: var(--olive); font-weight: 650; }
.left-scroll { flex: 1; min-height: 0; overflow: auto; margin: 4px -5px 0; padding: 0 5px; }
.section-line {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 15px 4px 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .075em;
}
.icon-button, .quiet-button {
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); padding: 5px;
}
.icon-button { width: 30px; height: 30px; padding: 5px; flex: none; }
.icon-button[aria-pressed="true"] { color: var(--clay); background: var(--clay-soft); }
.section-line .icon-button { width: 24px; height: 24px; }
.project-row, .chat-row { display: flex; gap: 2px; align-items: center; }
.project-row + .project-row { margin-top: 3px; }
.project-button { padding: 7px 8px; color: var(--muted); }
.project-button.current { background: #ece3d5; color: #5e442e; font-weight: 620; }
.project-button span, .chat-select span, .tree-label span, .tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-row .icon-button { width: 22px; background: transparent; }
.chat-select { padding: 7px 7px; color: var(--muted); line-height: 1.35; height: 35px; }
.chat-select.current { background: var(--olive-soft); color: var(--olive); font-weight: 650; }
.chat-row .icon-button { height: 25px; width: 25px; }
.chat-row .tiny-dot { flex: none; }
.side-note { padding: 5px 6px 11px; color: var(--quiet); font-size: 12px; }
.account {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 0 0;
  border-top: 1px solid var(--line-strong); margin-top: 10px;
}
.account .avatar { background: #dfded0; color: var(--olive); }
.account-name { flex: 1; min-width: 0; font-weight: 650; line-height: 1.22; }
.account-name small { display: block; margin-top: 3px; font-weight: 400; color: var(--muted); font-size: 11px; }

.workspace { display: flex; flex-direction: column; }
.top {
  min-height: 62px; padding: 0 19px; flex: none; display: flex; align-items: center;
  gap: 11px; border-bottom: 1px solid var(--line); background: var(--canvas);
}
.breadcrumb { flex: 1; display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.breadcrumb span { color: var(--quiet); font-size: 12px; flex: none; }
.breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 620; }
.breadcrumb b { color: #a29988; font-weight: 400; }
.model-pill {
  flex: none; display: flex; align-items: center; gap: 7px; color: var(--muted);
  font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
  background: var(--paper);
}
.tiny-dot { width: 7px; height: 7px; background: #698052; border-radius: 50%; display: inline-block; }
.tiny-dot.off { background: #a76744; }
.tiny-dot.running { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .36; } }
.mobile-toggle { display: none; }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 4; width: 100%; height: 100%; border: 0;
  background: #28251e36; cursor: default;
}
.tabs {
  background: #f7f3eb; border-bottom: 1px solid var(--line); display: flex;
  overflow-x: auto; padding: 0 10px; min-height: 38px; flex: none; gap: 1px;
}
.tab { display: flex; align-items: center; color: var(--quiet); flex: none; border-bottom: 2px solid transparent; }
.tab.active { border-bottom-color: var(--clay); color: var(--clay); background: var(--canvas); }
.tab > button:first-child {
  display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 5px 6px 8px;
  font-size: 12px; max-width: 160px; min-width: 0;
}
.tab .icon-button { width: 24px; height: 24px; margin-right: 3px; }
.tab .icon-button svg { width: 14px; height: 14px; }
.stage { flex: 1; min-width: 0; min-height: 0; overflow: auto; }
.welcome { max-width: 790px; margin: 0 auto; padding: clamp(48px, 10vh, 112px) 27px 35px; }
.welcome .heading-mark { display: flex; align-items: center; color: var(--clay); font-size: 13px; font-weight: 650; gap: 8px; margin-bottom: 20px; }
.heading-mark .avatar { width: 34px; height: 34px; border-radius: 8px; background: #efe3d4; color: var(--clay); }
.welcome h1 { font: 400 clamp(34px, 4vw, 59px)/1.05 var(--serif); letter-spacing: -.057em; }
.welcome > p { color: var(--muted); font-size: 15px; margin: 16px 0 27px; max-width: 48ch; }
.composer {
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper);
  box-shadow: 0 2px 4px #4d40200a; padding: 10px 11px;
}
.composer:focus-within { border-color: #b0a18c; }
.composer textarea {
  width: 100%; min-height: 70px; max-height: 180px; display: block; border: 0; outline: 0;
  resize: vertical; background: transparent; padding: 6px 6px 9px; color: var(--ink); font-size: 15px;
}
.composer textarea:focus-visible { outline: none; }
.composer textarea::placeholder { color: var(--quiet); }
.compose-actions { align-items: center; display: flex; gap: 6px; min-height: 35px; }
.compose-actions > .icon-button { border-color: var(--line); width: 32px; height: 32px; }
.compose-context {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px; margin-bottom: 7px;
}
.selector-trigger {
  display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 45px; width: 100%;
  border: 1px solid var(--line); border-radius: 8px; background: var(--canvas);
  color: var(--muted); padding: 5px 8px; text-align: left;
}
.selector-trigger:hover, .selector-trigger:focus-visible { border-color: var(--line-strong); background: var(--side); }
.selector-icon {
  display: grid; place-items: center; flex: none; width: 29px; height: 29px;
  border-radius: 6px; background: var(--olive-soft); color: var(--olive);
}
.selector-trigger[data-action="pick-model"] .selector-icon,
.selector-trigger[data-action="settings-model"] .selector-icon {
  background: var(--clay-soft); color: var(--clay);
}
.selector-copy { display: grid; flex: 1; min-width: 0; gap: 0; line-height: 1.25; }
.selector-copy small { font-size: 10px; font-weight: 600; color: var(--muted); }
.selector-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink); font-weight: 650; }
.settings-selector { max-width: 360px; margin-top: 10px; }
.research-chip {
  border: 1px solid transparent; background: none; border-radius: 6px; color: var(--muted);
  padding: 4px 6px; display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12px;
}
.research-chip svg { width: 16px; height: 16px; }
.research-chip[aria-pressed="true"] { background: var(--olive-soft); color: var(--olive); border-color: #d3d5c4; }
.research-chip:hover { background: var(--olive-soft); }
.send {
  width: 37px; height: 36px; padding: 5px; border: 0; border-radius: 7px; background: var(--olive);
  color: var(--paper); display: grid; place-items: center; flex: none; margin-inline-start: auto;
}
.send[disabled] { background: var(--olive); }
.attachment-list { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 4px; }
.attachment {
  display: inline-flex; gap: 6px; align-items: center; background: var(--rail); padding: 3px 6px;
  font-size: 12px; color: var(--muted); border-radius: 5px; max-width: 100%;
}
.attachment .icon-button { width: 22px; height: 22px; }
.suggestions { margin: 21px 0 0; border-top: 1px solid var(--line); }
.suggestion {
  border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%;
  min-height: 43px; display: flex; align-items: center; gap: 9px; text-align: left; padding: 8px 4px;
  color: var(--muted);
}
.suggestion .main-icon { color: var(--clay); width: 23px; display: grid; place-items: center; }
.suggestion span:nth-child(2) { flex: 1; }
.suggestion:hover { background: #f4efe5; color: var(--ink); }

.inspector { padding: 15px 15px 12px; background: var(--side); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.inspector-header { display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); padding-bottom: 11px; }
.inspector-tabs { flex: 1; display: flex; gap: 2px; }
.inspector-tabs button {
  background: none; border: 0; border-radius: 6px; padding: 6px 8px; color: var(--muted); font-size: 13px;
}
.inspector-tabs button.active { background: #ece4d7; color: #614731; font-weight: 650; }
.inspector-body { overflow-y: auto; flex: 1; min-height: 0; padding: 13px 2px 8px; }
.org-root { padding: 8px 4px 13px; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 7px; }
.org-root .avatar { background: #e8dfd0; color: var(--clay); }
.org-root .org-count { margin-left: auto; font-size: 11px; color: var(--quiet); font-weight: 400; }
.org-list, .org-children { list-style: none; margin: 0; padding: 0; }
.org-children { margin: 7px 0 6px 13px; padding: 0 0 0 11px; border-left: 1px solid var(--line-strong); }
.org-node { margin-bottom: 5px; position: relative; }
.org-children > .org-node::before { content: ""; height: 1px; width: 10px; background: var(--line-strong); position: absolute; top: 18px; left: -11px; }
.tree-row { display: flex; align-items: center; gap: 1px; }
.tree-row.selected { background: #eee4d6; border-radius: 7px; }
.tree-button { padding: 6px 4px; min-height: 35px; gap: 7px; color: var(--ink); flex: 1; }
.tree-label { display: flex; flex: 1; align-items: center; min-width: 0; gap: 7px; font-size: 13px; font-weight: 570; }
.tree-label small { margin-left: auto; font-size: 10px; color: var(--quiet); font-weight: 400; white-space: nowrap; }
.tree-row .icon-button { width: 23px; height: 25px; }
.tree-row .icon-button svg { width: 14px; height: 14px; }
.tree-row .avatar { width: 24px; height: 24px; font-size: 10px; border-radius: 6px; }
.tree-row[data-top="true"] .avatar { background: var(--olive); color: #fffdf7; }
.tree-row[data-top="true"] + .org-children { margin-top: 0; }
.tree-group { padding: 6px 6px 4px; color: var(--quiet); font-size: 11px; font-weight: 650; }
.tree-placeholder { color: var(--quiet); padding: 6px 8px; font-size: 12px; }
.avatar {
  display: inline-grid; width: 32px; height: 32px; place-items: center; flex: none;
  border-radius: 7px; font-size: 11px; font-weight: 700; color: var(--clay); background: #ebdfcf;
}
.avatar.temp { color: var(--muted); background: #ece8de; }
.inspector-foot { border-top: 1px solid var(--line); padding: 11px 1px 0; display: flex; align-items: center; gap: 7px; }
.inspector-foot .quiet-button { font-size: 12px; }
.inspector-foot .quiet-button:hover { color: var(--ink); background: var(--rail); }
.detail-inspect .subline { color: var(--muted); font-size: 12px; margin: 5px 0 7px; }
.detail-inspect h3 { font: 400 23px/1.12 var(--serif); margin: 11px 0 8px; }
.detail-inspect p { color: var(--muted); font-size: 13px; margin-bottom: 13px; }
.detail-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-inspect h4 { margin: 13px 0 7px; font-weight: 640; }
.step-list { list-style: none; margin: 4px 0 0; padding: 0; }
.step { padding: 7px 6px 8px 12px; border-bottom: 1px solid var(--line); position: relative; min-width: 0; }
.step.depth-1 { margin-left: 11px; }
.step.depth-2 { margin-left: 22px; }
.step.depth-3 { margin-left: 32px; }
.step::before { content: ""; position: absolute; left: 0; top: 14px; height: 7px; width: 7px; border-radius: 50%; background: #7a8765; }
.step[data-status="running"]::before { animation: pulse 1.8s ease-in-out infinite; background: #956345; }
.step[data-status="error"]::before, .step[data-status="partial"]::before { background: #ae744d; }
.step strong { font-size: 12px; }
.step p { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.step .state { font-size: 10px; color: var(--quiet); margin-left: 3px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); padding: 5px 9px;
  border-radius: 7px; font-size: 12px; font-weight: 590; text-decoration: none;
}
.button:hover { background: var(--rail); }
.button.primary { background: var(--olive); border-color: var(--olive); color: var(--paper); }
.context-title { display: flex; padding: 12px 18px; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.context-title > div { flex: 1; min-width: 0; }
.context-title strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.context-title small { color: var(--quiet); font-size: 11px; }
.chat-layout { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.transcript { flex: 1; min-height: 0; overflow-y: auto; }
.transcript-inner { max-width: 810px; margin: 0 auto; padding: 27px 25px 18px; }
.message { margin-bottom: 25px; min-width: 0; }
.message.user { display: flex; justify-content: flex-end; }
.message-user { background: #efe8dc; padding: 11px 15px; border-radius: 12px 12px 3px 12px; max-width: 90%; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.msg-head .avatar { width: 27px; height: 27px; }
.msg-head time { margin-left: auto; color: var(--quiet); font-size: 11px; }
.used-model {
  border: 1px solid var(--line); background: var(--side); color: var(--muted);
  padding: 1px 6px; border-radius: 5px; min-width: 0; max-width: 44%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.message-actions { display: flex; gap: 4px; margin-top: 8px; }
.composer-dock { padding: 7px 24px 16px; flex: none; background: var(--canvas); }
.composer-dock > div { max-width: 760px; margin: auto; }
.composer-dock textarea { min-height: 45px; }
.run-line {
  padding: 8px 10px; color: var(--muted); background: var(--side); border: 1px solid var(--line);
  border-radius: 7px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px;
}
.run-line .note { flex: 1 1 170px; font-size: 13px; overflow-wrap: anywhere; }
.run-line.error { color: var(--error); background: #fbefe7; border-color: #ecd6c7; }
.run-journal {
  min-width: 0; margin: 0 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper);
}
.run-journal + .message.assistant { margin-top: 20px; }
.run-journal summary {
  display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 37px; list-style: none; cursor: pointer;
}
.run-journal summary::-webkit-details-marker { display: none; }
.run-journal summary:hover { background: var(--side); }
.run-journal summary:focus-visible { outline-offset: -2px; }
.run-journal > summary { padding: 6px 10px; border-radius: 8px; }
.run-journal > summary > svg, .journal-step > summary > svg { color: var(--quiet); }
.run-journal[open] > summary > svg, .journal-step[open] > summary > svg, .journal-event details[open] > summary > svg:last-child {
  transform: rotate(90deg);
}
.journal-title { font-weight: 640; }
.journal-state, .journal-count, .run-journal time { color: var(--muted); font-size: 11px; flex: none; }
.run-journal time { margin-left: auto; }
.journal-state { border-radius: 4px; padding: 1px 5px; background: var(--rail); }
.journal-state[data-status="done"] { color: var(--olive); background: var(--olive-soft); }
.journal-state[data-status="running"], .journal-state[data-status="partial"] { color: var(--clay); background: var(--clay-soft); }
.journal-state[data-status="error"], .journal-event.error .journal-label { color: var(--error); }
.journal-body { padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.journal-list { margin: 0; padding: 0; list-style: none; }
.journal-step { margin: 5px 0; }
.journal-step > summary { min-height: 31px; padding: 4px 5px; border-radius: 5px; }
.journal-step > summary strong { font-size: 13px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.journal-step > summary small { color: var(--muted); flex: none; }
.journal-step > .journal-list { margin: 2px 0 0 10px; padding-left: 10px; border-left: 1px solid var(--line-strong); }
.journal-task, .journal-note { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.journal-task, .journal-step > .journal-note { padding: 1px 4px 4px 25px; }
.journal-event { padding: 4px 0; min-width: 0; }
.journal-label, .journal-event summary { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; font-weight: 610; }
.journal-event summary { min-height: 32px; align-items: center; border-radius: 5px; }
.journal-label > svg, .journal-event summary > svg { color: var(--quiet); margin-top: 2px; }
.journal-label > span, .journal-event summary > span { min-width: 0; overflow-wrap: anywhere; }
.journal-event.warning .journal-label, .journal-event.draft .journal-label { color: var(--clay); }
.journal-text.prose { margin: 2px 3px 2px 21px; color: var(--muted); font-size: 12px; }
.journal-text.prose h1, .journal-text.prose h2, .journal-text.prose h3 { font-size: 14px; }
.journal-event a[href] { overflow-wrap: anywhere; }
.journal-event > a, .journal-event details > a { display: inline-block; margin-left: 21px; font-size: 12px; }
.prose { min-width: 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 9px; }
.prose h1, .prose h2, .prose h3 { margin: 17px 0 5px; font-weight: 650; }
.prose h1 { font-size: 24px; }
.prose h2 { font-size: 19px; }
.prose h3 { font-size: 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose pre { overflow: auto; background: #eeeae1; padding: 9px; border-radius: 6px; }
.prose code { font-size: .9em; }
.prose blockquote { border-left: 2px solid #bba991; margin-left: 0; padding-left: 10px; color: var(--muted); }
.table-scroll { overflow: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 9px 8px; }
th { background: #f3eee4; color: var(--muted); font-weight: 650; }
th .sort { border: 0; background: none; padding: 0; font-weight: inherit; text-align: left; }
td.source-link { white-space: nowrap; }
td time { white-space: nowrap; color: var(--quiet); }
.finding-title { font-weight: 640; }
.finding-summary { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.report-widget { margin-top: 13px; }
.report-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 13px 0 10px; }
.report-toolbar input, .report-toolbar select, .field input, .field select, .field textarea {
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); min-height: 34px;
  padding: 5px 7px; min-width: 0;
}
.report-toolbar input[type="search"] { flex: 1; min-width: 100px; max-width: 270px; }
.report-toolbar .button { margin-left: auto; }
.report-note { color: var(--muted); margin-top: 9px; font-size: 12px; }
.table-empty { background: var(--side); border: 1px solid var(--line); padding: 20px 15px; border-radius: 8px; color: var(--muted); }
.page { max-width: 960px; margin: 0 auto; padding: 32px 24px 36px; }
.page h1 { font: 400 clamp(28px, 4vw, 43px)/1.1 var(--serif); letter-spacing: -.045em; }
.page > .lede { color: var(--muted); margin: 8px 0 19px; max-width: 66ch; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 23px; }
.page-heading .lede { max-width: 58ch; color: var(--muted); margin-top: 8px; }
.page-heading .button { padding-inline: 10px; min-height: 38px; }
.page h2 { font-size: 17px; margin: 22px 0 8px; }
.list-button { padding: 9px 5px; border-radius: 0; border-bottom: 1px solid var(--line); }
.list-button > span:nth-child(2) { min-width: 0; flex: 1; }
.list-button b { font-size: 14px; font-weight: 630; display: block; }
.list-button small { display: block; color: var(--muted); font-size: 12px; }
.list-button .mission-note { margin-top: 4px; overflow-wrap: anywhere; }
.list-button .badge-state { display: inline-flex; font-size: 11px; color: var(--clay); padding: 2px 6px; border-radius: 5px; background: var(--clay-soft); flex: none; }
.list-button .asset-sub { white-space: nowrap; }
.agent-page .heading-mark { margin-bottom: 8px; }
.agent-page .prose { padding: 0 5px; }
.directory .org-list { max-width: 650px; }
.directory .tree-label { font-size: 14px; }
.directory .tree-button { min-height: 38px; }
.directory .org-root { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.inset { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 12px; margin-top: 11px; }
.skill { padding: 9px 0; border-bottom: 1px solid var(--line); }
.skill p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.field { display: grid; gap: 4px; margin: 8px 0; }
.field span { font-size: 12px; color: var(--muted); font-weight: 620; }
.field textarea { resize: vertical; min-height: 88px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 11px; }
.member-row { display: grid; grid-template-columns: 1fr minmax(125px, 1fr); gap: 8px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.member-row small { display: block; color: var(--muted); }
details.menu { position: relative; }
details.menu summary { list-style: none; cursor: pointer; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu .popover {
  position: absolute; z-index: 4; right: 0; top: calc(100% + 3px); min-width: 180px; max-width: 250px;
  padding: 4px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 9px;
  box-shadow: 0 8px 24px #40341a1c;
}
.popover button {
  display: flex; gap: 8px; align-items: center; width: 100%; background: none; border: 0;
  padding: 6px 8px; text-align: left; border-radius: 5px; white-space: nowrap;
}
.popover button:hover { background: var(--rail); }
dialog { padding: 0; width: min(440px, calc(100vw - 28px)); border: 1px solid var(--line-strong); border-radius: 12px; background: var(--canvas); color: var(--ink); box-shadow: 0 14px 45px #332d2240; }
dialog::backdrop { background: #2c281941; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 12px 15px; }
.dialog-head h2 { font: 400 24px/1.2 var(--serif); }
.dialog-fields { padding: 7px 15px 10px; }
dialog footer { display: flex; gap: 7px; justify-content: flex-end; padding: 9px 15px 13px; border-top: 1px solid var(--line); }
.picker {
  width: min(550px, calc(100vw - 28px));
  max-height: min(680px, calc(100dvh - 30px));
  overflow: hidden; border-radius: 14px; background: var(--paper);
}
.picker[open] { display: flex; flex-direction: column; }
.picker-header {
  padding: 16px 19px 10px; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex: none;
}
.picker-header h2 { font: 400 28px/1.1 var(--serif); letter-spacing: -.035em; }
.picker-close { min-width: 40px; min-height: 40px; }
.picker-search {
  display: flex; align-items: center; gap: 9px; margin: 0 18px 10px; padding: 0 10px;
  min-height: 43px; flex: none; border: 1px solid var(--line-strong);
  border-radius: 8px; color: var(--clay); background: var(--side);
}
.picker-search:focus-within { outline: 2px solid var(--clay); outline-offset: 2px; }
.picker-search input {
  width: 100%; min-width: 0; min-height: 40px; border: 0;
  background: none; outline: none; color: var(--ink); font-size: 15px;
}
.picker-search input:focus-visible { outline: none; }
.picker-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 18px 10px; }
.picker-group h3 { color: var(--muted); font-size: 11px; font-weight: 650; margin: 9px 2px 5px; }
.picker-group + .picker-group { margin-top: 13px; }
.picker-group ul { list-style: none; padding: 0; margin: 0; }
.picker-option {
  width: 100%; min-height: 48px; display: flex; gap: 9px; align-items: center; text-align: left;
  padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent;
}
.picker-option:hover { background: var(--side); }
.picker-option.selected { border-color: #d8dacb; background: var(--olive-soft); }
.picker-option:focus-visible { outline-offset: -2px; }
.picker-glyph {
  width: 31px; height: 31px; display: grid; place-items: center; flex: none;
  border-radius: 7px; background: var(--rail); color: var(--clay); font-size: 10px; font-weight: 700;
}
.picker-option.selected .picker-glyph { background: var(--olive); color: var(--paper); }
.picker-option-copy { display: grid; gap: 2px; flex: 1; min-width: 0; line-height: 1.28; }
.picker-option-copy strong { font-size: 14px; font-weight: 640; overflow-wrap: anywhere; }
.picker-option-copy small { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.picker-check { color: var(--olive); flex: none; }
.picker-empty { padding: 20px 3px; color: var(--muted); }
.picker-footer {
  justify-content: space-between; align-items: center; flex: none; padding: 8px 17px; gap: 8px;
  background: var(--side);
}
.picker-status { color: var(--muted); font-size: 11px; flex: 1; }
.picker-update { min-height: 35px; flex: none; font-size: 12px; }
.picker-update:hover { background: var(--rail); }
.watch-page { max-width: 920px; }
.watch-summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px;
  padding: 8px 0 11px; color: var(--clay); border-bottom: 1px solid var(--line);
}
.watch-summary span, .watch-summary .quiet-button { display: flex; align-items: center; gap: 7px; }
.watch-summary .quiet-button { width: auto; min-height: 35px; }
.watch-summary .quiet-button:hover { background: var(--rail); }
.watch-list { display: grid; gap: 12px; margin-top: 15px; }
.watch-card {
  padding: 14px; display: grid; gap: 12px; border: 1px solid var(--line);
  background: var(--paper); border-radius: 10px; min-width: 0;
}
.watch-card-header { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.watch-icon {
  display: grid; place-items: center; width: 37px; height: 37px; border-radius: 8px;
  color: var(--clay); background: var(--clay-soft); flex: none;
}
.watch-card-name { flex: 1; min-width: min(145px, 100%); overflow-wrap: anywhere; }
.watch-card-name h2 { font-size: 15px; margin: 0; font-weight: 650; }
.watch-card-name p, .watch-subject { color: var(--muted); font-size: 13px; }
.watch-subject { overflow-wrap: anywhere; }
.watch-state {
  align-items: center; display: inline-flex; gap: 6px; padding: 3px 7px; flex: none;
  background: var(--olive-soft); color: var(--olive); font-size: 11px; border-radius: 5px;
}
.watch-state[data-state="paused"] { background: var(--clay-soft); color: var(--clay); }
.watch-times {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); gap: 9px;
  margin: 0; padding: 8px 11px; background: var(--side); border-radius: 6px;
}
.watch-times dt { color: var(--muted); font-size: 11px; }
.watch-times dd { font-size: 13px; font-weight: 600; margin: 0; font-variant-numeric: tabular-nums; }
.watch-last { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.watch-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.watch-actions > button { min-height: 36px; }
#toast:not(:empty) {
  position: fixed; z-index: 10; bottom: 15px; right: 15px; max-width: min(370px, calc(100vw - 30px));
  border: 1px solid #b9ae9c; background: var(--paper); padding: 9px 12px; border-radius: 7px;
  box-shadow: 0 5px 22px #231c1217;
}
.auth-card { width: min(360px, 90vw); background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 23px; }
.auth-card img { width: 43px; height: 43px; margin-bottom: 10px; }
.auth-card h1 { font: 400 30px/1.15 var(--serif); margin-bottom: 10px; }
.auth-card [role="alert"] { color: var(--error); margin-top: 6px; }
.empty-page { color: var(--muted); padding: 16px 4px; }
@media (max-width: 1130px) {
  .shell { grid-template-columns: 219px minmax(0, 1fr) 265px; }
  .shell.panel-closed { grid-template-columns: 219px minmax(0, 1fr); }
  .left { padding-left: 11px; padding-right: 11px; }
  .new-chat kbd { display: none; }
  .inspector { padding-left: 10px; padding-right: 10px; }
  .welcome { padding-left: 21px; padding-right: 21px; }
  .welcome h1 { font-size: clamp(34px, 4vw, 50px); }
}
@media (max-width: 960px) {
  .shell, .shell.panel-closed { grid-template-columns: 212px minmax(0, 1fr); }
  .inspector {
    position: fixed; inset: 0 0 0 auto; z-index: 5; min-width: 275px; width: min(320px, 88vw);
    box-shadow: -7px 0 28px #211a1525;
  }
}
@media (max-width: 640px) {
  .shell, .shell.panel-closed { grid-template-columns: minmax(0, 1fr); }
  .mobile-toggle { display: inline-flex; }
  .left { position: fixed; inset: 0 auto 0 0; z-index: 6; width: min(260px, 88vw); box-shadow: 7px 0 28px #211a1525; }
  .left:not(.mobile-open) { display: none; }
  .top { min-height: 52px; padding: 0 8px; gap: 4px; }
  .breadcrumb span, .breadcrumb b { display: none; }
  .model-pill { font-size: 10px; padding: 3px 5px; }
  .welcome { padding: 51px 16px 24px; }
  .welcome h1 { font-size: 39px; }
  .transcript-inner, .composer-dock, .page { padding-left: 14px; padding-right: 14px; }
  .selector-trigger { min-height: 44px; padding-inline: 6px; gap: 5px; }
  .selector-icon { width: 24px; height: 24px; }
  .selector-icon svg { width: 15px; height: 15px; }
  .selector-copy strong { white-space: normal; overflow-wrap: anywhere; }
  .compose-actions > .icon-button, .compose-actions > .research-chip { min-height: 40px; }
  .compose-actions .send { width: 42px; height: 42px; }
  .picker-search input, .field input, .field textarea { font-size: 16px; }
  .picker-header, .picker-footer { padding-inline: 11px; }
  .picker-search { margin-inline: 11px; }
  .picker-list { padding-inline: 11px; }
  .context-title { padding: 9px 11px; }
  .journal-step > .journal-list { margin-left: 4px; padding-left: 7px; }
  .journal-body { padding-inline: 8px; }
}
@media (max-width: 360px) {
  .welcome h1 { font-size: 33px; }
  .selector-trigger .selector-icon { display: none; }
  .picker-header h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; }
}

