:root {
  font-family:
    "Segoe UI",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: #212529;
  background: #f5f6f7;
  font-synthesis: none;
  color-scheme: light;
  --ink: #212529;
  --muted: #626970;
  --line: #dfe2e5;
  --control-line: #858c93;
  --paper: #fff;
  --soft: #f3f4f5;
  --accent: #e05d22;
  --accent-dark: #9f3810;
  --accent-ink: #17191c;
  --yellow: #ffc757;
  --danger: #a22c35;
  --success: #25634c;
  --sidebar-width: 278px;
  --page-gap: clamp(20px, 3.3vw, 48px);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-width: 280px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  overflow-wrap: anywhere;
}
button:hover,
.button:hover {
  background: #ed713b;
  color: var(--accent-ink);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button.secondary,
.button.secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
button.secondary:hover,
.button.secondary:hover {
  background: #edf0f2;
  border-color: #bfc5ca;
}
button.quiet {
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
}
button.quiet:hover {
  background: #e9ecef;
  color: var(--ink);
}
button.danger {
  background: #fff2f2;
  border-color: #edbdc1;
  color: var(--danger);
}
button.danger:hover {
  background: #ffe4e6;
}
input,
select,
textarea {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  font-size: 15px;
  line-height: 1.45;
}
input::placeholder,
textarea::placeholder {
  color: #697078;
  opacity: 1;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f1f2f3;
}
textarea {
  resize: vertical;
}
:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}
a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
a:hover {
  text-decoration-thickness: 2px;
}
label {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(29px, 3.2vw, 44px);
  line-height: 1.14;
  letter-spacing: -1.35px;
  font-weight: 650;
}
h2 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.55px;
}
h3 {
  line-height: 1.35;
}
p {
  line-height: 1.6;
}
small,
.field-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.field-help {
  margin: 7px 0 0;
  font-weight: 400;
}
.optional {
  color: var(--muted);
  font-weight: 400;
}
.eyebrow {
  color: #795036;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.5px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.skip-link:focus {
  top: 12px;
}
.workspace {
  min-height: 100dvh;
}
.mobile-header,
.sidebar-backdrop {
  display: none;
}
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 20;
}
.brand,
.brand-mark,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.brand {
  padding: 0 9px 24px;
  font-size: 21px;
  font-weight: 700;
}
.brand img,
.brand-mark img,
.mobile-brand img {
  object-fit: contain;
  flex-shrink: 0;
}
.brand strong,
.brand-mark strong,
.mobile-brand strong {
  font-weight: 400;
  color: #51585f;
}
.new-conversation {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  margin: 0 0 21px;
  padding: 11px;
}
.new-conversation span {
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}
.primary-nav {
  display: grid;
  gap: 4px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
.nav {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  background: transparent;
  color: #4e555c;
  padding: 10px 14px;
  min-height: 43px;
  border-left: 3px solid transparent;
  font-weight: 550;
}
.nav:hover {
  background: #f3f4f5;
  color: var(--ink);
}
.nav.active {
  background: #fff1e8;
  border-left-color: var(--accent);
  color: #873411;
  font-weight: 700;
}
.conversation-tools {
  padding: 20px 2px 0;
}
.conversation-label {
  display: block;
  margin-bottom: 10px;
  color: #666d74;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.7px;
}
#conversation-search {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
  border-color: #b0b6bb;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 13px;
  font-weight: 450;
}
.checkbox input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent-dark);
}
.checkbox.compact {
  margin: 12px 0 4px;
  align-items: center;
  font-size: 12px;
}
.checkbox.compact input {
  margin-top: 0;
}
.conversation-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-gutter: stable;
  padding: 6px 0;
}
.conversation-row {
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  text-align: left;
  align-items: start;
  background: transparent;
  color: var(--ink);
  display: grid;
  justify-content: stretch;
  gap: 5px;
}
.conversation-row:hover {
  background: #f2f3f4;
  color: var(--ink);
}
.conversation-row.active {
  background: #fff1e8;
  color: #873411;
}
.conversation-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.conversation-row small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.list-feedback {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 4px;
  line-height: 1.5;
}
.list-feedback:empty {
  display: none;
}
.aside-bottom {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding: 14px 8px 0;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.aside-bottom p {
  margin: 0 0 7px;
}
.aside-bottom .quiet {
  margin-left: -10px;
}
.worker-status {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #858c93;
  flex-shrink: 0;
}
.status-dot.available,
.status-dot.ready {
  background: var(--success);
}
.status-dot.unavailable {
  background: var(--danger);
}
#identity {
  overflow-wrap: anywhere;
  color: #434b52;
}
.main-shell {
  height: 100dvh;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.main-shell > section {
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.studio-view {
  overflow: hidden;
}
.studio-empty {
  height: 100%;
  overflow: auto;
  padding: clamp(30px, 5vh, 72px) var(--page-gap) 30px;
}
.start-intro,
.start-form {
  width: min(700px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.start-intro h1 {
  margin-bottom: 16px;
}
.start-intro > p:last-child {
  max-width: 630px;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.start-form {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--yellow);
  border-radius: 12px;
}
.start-form > label {
  margin-top: 19px;
  margin-bottom: 8px;
}
.start-form > label:first-child {
  margin-top: 0;
}
#new-project {
  width: min(340px, 100%);
}
#new-message {
  min-height: 144px;
}
.attachment-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 12px 0 18px;
}
.attachment-tools .field-help {
  font-size: 11px;
  margin: 0;
}
.attach-button {
  font-size: 12px;
  padding: 8px 12px;
}
.start-options {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  color: #505860;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0;
  overflow-wrap: anywhere;
}
summary::marker {
  color: var(--accent-dark);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 17px;
}
.start-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.start-footer > button {
  margin-left: auto;
}
.draft-status {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.scope-note {
  font-size: 11px;
  color: var(--muted);
  margin: 15px 0 0;
}
.chat-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 21px 30px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  min-width: 0;
}
.chat-heading {
  min-width: 0;
}
.chat-header h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.chat-header .eyebrow {
  margin-bottom: 5px;
}
.chat-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  flex-shrink: 0;
  max-width: 49%;
}
.chat-actions button {
  font-size: 12px;
  padding: 8px 10px;
}
.run-state {
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
  background: #f1f3f4;
  overflow-wrap: anywhere;
}
.run-state.running,
.run-state.queued {
  color: #87570a;
  background: #fff2d5;
}
.run-state.failed,
.run-state.cancelled {
  color: var(--danger);
  background: #fff0f1;
}
.chat-outcome {
  max-height: 26dvh;
  overflow: auto;
  padding: 12px 30px;
  border-bottom: 1px solid var(--line);
  background: #fffaf1;
  min-width: 0;
}
.chat-outcome h2,
.chat-outcome h3 {
  font-size: 14px;
  margin-bottom: 5px;
}
.chat-outcome p {
  font-size: 12px;
  line-height: 1.5;
  margin: 5px 0;
}
.chat-outcome .actions {
  margin: 9px 0 0;
}
.chat-outcome button,
.chat-outcome .button {
  min-height: 38px;
  font-size: 12px;
}
.message-list {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 30px max(26px, calc((100% - 830px) / 2)) 35px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.message {
  margin: 0 0 28px;
  min-width: 0;
}
.message.user {
  margin-left: auto;
  max-width: 82%;
  width: max-content;
}
.message.assistant {
  max-width: 830px;
}
.message-author {
  font-size: 12px;
  font-weight: 650;
  color: #5c646c;
  margin-bottom: 8px;
}
.message-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.75;
}
.message-content.markdown,
.markdown {
  white-space: normal;
}
.message.user .message-content {
  background: #fff0e5;
  border: 1px solid #f0dccd;
  border-radius: 12px 12px 3px 12px;
  padding: 13px 16px;
  color: #3d3028;
}
.message-content p:last-child {
  margin-bottom: 0;
}
.message-content ul,
.message-content ol,
.markdown ul,
.markdown ol {
  padding-left: 23px;
}
.message-content h1,
.message-content h2,
.message-content h3,
.markdown h1,
.markdown h2,
.markdown h3 {
  margin: 22px 0 10px;
  font-size: 18px;
  letter-spacing: -0.25px;
  line-height: 1.4;
}
.message-content h1:first-child,
.message-content h2:first-child,
.message-content h3:first-child {
  margin-top: 0;
}
.message-content table,
.markdown table {
  display: block;
  overflow: auto;
  border-collapse: collapse;
  max-width: 100%;
}
.message-content td,
.message-content th,
.markdown td,
.markdown th {
  padding: 8px;
  border: 1px solid var(--line);
  text-align: left;
}
.message-content blockquote,
.markdown blockquote {
  margin: 12px 0;
  padding: 4px 0 4px 15px;
  border-left: 3px solid var(--yellow);
  color: var(--muted);
}
code {
  font:
    0.9em/1.55 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  background: #eceff1;
  padding: 2px 4px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f0f2f4;
  color: #384049;
  padding: 15px;
  border: 1px solid #e0e4e7;
  border-radius: 8px;
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  max-height: 520px;
  max-width: 100%;
  overflow: auto;
}
pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}
.message-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.message-images a {
  display: block;
  max-width: 100%;
}
.message-images img {
  width: min(230px, 100%);
  max-height: 190px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.message-meta,
.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.message details {
  margin-top: 10px;
}
.message details pre {
  margin-top: 7px;
}
.composer {
  width: min(900px, calc(100% - 40px));
  min-width: 0;
  max-height: 43dvh;
  overflow: auto;
  margin: 0 auto 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid #c8cdd2;
  border-radius: 13px;
  box-shadow: 0 4px 16px #2125290a;
}
.composer-label {
  font-size: 11px;
  color: var(--muted);
  padding: 0 6px 6px;
}
.composer textarea {
  min-height: 58px;
  max-height: 160px;
  border-color: transparent;
  padding: 6px;
  font-size: 14px;
}
.composer textarea:focus {
  outline-offset: 0;
}
.composer-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 7px;
}
.model-field {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  min-width: 0;
}
.model-field select {
  width: auto;
  max-width: 220px;
  margin: 0;
  font-size: 12px;
  min-height: 39px;
  padding: 8px;
  border-color: #bcc2c8;
}
.send-button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
}
.composer-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 12px;
  padding: 9px 5px 1px;
}
.composer-notes small {
  font-size: 10px;
  line-height: 1.4;
}
.attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.attachment-preview:not(:empty) {
  margin: 10px 0;
}
.attachment-card {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f7f8;
  color: #4d565e;
  font-size: 11px;
}
.attachment-card img {
  width: 42px;
  height: 36px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
}
.attachment-card span {
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-card button {
  flex-shrink: 0;
  min-height: 36px;
  min-width: 36px;
  padding: 6px;
  background: transparent;
  color: var(--danger);
  font-size: 12px;
}
.page-view {
  overflow: auto;
  padding-bottom: 36px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 34px var(--page-gap) 23px;
}
.page-header h1 {
  font-size: 31px;
  letter-spacing: -0.9px;
  margin-bottom: 10px;
}
.page-header p:not(.eyebrow) {
  margin: 0;
  max-width: 680px;
  font-size: 14px;
  color: var(--muted);
}
.page-header .eyebrow {
  margin-bottom: 8px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 var(--page-gap) 26px;
}
.metrics article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 17px;
  border-radius: 10px;
  min-width: 0;
}
.metrics span,
.metrics small {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.metrics strong {
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.task-list,
.detail,
.audit-content,
.audit-summary,
.audit-actions {
  margin-left: var(--page-gap);
  margin-right: var(--page-gap);
}
.task-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.task-list:empty {
  display: none;
}
.list-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(155px, 230px);
  gap: 16px;
  margin: 0 var(--page-gap) 16px;
}
#task-list-feedback {
  margin: 8px var(--page-gap) 14px;
}
.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 21px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.task-row:last-child {
  border-bottom: 0;
}
.task-row > div {
  min-width: 0;
}
.task-row h3 {
  font-size: 14px;
  margin: 0 0 6px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.task-row p {
  margin: 7px 0 0;
}
.task-row small {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.task-row button {
  flex-shrink: 0;
  min-height: 40px;
  font-size: 12px;
  padding: 8px 12px;
  background: #f1f3f4;
  color: #3c444b;
  border-color: #dde1e5;
}
.task-row button:hover {
  background: #e4e8eb;
}
.badge {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
  font-size: 11px;
  line-height: 1.45;
  padding: 5px 8px;
  border-radius: 6px;
  background: #edf0f3;
  color: #48535e;
}
.badge.failed,
.badge.blocked,
.badge.rejected {
  background: #fff0f1;
  color: #a22c35;
}
.badge.running,
.badge.queued,
.badge.awaiting_review {
  background: #fff1d2;
  color: #785008;
}
.badge.succeeded,
.badge.approved,
.badge.deployed {
  background: #eaf5ef;
  color: #25634c;
}
.detail {
  margin-top: 0;
  padding: 25px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.detail > .quiet:first-child {
  margin: -7px 0 15px -10px;
}
.detail h2 {
  overflow-wrap: anywhere;
}
.detail h3 {
  margin-top: 25px;
  font-size: 16px;
}
.detail #detail-state {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.detail #detail-body {
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 20px;
}
.actions > * {
  max-width: 100%;
}
.notice,
.outcome-card {
  padding: 17px;
  margin: 14px 0;
  background: #fff7e8;
  border: 1px solid #e8d3ab;
  border-radius: 9px;
}
.notice p:last-child,
.outcome-card p:last-child {
  margin-bottom: 0;
}
.notice.error,
.outcome-card.failed {
  background: #fff2f3;
  border-color: #e8c2c5;
}
.empty-state {
  padding: 24px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}
.audit-summary {
  font-size: 13px;
  color: var(--muted);
}
.audit-content {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.audit-event {
  padding: 18px 21px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.audit-event:last-child {
  border-bottom: 0;
}
.audit-event h3 {
  font-size: 14px;
  margin: 0 0 6px;
}
.audit-event p {
  font-size: 13px;
  margin-bottom: 5px;
}
.audit-event time {
  font-size: 11px;
  color: var(--muted);
}
.audit-event pre {
  font-size: 11px;
  margin-bottom: 0;
}
.audit-actions .danger {
  margin-left: auto;
}
.banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 12px 24px;
  background: #fff0d1;
  border-bottom: 1px solid #e2c38a;
  color: #67460c;
  font-size: 13px;
}
.banner button {
  min-height: 38px;
  font-size: 12px;
  padding: 7px 12px;
}
.banner small {
  display: block;
  color: #6f561f;
  margin-top: 3px;
}
.network-banner {
  background: #fff0ec;
  border-color: #e6bbac;
  color: #853815;
}
.network-banner small {
  color: #794b36;
}
.login-panel {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  border-top: 5px solid var(--accent);
  background: #f5f6f7;
}
.login-card {
  width: min(450px, 100%);
  display: grid;
  gap: 10px;
  padding: 35px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.brand-mark {
  margin-bottom: 25px;
  font-size: 24px;
  font-weight: 700;
}
.login-card .eyebrow {
  margin-bottom: 2px;
}
.login-card h1 {
  font-size: 38px;
  margin-bottom: 6px;
}
.login-card > p:not(.eyebrow) {
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 14px;
}
.login-card label:not(:first-child) {
  margin-top: 4px;
}
.login-card button {
  margin: 12px 0 4px;
}
.login-card small {
  text-align: center;
  font-size: 11px;
}
.form-error,
.login-card > p.form-error {
  padding: 10px;
  border-radius: 6px;
  background: #fff0f1;
  color: var(--danger);
  font-size: 13px;
}
#security-qr {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
}

dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  background: #fff;
  color: var(--ink);
}
dialog::backdrop {
  background: #21252985;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
dialog form > label {
  margin: 15px 0;
}
dialog .actions {
  margin-bottom: 0;
}
#toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(450px, calc(100vw - 32px));
  padding: 15px 18px;
  border-radius: 9px;
  background: #212529;
  color: #fff;
  box-shadow: 0 8px 28px #0003;
  z-index: 90;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
#toast button {
  margin-left: 10px;
  min-height: 36px;
  font-size: 12px;
  background: #ffc757;
  color: #212529;
}
@media (max-width: 1100px) and (min-width: 851px) {
  :root {
    --sidebar-width: 246px;
    --page-gap: 26px;
  }
  .app-sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .chat-header {
    padding: 18px 22px;
    flex-wrap: wrap;
  }
  .chat-actions {
    max-width: 100%;
  }
  .chat-header h1 {
    font-size: 20px;
  }
  .chat-outcome {
    padding-left: 22px;
    padding-right: 22px;
  }
}
@media (max-width: 850px) {
  :root {
    --page-gap: 20px;
  }
  .mobile-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }
  .mobile-brand {
    font-size: 17px;
    font-weight: 700;
    gap: 8px;
  }
  .menu-button {
    padding: 9px 12px;
  }
  .menu-button span {
    font-size: 17px;
    line-height: 1;
  }
  .app-sidebar {
    width: min(310px, calc(100vw - 44px));
    transform: translateX(-105%);
    visibility: hidden;
    z-index: 70;
    padding-top: 23px;
    box-shadow: 6px 0 30px #21252920;
  }
  body.sidebar-open .app-sidebar {
    transform: translateX(0);
    visibility: visible;
  }
  body.sidebar-open {
    overflow: hidden;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: 60;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: #21252970;
  }
  .sidebar-backdrop:hover {
    background: #21252970;
  }
  .brand {
    padding-bottom: 22px;
  }
  .aside-bottom {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
  .main-shell {
    margin-left: 0;
    height: calc(100dvh - 64px);
  }
  .studio-empty {
    padding-top: 30px;
  }
  .start-intro h1 {
    font-size: 36px;
  }
  .start-intro > p:last-child {
    font-size: 14px;
    margin-bottom: 23px;
  }
  .start-form {
    padding: 21px;
  }
  .chat-header {
    padding: 14px 18px 11px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .chat-header h1 {
    font-size: 20px;
  }
  .chat-header .eyebrow {
    font-size: 9px;
  }
  .chat-actions {
    max-width: 100%;
    justify-content: flex-start;
    gap: 4px;
  }
  .chat-actions button {
    min-height: 36px;
    padding: 7px 9px;
  }
  .run-state {
    font-size: 10px;
  }
  .chat-outcome {
    padding: 10px 18px;
    max-height: 22dvh;
  }
  .message-list {
    padding: 22px 18px 25px;
  }
  .message {
    margin-bottom: 24px;
  }
  .message.user {
    max-width: 91%;
  }
  .message-content {
    font-size: 14px;
    line-height: 1.65;
  }
  .composer {
    width: calc(100% - 24px);
    margin-bottom: max(10px, env(safe-area-inset-bottom));
    padding: 10px;
    border-radius: 11px;
    max-height: 43dvh;
  }
  .composer textarea {
    font-size: 16px;
  }
  .composer-label {
    font-size: 11px;
  }
  .composer-toolbar {
    gap: 6px;
  }
  .model-field select {
    max-width: 180px;
  }
  .composer-notes small {
    font-size: 10px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-bottom: 20px;
  }
  .metrics strong {
    font-size: 23px;
  }
  .page-header {
    padding-top: 25px;
  }
  .page-header h1 {
    font-size: 28px;
  }
  .page-header > button {
    margin-top: 0;
  }
  .detail {
    padding: 21px;
  }
  .banner {
    padding: 10px 18px;
    font-size: 12px;
  }
  .audit-actions .danger {
    margin-left: 0;
  }
  #toast {
    right: 16px;
    bottom: 16px;
  }
}
@media (max-width: 480px) {
  :root {
    --page-gap: 16px;
  }
  .mobile-header {
    padding: 10px 12px;
  }
  .start-intro h1 {
    font-size: 34px;
  }
  .studio-empty {
    padding-top: 25px;
    padding-bottom: 24px;
  }
  .start-form {
    padding: 17px;
  }
  .start-form > label {
    font-size: 13px;
  }
  .start-footer {
    gap: 12px;
  }
  .start-footer > button {
    width: 100%;
  }
  .field-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .field-grid input,
  .field-grid select,
  #new-message,
  #new-project {
    font-size: 16px;
  }
  .attachment-tools {
    align-items: flex-start;
    flex-direction: column;
  }
  .attachment-tools .field-help {
    font-size: 10px;
  }
  .scope-note {
    font-size: 10px;
  }
  .chat-header {
    padding-left: 14px;
    padding-right: 14px;
  }
  .chat-actions {
    gap: 2px;
  }
  .chat-header h1 {
    font-size: 18px;
  }
  .chat-actions button {
    font-size: 11px;
    padding: 7px;
  }
  .chat-outcome {
    padding-left: 14px;
    padding-right: 14px;
  }
  .message-list {
    padding-left: 14px;
    padding-right: 14px;
  }
  .composer {
    width: calc(100% - 20px);
    padding: 9px;
  }
  .composer-toolbar .attach-button {
    font-size: 11px;
    min-height: 36px;
    padding: 7px 8px;
  }
  .model-field {
    margin-left: auto;
    gap: 4px;
  }
  .model-field span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .model-field select {
    max-width: 135px;
    font-size: 11px;
    min-height: 36px;
    padding: 7px;
  }
  .send-button {
    min-height: 36px;
    font-size: 12px;
    padding: 7px 10px;
  }
  .composer-notes {
    padding-left: 2px;
    padding-right: 2px;
  }
  .list-filters {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .task-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 11px;
    padding: 16px;
  }
  .task-row > div:first-child {
    flex: 1 1 100%;
  }
  .task-row > button {
    margin-left: auto;
  }
  .task-row .actions {
    margin: 0;
  }
  .metrics article {
    padding: 14px;
  }
  .metrics strong {
    font-size: 21px;
  }
  .detail {
    padding: 18px;
  }
  .detail h2 {
    font-size: 21px;
  }
  .audit-event {
    padding: 16px;
  }
  .audit-actions > button {
    font-size: 12px;
  }
  .login-panel {
    padding: 18px;
  }
  .login-card {
    padding: 25px;
  }
  .login-card h1 {
    font-size: 33px;
  }
  .login-card input {
    font-size: 16px;
  }
  dialog {
    padding: 21px;
  }
  dialog h2 {
    font-size: 21px;
  }
  dialog input,
  dialog select,
  dialog textarea {
    font-size: 16px;
  }
}
@media (max-width: 350px) {
  .composer-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .composer-toolbar .attach-button {
    justify-self: start;
  }
  .model-field {
    grid-column: 2;
    grid-row: 1;
  }
  .model-field select {
    max-width: 120px;
  }
  .send-button {
    grid-column: 2;
    justify-self: end;
  }
  .composer-notes {
    padding-top: 6px;
  }
  .attachment-card span {
    max-width: 105px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .app-sidebar {
    transition:
      transform 0.18s ease,
      visibility 0.18s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .app-sidebar,
  .mobile-header,
  .composer,
  .primary-nav,
  .actions,
  #toast {
    display: none !important;
  }
  .main-shell {
    margin-left: 0;
    height: auto;
    overflow: visible;
  }
  .page-view,
  .studio-view,
  .chat-shell,
  .message-list {
    height: auto;
    overflow: visible;
    display: block;
  }
}
.chat-header {
  grid-row: 1;
}
.chat-outcome {
  grid-row: 2;
}
.message-list {
  grid-row: 3;
}
.composer {
  grid-row: 4;
}
.app-sidebar {
  transition: none;
}

.close-sidebar {
  display: none;
}
@media (max-width: 850px) {
  .close-sidebar {
    display: inline-flex;
    position: absolute;
    top: 17px;
    right: 9px;
    width: 44px;
    min-height: 44px;
    padding: 7px;
    font-size: 24px;
  }
  .app-sidebar .brand {
    padding-right: 38px;
  }
}
/* Dynamic content shares the same bounds as the static workspace. */
.version {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 12px;
  color: var(--muted);
}
.attachment-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 5px 9px;
  margin: 0;
  padding: 8px;
  width: min(280px, 100%);
  max-width: 100%;
  background: #f5f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.attachment-item img {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 5px;
}
.attachment-item figcaption {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.attachment-item button {
  justify-self: start;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 0;
  color: var(--danger);
  font-size: 11px;
  text-align: left;
}
.message > header {
  font-size: 12px;
  font-weight: 650;
  color: #5c646c;
  margin-bottom: 8px;
}
.message > .markdown {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.75;
}
.message.user > .markdown {
  background: #fff0e5;
  border: 1px solid #f0dccd;
  border-radius: 12px 12px 3px 12px;
  padding: 13px 16px;
  color: #3d3028;
}
.message > .markdown p:last-child {
  margin-bottom: 0;
}
.message-attachment {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 12px 0 0;
  max-width: 100%;
  font-size: 12px;
}
.message-attachment img {
  display: block;
  width: min(230px, 100%);
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.chat-outcome > .outcome-card {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.deployment-card {
  padding: 21px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.deployment-card:last-child {
  border-bottom: 0;
}
.deployment-card h2 {
  font-size: 18px;
  margin-bottom: 10px;
}
.deployment-card p {
  font-size: 13px;
  margin-bottom: 9px;
}
.deployment-card .outcome-card {
  margin: 14px 0;
}
@media (max-width: 480px) {
  .deployment-card {
    padding: 16px;
  }
  .message > .markdown {
    line-height: 1.65;
  }
}
/* Conversation-first workspace: common composer, restrained Aliant accents. */
:root {
  --sidebar-width: 260px;
  background: #fff;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0 !important;
}
.phosphor {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  opacity: 0.8;
}
.icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  flex: 0 0 44px;
  border-radius: 50%;
}
.app-sidebar {
  background: #f7f7f6;
  border: 0;
  padding: 22px 12px 12px;
}
.brand {
  font-size: 20px;
  padding: 0 10px 25px;
}
.new-conversation {
  background: transparent;
  color: var(--ink);
  margin-bottom: 4px;
  font-weight: 500;
  padding: 10px 12px;
}
.new-conversation:hover {
  background: #eaeae8;
}
.primary-nav {
  gap: 2px;
  padding: 0 0 18px;
  border: 0;
}
.nav {
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 450;
}
.nav.active {
  background: #eaeae8;
  color: var(--ink);
  font-weight: 550;
}
.nav:hover {
  background: #eaeae8;
}
.conversation-tools {
  padding: 0 4px;
}
.conversation-list {
  flex: 1;
  min-height: 60px;
}
.management-nav {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 6px 0;
}
.management-nav > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  font-weight: 500;
}
.management-nav > summary::after {
  content: "⌄";
  margin-left: auto;
}
.management-nav nav {
  padding-left: 8px;
}
.aside-bottom {
  flex-shrink: 0;
  padding: 10px 10px 0;
}
.aside-bottom #identity {
  display: inline;
  font-size: 13px;
}
.aside-bottom #logout {
  min-height: 36px;
  padding: 6px 0;
  font-size: 12px;
}
.aside-bottom #logout .phosphor {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.main-shell,
.studio-view {
  background: #fff;
}
.studio-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 28px 12vh;
}
.start-intro,
.start-form {
  width: min(760px, 100%);
}
.start-intro h1 {
  text-align: center;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 550;
  letter-spacing: -0.9px;
  margin: 0 0 30px;
}
.start-form,
.composer {
  border: 1px solid #dededb;
  border-radius: 26px;
  padding: 14px 16px 10px;
  box-shadow: 0 2px 8px #00000005;
  background: #fff;
}
.start-form:focus-within,
.composer:focus-within {
  border-color: #9b9b95;
}
.start-form textarea,
.composer textarea {
  border: 0;
  outline: 0;
  padding: 8px 6px;
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  max-height: 200px;
  background: transparent;
}
#new-message {
  min-height: 76px;
}
.compose-controls,
.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  padding-top: 4px;
}
.site-field {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #e4e4e1;
  border-radius: 22px;
  padding-left: 10px;
  min-width: 0;
  max-width: 220px;
}
.site-field .phosphor {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.site-field select,
#new-project {
  width: auto;
  max-width: 180px;
  min-height: 38px;
  margin: 0;
  padding: 6px;
  border: 0;
  border-radius: 20px;
  font-size: 13px;
  background: transparent;
}
.model-field {
  margin-left: auto;
}
.model-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.model-field select {
  min-height: 40px;
  max-width: 160px;
  padding: 8px 4px;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.start-form > .draft-status:not(:empty) {
  padding: 5px 6px 0;
}
.start-hint {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 15px 0 22px;
}
.suggestions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.suggestions button {
  border-radius: 22px;
  font-size: 12px;
  font-weight: 450;
  padding: 8px 14px;
}
.studio-empty > .scope-note {
  font-size: 11px;
  text-align: center;
  margin-top: 20px;
}
.chat-shell {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.chat-header {
  padding: 16px 26px;
  border: 0;
  align-items: center;
  flex-wrap: nowrap;
}
.chat-header h1 {
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.chat-header h1:has(input) {
  overflow: visible;
}
.chat-header .eyebrow {
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: 3px;
  font-weight: 450;
}
.chat-actions {
  max-width: 55%;
  flex-wrap: nowrap;
}
.run-state {
  background: transparent;
  font-size: 12px;
}
.chat-menu {
  position: relative;
}
.chat-menu > summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
  list-style: none;
}
.chat-menu > summary::-webkit-details-marker {
  display: none;
}
.chat-menu > summary:hover {
  background: var(--soft);
}
.chat-menu-items {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 30;
  width: 180px;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 25px #0002;
}
.chat-menu-items button {
  width: 100%;
  justify-content: flex-start;
  min-height: 44px;
}
.message-list {
  grid-row: 2;
  padding: 24px max(24px, calc((100% - 760px) / 2)) 28px;
}
.message {
  margin-bottom: 32px;
}
.message > .markdown {
  font-size: 16px;
  line-height: 1.7;
}
.message.user > header {
  display: none;
}
.message.user > .markdown {
  background: #f3f3f1;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  padding: 12px 19px;
}
.message.assistant > header {
  color: var(--accent-dark);
}
.chat-outcome {
  max-height: none;
  overflow: visible;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 24px;
}
.chat-outcome > .outcome-card {
  background: #fafaf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.chat-outcome .version {
  font-size: 11px;
}
.composer {
  grid-row: 3;
  width: min(760px, calc(100% - 40px));
  margin-bottom: max(16px, env(safe-area-inset-bottom));
  max-height: 45dvh;
}
.composer textarea {
  min-height: 44px;
}
.composer .send-button {
  width: 44px;
  min-height: 44px;
  padding: 10px;
}
.composer-notes {
  padding-top: 6px;
}
.composer-notes #composer-note {
  font-size: 11px;
}
@media (max-width: 850px) {
  .mobile-header {
    height: 58px;
    border: 0;
  }
  .main-shell {
    height: calc(var(--viewport-height, 100dvh) - 58px);
  }
  .mobile-header .menu-button {
    background: transparent;
    border: 0;
    padding: 10px;
  }
  .studio-empty {
    justify-content: flex-start;
    padding: max(50px, 12vh) 18px 28px;
  }
  .start-intro h1 {
    font-size: 27px;
    margin-bottom: 26px;
  }
  .chat-header {
    padding: 8px 16px;
  }
  .chat-header h1 {
    font-size: 16px;
  }
  .chat-actions {
    gap: 0;
  }
  .run-state {
    font-size: 10px;
    padding: 4px;
  }
  .message-list {
    padding: 22px 18px;
  }
  .message > .markdown {
    font-size: 15px;
  }
  .composer {
    width: calc(100% - 24px);
    margin-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .model-field select {
    max-width: 140px;
  }
}
@media (max-width: 480px) {
  .start-form,
  .composer {
    padding: 10px 10px 8px;
    border-radius: 24px;
  }
  .compose-controls {
    flex-wrap: wrap;
    gap: 2px;
  }
  .site-field {
    max-width: calc(100% - 48px);
  }
  .compose-controls .model-field {
    order: 4;
    margin-left: 48px;
    flex: 1;
  }
  .compose-controls #start-conversation {
    margin-left: auto;
  }
  .compose-controls .model-field select {
    min-height: 30px;
    padding-top: 2px;
    padding-bottom: 2px;
  }
  .composer-toolbar {
    display: flex;
    gap: 4px;
  }
  .composer-toolbar .model-field {
    margin-left: auto;
  }
  .composer-toolbar .send-button {
    flex: 0 0 44px;
  }
  .start-hint {
    max-width: 290px;
    font-size: 12px;
  }
  .suggestions {
    max-width: 330px;
    gap: 6px;
  }
  .suggestions button {
    font-size: 11px;
    padding: 8px 11px;
  }
  .chat-actions {
    max-width: 58%;
  }
  .message.user {
    max-width: 90%;
  }
  .chat-outcome {
    padding: 0;
  }
}
@media (max-height: 550px) {
  .studio-empty {
    padding-top: 24px;
    justify-content: flex-start;
  }
  .suggestions,
  .studio-empty > .scope-note {
    display: none;
  }
  .composer-notes #composer-note {
    display: none;
  }
}
.aside-bottom #identity {
  display: block;
  margin: 4px 0;
}
