@font-face{font-family:Onest;src:url("./assets/browser/onest-regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}

@font-face{font-family:Onest;src:url("./assets/browser/onest-medium.ttf") format("truetype");font-weight:500 700;font-style:normal;font-display:swap}

:root {
  --font-display: Onest,"PingFang SC","Microsoft YaHei",sans-serif;
  --font-text: Onest,"PingFang SC","Microsoft YaHei",sans-serif;
  --font-mono: "Cascadia Code",Consolas,monospace;
  --display-weight: 600;
  --display-tracking: -.02em;
  --display-tracking-xl: -.022em;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-soft: #f1f4f9;
  --surface: #ffffff;
  --muted-surface: #f1f4f9;
  --text: #18202c;
  --muted: #647082;
  --muted-strong: #3f4b5e;
  --line: #e3e8f0;
  --line-strong: #cbd3e1;
  --border: #e3e8f0;
  --field-border: #cbd3e1;
  --office-line: #e3e8f0;
  --primary: #1668e3;
  --primary-dark: #0f52ba;
  --primary-deep: #0f52ba;
  --accent: #1668e3;
  --primary-soft: #edf4ff;
  --primary-softer: #f5f9ff;
  --composer-focus: #a9caf7;
  --green: #227452;
  --green-soft: #e9f6ef;
  --success: #227452;
  --success-soft: #e9f6ef;
  --orange: #93671d;
  --orange-soft: #faf3e6;
  --red: #ac4741;
  --red-soft: #fbedeb;
  --blue: #4f718d;
  --blue-soft: #edf3f8;
  --dialog-teal: #126b70;
  --dialog-teal-soft: #e5f3f1;
  --radius: 12px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px -6px rgba(15,23,42,.08);
  --shadow-md: 0 18px 44px -24px rgba(15,23,42,.22), 0 2px 6px rgba(15,23,42,.04);
  --sidebar: 280px;
  --toolbar: 72px;
  --space: 8px;
  --action: #18202c;
  --action-ink: #fff;
  --ink: #18202c;
  --card: #ffffff;
  --surface-shadow: 0 1px 2px rgba(15,23,42,.04), 0 22px 46px -28px rgba(15,23,42,.2);
  --composer-shadow: 0 14px 36px -20px rgba(24,42,74,.2), 0 2px 8px -2px rgba(15,23,42,.05), inset 0 1px 0 rgba(255,255,255,.95);
  --work-ease: cubic-bezier(.22,1,.36,1);
}

* {
  box-sizing: border-box;
}

html,body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: clip;
}

button,input,select,textarea {
  font: inherit;
}

button,a,summary {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

button svg,button svg * {
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}

button {
  color: inherit;
}

input,textarea {
  caret-color: var(--primary);
}

input::placeholder,textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

::selection {
  background: #dfe8ff;
  color: #193c90;
}

input[type=checkbox],input[type=radio] {
  accent-color: var(--primary);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

button:focus:not(:focus-visible) {
  outline: none;
}

h1,h2,h3,h4,p {
  margin-top: 0;
}

h1,h2,h3,h4 {
  font-weight: 600;
  letter-spacing: -.018em;
}

h1 {
  font-size: 32px;
  line-height: 1.35;
}

h2 {
  font-size: 18px;
  line-height: 1.5;
}

h3 {
  font-size: 14px;
  line-height: 1.6;
}

p {
  line-height: 1.8;
}

strong,b {
  font-weight: 600;
}

svg {
  flex-shrink: 0;
}

button {
  transition: background-color 140ms ease,color 140ms ease,border-color 140ms ease,box-shadow 140ms ease;
}

button[hidden],[hidden] {
  display: none !important;
}

.muted,.cell-muted {
  color: var(--muted);
  font-size: 13px;
}

.amount,.number,table,.task-progress,.briefing-counts,.directory-updated {
  font-variant-numeric: tabular-nums;
}

.eyebrow,.project-section-kicker,.module-section-index {
  display: none;
}

.view {
  min-width: 0;
  animation: none;
}

.mobile-menu,.sidebar-close {
  display: none;
}

.mobile-sidebar-overlay {
  display: none;
}

.app-shell {
  min-height: 100dvh;
}

.main-shell {
  margin-left: var(--sidebar);
  min-width: 0;
  min-height: 100dvh;
  transition: margin-left 240ms var(--work-ease);
}

.main-shell:focus {
  outline: none;
}

.content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 38px 42px 56px;
  min-width: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 290px;
  z-index: 1000;
  padding: 10px 16px;
  transform: translateY(-160%);
  background: var(--text);
  color: #fff;
  border-radius: 6px;
}

.skip-link:focus {
  transform: none;
}

/* A single conversational sidebar preserves both project scope and task history. */
.sidebar {
  position: fixed;
  inset: 12px auto 12px 12px;
  width: calc(var(--sidebar) - 24px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: var(--r-xl);
  box-shadow: 0 1px 2px rgba(15,23,42,.04),0 22px 48px -22px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
  overflow: hidden;
}

.assistant-sidebar-header {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:20px 14px 16px}
.sidebar-wordmark {display:flex;align-items:center;gap:8px;min-width:0;padding:0;border:0;background:transparent;font-size:22px;letter-spacing:-.02em;color:var(--text);white-space:nowrap}
.sidebar-wordmark>strong {font-weight:600}
.workspace-mobile-name {display:none}
.sidebar-compose-row {display:flex;align-items:center;gap:8px;margin:0 14px 14px}
.sidebar-compose-row>.new-conversation {flex:1;justify-content:flex-start;min-height:42px;padding:10px 13px;border-radius:var(--r-md);font-size:13px;font-weight:600;background:linear-gradient(180deg,#ffffff 0%,#f7f9fc 100%);border:1px solid rgba(24,32,44,.09);color:var(--text);box-shadow:0 1px 2px rgba(15,23,42,.04),inset 0 1px 0 #fff;transition:background-color 160ms var(--work-ease),border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease)}
.sidebar-compose-row>.new-conversation:hover {background:#fff;border-color:rgba(22,104,227,.28);color:var(--primary-dark);box-shadow:0 6px 16px -10px rgba(22,104,227,.3)}
.sidebar-collapse {flex:none;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.85);color:var(--muted)}
.sidebar-collapse:hover {background:#fff;border-color:var(--line-strong);color:var(--text)}
.sidebar .sidebar-search-shortcut,.sidebar .sidebar-rail-admin {display:none}
.sidebar-expand {flex:none;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--muted-strong)}
.sidebar-search {margin:0 14px 14px;min-height:38px}
.sidebar-search>label {display:flex;align-items:center;gap:7px;min-height:38px;padding:0 10px;border:1px solid var(--line);border-radius:11px;background:#f2f5fa;color:var(--muted)}
.sidebar-search input {min-width:0;width:100%;border:0;background:transparent;outline:none;font-size:12px;color:var(--text)}
.sidebar-search:focus-within>label {border-color:var(--composer-focus);background:#fff;box-shadow:0 0 0 3px rgba(22,104,227,.11)}
.workspace-search {position:relative;min-width:0}
.topbar-search .global-search {border:1px solid rgba(24,32,44,.08);background:rgba(255,255,255,.78);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-radius:var(--r-pill);padding:0 12px;min-height:38px;box-shadow:0 1px 2px rgba(15,23,42,.03);transition:background-color 160ms var(--work-ease),border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease)}
.topbar-search .global-search:focus-within {background:#fff;border-color:var(--composer-focus);box-shadow:0 0 0 3px rgba(22,104,227,.11)}
.topbar-search .global-search input {width:172px}
.workspace-search-results {text-align:left;background:#fff;border:1px solid var(--line);border-radius:16px;padding:8px;overscroll-behavior:contain;scrollbar-width:thin}
.topbar-search>.workspace-search-results {position:absolute;right:0;top:calc(100% + 8px);width:min(390px,calc(100vw - 24px));max-height:min(580px,75dvh);overflow:auto;box-shadow:var(--shadow-md);z-index:90}
.sidebar-search>.workspace-search-results {margin-top:10px;max-height:calc(100dvh - 310px);overflow:auto}
.workspace-search-group+.workspace-search-group {margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}
.workspace-search-group h3 {margin:0;padding:5px 7px;font-size:11px;font-weight:600;color:var(--muted)}
.workspace-search-result {display:flex;align-items:center;gap:10px;min-width:0;width:100%;padding:10px 8px;border:0;border-radius:9px;background:transparent;text-align:left;color:var(--muted-strong)}
.workspace-search-result>span {flex:1;min-width:0}
.workspace-search-result strong,.workspace-search-result small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-search-result strong {font-size:13px;font-weight:600;color:var(--text)}
.workspace-search-result small {font-size:11px;color:var(--muted);margin-top:3px}
.workspace-search-result:hover,.workspace-search-result:focus-visible {background:var(--primary-soft);color:var(--primary)}
.workspace-search-empty {display:grid;justify-items:center;gap:8px;text-align:center;padding:24px 12px;color:var(--muted)}
.workspace-search-empty strong {font-size:13px;color:var(--text)}
.workspace-search-empty p {font-size:12px;line-height:1.7;margin:0}
.sidebar-scroll {flex:1;min-height:0;overflow:hidden auto;overscroll-behavior-y:contain;padding:0 12px 24px;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#cdd4e0 transparent}
.context-links {display:grid;gap:4px}
.context-link {display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:8px 12px;border:1px solid transparent;border-radius:var(--r-md);background:transparent;text-align:left;color:var(--muted-strong);font-size:13px;line-height:1.55;transition:background-color 160ms var(--work-ease),color 160ms var(--work-ease),border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease),transform 180ms var(--work-ease)}
.context-link>span {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.context-link>svg {color:#7a8290;transition:color 160ms var(--work-ease),transform 180ms var(--work-ease)}
.sidebar .nav-artwork {display:block;flex:none;width:32px;height:32px;object-fit:contain}
.sidebar .context-link:has(>.nav-artwork) {padding:6px 10px}
.nav-brand-artwork {display:block;flex:none;width:32px;height:32px;object-fit:contain}
.sidebar .sidebar-wordmark {gap:8px;font-size:21px}
.context-link b {font-size:11px;min-width:20px;padding:1px 6px;border-radius:var(--r-pill);background:rgba(15,23,42,.05);text-align:center;color:var(--muted);font-weight:500;font-variant-numeric:tabular-nums}
.context-link:hover {background:rgba(255,255,255,.92);border-color:rgba(24,32,44,.07);color:var(--text);box-shadow:0 4px 14px -10px rgba(15,23,42,.18)}
.context-link.active {background:linear-gradient(180deg,#ffffff 0%,#f5f9ff 100%);border-color:rgba(22,104,227,.26);color:var(--primary-dark);font-weight:600;box-shadow:0 8px 18px -14px rgba(22,104,227,.45),inset 0 1px 0 #fff}
.context-link.active>svg,.context-link.active b {color:var(--primary)}
.context-link.active b {background:rgba(22,104,227,.1)}
.sidebar-primary .context-link {font-size:13px;min-height:42px}
.sidebar-group {margin-top:18px;padding-top:16px;border-top:1px solid rgba(24,32,44,.06)}
.sidebar-group-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px 8px;min-width:0}
.sidebar-group-heading>span {font-size:11px;font-weight:600;letter-spacing:.02em;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-group-heading>.btn {width:26px;min-height:26px;padding:4px;border-radius:7px;color:var(--muted)}
.sidebar-group-heading>.btn span {display:none}
.sidebar-create-project {display:flex;align-items:center;gap:8px;border:0;background:transparent;color:var(--muted);font-size:12px;padding:10px 12px}
.sidebar-administration {margin-top:10px}
.sidebar-administration>summary {display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;padding:10px 12px;border-radius:11px;font-size:13px;color:var(--muted-strong);transition:background-color 160ms var(--work-ease),color 160ms var(--work-ease)}
.sidebar-administration>summary>svg:last-child {margin-left:auto;transition:transform 200ms ease}
.sidebar-administration[open]>summary>svg:last-child {transform:rotate(180deg)}
.sidebar-administration>nav {padding-left:12px}
.sidebar-administration>summary:hover {background:rgba(24,32,44,.04);color:var(--text)}
.assistant-sidebar-footer {display:flex;align-items:center;gap:8px;padding:12px 14px;border-top:1px solid rgba(24,32,44,.07);background:rgba(248,250,253,.8);box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}
.sidebar-account {display:flex;align-items:center;gap:10px;flex:1;min-width:0;border:1px solid transparent;background:transparent;text-align:left;padding:6px 8px}
.sidebar-account>span:nth-child(2) {flex:1;min-width:0}
.sidebar-account strong,.sidebar-account small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-account strong {font-size:13px;font-weight:600;color:var(--text)}
.sidebar-account small {font-size:11px;color:var(--muted);margin-top:1px}
.sidebar-account>svg {color:var(--muted)}

.sidebar-create-project {border-radius:10px;transition:background-color 160ms var(--work-ease),color 160ms var(--work-ease)}
.sidebar-create-project:hover {background:rgba(255,255,255,.92);color:var(--primary-dark)}
.sidebar-account {border-radius:12px;transition:background-color 160ms var(--work-ease),border-color 160ms var(--work-ease)}
.sidebar-account:hover {background:rgba(255,255,255,.95);border-color:rgba(24,32,44,.07)}
@media (hover:hover) and (pointer:fine) {
  .context-link:hover {transform:translateX(2px)}
  .context-link:active {transform:translateX(2px) scale(.985)}
  .sidebar-compose-row>.new-conversation:active {transform:scale(.985)}
}

@media (prefers-reduced-motion:reduce) {
  .sidebar .context-link:hover,.sidebar .context-link:active,.sidebar-compose-row>.new-conversation:active {transform:none}
}

@media (prefers-reduced-transparency:reduce) {
  .sidebar {background:#fff;-webkit-backdrop-filter:none;backdrop-filter:none}
}
.topbar {
  height: var(--toolbar);
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg);
  border-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-location {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 13px;
}

.crumb-root {
  color: var(--muted);
}

.topbar-location>svg {
  color: var(--muted);
}

.topbar-location strong {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.global-search input {
  width: 145px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  outline: none;
}

.global-search kbd {
  font: 10px/1.5 var(--font-text);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(244,246,250,.9);
  color: var(--muted);
  white-space: nowrap;
}

.toolbar-account {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(22,104,227,.18);
  background: linear-gradient(135deg,#eaf2ff 0%,#dce9ff 100%);
  border-radius: 50%;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 12px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 0 0 8px;
  letter-spacing: -.02em;
  font-weight: 600;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 5px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.section-heading>span {
  font-size: 12px;
  color: var(--muted);
}

.section-heading .btn {
  min-height: 28px;
  padding: 3px 0;
  font-size: 12px;
}

.work-section {
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(180deg,#232c3b 0%,#151b26 100%);
  border-color: #151b26;
  color: #fff;
  box-shadow: 0 2px 6px -2px rgba(15,23,42,.35),inset 0 1px 0 rgba(255,255,255,.14);
}

.btn-primary:hover {
  background: linear-gradient(180deg,#2e394c 0%,#1f2837 100%);
  border-color: #1f2837;
  box-shadow: 0 6px 14px -6px rgba(15,23,42,.42),inset 0 1px 0 rgba(255,255,255,.18);
}

.btn-secondary {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--muted-strong);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.btn-secondary:hover {
  background: var(--panel-soft);
  border-color: #b7c3d6;
  color: var(--text);
}

.btn-ghost {
  padding-left: 10px;
  padding-right: 10px;
  color: var(--muted-strong);
}

.btn-ghost:hover {
  background: rgba(22,104,227,.07);
  color: var(--primary-dark);
}

.btn-danger {
  background: #fff;
  border-color: #ecc9c6;
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red-soft);
  border-color: #dfa9a4;
}


.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: var(--primary);
  font-size: 13px;
}

.text-link:hover {
  text-decoration: underline;
}

.icon-btn,.modal-close,.simple-back-button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}

.icon-btn:hover,.modal-close:hover {
  background: rgba(15,23,42,.06);
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--muted-strong);
  background: var(--panel-soft);
  border: 1px solid rgba(15,23,42,.05);
}

.status-pill.active,.status-pill.processing {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: rgba(22,104,227,.14);
}

.status-pill.completed,.status-pill.success {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(34,116,82,.14);
}

.status-pill.review,.status-pill.pending,.status-pill.warning {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: rgba(147,103,29,.14);
}

.status-pill.danger,.status-pill.failed,.status-pill.error {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(172,71,65,.14);
}

.mini-avatar,.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 2px solid #fff;
  font-size: 12px;
  font-weight: 600;
}

.progress-track {
  height: 5px;
  background: #e8edf5;
  border-radius: var(--r-pill);
  overflow: hidden;
}

.progress-track>span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,var(--primary) 0%,#4b93f8 100%);
}

.progress-track.green>span {
  background: linear-gradient(90deg,var(--green) 0%,#3ba177 100%);
}

.module-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* Projects are a directory, not a collection of empty KPI cards. */

.directory-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
}

.directory-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.directory-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.directory-tabs button:hover {
  color: var(--text);
}

.directory-tabs button.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}

.directory-tabs button span {
  font-size: 11px;
  color: var(--muted);
  background: var(--panel-soft);
  padding: 1px 6px;
  border-radius: var(--r-pill);
}

.directory-tabs button.active span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.directory-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  transition: border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease);
}

.search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,104,227,.11);
}

.search-field input {
  min-width: 0;
  width: 170px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: var(--text);
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sort-control select {
  max-width: 125px;
  min-width: 0;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 12px;
  cursor: pointer;
}

.project-directory {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  min-height: 360px;
  overflow: hidden;
}

.directory-columns,.directory-project {
  display: grid;
  grid-template-columns: minmax(230px,1fr) 82px minmax(105px,150px) 82px 94px 28px;
  gap: 18px;
  align-items: center;
  padding: 0 24px;
}

.directory-columns {
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  background: #f8fafd;
}

.directory-project {
  position: relative;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
  transition: background-color 140ms var(--work-ease);
}

.directory-project:last-child {
  border-bottom: 0;
}

.directory-project:hover {
  background: var(--primary-softer);
}

.directory-project-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
}

.directory-folder {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--primary);
  border-radius: 12px;
  background: var(--primary-soft);
}

.directory-project-name {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.directory-project-name strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.directory-project-name small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.directory-project-work {
  display: grid;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
}

.directory-members {
  display: flex;
  align-items: center;
  position: relative;
  flex-wrap: wrap;
}

.directory-members .mini-avatar {
  width: 24px;
  height: 24px;
  margin-left: -6px;
  border: 2px solid #fff;
  font-size: 12px;
}

.directory-members .mini-avatar:first-child {
  margin-left: 0;
}

.directory-members small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 5px;
  white-space: nowrap;
}

.directory-updated {
  font-size: 12px;
  color: var(--muted);
}

.row-menu {
  position: relative;
}

.row-menu>summary {
  display: grid;
  place-items: center;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  border-radius: 4px;
  min-width: 28px;
  min-height: 30px;
}

.row-menu>summary::-webkit-details-marker {
  display: none;
}

.row-menu[open]>summary {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.row-menu>div {
  position: absolute;
  right: 0;
  top: 36px;
  z-index: 15;
  display: grid;
  gap: 4px;
  min-width: 164px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  border-radius: 7px;
}

.row-menu .btn {
  justify-content: flex-start;
  border: 0;
  font-size: 12px;
}

.directory-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

.directory-footer>span:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-first-run {
  min-height: 390px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 58px 64px;
}

.project-first-run h2 {
  font-size: 23px;
  margin: 20px 0 12px;
  color: var(--text);
}

.project-first-run>div>p {
  font-size: 13px;
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: 24px;
}

.empty-glyph {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
}

.first-run-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: start;
}

.first-run-steps li {
  position: relative;
  padding: 0 0 24px 43px;
  counter-increment: start;
  border-left: 1px solid var(--line);
  margin-left: 12px;
}

.first-run-steps li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.first-run-steps li:before {
  content: counter(start);
  position: absolute;
  left: -13px;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--primary-soft);
  border: 1px solid rgba(22,104,227,.2);
  border-radius: 50%;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 12px;
}

.first-run-steps strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.first-run-steps p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.workspace-empty {
  min-height: 285px;
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.workspace-empty h2 {
  margin: 3px 0 0;
  font-size: 18px;
  color: var(--text);
}

.workspace-empty p {
  margin: 0;
  max-width: 46ch;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}

.workspace-empty .btn {
  margin-top: 8px;
}

/* Project overview reads as a working file with a factual inspector. */

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 248px;
  gap: 40px;
  align-items: start;
}

.overview-main {
  min-width: 0;
}

.project-briefing {
  padding: 26px 28px 24px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.briefing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.briefing-head h2 {
  font-size: 17px;
  margin-bottom: 7px;
}

.briefing-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.briefing-head>strong {
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
}

.briefing-head>strong>span {
  font-size: 15px;
  margin-left: 3px;
  color: var(--muted);
}

.briefing-counts {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 18px;
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.briefing-counts>div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.briefing-counts dt {
  font-size: 12px;
  color: var(--muted);
  order: 2;
}

.briefing-counts dd {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.project-inspector {
  padding-top: 3px;
  color: var(--muted);
}

.project-inspector>section+section {
  border-top: 1px solid var(--line);
  padding-top: 25px;
  margin-top: 25px;
}

.project-inspector .section-heading {
  margin-bottom: 18px;
}

.project-inspector .section-heading h2 {
  font-size: 14px;
}

.project-inspector dl {
  margin: 0;
}

.project-inspector dl>div {
  display: grid;
  grid-template-columns: 67px minmax(0,1fr);
  gap: 13px;
  margin-bottom: 13px;
}

.project-inspector dt {
  font-size: 12px;
  color: var(--muted);
}

.project-inspector dd {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.inspector-members {
  display: grid;
  gap: 18px;
}

.inspector-members>div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.inspector-members strong {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.inspector-members small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.inspector-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inspector-note>svg {
  color: var(--muted);
}

.inspector-note p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}

.overview-modules {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.overview-module {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 21px 20px;
  min-width: 0;
  min-height: 91px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  transition: background-color 140ms var(--work-ease);
}

.overview-module:nth-child(2n) {
  border-right: 0;
}

.overview-module:nth-last-child(-n/**/+2) {
  border-bottom: 0;
}

.overview-module:hover {
  background: var(--primary-softer);
}

.overview-module>span:nth-child(2) {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.overview-module strong {
  font-size: 14px;
  color: var(--text);
}

.overview-module small {
  font-size: 12px;
  color: var(--muted);
}

.overview-module>svg {
  color: var(--muted);
}

.inline-blank {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 35px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.inline-blank>span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.inline-blank strong {
  font-size: 14px;
  color: var(--text);
}

.inline-blank p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.capability-directory {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.capability-directory-row {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  transition: background-color 140ms var(--work-ease);
}

.capability-directory-row:last-child {
  border-bottom: 0;
}

.capability-directory-row:hover {
  background: var(--primary-softer);
}

.capability-directory-row h2 {
  font-size: 15px;
  margin: 0 0 5px;
}

.capability-directory-row p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.capability-directory-row>div>span {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}

.capability-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-next-task-list {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.project-next-task-row {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 72px auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.project-next-task-row:last-child {
  border: 0;
}

.project-next-task-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--primary-soft);
  border-radius: 10px;
  color: var(--primary-dark);
}

.project-next-task-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-next-task-copy strong {
  font-size: 13px;
}

.project-next-task-copy small,.project-next-task-note {
  font-size: 12px;
  color: var(--muted);
}

.project-next-task-progress b {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-strong);
}

.project-next-task-actions {
  grid-column: 2/-1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.project-next-task-actions .btn {
  font-size: 12px;
  min-height: 30px;
  padding: 5px 9px;
}

.task-directory {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.task-directory-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 88px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  transition: background-color 140ms var(--work-ease);
}

.task-directory-row:last-child {
  border-bottom: 0;
}

.task-directory-row:hover {
  background: var(--primary-softer);
}

.task-directory-main {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0;
  text-align: left;
  border: 0;
  background: transparent;
}

.task-directory-main>span:last-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.task-directory-main strong {
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.task-directory-main small {
  font-size: 12px;
  color: var(--muted);
}

.task-state-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 11px;
}

.task-state-icon.review {
  background: var(--orange-soft);
  color: var(--orange);
}

.task-state-icon.completed {
  background: var(--green-soft);
  color: var(--green);
}

.task-progress {
  font-size: 12px;
  color: var(--muted);
}

.task-row-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-row-tools .btn {
  font-size: 12px;
  min-height: 30px;
  padding: 5px 8px;
}

.usage-summary {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.usage-summary strong {
  font-size: 28px;
  color: var(--muted);
  margin-right: 9px;
  font-weight: 400;
}

/* The conversation is the primary working surface; office context opens beside it. */
.audit-chat-mode .main-shell {height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.audit-chat-mode .content {padding:0;width:100%;max-width:none;flex:1;min-height:0;display:flex}
.conversation-workspace {--skill-color:#1668e3;--skill-soft:#edf4ff;--skill-tint:#cbe0ff;display:flex;flex-direction:column;width:100%;min-width:0;min-height:0;flex:1;background:radial-gradient(ellipse 68% 54% at 18% 12%,rgba(206,229,255,.52),transparent 62%),radial-gradient(ellipse 56% 52% at 86% 68%,rgba(248,229,200,.42),transparent 58%),radial-gradient(ellipse 60% 45% at 50% 0%,rgba(255,255,255,.72),transparent 68%)}
.chat-toolbar {display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:12px 24px 8px;flex:none;min-width:0}
.chat-toolbar>.chat-project-select,.chat-toolbar>[data-action="new-project"] {grid-column:1;grid-row:1;min-width:0;max-width:100%;justify-self:start}
.chat-toolbar>label.chat-project-select {width:336px}
.chat-context-actions {display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;flex-wrap:wrap}
.chat-toolbar>.topbar-tools {gap:10px;justify-self:end}
.chat-toolbar .global-search {background:rgba(255,255,255,.76);border-color:rgba(24,32,44,.08)}
.chat-toolbar .global-search:focus-within {background:#fff;border-color:var(--composer-focus)}
.chat-toolbar .global-search input {width:154px}
.chat-toolbar>.workspace-mobile-name {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inspector-open .chat-toolbar {grid-template-columns:minmax(0,1fr) auto}
.inspector-open .chat-toolbar>.topbar-tools {grid-column:1/-1}
.chat-project-select {position:relative;display:flex;align-items:center;min-width:0;color:var(--muted-strong);font-size:14px}
.chat-project-select>select {appearance:none;width:100%;min-width:0;min-height:42px;padding:9px 36px 9px 40px;border:1px solid rgba(24,32,44,.09);border-radius:var(--r-pill);background:rgba(255,255,255,.84);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 1px 2px rgba(15,23,42,.04),0 6px 18px -12px rgba(15,23,42,.18);color:var(--text);font:inherit;font-weight:600;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent;transition:background-color 160ms var(--work-ease),border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease)}
.chat-project-select>svg {position:absolute;z-index:1;pointer-events:none;color:var(--primary)}
.chat-project-select>svg:first-child {inset-inline-start:15px}
.chat-project-select>svg:last-child {inset-inline-end:14px;color:var(--muted)}
.chat-project-select>select:focus-visible {outline:2px solid var(--primary);outline-offset:2px}
@media (hover:hover) and (pointer:fine) {.chat-project-select>select:hover {background:#fff;border-color:rgba(22,104,227,.3);box-shadow:0 8px 20px -12px rgba(22,104,227,.26)}}
@media (prefers-reduced-motion:reduce) {.chat-project-select>select {transition:none}}
@supports (appearance:base-select) and selector(select::picker(select)) {
  .chat-project-select>select,.chat-project-select>select::picker(select) {appearance:base-select}
  .chat-project-select>select::picker-icon {display:none}
  .chat-project-select>select>button {display:flex;flex:1;min-width:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:start;cursor:inherit}
  .chat-project-select selectedcontent {display:block;flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .chat-project-select>select:open {background:var(--panel);border-color:var(--primary)}
  .chat-project-select:has(>select:open)>svg:last-child {transform:rotate(180deg)}
  .chat-project-select>select::picker(select) {position-area:block-end span-inline-end;position-try-fallbacks:flip-block,flip-inline;margin:6px 0;padding:6px;width:max-content;min-width:anchor-size(width);max-width:min(460px,calc(100vw - 32px));max-height:min(340px,50dvh);overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:18px;background:var(--panel);box-shadow:var(--shadow-md);color:var(--text)}
  .chat-project-select option {min-height:44px;padding:9px 12px;gap:10px;border-radius:12px;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
  .chat-project-select option:checked {background:var(--primary-soft);color:var(--primary-dark);font-weight:600}
  .chat-project-select option:hover,.chat-project-select option:focus-visible {background:var(--panel-soft)}
  .chat-project-select option::checkmark {order:1;margin-inline-start:auto;color:var(--primary-dark)}
}
.chat-workspace-toggle {display:flex;align-items:center;gap:7px;min-height:38px;border:1px solid transparent;border-radius:var(--r-pill);background:rgba(255,255,255,.55);padding:7px 12px;font-size:12px;font-weight:500;color:var(--muted-strong);white-space:nowrap;transition:background-color 140ms var(--work-ease),color 140ms var(--work-ease),border-color 140ms var(--work-ease),box-shadow 140ms var(--work-ease)}
.chat-workspace-toggle:hover,.chat-workspace-toggle.active {background:#fff;border-color:rgba(22,104,227,.22);color:var(--primary-dark);box-shadow:0 4px 12px -8px rgba(22,104,227,.35)}
.chat-workspace-toggle.active>svg:last-child {transform:rotate(180deg)}
.conversation-history-card {display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 12px;border:1px solid transparent;border-radius:var(--r-pill);background:rgba(255,255,255,.55);color:var(--muted-strong);font-size:12px;font-weight:500;white-space:nowrap;transition:background-color 160ms var(--work-ease),color 160ms var(--work-ease),border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease),transform 180ms var(--work-ease)}
.conversation-history-card>img {display:block;flex:none;width:20px;height:20px;object-fit:contain}
.conversation-history-card:hover {background:#fff;border-color:rgba(22,104,227,.22);color:var(--primary-dark);box-shadow:0 4px 12px -8px rgba(22,104,227,.35);transform:translateY(-1px)}
.conversation-history-card:active {transform:translateY(0) scale(.985)}
.conversation-history-card:focus-visible {outline:2px solid var(--primary);outline-offset:4px}
.chat-workspace-layout {display:flex;flex:1;min-height:0;min-width:0;padding:0 16px 16px 0;gap:14px}
.chat-main {flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.chat-body {flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.chat-home {display:flex;flex:1;min-width:0;min-height:0;justify-content:center;padding:8px 36px 28px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cdd4e0 transparent}
.chat-home-content {width:min(920px,100%);margin:0;min-width:0}
.chat-welcome {margin:0 0 18px;text-align:center}
.assistant-presence {position:relative;display:grid;place-items:center;width:96px;height:96px;margin:0 auto 8px;padding:0;border:0;border-radius:20px;background:transparent;cursor:pointer;filter:drop-shadow(0 8px 16px rgba(235,169,58,.18))}
.presence-core {display:block;width:100%;height:100%}
.presence-core>img {display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.assistant-presence:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
.chat-context-actions .assistant-presence-compact {flex:none;width:40px;height:40px;margin:0;filter:none}
[data-assistant-status] {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media (prefers-reduced-motion:reduce) {.assistant-presence {transition:none;transform:none}}
.chat-welcome h1 {font-size:32px;font-weight:600;line-height:1.3;letter-spacing:-.02em;margin:0 0 6px;color:var(--text)}
.chat-welcome p {font-size:14px;color:var(--muted);margin:0;line-height:1.7}
.chat-composer-shell {display:grid;gap:8px;min-width:0}
.chat-composer {position:relative;min-width:0;padding:14px 18px 12px;background:rgba(255,255,255,.88);-webkit-backdrop-filter:blur(20px) saturate(130%);backdrop-filter:blur(20px) saturate(130%);border:1px solid rgba(255,255,255,.92);border-radius:26px;box-shadow:0 0 0 1px rgba(24,32,44,.07),0 18px 44px -24px rgba(24,42,74,.22),inset 0 1px 0 #fff;transition:border-color 180ms var(--work-ease),background-color 180ms var(--work-ease),box-shadow 180ms var(--work-ease)}
.chat-composer:focus-within {background:#fff;border-color:color-mix(in srgb,var(--skill-color,#1668e3) 48%,white);box-shadow:0 0 0 3px color-mix(in srgb,var(--skill-color,#1668e3) 13%,transparent),0 22px 52px -24px rgba(24,42,74,.26),inset 0 1px 0 #fff}
.composer-skill-toolbar {display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 0 8px;margin-bottom:4px}
.chat-routing,.skill-picker-trigger {display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:5px 12px;border:1px solid var(--line);border-radius:var(--r-pill);background:rgba(244,246,250,.75);color:var(--muted-strong);font-size:12px;font-weight:500;transition:background-color 160ms var(--work-ease),color 160ms var(--work-ease),border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease)}
.chat-routing:hover {background:#fff;border-color:var(--line-strong);color:var(--text)}
.chat-routing.selected {background:var(--primary-soft);border-color:rgba(22,104,227,.26);color:var(--primary-dark)}
.skill-picker-trigger {background:#fff6eb;border-color:#f3d7b0;color:#995c1e}
.skill-picker-trigger:hover {background:#ffedd4;border-color:#e6bc82}
.composer-options {margin-left:auto;font-size:12px;min-height:32px;padding:5px 10px;border-radius:var(--r-pill);color:var(--muted-strong)}
.selected-skill-sticker {display:inline-flex;align-items:center;gap:10px;max-width:100%;margin:2px 0 8px;padding:8px 10px 8px 12px;border:1px solid var(--skill-tint);border-radius:14px;background:var(--skill-soft);box-shadow:0 4px 12px -8px var(--skill-color);color:var(--skill-color)}
.skill-sticker-icon {display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:9px;background:rgba(255,255,255,.78)}
.selected-skill-sticker>span:nth-child(2) {min-width:0}
.selected-skill-sticker small {display:block;font-size:10px;line-height:1.45;color:var(--skill-color)}
.selected-skill-sticker strong {display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere}
.selected-skill-sticker>.icon-btn {flex:none;width:26px;min-width:26px;height:26px;color:var(--skill-color);border-radius:50%}
.chat-input-label {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.chat-composer textarea#composer-input {display:block;width:100%;min-height:74px;max-height:220px;resize:none;field-sizing:content;padding:6px 4px;border:0;outline:none;background:transparent;color:var(--text);font-size:16px;line-height:1.75;overflow:auto;scrollbar-width:thin;scrollbar-color:#d5dce7 transparent}
.chat-composer textarea#composer-input::placeholder {color:#7a8596}
.chat-composer-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0 0;border-top:1px solid rgba(24,32,44,.06);flex-wrap:wrap}
.chat-composer-tools,.chat-send-actions {display:flex;align-items:center;gap:6px;min-width:0}
.chat-composer-tools>.btn {font-size:12px;color:var(--muted-strong);padding:6px 10px;min-height:34px;border-radius:var(--r-pill)}
.chat-composer-tools>.btn:hover {background:var(--panel-soft);color:var(--text)}
.chat-send-actions .btn {min-height:38px}
.chat-send {padding:9px 18px;min-width:112px;border-radius:var(--r-pill);font-weight:600}
.chat-composer-hint {display:flex;justify-content:flex-end;font-size:11px;line-height:1.5;color:#7e8a9c;padding:0 12px}
.composer-model-trigger {display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:200px;min-height:36px;padding:6px 12px;border:1px solid transparent;border-radius:var(--r-pill);background:transparent;color:var(--muted-strong);font-size:12px;transition:background-color 140ms var(--work-ease),border-color 140ms var(--work-ease),color 140ms var(--work-ease)}
.composer-model-trigger>span {min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.composer-model-trigger>svg {flex:none;color:var(--primary)}
.composer-model-trigger:hover {background:var(--primary-soft);border-color:rgba(22,104,227,.18);color:var(--primary-dark)}
.harness-workspace {--harness-chat-width:760px}
.harness-workspace .chat-transcript {padding-inline:max(32px,calc((100% - var(--harness-chat-width))/2))}
.harness-workspace .conversation-thread {gap:18px;margin-bottom:32px}
.harness-workspace .conversation-user-message {display:flex;flex-direction:column;align-items:flex-end;min-width:0;max-width:86%}
.harness-workspace .conversation-turn .user-bubble {max-width:100%;padding:11px 16px;border:0;border-radius:18px;background:#edf2ff;color:var(--text)}
.harness-workspace .conversation-bubble>p {margin:0;font-size:16px;line-height:1.8}
.harness-workspace .assistant-bubble {padding:0}
.harness-workspace .assistant-reply:not([hidden]) {display:flow-root;color:var(--text);font-size:1rem;line-height:1.8;overflow-wrap:anywhere}
.harness-workspace .assistant-reply :where(p,ul,ol,blockquote,pre,hr,.assistant-reply-table) {margin:0 0 .85em}
.harness-workspace .assistant-reply p {white-space:normal;text-wrap:pretty}
.harness-workspace .assistant-reply :is(h1,h2,h3,h4,h5,h6) {margin:1.15em 0 .4em;font-size:1.0625rem;font-weight:700;line-height:1.42;text-wrap:balance}
.harness-workspace .assistant-reply :is(h1,h2) {font-size:1.25rem}
.harness-workspace .assistant-reply strong {font-weight:700}
.harness-workspace .assistant-reply :is(ul,ol) {padding-inline-start:1.55em}
.harness-workspace .assistant-reply li+li {margin-top:.22em}
.harness-workspace .assistant-reply li :is(ul,ol) {margin:.25em 0 0}
.harness-workspace .assistant-reply blockquote {padding-inline-start:.85em;border-inline-start:2px solid var(--line);color:var(--muted-strong)}
.harness-workspace .assistant-reply hr {border:0;border-top:1px solid var(--line)}
.harness-workspace .assistant-reply a {color:var(--primary);text-decoration:underline;text-underline-offset:.18em}
.harness-workspace .assistant-reply code {padding:.12em .3em;border-radius:4px;background:var(--panel-soft);font: .875em var(--font-mono)}
.harness-workspace .assistant-reply pre {overflow:auto;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:var(--panel-soft);line-height:1.6}
.harness-workspace .assistant-reply pre code {padding:0;background:transparent}
.harness-workspace .assistant-reply-table {max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.harness-workspace .assistant-reply table {width:100%;border-collapse:collapse;font-size:.875rem;font-variant-numeric:tabular-nums}
.harness-workspace .assistant-reply :is(th,td) {padding:8px 12px;border-bottom:1px solid var(--line);text-align:start}
.harness-workspace .assistant-reply th {background:var(--panel-soft);font-weight:700}
.harness-workspace .assistant-reply tbody tr:last-child td {border-bottom:0}
.harness-workspace .assistant-reply>:first-child {margin-top:0}
.harness-workspace .assistant-reply :is(li,blockquote)>:last-child,.harness-workspace .assistant-reply>:last-child {margin-bottom:0}
.harness-workspace .conversation-message-meta {display:flex;align-items:center;gap:9px;margin-top:5px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.harness-workspace .conversation-copy {display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted)}
.harness-workspace .conversation-copy:hover {background:var(--panel-soft);color:var(--text)}
.harness-workspace .conversation-copy:focus-visible {outline:2px solid var(--primary)}
.harness-workspace .conversation-activity>.conversation-process {margin-bottom:10px;color:var(--muted);font-size:13px}
.harness-workspace .conversation-process-status {padding-bottom:8px;border-bottom:1px solid var(--line);color:var(--muted);font-size:13px;line-height:1.55}
.harness-workspace .conversation-activity>.conversation-process>summary {min-width:0;padding-inline:0}
.harness-workspace .conversation-process-body {margin-left:0;padding-left:0;border-left:0}
.harness-workspace .conversation-failure {color:var(--muted-strong)}
@media (pointer:coarse){.harness-workspace .conversation-copy {width:44px;height:44px}}
.harness-workspace .conversation-result-link {margin-top:8px;color:var(--primary);padding-inline:0}
.conversation-deliverables {margin-top:20px}
.conversation-deliverables h3 {margin:0 0 8px;font-size:13px;font-weight:600;color:var(--muted-strong)}
.conversation-deliverables ul {display:grid;gap:8px;padding:0;margin:0;list-style:none}
.conversation-deliverables-more>summary {list-style:none;cursor:pointer}
.conversation-deliverables-more>summary::-webkit-details-marker {display:none}
.conversation-deliverables-more:not([open]) .conversation-deliverables-expanded,
.conversation-deliverables-more[open] .conversation-deliverables-collapsed {display:none}
.conversation-deliverables-more[open]>summary>svg {transform:rotate(90deg)}
.conversation-deliverables-more>ul {margin-top:8px}
@media (pointer:coarse){.conversation-deliverables-more>summary {min-height:44px}}
.conversation-deliverable {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:11px 13px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm);transition:border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease)}
.conversation-deliverable:hover {border-color:rgba(22,104,227,.26);box-shadow:0 8px 20px -14px rgba(22,104,227,.3)}
.conversation-deliverable-icon {display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--primary-soft);color:var(--primary)}
.conversation-deliverable[data-file-type="table"] .conversation-deliverable-icon {background:var(--green-soft);color:var(--green)}
.conversation-deliverable-name {overflow-wrap:anywhere;line-height:1.45}
.conversation-deliverable-name strong,.conversation-deliverable-name small {display:block}
.conversation-deliverable-name strong {font-size:14px;font-weight:600;color:var(--text)}
.conversation-deliverable-name small {margin-top:2px;color:var(--muted);font-size:12px}
.conversation-deliverable-actions {display:flex;gap:2px}
.conversation-deliverable-actions .btn {min-width:36px;min-height:36px;padding:4px 6px;color:var(--primary)}
@media (pointer:coarse){.conversation-deliverable-actions .btn {min-width:44px;min-height:44px}}
.audit-chat-mode #firm-assistant-root .firm-assistant-launcher[aria-expanded="false"] {display:none}
.chat-project-loading {font-size:13px;color:var(--muted-strong)}
@media (max-width:760px){.harness-workspace .chat-transcript {padding-inline:16px}}
.modal-backdrop.chat-settings-backdrop {background:#252a3433}
.modal.chat-settings-modal {display:flex;flex-direction:column;width:min(640px,100%);overflow:hidden;border-color:#ffffffd9;border-radius:24px;box-shadow:var(--dialog-shadow)}
.chat-settings-modal.task-options-modal {width:min(800px,100%)}
.chat-settings-modal .modal-head,.chat-settings-modal .modal-foot {flex-shrink:0;background:#ffffff61}
.chat-settings-modal .modal-head h2 {font-size:20px;font-weight:500;letter-spacing:-.02em;color:var(--text)}
.chat-settings-modal .modal-head p {color:var(--muted)}
.chat-settings-modal .modal-body {min-height:0;overflow:auto;overscroll-behavior:contain}
.chat-settings-modal .modal-foot {flex-wrap:wrap}
.chat-settings-modal .modal-foot>span {flex:1;color:var(--muted);font-size:12px}
.chat-settings-modal .audit-personal-controls {display:grid;gap:24px;margin:0;padding:0;border:0;background:none}
.chat-settings-modal .audit-personal-controls>div,.chat-settings-modal .audit-personal-controls>label {display:grid;justify-items:start;gap:10px;min-width:0;font-size:13px;color:var(--text)}
.chat-settings-modal .audit-personal-controls>label {width:100%;justify-items:stretch}
.chat-settings-modal .audit-personal-controls small {font-size:12px;line-height:1.7;color:var(--muted)}
.chat-settings-modal .audit-personal-controls select {width:100%;max-width:100%;min-height:44px;padding:10px 12px;border:1px solid #c8cbd3;border-radius:9px;background:#ffffffd9;color:var(--text);font-size:14px;box-shadow:0 1px 2px #1d1d1f05,inset 0 1px 0 #fff}
.model-editor-modal>form {display:flex;flex-direction:column;min-height:0}
.model-editor-modal .model-editor-fields label {min-width:0}
.modal.account-model-modal {width:min(900px,100%)}
.account-model-modal .admin-shared-model-card {margin:0;border:0;border-radius:0;box-shadow:none}
.account-model-modal .admin-model-grid {min-width:0}
.chat-source-options .audit-option-toggle.selected {background:var(--blue-soft);color:var(--blue);border-color:var(--blue-soft)}
.chat-source-options {display:flex;align-items:center;flex-wrap:wrap;gap:12px;min-width:0}
.chat-source-options>section,.chat-source-options>.capability-workspace {flex-basis:100%;min-width:0}
.chat-source-options .audit-option-group {display:flex;flex-wrap:wrap;gap:8px;width:100%;margin:0 0 8px}
.chat-source-options .audit-upload {min-height:38px;max-width:100%;white-space:normal}
.chat-source-options .local-folder-mode-label {flex-basis:100%;margin-bottom:6px;line-height:1.8;color:var(--muted-strong)}
.chat-attachments {display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.chat-attachment {display:inline-flex;align-items:center;gap:8px;padding:6px 7px 6px 10px;border:1px solid #e0e6f1;border-radius:10px;background:#fafbfe;font-size:12px;max-width:100%;color:var(--muted-strong)}
.chat-attachment>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.chat-attachment>.icon-btn {width:24px;height:24px}
[data-skill="balance"] {--skill-color:#237455;--skill-soft:#eaf6ef;--skill-tint:#b7dec8}
[data-skill="ledger"] {--skill-color:#97601b;--skill-soft:#fff4dc;--skill-tint:#ebd4a5}
[data-skill="voucher"] {--skill-color:#b84f35;--skill-soft:#ffede6;--skill-tint:#efc6b7}
[data-skill="confirmation"] {--skill-color:#1b65b8;--skill-soft:#eaf3ff;--skill-tint:#bbd6f5}
[data-skill="accounts"] {--skill-color:#1c7785;--skill-soft:#e6f5f6;--skill-tint:#afd7dd}
[data-skill="analysis"] {--skill-color:#4e63ac;--skill-soft:#eef1fd;--skill-tint:#c9d1f2}
.audit-scene-gallery {margin-top:20px}
.audit-scenes-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.audit-scenes-heading h2 {font-size:13px;font-weight:600;margin:0;color:var(--muted-strong);letter-spacing:.01em}
.audit-scene-grid {display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}
.audit-scene {position:relative;display:block;grid-column:span 3;min-width:0;width:100%;padding:0;border:0;aspect-ratio:1.45;overflow:hidden;border-radius:16px;background:#dce2ea;isolation:isolate;text-align:left;cursor:pointer;box-shadow:0 2px 8px -4px rgba(15,23,42,.2),0 10px 24px -16px rgba(15,23,42,.24);transition:transform 220ms var(--work-ease),box-shadow 220ms var(--work-ease)}
.audit-scene::before {content:"";position:absolute;inset:0;z-index:3;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(255,255,255,.24);pointer-events:none}
.audit-scene:nth-child(1) {grid-column:span 7;aspect-ratio:2.4}
.audit-scene:nth-child(2) {grid-column:span 5;aspect-ratio:auto}
.audit-scene>img {display:block;width:100%;height:100%;object-fit:cover;object-position:center 38%;transition:transform 340ms var(--work-ease)}
.audit-scene::after {content:"";position:absolute;inset:24% 0 0;z-index:1;background:linear-gradient(180deg,rgba(12,20,34,0) 0%,rgba(12,20,34,.28) 46%,rgba(12,20,34,.82) 100%);pointer-events:none}
.audit-scene-title {position:absolute;left:16px;right:14px;bottom:40px;z-index:2;margin:0;color:#fff;font-size:15px;font-weight:600;line-height:1.4;text-shadow:0 2px 8px rgba(10,16,28,.55)}
.audit-scene:nth-child(1)>.audit-scene-title {font-size:19px;left:20px;bottom:44px}
.audit-scene-action {position:absolute;left:16px;bottom:14px;display:inline-flex;align-items:center;gap:5px;z-index:2;padding:3px 9px 3px 0;color:rgba(255,255,255,.92);font-size:11px;font-weight:500;line-height:1.4;text-shadow:0 1px 4px rgba(10,16,28,.45)}
.audit-scene-action>svg {transition:transform 200ms var(--work-ease)}
.audit-scene:nth-child(1)>.audit-scene-action {left:20px}
.audit-scene:hover {transform:translateY(-3px);box-shadow:0 16px 32px -18px rgba(15,23,42,.38),0 4px 12px -6px rgba(15,23,42,.18)}
.audit-scene:hover>img {transform:scale(1.04)}
.audit-scene:hover .audit-scene-action>svg {transform:translate(2px,-2px)}
.audit-scene:focus-visible {outline:3px solid var(--primary);outline-offset:3px}
.modal.audit-workflow-modal {display:flex;flex-direction:column;width:min(760px,100%);overflow:hidden;border-radius:24px}
.audit-workflow-photo {position:relative;flex:none;height:190px;background:#e3e7ea;overflow:hidden}
.audit-workflow-photo>img {display:block;width:100%;height:100%;object-fit:cover;object-position:center 40%}
.audit-workflow-modal .audit-workflow-photo>.modal-close {position:absolute;top:14px;right:14px;background:#ffffffec;color:#363840;z-index:2}
.audit-workflow-modal .audit-workflow-photo>.modal-close:hover {background:#fff;color:var(--text)}
.audit-workflow-modal .modal-head {flex:none}
.audit-workflow-modal .modal-body {min-height:0;overflow:auto}
.audit-workflow-modal .modal-body section+section {margin-top:24px}
.audit-workflow-modal h3 {margin:0 0 10px;font-size:14px;font-weight:500}
.audit-workflow-modal .modal-body p {font-size:13px;color:var(--muted-strong);line-height:1.8;margin:0}
.audit-workflow-steps {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;margin:0;padding-left:20px;color:var(--muted-strong);font-size:13px;line-height:1.8}
.audit-workflow-outputs {display:flex;flex-wrap:wrap;gap:8px}
.audit-workflow-outputs>span {display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:12px;color:var(--muted-strong)}
.audit-workflow-modal .modal-foot {flex:none;flex-wrap:wrap}
.audit-workflow-modal .modal-foot>span {flex:1;font-size:12px;color:var(--muted)}
.skill-picker-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.skill-pick-card {position:relative;display:flex;align-items:center;gap:12px;min-width:0;width:100%;min-height:104px;padding:16px 14px;border:1px solid var(--skill-tint);border-radius:18px;background:var(--skill-soft);color:var(--skill-color);text-align:left;overflow:hidden;box-shadow:0 3px 8px -7px var(--skill-color),inset 0 1px 0 #ffffffd9;transition:background-color 180ms var(--work-ease),border-color 180ms var(--work-ease),color 180ms var(--work-ease),box-shadow 180ms var(--work-ease),transform 180ms var(--work-ease)}
.skill-pick-card::after {content:"";position:absolute;width:70px;height:70px;right:-20px;top:-30px;border:14px solid currentColor;border-radius:50%;opacity:.035;pointer-events:none}
.skill-card-icon {display:grid;place-items:center;flex:none;width:42px;height:44px;border:1px solid #ffffffb3;border-radius:13px;background:#ffffffa6;box-shadow:0 3px 6px -5px var(--skill-color);color:var(--skill-color)}
.skill-card-copy {min-width:0;flex:1}
.skill-card-copy strong {display:block;font-size:14px;font-weight:500;line-height:1.5}
.skill-card-copy small {display:block;font-size:11px;line-height:1.6;margin-top:4px;color:var(--skill-color)}
.skill-card-check {display:grid;place-items:center;flex:none;width:22px;height:22px;border:1px solid var(--skill-tint);border-radius:50%;background:#ffffff80;color:var(--skill-color)}
.skill-pick-card:hover {transform:translateY(-2px);box-shadow:0 12px 22px -16px var(--skill-color),inset 0 1px 0 #fff;border-color:var(--skill-color)}
.skill-pick-card.selected {background:var(--skill-color);border-color:var(--skill-color);color:#fff;box-shadow:0 10px 20px -15px var(--skill-color)}
.skill-pick-card.selected .skill-card-copy small {color:#fff}
.skill-pick-card.selected .skill-card-icon {background:#ffffff24;color:#fff;border-color:#ffffff40}
.skill-pick-card.selected .skill-card-check {color:var(--skill-color);background:#fff;border-color:#fff}
.skill-pick-card:active {transform:translateY(0) scale(.985)}
.skill-pick-card:disabled,.skill-specialist:disabled {opacity:.45;cursor:not-allowed;transform:none;box-shadow:none}
.modal.skills-picker-modal {display:flex;flex-direction:column;width:min(850px,100%);overflow:hidden;border-radius:24px}
.skills-picker-modal .modal-head {flex:none}
.skills-picker-modal .modal-body {overflow:auto;min-height:0}
.skill-picker-search {display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--muted);margin-bottom:20px}
.skill-picker-search>input {min-width:0;width:100%;border:0;background:none;box-shadow:none;outline:none;font-size:14px;padding:0}
.skill-picker-results h3 {font-size:13px;font-weight:500;color:var(--muted-strong);margin:20px 0 12px}
.skill-picker-results h3:first-child {margin-top:0}
.skill-pick-card.compact {min-height:90px;padding:12px;gap:10px}
.skill-pick-card.compact .skill-card-icon {width:34px;height:36px}
.skill-pick-card.compact .skill-card-copy strong {font-size:13px}
.skill-picker-specialists {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.skill-specialist {display:flex;align-items:center;gap:10px;min-width:0;padding:12px;border:1px solid #e4e7ee;border-radius:12px;background:#fff;color:var(--skill-color);text-align:left;transition:background-color 160ms var(--work-ease),border-color 160ms var(--work-ease)}
.skill-specialist>span {flex:1;min-width:0}
.skill-specialist strong {display:block;font-size:12px;font-weight:500}
.skill-specialist small {display:block;font-size:11px;color:var(--muted);margin-top:4px;line-height:1.6}
.skill-specialist:hover,.skill-specialist.selected {background:var(--skill-soft);border-color:var(--skill-tint)}
.chat-home-note {text-align:center;font-size:12px;color:#7e8a9c;margin:16px 0 0;line-height:1.8}
.chat-transcript {flex:1;min-height:0;overflow:auto;padding:32px max(32px,calc((100% - 840px)/2)) 24px;scrollbar-width:thin;scrollbar-color:#d5dce7 transparent}
.chat-composer-dock {flex:none;width:min(900px,100%);margin:0 auto;padding:12px 30px 18px}
.chat-composer-dock .chat-composer {border-radius:24px}
.chat-composer-dock textarea#composer-input {min-height:66px;max-height:160px}
.chat-inspector {flex:none;width:344px;min-height:0;margin-top:12px;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.94);border-radius:22px;background:rgba(255,255,255,.88);-webkit-backdrop-filter:blur(22px) saturate(130%);backdrop-filter:blur(22px) saturate(130%);box-shadow:0 0 0 1px rgba(24,32,44,.06),var(--surface-shadow);overflow:hidden}
.chat-inspector-heading {display:flex;align-items:center;justify-content:space-between;padding:18px 20px;gap:12px}
.chat-inspector-heading>div {display:flex;align-items:center;gap:9px;color:var(--text)}
.chat-inspector-heading h2 {font-size:15px;font-weight:600;margin:0}
.chat-inspector-tabs {display:flex;position:relative;padding:4px;margin:0 18px;background:var(--panel-soft);border:1px solid rgba(24,32,44,.06);border-radius:12px;gap:4px}
.chat-inspector-tabs>button {flex:1;min-height:34px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:13px;font-weight:500;transition:background-color 180ms var(--work-ease),color 180ms var(--work-ease),box-shadow 180ms var(--work-ease)}
.chat-inspector-tabs>button[aria-selected=true] {background:#fff;color:var(--text);font-weight:600;box-shadow:0 2px 6px rgba(15,23,42,.08)}
.chat-inspector-content {flex:1;min-height:0;overflow:auto;padding:22px 20px;scrollbar-width:thin;scrollbar-color:#d5dce7 transparent}
.chat-inspector-section h3 {display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:600;margin:0 0 14px;color:var(--muted-strong)}
.chat-inspector-section h3>span {font-size:12px;color:var(--muted);font-weight:400}
.chat-panel-empty {display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:28px 12px;color:#8893a4}
.chat-panel-empty strong {font-size:14px;color:var(--text)}
.chat-panel-empty p {font-size:12px;color:var(--muted);margin:0;line-height:1.9}
.chat-panel-empty .btn {margin-top:2px}
.chat-panel-section-title {margin:24px 0 12px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:24px}
.chat-panel-section-title h3 {margin:0}
.chat-panel-section-title>span {font-size:11px;color:var(--muted)}
.chat-panel-note {font-size:12px;line-height:1.9;color:var(--muted)}
.chat-office-file {display:flex;align-items:center;gap:10px;min-width:0;padding:11px 10px;border:1px solid transparent;border-bottom:1px solid var(--line);border-radius:10px;background:transparent;font-size:12px;color:var(--muted-strong);width:100%;text-align:left;transition:background-color 150ms var(--work-ease),border-color 150ms var(--work-ease)}
.chat-office-file>svg:first-child {color:var(--primary);flex:none}
.chat-office-file>span {flex:1;min-width:0;overflow-wrap:anywhere}
.chat-office-file>svg:last-child {color:var(--muted)}
.chat-office-file strong,.chat-office-file small {display:block;font-size:12px;font-weight:500;color:var(--text)}
.chat-office-file small {color:var(--muted);font-size:11px;font-weight:400;margin-top:3px}
.artifact-download:hover {color:var(--primary-dark);background:var(--primary-soft);border-color:rgba(22,104,227,.16)}
.chat-task-status {display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:13px}
.chat-task-status strong {font-variant-numeric:tabular-nums}
.chat-activity-list {list-style:none;padding:0;margin:24px 0}
.chat-activity-list li {display:flex;gap:10px;align-items:flex-start;color:var(--primary)}
.chat-activity-list p {margin:0 0 18px;color:var(--muted-strong);font-size:12px;line-height:1.9}
.chat-activity-list li>span {padding-top:4px}
.chat-inspector-footer {display:flex;align-items:center;gap:5px;border-top:1px solid var(--line);padding:14px 18px;font-size:11px;color:var(--muted)}
.chat-inspector-footer>.btn {margin-left:auto;font-size:12px;min-height:28px;padding:4px 7px}
.inspector-open .chat-home {padding-left:24px;padding-right:24px}
.inspector-open .chat-welcome {margin-bottom:18px}


.audit-source-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}

.audit-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
}

.audit-upload:hover {
  background: var(--primary-soft);
  border-color: rgba(22,104,227,.3);
  color: var(--primary-dark);
}

.audit-option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.audit-option-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted-strong);
}

.audit-option-toggle.selected {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}

.balance-output-toggles input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.local-folder-mode-label,.capability-input-hint {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}


.active-task-section {margin-bottom:24px}

.conversation-thread {
  display: grid;
  gap: 20px;
}

.conversation-turn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.user-turn {justify-content:flex-end}

.conversation-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #edf2ff;
  color: var(--primary);
  border-radius: 10px;
  flex-shrink: 0;
}

.conversation-bubble {
  min-width: 0;
  max-width: 100%;
  flex: 1;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.user-bubble {
  background: linear-gradient(135deg,#edf4ff 0%,#e3eeff 100%);
  border-color: rgba(22,104,227,.14);
  box-shadow: 0 4px 14px -10px rgba(22,104,227,.28);
}

.user-turn .conversation-bubble {flex:0 1 auto;max-width:88%;border-radius:18px 18px 5px 18px}
.assistant-turn .conversation-bubble {border:0;background:transparent;padding:2px 0 18px}
.conversation-bubble p {white-space:pre-wrap;overflow-wrap:anywhere}

.conversation-process {margin:16px 0;font-size:12px;color:var(--muted)}
.conversation-process>summary {display:flex;align-items:center;gap:7px;list-style:none;cursor:pointer;width:fit-content;padding:4px 0}
.conversation-process[open]>summary>svg:last-child {transform:rotate(180deg)}
.conversation-activity>.conversation-process {
  margin: 0 0 10px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
}
.conversation-activity>.conversation-process>summary {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-height: 36px;
  padding: 6px;
  border-radius: 6px;
}
.conversation-activity>.conversation-process>summary::-webkit-details-marker {display:none}
.conversation-activity>.conversation-process>summary:hover {background:var(--surface-2, #eef2f8);color:var(--text)}
.conversation-activity>.conversation-process>summary:focus-visible {outline:2px solid var(--primary);outline-offset:2px}
.conversation-activity>.conversation-process[open]>summary>svg:first-child {transform:rotate(90deg)}
.conversation-activity>.conversation-process>summary>svg {flex:none}
.conversation-process-label {min-width:0;overflow-wrap:anywhere}
.conversation-process-body {margin:2px 0 12px 9px;padding-left:14px;border-left:1px solid var(--line);overflow-wrap:anywhere}
.conversation-process-steps {padding:4px 0}
.conversation-stage {font-weight:600;margin-bottom:5px}
.conversation-tool-calls {list-style:none;padding:0;margin:0}
.conversation-tool-calls>li {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:12px;padding:5px 0}
.conversation-tool-calls small {font-size:12px;color:var(--muted-strong)}
.conversation-tool-calls [data-call-status="running"] small {color:var(--primary)}
.conversation-tool-calls [data-call-status="returned"] small {color:#187059}
.conversation-tool-calls [data-call-status="failed"] small {color:#a62d40}
.conversation-trace-target {margin-inline-start:8px;color:var(--muted-strong)}
.conversation-trace-outcome {margin-top:2px;color:var(--muted);font-size:12px}
.conversation-trace-plan,.conversation-trace-findings {padding:8px 0}
.conversation-trace-plan+.conversation-tool-calls,.conversation-trace-findings:not(:first-child) {border-top:1px solid var(--line)}
.conversation-trace-findings ul {margin:4px 0 0;padding-inline-start:16px}
.conversation-trace-findings li {margin-bottom:3px}
.conversation-process-body .inline-job-log {margin:6px 0 0;padding-inline-start:16px}
@media (pointer:coarse) {.conversation-activity>.conversation-process>summary {min-height:44px}}
.conversation-input-needed {display:flex;align-items:center;gap:8px;padding:12px 14px;margin-top:12px;font-size:13px;color:var(--muted-strong);background:var(--orange-soft);border:1px solid rgba(147,103,29,.2);border-radius:12px}
.conversation-clarification {margin-top:16px;max-width:660px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface,#fff);overflow-wrap:anywhere}
.conversation-clarification header {margin-bottom:14px}
.conversation-clarification h3 {margin:0 0 4px;font-size:16px;font-weight:650}
.conversation-clarification p {margin:0;color:var(--muted-strong);font-size:13px;line-height:1.55}
.clarification-question {display:grid;gap:6px;min-inline-size:0;margin:0;padding:0;border:0}
.clarification-question+.clarification-question {margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.clarification-question legend {padding:0;margin-bottom:5px;font-size:14px;font-weight:650}
.clarification-option {display:flex;align-items:flex-start;gap:10px;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:8px;cursor:pointer;font-size:13px;line-height:1.55}
.clarification-option:hover,.clarification-option:has(:checked) {border-color:var(--primary);background:var(--primary-softer)}
.clarification-option:has(:focus-visible) {outline:2px solid var(--primary);outline-offset:2px}
.clarification-option input {flex:none;inline-size:16px;block-size:16px;margin:2px 0 0;accent-color:var(--primary)}
.clarification-option span {min-width:0}
.clarification-option strong {font-weight:550}
.clarification-option small {display:block;color:var(--muted-strong);font-size:12px}
.clarification-custom {display:grid;gap:4px;font-size:13px;color:var(--muted-strong)}
.clarification-custom input {min-width:0;min-height:44px;font-size:16px}
.clarification-question:not(:has(input[value="other"]:checked)) .clarification-other {display:none}
.clarification-footer {display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:14px}
.clarification-footer .btn {min-height:44px}
.clarification-feedback {color:var(--muted-strong);font-size:13px}
.clarification-record {margin:8px 0;color:var(--muted-strong);font-size:13px;overflow-wrap:anywhere}
.clarification-record summary {cursor:pointer}
.clarification-record p {margin:8px 0 0;white-space:pre-wrap}
.clarification-composer-hint {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:6px 16px;color:var(--muted-strong);font-size:13px}
.chat-result-workspace-link {display:flex;align-items:center;gap:8px;width:100%;padding:12px 14px;margin-top:12px;border:1px solid rgba(22,104,227,.18);border-radius:12px;background:var(--primary-softer);color:var(--primary-dark);font-size:13px;font-weight:500;text-align:left;transition:background-color 150ms var(--work-ease),border-color 150ms var(--work-ease)}
.chat-result-workspace-link:hover {background:var(--primary-soft);border-color:rgba(22,104,227,.3)}
.chat-result-workspace-link>svg:last-child {margin-left:auto}
.conversation-thread .progress-track>span {transition:width 300ms cubic-bezier(.2,.8,.2,1)}
.conversation-meta {
  font-size: 12px;
  color: var(--muted-strong);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.conversation-bubble p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.9;
}

.conversation-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.conversation-file {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
  color: var(--muted-strong);
  background: #f5f7fc;
  border: 1px solid #e3e8f2;
  padding: 4px 8px;
  border-radius: 4px;
}

.inline-job-log {
  font-size: 12px;
  color: var(--muted-strong);
  line-height: 1.9;
  margin: 14px 0;
}

.inline-job-log>div {
  display: flex;
  gap: 7px;
  align-items: center;
}

.inline-job-progress>div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted-strong);
}

.conversation-muted {
  font-size: 12px;
  color: var(--muted-strong);
  line-height: 1.9;
}

.inline-result-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}

.inline-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.inline-result-head strong,.inline-result-head small {
  display: block;
}

.inline-result-head strong {
  font-size: 14px;
  color: var(--text);
}

.inline-result-head small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.inline-result-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.inline-result-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.inline-result-row strong,.inline-result-row small {
  display: block;
  font-size: 12px;
  color: var(--text);
}

.inline-result-row small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 4px;
}

/* History is a source column and batch column beside one document surface. */

.history-browser {
  display: grid;
  grid-template-columns: 196px 236px minmax(0,1fr);
  min-height: 570px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: clip;
}

.history-sources,.history-batches {
  padding: 20px 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.history-sources {
  background: #f8fafd;
}

.history-sources .section-heading,.history-batches .section-heading {
  padding: 0 10px;
  margin-bottom: 18px;
}

.history-sources h2,.history-batches h2 {
  font-size: 12px;
  color: var(--muted);
}

.history-sources .section-heading>span,.history-batches .section-heading>span {
  font-size: 12px;
  color: var(--muted);
}

.history-source {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  color: var(--muted-strong);
  text-align: left;
}

.history-source>span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.history-source b {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.history-source:hover {
  background: rgba(255,255,255,.9);
  color: var(--text);
}

.history-source.active {
  background: #fff;
  border-color: rgba(22,104,227,.24);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: 0 4px 12px -10px rgba(22,104,227,.35);
}

.history-source.active b {
  color: var(--primary);
}

.history-batches {
  background: #fcfdff;
}

.history-batch {
  display: grid;
  gap: 7px;
  text-align: left;
  width: 100%;
  padding: 13px 12px;
  margin-bottom: 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted-strong);
}

.history-batch strong {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
  overflow-wrap: anywhere;
}

.history-batch small {
  font-size: 12px;
  color: var(--muted);
}

.history-batch .status-pill {
  justify-self: start;
}

.history-batch:hover {
  background: var(--panel-soft);
}

.history-batch.active {
  background: var(--primary-soft);
  border-color: rgba(22,104,227,.22);
}

.column-blank {
  font-size: 12px;
  color: var(--muted);
  padding: 40px 10px;
  text-align: center;
}

.history-detail {
  min-width: 0;
  padding: 26px 28px;
}

.history-detail .workspace-empty {
  min-height: 440px;
}

.history-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.history-detail-heading h2 {
  font-size: 19px;
  color: var(--text);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.history-detail-heading p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}

.history-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 26px 0;
}

.history-facts dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.history-facts dd {
  margin: 0;
  font-size: 12px;
  color: var(--muted-strong);
  overflow-wrap: anywhere;
}

.history-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.history-files {
  margin-top: 26px;
}

.history-files .section-heading h2 {
  font-size: 14px;
  color: var(--text);
}

.history-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  font-size: 12px;
  color: var(--muted);
}

.history-breadcrumb button {
  border: 0;
  background: transparent;
  padding: 2px;
  color: var(--muted-strong);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.artifact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  text-align: left;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted-strong);
  transition: background-color 140ms var(--work-ease);
}

.artifact-line:hover {
  background: var(--primary-softer);
}

.artifact-line>span {
  flex: 1;
  min-width: 0;
}

.artifact-line strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
}

.artifact-line small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Primitive fields, content groups and protected-focus sheets. */

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 17px;
  margin: 0 0 6px;
}

.panel-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}

.hero,.simple-page-head,.simple-subpage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.hero h1,.simple-page-head h1,.simple-subpage-head h1 {
  font-size: 30px;
  line-height: 1.4;
  margin: 0 0 8px;
}

.hero p,.simple-page-head p,.simple-subpage-head p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  max-width: 70ch;
}

.hero-actions,.project-wall-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 18px;
}

.section-title h2 {
  font-size: 17px;
  margin: 0 0 7px;
}

.section-title p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.field,.auth-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field label,.field>span {
  font-size: 13px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.field input,.field select,.field textarea,.auth-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 160ms var(--work-ease),box-shadow 160ms var(--work-ease),background-color 160ms var(--work-ease);
}

.field input:focus,.field select:focus,.field textarea:focus,.auth-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,104,227,.12);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field.full {
  grid-column: 1/-1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
}

.form-grid .full {
  grid-column: 1/-1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #252a3433;
  -webkit-backdrop-filter: blur(6px) saturate(110%);
  backdrop-filter: blur(6px) saturate(110%);
}

.modal {
  --dialog-action: #0068d9;
  --dialog-line: #1d1d1f14;
  --dialog-surface: #f8f9fcf7;
  --dialog-shadow: 0 28px 72px -20px #1d24384a,0 8px 24px -12px #1d243826,inset 0 1px 0 #fff;
  width: min(680px,100%);
  max-height: calc(100dvh - 56px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--dialog-surface);
  border: 1px solid #ffffffd9;
  border-radius: 18px;
  box-shadow: var(--dialog-shadow);
  min-width: 0;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--dialog-line);
  background: #ffffff61;
}

.modal-head h2 {
  font-size: 22px;
  line-height: 1.4;
  margin: 0 0 8px;
  font-weight: 500;
  letter-spacing: -.02em;
}

.modal-head p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  max-width: 65ch;
}

.modal-body {
  padding: 26px 28px;
  min-width: 0;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px;
  border-top: 1px solid var(--dialog-line);
  background: #ffffff61;
}

.modal-close {
  flex-shrink: 0;
}

.modal .modal-close {border-radius:50%;background:#1d1d1f08;color:#62656f;transition:background-color 140ms var(--work-ease),color 140ms var(--work-ease)}
.modal .modal-close:hover {background:#1d1d1f12;color:var(--text)}
.modal .btn {border-radius:9px;transition:background-color 140ms var(--work-ease),border-color 140ms var(--work-ease),box-shadow 140ms var(--work-ease),color 140ms var(--work-ease)}
.modal .btn-primary {background:var(--dialog-action);border-color:#005fc7;color:#fff;box-shadow:0 1px 2px #00377924,inset 0 1px 0 #ffffff26}
.modal .btn-primary:hover {background:#005fc7;border-color:#0058b8;box-shadow:0 2px 5px #00377926,inset 0 1px 0 #ffffff26}
.modal .btn-secondary,.modal .audit-upload {background:#ffffffd9;border-color:#cfd2da;color:#363840;box-shadow:0 1px 2px #1d1d1f07,inset 0 1px 0 #fff}
.modal .btn-secondary:hover,.modal .audit-upload:hover {background:#fff;border-color:#b8bdc8;color:var(--text);box-shadow:0 2px 6px -3px #1d1d1f26}
.modal .btn:disabled {opacity:.5;box-shadow:none}
.modal .audit-upload {border-radius:8px}
.modal .audit-option-group {background:#e9ebf180;border-color:#1d1d1f0d;border-radius:9px}
.modal .audit-option-toggle {border-radius:6px}
.modal .audit-option-toggle.selected {background:#fff;color:#005fc7;box-shadow:0 1px 4px #1d1d1f14}
.modal :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {border-color:#c8cbd3;border-radius:8px;background-color:#ffffffd9;box-shadow:0 1px 2px #1d1d1f05,inset 0 1px 0 #fff;transition:border-color 140ms var(--work-ease),box-shadow 140ms var(--work-ease)}
.modal :is(input,select,textarea):focus-visible {outline:2px solid #0068d980;outline-offset:2px;border-color:#6b9fdf}
.modal :is(input[type="checkbox"],input[type="radio"]) {accent-color:var(--dialog-action)}
.modal .audit-personal-controls>div>span,.modal .audit-personal-controls>label {color:#363840}

@media (prefers-reduced-transparency:reduce) {
  .modal-backdrop {-webkit-backdrop-filter:none;backdrop-filter:none;background:#252a3466}
  .modal {--dialog-surface:#f8f9fc}
}

@media (forced-colors:active) {
  .modal .btn-primary,.modal .btn-secondary,.modal .audit-upload {border-color:ButtonText}
}

.modal form {
  min-width: 0;
}

.modal .field+.field {
  margin-top: 18px;
}

.modal .form-grid .field+.field {
  margin-top: 0;
}

body:has(.modal-backdrop) {
  overflow-y: hidden;
}

.project-create-modal {
  display: flex;
  flex-direction: column;
}

.project-create-modal form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.project-create-modal .modal-body {
  overflow: auto;
}

.account-list {
  padding: 24px;
}

.account-option {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 20px;
}

.account-option>span:nth-child(2) {
  flex: 1;
  display: grid;
  gap: 5px;
}

.account-option small {
  font-size: 12px;
  color: var(--muted);
}

.auth-logout {
  width: 100%;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 26px;
  text-align: center;
  border: 1px dashed rgba(22,104,227,.28);
  border-radius: 14px;
  background: var(--primary-softer);
  color: var(--muted-strong);
}

.dropzone strong,.dropzone span {
  display: block;
}

.dropzone strong {
  font-size: 14px;
  color: var(--text);
  margin: 10px 0 5px;
}

.dropzone span {
  font-size: 12px;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  z-index: 1800;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px,calc(100vw - 32px));
  padding: 13px 18px;
  border: 1px solid rgba(24,32,44,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 13px;
}

.toast.error {
  border-color: #ecc9c6;
  background: #fff8f7;
  color: var(--red);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--text);
}

.audit-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #f8fafd;
  white-space: nowrap;
}

.audit-table th,.audit-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.audit-table tr:last-child td {
  border-bottom: 0;
}

.audit-table tbody tr:hover {
  background: var(--primary-softer);
}

.table-panel {
  overflow: auto;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.table-panel .cell-muted {
  font-size: 12px;
  margin-top: 5px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-select {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  padding: 6px 10px;
  color: var(--muted-strong);
  font-size: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.kpi-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.kpi-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 12px;
}

.kpi-icon {
  color: var(--primary);
}

.kpi-value {
  font-size: 25px;
  font-weight: 600;
  margin: 14px 0 7px;
  color: var(--text);
}

.kpi-trend {
  font-size: 12px;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-dot.green {
  background: var(--green);
}

.status-dot.orange {
  background: #d99026;
}

.status-dot.blue {
  background: var(--primary);
}

.two-col,.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 24px;
}

.simple-empty,.simple-empty-inline {
  padding: 34px 24px;
  color: var(--muted);
  font-size: 13px;
}

.simple-empty strong,.simple-empty small,.simple-empty-inline strong,.simple-empty-inline small {
  display: block;
}

.simple-empty small,.simple-empty-inline small {
  font-size: 12px;
  margin-top: 7px;
}

.simple-filter-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.simple-filter-row button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 13px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
}

.simple-filter-row button.active {
  background: var(--primary-soft);
  border-color: rgba(22,104,227,.28);
  color: var(--primary-dark);
  font-weight: 600;
}

/* Authentication keeps real controls separate from the generated background plate. */

.auth-page {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("./assets/browser/auth-workspace.webp") left center / cover no-repeat;
}

.auth-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 24px 56px;
}

.auth-wordmark {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
}

.auth-wordmark>strong {
  font-size: 30px;
  letter-spacing: -.02em;
  font-weight: 600;
}

.auth-brand-mark {
  width: 44px;
  height: 44px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(360px,460px);
  align-items: center;
  gap: 64px;
  width: min(1120px,calc(100% - 112px));
  margin: auto;
  flex: 1;
  padding: 16px 0 24px;
}

.auth-layout>.auth-entry {
  grid-column: 2;
}

.auth-entry {
  padding: 32px 34px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 28px;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  backdrop-filter: blur(28px) saturate(145%);
  box-shadow: 0 0 0 1px rgba(24,32,44,.06),0 28px 68px -24px rgba(15,23,42,.26),inset 0 1px 0 rgba(255,255,255,.96);
  min-width: 0;
}

.auth-server-settings{flex:none;min-height:44px;padding:10px 18px;gap:8px;border-radius:var(--r-pill);background:rgba(255,255,255,.78);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-color:rgba(255,255,255,.92);box-shadow:0 4px 16px -8px rgba(15,23,42,.2)}
.auth-server-settings:hover{background:#fff;border-color:rgba(22,104,227,.25);color:var(--primary-dark)}
.local-center-settings{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;background:var(--panel);border-radius:24px;box-shadow:var(--surface-shadow)}
.local-center-settings .modal-head{padding:24px 28px;border-bottom:1px solid var(--line)}
.local-center-settings .auth-form{gap:0}
.local-center-settings .modal-body{padding:24px 28px}
.local-center-settings .modal-foot{padding:18px 28px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px}
.local-center-settings .modal-foot .btn{min-height:44px}
.local-center-note{margin-top:12px;color:var(--muted);font-size:13px;line-height:1.6}
.local-center-error{margin-top:12px;color:var(--red);font-size:13px;line-height:1.6}
@media(max-width:600px){.auth-navigation{flex-wrap:wrap;gap:16px}.auth-server-settings{margin-left:auto}.local-center-settings .modal-head,.local-center-settings .modal-body{padding:20px}.local-center-settings .modal-foot{padding:16px 20px}}
@media(prefers-reduced-transparency:reduce){.auth-entry,.auth-server-settings,.chat-composer,.chat-inspector{background:#fff;-webkit-backdrop-filter:none;backdrop-filter:none}}

.auth-entry-heading h1 {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-entry-heading p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 28px;
}

.auth-form {
  display: grid;
  gap: 20px;
}

.auth-form label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 500;
}

.auth-form input {
  background: rgba(255,255,255,.92);
  border-color: rgba(24,32,44,.14);
  border-radius: 12px;
  min-height: 46px;
  font-size: 16px;
  color: var(--text);
}

.auth-form input::placeholder {
  color: #8b96a8;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.auth-password-pair {
  display: grid;
  gap: 18px;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-switch button {
  border: 0;
  background: transparent;
  padding: 3px;
  color: var(--primary-dark);
  font-weight: 500;
  font-size: 12px;
}

.auth-switch button:hover {
  text-decoration: underline;
}

.auth-footer {
  padding: 20px 56px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid rgba(24,32,44,.07);
  background: rgba(255,255,255,.32);
}

.auth-loading,.auth-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  background: var(--bg);
}

/* Structural responsive changes are shared, not patched per route. */

@media (hover:hover) and (pointer:fine) {


.overview-module:hover {
  box-shadow: inset 0 0 0 1px rgba(22,104,227,.18);
}

.directory-project-main:hover .directory-project-name strong {
  color: var(--primary-dark);
}
}

@media (max-width:1350px) {
.content {
  padding: 32px 30px 48px;
}

.overview-layout {
  gap: 28px;
  grid-template-columns: minmax(0,1fr) 220px;
}

.directory-columns,.directory-project {
  grid-template-columns: minmax(210px,1fr) 72px 110px 65px 28px;
  gap: 14px;
  padding-left: 20px;
  padding-right: 20px;
}

.directory-columns>:nth-child(5),.directory-updated {
  display: none;
}


.history-browser {
  grid-template-columns: 170px 205px minmax(0,1fr);
}
}

@media (max-width:1200px) {
  .chat-inspector {width:300px}
  .inspector-open .chat-home {padding:28px 20px}
  .chat-toolbar {padding-left:20px;padding-right:20px;gap:8px}
  .chat-toolbar .global-search input {width:120px}
  .chat-toolbar>.chat-context-actions {gap:4px}
  .chat-toolbar .conversation-history-card,.chat-toolbar .chat-workspace-toggle,.chat-toolbar .context-new-conversation {width:40px;min-height:40px;padding:8px;justify-content:center}
  .chat-toolbar .conversation-history-card>span,.chat-toolbar .chat-workspace-toggle>span,.chat-toolbar .context-new-conversation>span {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .chat-toolbar .chat-workspace-toggle>svg:last-child {display:none}
}

@media (min-width:981px) and (max-height:820px) {
  .chat-home {padding-top:10px;padding-bottom:18px}
  .chat-home-content {margin:0}
  .chat-welcome {margin-bottom:18px}
  .assistant-presence {width:92px;height:92px;margin-bottom:10px}
  .chat-welcome h1 {font-size:28px;margin-bottom:6px}
  .chat-home-note {margin-top:16px}
  .chat-composer textarea#composer-input {min-height:72px}
  .chat-composer {padding:12px 18px 8px}
  .chat-composer-toolbar {padding-top:8px;padding-bottom:6px}
  .chat-composer-hint {padding-top:8px}
}


@media (max-width:1120px) {

.content {
  padding: 28px 24px 40px;
}

.topbar {
  padding: 0 24px;
}

.overview-layout {
  grid-template-columns: minmax(0,1fr);
}

.project-inspector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.project-inspector>section+section {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.project-inspector>.inspector-note {
  grid-column: 1/-1;
}

.directory-controls {
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.directory-tools {
  width: 100%;
  justify-content: space-between;
}

.search-field {
  flex: 1;
  max-width: 360px;
}

.search-field input {
  width: 100%;
}

.history-browser {
  grid-template-columns: 170px minmax(0,1fr);
}

.history-sources {
  grid-row: 1/3;
}

.history-batches {
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.history-detail {
  grid-column: 2;
}

.history-batch {
  display: inline-grid;
  width: 180px;
  vertical-align: top;
}

.column-blank {
  padding: 18px 10px;
}

.project-first-run {
  padding: 42px 36px;
  gap: 32px;
}


.kpi-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.two-col,.dashboard-grid {
  grid-template-columns: 1fr;
}

.task-directory-row {
  gap: 16px;
  flex-wrap: wrap;
}

.task-row-tools {
  width: 100%;
  padding-left: 50px;
}

.auth-layout {
  gap: 60px;
}

}

@media (max-width:980px) {
:root {
  --sidebar: 0px;
}

.sidebar {
  inset: 8px auto 8px 8px;
  width: min(280px,calc(100vw - 24px));
  transform: translateX(calc(-100% - 16px));
  visibility: hidden;
  transition: transform 200ms ease,visibility 200ms;
}

.sidebar-open .sidebar {
  transform: none;
  visibility: visible;
}

.sidebar-close,.mobile-menu {
  display: inline-grid;
}

.chat-toolbar,.inspector-open .chat-toolbar {display:flex;flex-wrap:wrap;align-items:center}
.chat-toolbar::before {content:"";flex-basis:100%;order:1}
.chat-toolbar>.mobile-menu {flex:none}
.chat-toolbar>.workspace-mobile-name {display:block;flex:1;font-size:20px;font-weight:500;letter-spacing:-.03em}
.chat-toolbar>.topbar-tools {flex:none;margin-left:auto}
.chat-toolbar>.chat-project-select,.chat-toolbar>[data-action="new-project"] {order:2;flex:1}
.chat-toolbar>.chat-context-actions {order:2;flex:none}

.main-shell {
  margin-left: 0;
}

.sidebar-open {
  overflow: hidden;
}

.sidebar-open .mobile-sidebar-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 75;
  border: 0;
  background: #19231d48;
  padding: 0;
}


.page-heading h1 {
  font-size: 30px;
}


.auth-layout {
  width: calc(100% - 80px);
  gap: 44px;
}

.auth-entry {
  padding-left: 32px;
}

.auth-navigation {
  padding: 28px 40px;
}

.auth-footer {
  padding: 24px 40px;
}
}

@media (max-width:1100px) {
  .chat-workspace-layout {position:relative}
  .chat-inspector {position:absolute;inset:0 0 16px auto;width:min(360px,100%);z-index:50;box-shadow:var(--surface-shadow)}
}


@media (min-width:981px) {
  .topbar .mobile-menu,.chat-toolbar>.mobile-menu,.assistant-sidebar-header .sidebar-close {display:none}
  .sidebar-search {display:none}
  .sidebar {transition:width 240ms var(--work-ease)}
  .sidebar-collapsed .sidebar {width:72px;border-radius:22px}
  .sidebar-collapsed .main-shell {margin-left:96px}
  .sidebar-collapsed .assistant-sidebar-header {justify-content:center;padding:20px 0 14px}
  .sidebar-collapsed .sidebar-wordmark {gap:0}
  .sidebar-collapsed .sidebar-wordmark>strong {display:none}
  .sidebar-collapsed .sidebar-compose-row {flex-direction:column;margin:0 12px 10px;gap:8px}
  .sidebar-collapsed .sidebar-compose-row>.new-conversation {flex:none;width:46px;min-height:40px;padding:10px;justify-content:center}
  .sidebar-collapsed .new-conversation>span {display:none}
  .sidebar-collapsed .sidebar-collapse,.sidebar-collapsed .sidebar-search {display:none}
  .sidebar-collapsed .sidebar-expand {width:44px;height:36px}
  .sidebar-collapsed .sidebar-search-shortcut {display:grid;flex:none;width:46px;height:38px;margin:0 auto 10px;border-radius:11px;background:#eef2f8}
  .sidebar-collapsed .sidebar-scroll {padding:0 10px 12px}
  .sidebar-collapsed .context-link {justify-content:center;gap:0;min-height:48px;padding:8px}
  .sidebar-collapsed .context-link>span,.sidebar-collapsed .context-link b {display:none}
  .sidebar-collapsed .sidebar-group:not(.sidebar-resources),.sidebar-collapsed .sidebar-administration {display:none}
  .sidebar-collapsed .sidebar-resources {margin-top:16px}
  .sidebar-collapsed .sidebar-rail-admin {display:grid;width:44px;height:40px;margin:8px auto 0;border-radius:11px}
  .sidebar-collapsed .assistant-sidebar-footer {flex-direction:column;padding:12px 0;gap:8px}
  .sidebar-collapsed .sidebar-account {flex:none;justify-content:center;width:44px;height:40px;padding:0}
  .sidebar-collapsed .sidebar-account>span:nth-child(2),.sidebar-collapsed .sidebar-account>svg {display:none}
}


@media (max-width:980px) {
  .sidebar .sidebar-collapse,.sidebar .sidebar-expand,.sidebar .sidebar-search-shortcut,.sidebar .sidebar-rail-admin {display:none}
  .sidebar-compose-row>.new-conversation {width:100%}
}

@media (max-width:1120px) {
  .skill-picker-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .audit-scene {grid-column:span 4;aspect-ratio:1.35}
  .audit-scene:nth-child(1),.audit-scene:nth-child(2) {grid-column:span 6;aspect-ratio:1.6}
}

@media (prefers-reduced-motion:reduce) {
  .skill-pick-card:hover,.skill-pick-card:active,.audit-scene:hover>img {transform:none}
}

@media (max-width:760px) {
.content {
  padding: 28px 20px 38px;
}

.topbar {
  height: 60px;
  padding: 0 18px;
}

.global-search {
  display: none;
}

.topbar-tools {
  gap: 10px;
}

.chat-transcript {flex:none;overflow:visible}
.has-conversation .chat-body {overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cdd0d8 transparent}
.chat-composer-dock {position:static;margin-top:auto}
.chat-inspector {position:fixed;inset:8px 8px 8px auto;max-height:calc(100dvh - 16px);margin:0}
.chat-workspace-layout {padding:0;gap:0}
.chat-inspector {border-radius:20px}
.chat-toolbar {padding:8px 16px;column-gap:8px;row-gap:4px}
.chat-toolbar>.workspace-mobile-name {font-size:18px}
.chat-toolbar>.topbar-tools {gap:4px}
.chat-project-select {font-size:16px}
.chat-home {padding:20px 20px 32px}
.chat-home-content {margin:0;align-self:flex-start}
.chat-welcome {margin:14px 0 28px}
.chat-welcome h1 {font-size:30px}
.chat-welcome p {font-size:14px}
.assistant-presence {width:104px;height:104px;margin-bottom:12px}
.chat-context-actions .assistant-presence-compact {width:40px;height:40px}
.chat-composer {padding:14px 16px 12px;border-radius:22px}
.chat-composer-toolbar {gap:8px;flex-wrap:wrap}
.chat-composer-tools {gap:0;flex-wrap:wrap}
.chat-send-actions {margin-left:auto}
.chat-composer-hint {flex-wrap:wrap;justify-content:flex-start;font-size:11px}
.chat-composer-hint>span {flex-basis:100%;margin:0;padding-left:18px}
.chat-home-note {font-size:11px;margin-top:20px}
.chat-transcript {padding:24px 20px}
.chat-composer-dock {padding:12px 16px 20px}
.chat-inspector {width:min(360px,100%)}
.conversation-turn {gap:10px}
.user-turn .conversation-bubble {max-width:92%}
.crumb-root {
  display: none;
}

.topbar-location>svg {
  display: none;
}

.topbar-location {
  gap: 9px;
}

.page-heading {
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.page-heading h1 {
  font-size: 28px;
}

.page-actions {
  padding-top: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.page-heading p {
  font-size: 12px;
}

.directory-tabs {
  gap: 22px;
  flex-wrap: wrap;
  row-gap: 8px;
}

.directory-tabs button {
  font-size: 12px;
}

.directory-tools {
  gap: 12px;
}

.sort-control {
  font-size: 12px;
}

.directory-columns {
  display: none;
}

.directory-project {
  grid-template-columns: minmax(0,1fr) auto 26px;
  gap: 14px;
  padding: 22px 18px;
  min-height: 112px;
}

.directory-project-main {
  grid-column: 1;
  gap: 13px;
}

.directory-folder {
  width: 36px;
  height: 38px;
}

.directory-folder svg {
  width: 24px;
  height: 24px;
}

.directory-project-name strong {
  font-size: 14px;
}

.directory-project-name small {
  font-size: 12px;
}

.directory-project-state {
  grid-column: 2;
  grid-row: 1;
}

.directory-project-work {
  grid-column: 1;
  grid-row: 2;
  padding-left: 49px;
  max-width: 240px;
}

.directory-members {
  display: none;
}

.directory-project .row-menu {
  grid-column: 3;
  grid-row: 1;
}

.directory-footer {
  flex-wrap: wrap;
  gap: 8px;
}

.project-first-run {
  grid-template-columns: 1fr;
  padding: 38px 26px;
  gap: 36px;
}

.project-first-run h2 {
  font-size: 22px;
}

.first-run-steps {
  max-width: 420px;
}

.overview-modules {
  grid-template-columns: 1fr;
}

.overview-module:nth-child(2n) {
  border-right: 0;
}

.overview-module:nth-last-child(-n/**/+2) {
  border-bottom: 1px solid #edf0eb;
}

.overview-module:last-child {
  border-bottom: 0;
}

.overview-module {
  border-right: 0;
  padding: 18px;
}

.briefing-counts {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.project-briefing {
  padding: 22px;
}

.project-inspector {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.capability-directory-row {
  grid-template-columns: 34px minmax(0,1fr);
  gap: 14px;
  padding: 22px 0;
}

.capability-row-actions {
  grid-column: 2;
  flex-wrap: wrap;
}

.capability-directory-row h2 {
  font-size: 14px;
}

.task-directory-row {
  padding: 18px 0;
  gap: 12px;
}

.task-directory-main {
  min-width: 180px;
}

.task-progress {
  display: none;
}

.task-directory-row .status-pill {
  font-size: 12px;
}

.task-row-tools {
  padding-left: 0;
}

.task-row-tools .btn {
  min-height: 32px;
}


.audit-upload {
  min-height: 38px;
  font-size: 12px;
}

.history-browser {
  grid-template-columns: 1fr;
  min-height: 0;
  overflow: visible;
}

.history-sources {
  grid-column: 1;
  grid-row: auto;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  max-height: 245px;
  overflow: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 18px 12px;
}

.history-sources>.section-heading {
  flex: 1 1 100%;
  padding: 0 8px;
  margin-bottom: 12px;
}

.history-source {
  flex: 1 1 calc(50% - 4px);
  width: calc(50% - 4px);
  min-height: 40px;
}

.history-batches {
  grid-column: 1;
  padding: 18px 12px;
}

.history-batches .section-heading {
  margin-bottom: 12px;
}

.history-detail {
  grid-column: 1;
  padding: 24px 20px;
}

.history-detail .workspace-empty {
  min-height: 290px;
}

.history-facts {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.modal-backdrop {
  padding: 14px;
}

.modal {
  max-height: calc(100dvh - 28px);
}

.modal-head {
  padding: 22px;
}

.modal-body {
  padding: 22px;
}

.modal-foot {
  padding: 16px 22px;
  flex-wrap: wrap;
}

.modal-head h2 {
  font-size: 20px;
}

.form-grid {
  gap: 18px;
}

.hero,.simple-page-head,.simple-subpage-head {
  flex-wrap: wrap;
  gap: 18px;
}

.hero h1,.simple-page-head h1,.simple-subpage-head h1 {
  font-size: 28px;
}

.hero-actions {
  gap: 8px;
}

.auth-navigation {
  padding: 24px;
}

.auth-layout {
  grid-template-columns: 1fr;
  width: calc(100% - 48px);
  gap: 32px;
  padding: 24px 0 44px;
  max-width: 500px;
}

.auth-page::before {
  background-position: 24% top;
  opacity: .65;
}

.auth-layout>.auth-entry {
  grid-column: 1;
  padding: 28px;
}


.auth-entry-heading h1 {
  font-size: 24px;
}

.auth-entry-heading p {
  font-size: 12px;
  margin-bottom: 25px;
}

.auth-form {
  gap: 20px;
}

.auth-form input {
  font-size: 16px;
}

.auth-footer {
  padding: 20px 24px;
  font-size: 12px;
}


.auth-password-pair {
  gap: 20px;
}

.usage-summary {
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
}

.usage-summary strong {
  font-size: 24px;
}

.project-next-task-row {
  grid-template-columns: 30px minmax(0,1fr) auto;
  gap: 12px;
  padding: 18px;
}

.project-next-task-progress {
  display: none;
}

.project-next-task-status {
  grid-column: 3;
}

.project-next-task-actions {
  grid-column: 2/-1;
}

.project-next-task-actions .btn {
  font-size: 12px;
  min-height: 32px;
}

.conversation-turn {
  gap: 8px;
}

.conversation-bubble {
  padding: 15px;
}

.conversation-avatar {
  width: 25px;
  height: 25px;
}

.user-turn .conversation-avatar {
  display: none;
}

.active-task-section {
  padding: 18px;
}
}

@media (max-width:480px) {
.content {
  padding: 25px 16px 32px;
}

.topbar {
  padding: 0 12px;
}

.topbar-location {
  font-size: 12px;
}

.topbar-tools>.icon-btn {
  display: none;
}

.page-heading h1 {
  font-size: 27px;
}
.chat-home,.inspector-open .chat-home {padding:20px 16px 28px}
.chat-welcome h1 {font-size:27px}
.chat-welcome {margin-top:12px;margin-bottom:24px}
.chat-welcome p {font-size:13px}
.chat-context-actions .context-new-conversation {min-height:40px;font-size:12px;padding:8px}
.chat-composer-tools>.btn {font-size:11px;padding:7px 6px;min-height:36px}
.chat-composer-tools>.btn svg {width:15px;height:15px}
.chat-send {min-width:100px;font-size:12px;padding:9px 12px}
.chat-send-actions {width:100%;justify-content:flex-end}
.skill-picker-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.audit-scene-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.audit-scene,.audit-scene:nth-child(2) {grid-column:span 1;aspect-ratio:1.15}
.audit-scene:nth-child(1),.audit-scene:nth-child(6) {grid-column:span 2;aspect-ratio:1.9}
.audit-scene>.audit-scene-title {left:12px;bottom:38px;font-size:13px}
.audit-scene:nth-child(1)>.audit-scene-title {font-size:16px;left:14px;bottom:40px}
.audit-scene>.audit-scene-action,.audit-scene:nth-child(1)>.audit-scene-action {left:12px;bottom:13px;font-size:10px}
.composer-model-trigger {flex:1;max-width:190px}
.audit-workflow-photo {height:150px}
.audit-workflow-steps {grid-template-columns:1fr}
.audit-scenes-heading h2 {font-size:13px}
.skill-pick-card {min-height:122px;align-items:flex-start;flex-wrap:wrap;padding:13px;gap:10px;border-radius:15px}
.skill-card-copy {flex-basis:100%;order:2}
.skill-card-copy strong {font-size:13px}
.skill-card-icon {width:32px;height:32px;border-radius:10px}
.skill-card-icon svg {width:19px;height:19px}
.skill-card-check {margin-left:auto}
.skill-pick-card.compact {min-height:120px}
.skill-picker-specialists {grid-template-columns:1fr}
.composer-options {font-size:11px;padding:6px;margin-left:0}
.composer-skill-toolbar {gap:6px}
.chat-transcript {padding:20px 16px}
.chat-composer-dock {padding:8px 12px 16px}
.chat-inspector {width:calc(100% - 16px)}

.page-actions {
  width: 100%;
  justify-content: flex-end;
}

.page-actions>.project-header-status {
  margin-right: auto;
}

.directory-controls {
  gap: 18px;
  margin-bottom: 18px;
}

.directory-tabs {
  gap: 18px;
}

.directory-tools {
  flex-wrap: wrap;
}

.directory-tools .search-field {
  flex: 1 1 100%;
  max-width: none;
}

.sort-control {
  margin-left: auto;
}

.directory-project {
  padding: 19px 14px;
  gap: 10px;
}

.directory-project-name strong {
  font-size: 13px;
}

.directory-project-name small {
  font-size: 12px;
}

.directory-project-state .status-pill {
  font-size: 12px;
  padding: 3px 5px;
}

.directory-folder {
  width: 30px;
  height: 34px;
}

.directory-project-main {
  gap: 10px;
}

.directory-project-work {
  padding-left: 40px;
}

.project-first-run {
  padding: 32px 22px;
}

.project-first-run h2 {
  font-size: 20px;
}

.project-first-run>div>p {
  font-size: 12px;
}

.workspace-empty {
  padding: 32px 20px;
}

.workspace-empty h2 {
  font-size: 16px;
}

.workspace-empty p {
  font-size: 12px;
}

.project-inspector {
  grid-template-columns: 1fr;
}

.overview-module {
  padding: 17px 16px;
}

.briefing-counts>div {
  gap: 9px;
}

.briefing-counts dt {
  font-size: 12px;
}


.history-source {
  font-size: 12px;
  gap: 6px;
  padding: 8px 5px;
}

.history-source svg {
  width: 15px;
  height: 15px;
}

.history-batch {
  width: 100%;
  margin-bottom: 6px;
}

.history-facts {
  grid-template-columns: 1fr;
}

.history-detail-heading {
  flex-wrap: wrap;
}

.history-detail-heading h2 {
  font-size: 17px;
}

.history-actions .btn {
  flex: 1;
}

.modal-backdrop {
  padding: 8px;
}

.modal {
  max-height: calc(100dvh - 16px);
  border-radius: 8px;
}

.modal-head,.modal-body {
  padding: 20px;
}

.modal-foot {
  padding: 15px 20px;
}

.modal-foot .btn {
  min-height: 40px;
}

.form-grid {
  grid-template-columns: 1fr;
}

.field input,.field select,.field textarea {
  font-size: 16px;
}

.auth-navigation {
  padding: 22px 20px;
}

.auth-wordmark>strong {
  font-size: 28px;
}

.auth-layout {
  width: calc(100% - 40px);
}


.auth-footer {
  padding: 20px;
  flex-wrap: wrap;
  gap: 6px;
}

.kpi-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpi-card {
  padding: 15px;
}

.kpi-value {
  font-size: 21px;
}

.toast {
  right: 12px;
  bottom: 12px;
  padding: 12px 14px;
  font-size: 12px;
}
}

@media (prefers-reduced-motion:reduce) {
*,*::before,*::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
}
}

@media (forced-colors:active) {
.context-link.active,.skill-pick-card.selected,.skill-specialist.selected {
  outline: 2px solid Highlight;
  outline-offset: -2px;
}
}

@media(prefers-reduced-motion:reduce) {
  .conversation-history-card {transition:none}
  .conversation-history-card:hover,.conversation-history-card:active {transform:none}
}
