:root {
  --ink: #243b36;
  --muted: #718078;
  --accent: #326a51;
  --accent-dark: #214a39;
  --paper: #fafbf8;
  --line: #e1e7de;
  --soft: #edf2e9;
  --white: #fff;
  --danger: #a74435;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font:
    18px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button,
a,
input,
textarea,
select,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
}
a {
  color: var(--accent);
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 244px;
  flex: 0 0 244px;
  padding: 31px 22px 20px;
  border-right: 1px solid var(--line);
  background: #f3f5ef;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.8px;
  margin-bottom: 40px;
}
.brand small {
  display: block;
  font: 12px/1.8 var(--ui-font);
  letter-spacing: 1.8px;
  color: var(--muted);
}
.new-project {
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  padding: 11px 15px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 7px;
  text-align: left;
  font-weight: 600;
  margin-bottom: 25px;
}
.new-project:hover,
.primary:hover {
  background: var(--accent-dark);
}
nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 10px 13px;
  border-radius: 6px;
}
.nav-item > span[aria-hidden] {
  font-size: 19px;
  width: 20px;
}
.nav-item.active,
.nav-item:hover {
  background: #e5ecdf;
  color: var(--ink);
}
.sidebar-label {
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin: 34px 10px 12px;
}
.project-list {
  overflow: auto;
}
.project-link {
  width: 100%;
  display: block;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 5px;
}
.project-link.selected {
  background: #e5ecdf;
  color: var(--ink);
}
.project-list .muted {
  padding: 0 10px;
  font-size: 16px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 25px 10px 0;
  font-size: 14px;
  color: var(--muted);
}
.sidebar-bottom a {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 24px;
  color: var(--ink);
}
.connection-dot {
  display: block;
  font-size: 13px;
  margin-top: 5px;
}
.connection-dot:before,
.status-dot {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #aab4a5;
  border-radius: 50%;
  margin-right: 6px;
}
.connection-dot.connected:before,
.status-dot {
  background: #689960;
}
main {
  margin-left: 244px;
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 75px;
  border-bottom: 1px solid var(--line);
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  position: relative;
  z-index: 1;
  gap: 15px;
  box-shadow: none;
}
.topbar #breadcrumb {
  font-size: 16px;
  color: var(--muted);
}
#breadcrumb span {
  margin: 0 12px;
  color: #bbc5b5;
}
.topbar-right {
  display: flex;
  gap: 20px;
  align-items: center;
}
.local-label {
  font-size: 12px;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.quiet {
  padding: 5px 0;
  border: 0;
  background: none;
  font-size: 16px;
  color: var(--ink);
}
.quiet span {
  margin-left: 12px;
}
.view {
  max-width: 1400px;
  margin: 0 auto;
  padding: 42px 54px 60px;
}
.page-intro {
  margin: 10px 0 27px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 16px;
}
h1 {
  font:
    normal 46px/1.16 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -1.2px;
  margin: 0 0 18px;
  color: var(--ink);
}
.lead {
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.compact h1 {
  font-size: 37px;
}
.compact {
  margin-bottom: 30px;
}
.start-box {
  background: #fff;
  border: 1px solid #d5dfce;
  border-radius: 10px;
  padding: 20px 23px;
  box-shadow: 0 4px 18px #243b3605;
}
.start-box label {
  font-size: 16px;
  font-weight: 600;
}
.start-box textarea {
  border: 0;
  padding: 12px 0 6px;
  box-shadow: none;
  background: none;
  resize: vertical;
  font-size: 18px;
}
.start-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #edf0e8;
  padding-top: 14px;
}
.start-bottom > span {
  font-size: 14px;
  color: var(--muted);
}
.primary,
.secondary {
  border-radius: 6px;
  padding: 10px 17px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.primary {
  background: var(--accent);
  color: white;
}
.secondary {
  background: white;
  color: var(--ink);
  border-color: #d4dece;
}
.secondary:hover {
  background: var(--soft);
}
.section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 33px 0 15px;
}
.section-line h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.section-line > span {
  color: var(--muted);
  font-size: 13px;
}
.examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.example {
  position: relative;
  padding: 22px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.example:hover {
  border-color: #93ae82;
  transform: translateY(-2px);
}
.example-number {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
}
.example h3 {
  font:
    normal 20px/1.3 Georgia,
    serif;
  margin: 21px 0 10px;
  color: var(--ink);
}
.example p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 14px;
  max-width: 220px;
}
.arrow {
  display: block;
  color: var(--accent);
  font-size: 18px;
}
.home-modes {
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.home-modes h3 { margin: 0 0 7px; font-size: 14px; font-weight: 600; }
.home-modes p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  padding: 26px;
}
label {
  display: block;
  margin: 15px 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6ded1;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font-size: 17px;
  min-height: 40px;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
input::placeholder,
textarea::placeholder {
  color: #96a091;
}
select {
  padding-right: 24px;
}
.field-help {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) minmax(230px, 0.8fr);
  gap: 50px;
}
.form-panel > label:first-child {
  margin-top: 0;
}
.advanced {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.research-director-option { display: flex; align-items: flex-start; gap: 10px; }
.research-director-option input { width: 18px; height: 18px; min-height: 0; padding: 0;
  margin: 3px 0 0; flex: 0 0 18px; accent-color: var(--ink); }
summary {
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
}
.setup-notes {
  padding: 8px 0;
}
.setup-notes h3 {
  font-size: 18px;
  font-weight: 600;
}
.setup-notes p {
  font-size: 16px;
  color: var(--muted);
  max-width: 340px;
}
.setup-notes hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
.machine-card {
  padding: 13px 17px;
  background: var(--soft);
  border-radius: 6px;
  margin: 20px 0;
  word-break: break-word;
}
.machine-card strong,
.machine-card small {
  display: block;
}
.machine-card small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}
.cli-chip {
  display: inline-block;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 14px;
  margin: 4px;
}
.tool-note {
  background: var(--soft);
  padding: 16px 20px;
  border-radius: 7px;
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
}
.tool-note strong {
  color: var(--ink);
  margin-right: 9px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.tool-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 21px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tool-card h3 {
  font-size: 18px;
  margin: 12px 0 7px;
}
.tool-card p {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 17px;
  min-height: 40px;
}
.badge {
  font-size: 12px;
  letter-spacing: 0.6px;
  background: var(--soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 3px 7px;
  align-self: flex-start;
}
.tool-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}
.tool-card details {
  margin-top: 13px;
}
.tool-card pre {
  font-size: 13px;
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
}
.custom-tool {
  margin: 25px 0 20px;
}
.custom-tool summary {
  font-weight: 600;
  color: var(--ink);
}
.custom-tool form {
  max-width: 600px;
}
.custom-tool button {
  margin-top: 18px;
}
.custom-tool p {
  font-size: 16px;
  color: var(--muted);
}
.project-view {
  padding-top: 29px;
}
.project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 25px;
}
.project-heading .eyebrow {
  margin-bottom: 8px;
}
.project-heading h1 {
  font-size: 30px;
  max-width: 550px;
  margin: 0;
  overflow-wrap: anywhere;
}
.mode-switch {
  display: flex;
  background: #eaf0e4;
  padding: 4px;
  border-radius: 7px;
  flex-shrink: 0;
}
.mode-switch button {
  border: 0;
  background: none;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
}
.mode-switch button.selected {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px #20372d12;
}
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 28px;
}
.conversation-heading {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
}
.messages {
  min-height: 260px;
  max-height: calc(100vh - 425px);
  overflow: auto;
  padding: 22px 8px 10px 0;
  scroll-behavior: smooth;
}
.message {
  margin-bottom: 24px;
}
.message-role {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 9px;
}
.message.user .message-content {
  background: #eaf0e5;
  border-radius: 8px 8px 2px 8px;
  padding: 14px 17px;
}
.message-content {
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.message-content p:first-child {
  margin-top: 0;
}
.message-content pre {
  overflow: auto;
  font-size: 14px;
  padding: 12px;
  background: #eef1ea;
  border-radius: 6px;
}
.message-content h1,
.message-content h2,
.message-content h3 {
  font-family: inherit;
  font-size: 18px;
  letter-spacing: normal;
  line-height: 1.4;
}
.message details {
  font-size: 14px;
  margin-top: 10px;
}
.trace {
  padding: 10px 12px;
  border-left: 2px solid #d3dfcb;
  color: var(--muted);
  max-height: 230px;
  overflow: auto;
}
.trace p {
  margin: 4px 0;
}
.trace pre {
  white-space: pre-wrap;
  font-size: 13px;
}
.thinking {
  color: var(--muted);
  font-size: 16px;
}
.composer {
  border: 1px solid #cfdcc7;
  background: #fff;
  border-radius: 9px;
  padding: 10px 15px;
}
.composer textarea {
  border: 0;
  resize: vertical;
  box-shadow: none;
  padding: 5px 0;
}
.composer-bottom {
  display: flex;
  gap: 10px;
  align-items: center;
}
.attach-button {
  font-size: 14px;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
}
.composer-bottom #agent-label {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
.composer-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.project-context {
  border-left: 1px solid var(--line);
  padding-left: 25px;
}
.context-section {
  margin-bottom: 27px;
}
.context-section h3 {
  font-size: 16px;
  margin: 0 0 13px;
}
.context-section h3 span {
  font-size: 13px;
  color: var(--muted);
  font-weight: normal;
  margin-left: 8px;
}
.context-section p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.context-section details {
  margin-top: 14px;
}
.context-section summary {
  font-size: 13px;
}
.context-section code {
  font-size: 13px;
  overflow-wrap: anywhere;
  display: block;
  margin-top: 8px;
}
.file-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.file-row a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-row small {
  white-space: nowrap;
  color: var(--muted);
}
.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 14px;
}
.brief-form {
  padding: 24px;
}
.brief-form .section-line {
  margin-top: 0;
}
.two-fields {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
}
.brief-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
}
.study-card {
  background: white;
  border: 1px solid #cbdcc1;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 20px;
}
.study-card h3 {
  font-size: 18px;
  line-height: 1.6;
  margin: 12px 0;
}
.study-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.study-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.study-findings {
  margin-top: 12px;
  font-size: 16px;
}
.study-findings details {
  padding-top: 10px;
}
.study-findings .message-content {
  max-height: 400px;
  overflow: auto;
}
.metrics {
  display: flex;
  gap: 25px;
  margin: 18px 0;
  font-size: 14px;
  color: var(--muted);
}
.metrics strong {
  display: block;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(650px, 90vw);
  border-radius: 7px;
  background: var(--ink);
  color: white;
  padding: 13px 22px;
  box-shadow: 0 8px 30px #0002;
  z-index: 100;
  font-size: 17px;
}
.toast.error {
  background: var(--danger);
}
.banner {
  padding: 12px 44px;
  background: #fff1d9;
  color: #775723;
  font-size: 16px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  width: min(480px, 90vw);
  color: var(--ink);
  box-shadow: 0 20px 80px #0002;
}
dialog::backdrop {
  background: #19312555;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font:
    normal 28px Georgia,
    serif;
}
dialog p {
  font-size: 16px;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.error-text {
  color: var(--danger);
}
.welcome-message {
  padding: 20px 4px;
}
.welcome-message h2 {
  font:
    normal 26px Georgia,
    serif;
}
.welcome-message p {
  color: var(--muted);
  font-size: 17px;
}
.muted {
  color: var(--muted);
}
@media (min-width: 1500px) {
  .home-view {
    max-width: 1170px;
    padding-top: 65px;
  }
  .home-view h1 {
    font-size: 54px;
  }
  .home-view .examples {
    margin-top: 20px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 210px;
    flex-basis: 210px;
    padding-left: 15px;
    padding-right: 15px;
  }
  main {
    margin-left: 210px;
  }
  .view {
    padding: 30px;
  }
  .topbar {
    padding: 0 30px;
  }
  .project-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .project-layout {
    grid-template-columns: minmax(0, 1fr) 205px;
    gap: 20px;
  }
  .project-context {
    padding-left: 18px;
  }
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-layout {
    gap: 30px;
  }
  .example {
    padding: 17px;
  }
  .example h3 {
    font-size: 18px;
  }
}
@media (max-width: 820px) {
  .sidebar {
    width: 175px;
    flex-basis: 175px;
    padding: 25px 12px;
  }
  .brand {
    font-size: 20px;
    gap: 8px;
  }
  .brand small {
    font-size: 11px;
  }
  main {
    margin-left: 175px;
  }
  .view {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .local-label {
    display: none;
  }
  .project-layout {
    grid-template-columns: 1fr;
  }
  .project-context {
    border: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .project-context .context-section:last-child {
    display: none;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .setup-notes {
    display: none;
  }
  .examples {
    gap: 10px;
  }
  .example {
    padding: 13px;
  }
  .example h3 {
    font-size: 17px;
  }
  .example-number {
    font-size: 12px;
  }
  .start-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .start-bottom .primary {
    align-self: flex-end;
  }
  .home-modes {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  h1 {
    font-size: 38px;
  }
  .messages {
    max-height: none;
    min-height: 240px;
  }
  .tool-grid {
    grid-template-columns: 1fr 1fr;
  }
  .section-line > span {
    display: none;
  }
}
@media (max-width: 600px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 12px 18px;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 15px;
  }
  .brand {
    margin: 0;
    font-size: 19px;
  }
  .brand small,
  .sidebar-label,
  .project-list,
  .sidebar-bottom {
    display: none;
  }
  .new-project {
    width: auto;
    font-size: 0;
    margin: 0;
    padding: 7px 10px;
  }
  .new-project:first-letter {
    font-size: 20px;
  }
  .new-project span {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin-left: auto;
    gap: 0;
  }
  .nav-item {
    padding: 6px;
    font-size: 0;
  }
  .nav-item > span[aria-hidden] {
    font-size: 21px;
  }
  .shell {
    display: block;
  }
  main {
    margin: 0;
  }
  .topbar {
    height: 52px;
    padding: 0 20px;
  }
  .view {
    padding: 25px 20px;
  }
  .home-view h1 {
    font-size: 35px;
  }
  .compact h1 {
    font-size: 30px;
  }
  .examples {
    grid-template-columns: 1fr;
  }
  .example {
    padding: 17px;
  }
  .example h3 {
    margin: 10px 0 6px;
    font-size: 20px;
  }
  .example p {
    max-width: 100%;
    margin-bottom: 0;
  }
  .example .arrow {
    position: absolute;
    right: 19px;
    top: 14px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .two-fields {
    grid-template-columns: 1fr;
  }
  .project-context {
    grid-template-columns: 1fr;
  }
  .project-heading h1 {
    font-size: 27px;
  }
  .mode-switch {
    width: 100%;
  }
  .mode-switch button {
    flex: 1;
  }
  .brief-form {
    padding: 18px;
  }
  .brief-footer {
    flex-direction: column;
  }
  .composer-bottom #agent-label {
    display: none;
  }
  .composer-bottom button:first-of-type {
    margin-left: auto;
  }
  .primary,
  .secondary {
    padding: 9px 12px;
  }
  .start-bottom > span {
    font-size: 13px;
  }
  .home-modes {
    margin-top: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.agent-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0 0 24px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.installed-variants > div {
  margin: 12px 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.installed-variants strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.installed-variants p {
  min-height: 0;
  margin: 6px 0;
  font-size: 14px;
}
.installed-variants code {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
  color: var(--muted);
}
#home-agent-host .agent-controls {
  margin-bottom: 16px;
}
.agent-controls > div {
  min-width: 130px;
}
.agent-controls .model-control {
  flex: 1;
  max-width: 350px;
}
.agent-controls label {
  margin: 0 0 5px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.agent-controls input,
.agent-controls select {
  min-height: 35px;
  padding: 7px 10px;
  font-size: 16px;
}
.agent-controls .quiet {
  padding-bottom: 8px;
  margin-left: auto;
}
.agent-controls > p {
  flex-basis: 100%;
  margin: 0;
  font-size: 13px;
}
.inventory-heading {
  margin: 28px 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.inventory-heading h2 {
  font-size: 19px;
  margin: 0;
  font-weight: 600;
}
.inventory-heading p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5ecdf;
  color: var(--accent);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 14px;
  margin-left: 6px;
  vertical-align: middle;
}
.tool-status {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  padding: 5px 9px;
}
.tool-status.installed {
  background: #e4f0df;
  color: #315d3b;
}
.tool-status.not-installed {
  background: #f0f1ed;
  color: #75806e;
}
.tool-installed {
  border-top: 3px solid #81a575;
}
.tool-missing {
  background: #fdfefb;
}
.tool-card > .field-help {
  margin: -4px 0 18px;
  min-height: 0;
}
.study-preparation {
  margin-bottom: 20px;
}
.study-preparation h2 {
  font:
    normal 25px/1.4 Georgia,
    serif;
  margin: 0 0 10px;
}
.study-preparation > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.preparation-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 20px 0 12px;
}
.preparation-option {
  padding: 18px;
  text-align: left;
  background: var(--paper);
  border: 1px solid #d2dfca;
  border-radius: 7px;
  color: var(--ink);
}
.preparation-option:hover {
  background: var(--soft);
  border-color: #84a774;
}
.preparation-option strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 17px;
}
.preparation-option strong span {
  color: var(--accent);
}
.preparation-option small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 10px;
}
.prepared-brief {
  border-color: #bdcfb1;
  margin-bottom: 16px;
}
.prepared-brief h2 {
  font:
    normal 24px/1.4 Georgia,
    serif;
  margin: 0 0 22px;
  overflow-wrap: anywhere;
}
#prepared-details > div {
  margin-bottom: 17px;
}
#prepared-details strong {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
#prepared-details p {
  font-size: 17px;
  margin: 4px 0;
  white-space: pre-wrap;
}
.brief-editor > summary {
  padding: 12px 2px;
}
.brief-editor .brief-form {
  margin-top: 6px;
}
.prepared-brief .brief-footer {
  margin-top: 25px;
}
.agent-controls #custom-model-control {
  flex: 1;
}
@media (max-width: 820px) {
  .agent-controls > div {
    min-width: 110px;
    flex: 1;
  }
  .agent-controls .model-control {
    max-width: none;
  }
  .inventory-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .preparation-options {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .agent-controls {
    padding: 13px;
    gap: 10px;
  }
  .agent-controls > div {
    flex: 1 1 40%;
  }
  .agent-controls .quiet {
    font-size: 14px;
  }
  .study-preparation,
  .prepared-brief {
    padding: 19px;
  }
  .prepared-brief .brief-footer {
    flex-direction: column;
  }
}

/* Workspace chrome: Web Awesome supplies the accessible split panel and tab mechanics. */
:root {
  --ink: #202332;
  --muted: #7b8192;
  --accent: #6658d9;
  --accent-dark: #5345bb;
  --paper: #f8f9fc;
  --line: #e8eaf1;
  --soft: #f0eefb;
  --wa-color-brand-fill-loud: #6658d9;
  --wa-color-brand-on-quiet: #5345bb;
  --wa-font-family-body:
    var(--ui-font);
}
body {
  font-family:
    var(--ui-font);
  font-size: 17px;
  letter-spacing: -0.1px;
}
.sidebar {
  background: #191c29;
  border-color: #252a3a;
  color: #bfc3d2;
  width: 224px;
  flex-basis: 224px;
  padding: 28px 18px 18px;
}
.brand {
  color: #f4f4fc;
  letter-spacing: -0.8px;
  font-size: 22px;
  gap: 10px;
  margin-bottom: 30px;
}
.brand small {
  color: #8188a1;
  font-size: 12px;
}
.new-project {
  white-space: nowrap;
  background: #7666e1;
  border-radius: 9px;
  box-shadow: 0 3px 12px #0002;
  padding: 11px 14px;
  font-size: 16px;
}
.nav-item {
  color: #aeb4c9;
  font-size: 16px;
  padding: 10px 12px;
  gap: 10px;
}
.nav-item.active,
.nav-item:hover {
  background: #2b2c43;
  color: #eeeaff;
}
.nav-item > span[aria-hidden] {
  font-size: 17px;
}
.sidebar-label {
  color: #6e7794;
  font-size: 12px;
  letter-spacing: 1.6px;
  margin-top: 28px;
}
.project-link {
  color: #9ba4be;
  font-size: 14px;
  padding: 9px 11px;
}
.project-link.selected {
  background: #2b2c43;
  color: #f3f0ff;
}
.project-link:hover {
  background: #252a3c;
  color: white;
}
.sidebar-bottom a {
  color: #aeb6cb;
}
.sidebar-bottom {
  color: #78819b;
  font-size: 13px;
}
.connection-dot.connected:before {
  background: #8ba7ff;
}
.sidebar .muted {
  color: #737d96;
}
main {
  margin-left: 224px;
}
.topbar {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid #eceef5;
  padding: 0 32px;
}
.local-label {
  color: #8b91a3;
  font-size: 12px;
}
.topbar #breadcrumb {
  font-size: 14px;
}
.topbar #breadcrumb span {
  margin-left: 0;
}
.quiet {
  font-size: 14px;
}
.view {
  padding: 36px 40px;
  max-width: 1350px;
}
.home-view {
  max-width: 1080px;
  padding-top: 64px;
}
.home-view .page-intro {
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.7px;
  color: #8a82b9;
}
h1,
.compact h1 {
  font-family:
    var(--ui-font);
  font-weight: 600;
  font-size: 35px;
  letter-spacing: -1.4px;
  line-height: 1.25;
}
.home-view h1 {
  font-size: 40px;
  letter-spacing: -1.7px;
}
.lead {
  font-size: 17px;
  color: #8a8fa0;
  line-height: 1.8;
}
.start-box {
  border-color: #e3e1ef;
  border-radius: 14px;
  box-shadow: 0 8px 28px #2d235c05;
  padding: 20px;
}
.start-box textarea {
  font-size: 18px;
  min-height: 90px;
}
.start-box label {
  color: #656d83;
  font-size: 14px;
}
.start-bottom {
  border-color: #f0f0f6;
}
.primary {
  background: #6658d9;
  border-radius: 8px;
  box-shadow: 0 3px 8px #6658d915;
}
.secondary {
  border-color: #e4e5ee;
  border-radius: 8px;
}
.example {
  border-color: #e7e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px #10152a02;
}
.example h3 {
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  margin-top: 19px;
}
.example p {
  font-size: 14px;
  color: #8a8fa0;
}
.example-number {
  font-size: 12px;
  color: #9297aa;
}
.example:hover {
  border-color: #b5acec;
  box-shadow: 0 6px 22px #6658d90a;
}
.project-view {
  max-width: none;
  padding: 22px 28px 18px;
}
.project-heading {
  margin-bottom: 16px;
  gap: 15px;
}
.project-heading h1 {
  font-family: inherit;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.7px;
  line-height: 1.4;
  max-width: 650px;
}
.project-heading .eyebrow {
  font-size: 12px;
  margin-bottom: 5px;
}
.mode-switch {
  background: #eeedf5;
  border-radius: 8px;
}
.mode-switch button {
  font-size: 13px;
  padding: 7px 11px;
}
.mode-switch button.selected {
  box-shadow: 0 2px 7px #17162c0a;
}
.agent-controls {
  padding: 11px 14px;
  gap: 10px;
  background: #fff;
  border-color: #e7e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
}
.agent-controls input,
.agent-controls select {
  border-color: #e7e8ef;
  border-radius: 6px;
  padding: 6px 9px;
  min-height: 31px;
  font-size: 14px;
}
.agent-controls label {
  font-size: 12px;
  color: #8c91a2;
}
.agent-controls .field-help {
  font-size: 12px;
  color: #969bab;
}
.agent-controls .model-control {
  max-width: 280px;
}
.agent-controls > div {
  min-width: 120px;
}
wa-split-panel.project-layout {
  display: grid;
  gap: 0;
  width: 100%;
  --divider-width: 12px;
  --min: 260px;
  --max: 50%;
  background: transparent;
}
wa-split-panel.project-layout::part(divider) {
  background: transparent;
  color: #c8ccda;
  border-radius: 5px;
}
wa-split-panel.project-layout::part(divider):hover {
  background: #ece9f8;
  color: #8b7ccb;
}
.resize-grip {
  font-size: 18px;
  line-height: 1;
  opacity: 0.65;
}
.conversation-column {
  padding-right: 15px;
  min-width: 0;
  height: calc(100dvh - 251px);
  min-height: 430px;
  overflow: auto;
}
.project-context {
  padding: 0 0 0 15px;
  border-left: 0;
  min-width: 0;
  height: calc(100dvh - 251px);
  min-height: 430px;
  overflow: auto;
  background: transparent;
}
.inspector-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 12px;
  gap: 8px;
}
.inspector-heading strong {
  font-size: 16px;
  font-weight: 600;
}
.inspector-heading > span {
  font-size: 12px;
  color: #9ca0ae;
}
#inspector-tabs {
  --indicator-color: #8576e7;
  --track-color: #ecebf3;
  --track-width: 1px;
}
#inspector-tabs wa-tab {
  font-size: 14px;
}
#inspector-tabs wa-tab::part(tab) {
  padding: 10px 12px;
}
#inspector-tabs wa-tab-panel {
  --padding: 15px 0;
}
#interactive-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.conversation-heading {
  font-size: 13px;
  border-color: #eceef4;
  padding-bottom: 12px;
}
.status-dot {
  background: #8b81d5;
}
.messages {
  flex: 1;
  min-height: 160px;
  height: auto;
  max-height: none;
  padding: 20px 5px 12px 0;
  scrollbar-width: thin;
  scrollbar-color: #dcdde7 transparent;
}
.message {
  margin-bottom: 26px;
}
.message-role {
  font-size: 12px;
  color: #9196a8;
  letter-spacing: 1.1px;
  margin-bottom: 9px;
}
.message.user .message-content {
  background: #eeecfa;
  border: 1px solid #e6e2f7;
  border-radius: 12px 12px 3px 12px;
  padding: 13px 16px;
  color: #403a62;
}
.message-content {
  font-size: 17px;
  line-height: 1.9;
}
.message-content p {
  margin-bottom: 12px;
}
.composer {
  border-color: #dfdcec;
  border-radius: 12px;
  box-shadow: 0 4px 20px #37286204;
  padding: 13px 15px;
  background: #fff;
}
.composer textarea {
  font-size: 16px;
  min-height: 64px;
}
.composer-bottom {
  border-top: 1px solid #f2f1f7;
  padding-top: 10px;
}
.composer-bottom #agent-label {
  font-size: 12px;
  color: #8d90a4;
}
.composer-note {
  font-size: 12px;
  color: #a0a3b2;
  margin: 9px 0 0;
}
.attach-button {
  font-size: 13px;
}
.context-section {
  margin: 6px 0 24px;
}
.context-section h3 {
  color: #4a5269;
  font-size: 14px;
}
.file-row {
  border-color: #ececf3;
  font-size: 13px;
}
.count-badge {
  background: #eeebfc;
  color: #7d6ec7;
  padding: 1px 6px;
  font-size: 12px;
}
.context-section p {
  font-size: 13px;
  color: #8d93a5;
}
.context-section code {
  color: #8b91a1;
}
.research-link-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 15px;
  padding: 14px 16px;
  margin: 13px 0;
  background: #fff;
  border: 1px solid #e5e1f2;
  border-radius: 10px;
  box-shadow: 0 3px 9px #4c397906;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.research-link-card:hover {
  border-color: #afa1e5;
  transform: translateY(-1px);
}
.link-category {
  grid-column: 1/-1;
  font-size: 12px;
  letter-spacing: 1.1px;
  color: #9786c2;
}
.research-link-card strong {
  font-size: 16px;
  font-weight: 500;
  color: #4c446a;
  overflow-wrap: anywhere;
}
.link-open {
  align-self: center;
  white-space: nowrap;
  font-size: 13px;
  color: #8370c3;
}
.agent-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  color: #8c84a3;
  font-size: 14px;
}
.agent-progress wa-spinner {
  font-size: 18px;
  --indicator-color: #8877d7;
  --track-width: 2px;
}
.agent-progress small {
  color: #aaa5b5;
  font-size: 12px;
  margin-left: 2px;
}
.trace {
  font-size: 13px;
  border-color: #e3dcef;
}
.trace p {
  font-size: 13px;
}
.prepared-brief,
.study-card {
  border-color: #ded8ef;
  border-radius: 11px;
}
.prepared-brief h2,
.study-preparation h2 {
  font-family: inherit;
  font-size: 19px;
  letter-spacing: -0.4px;
  font-weight: 550;
}
.study-preparation {
  border-color: #e7e8f0;
  border-radius: 11px;
}
.preparation-option {
  background: #faf9fd;
  border-color: #e6e1f1;
  border-radius: 9px;
}
.preparation-option:hover {
  border-color: #bdafe6;
  background: #f6f3ff;
}
.preparation-option strong {
  font-size: 16px;
}
.panel {
  border-color: #e5e6ef;
  border-radius: 11px;
}
.tool-card {
  border-color: #e4e6ee;
  border-radius: 11px;
}
.tool-installed {
  border-top-color: #89b49e;
}
.tool-status.installed {
  color: #507f67;
  background: #eaf3ed;
}
.tool-status.not-installed {
  background: #f0f1f6;
  color: #9297aa;
}
.tool-note {
  background: #f0eef8;
  color: #8c85a1;
}
.inventory-heading h2 {
  font-size: 17px;
}
.example-number,
.section-line > span {
  color: #999dac;
}
.simulation-item {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e9e8f1;
  border-radius: 8px;
  margin-bottom: 7px;
  font-size: 13px;
  color: #747b90;
  background: #fff;
}
.simulation-item > span:nth-child(2) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.simulation-item small {
  font-size: 12px;
  color: #a0a5b2;
}
.simulation-item.selected {
  background: #f2effc;
  border-color: #d9d0f1;
  color: #685c91;
}
.run-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4c6d1;
}
.run-dot.running,
.run-dot.queued {
  background: #9b86e7;
  animation: activity-pulse 1.6s ease-in-out infinite;
}
.run-dot.succeeded {
  background: #80b89e;
}
.run-dot.failed,
.run-dot.timed_out {
  background: #d98d96;
}
.sidebar-runs {
  margin-top: 6px;
  max-height: 210px;
  overflow: auto;
}
.sidebar-runs .sidebar-label {
  margin: 20px 10px 10px;
}
.sidebar-run {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #9da8c4;
  font-size: 13px;
}
.sidebar-run > span:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-run small {
  display: none;
}
.monitor-empty {
  padding: 28px 10px;
  text-align: center;
  color: #9da3b4;
}
.monitor-symbol {
  font-size: 37px;
  color: #bcb2d8;
}
.monitor-empty h3 {
  font-size: 17px;
  font-weight: 500;
  color: #7a7c93;
  margin: 15px 0 9px;
}
.monitor-empty p {
  font-size: 14px;
  line-height: 1.8;
}
.run-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 21px 0 8px;
}
.run-heading h3 {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
  max-width: 70%;
}
.run-state {
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #edeaf6;
  color: #8b7caa;
  white-space: nowrap;
}
.run-state.succeeded {
  background: #e8f3ee;
  color: #65937c;
}
.run-state.failed,
.run-state.timed_out {
  background: #faebed;
  color: #b87780;
}
.run-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #a0a4b4;
  margin-bottom: 16px;
}
.run-meta [data-elapsed]:after {
  content: " elapsed";
}
:is(#simulation-detail, #command-detail) details {
  margin: 12px 0;
}
:is(#simulation-detail, #command-detail) details summary {
  font-size: 13px;
}
:is(#simulation-detail, #command-detail) details pre,
:is(#simulation-detail, #command-detail) details code {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #8a8fa3;
}
.console-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 1px;
  color: #9c96ad;
  margin: 17px 0 8px;
}
.console-heading button {
  letter-spacing: 0;
  font-size: 12px;
  color: #a97c8f;
}
.live-console {
  padding: 15px;
  background: #202331;
  border: 1px solid #292d3f;
  border-radius: 10px;
  color: #c0c7db;
  font:
    13px/1.9 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 160px;
  max-height: 340px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #44485e transparent;
}
.simulation-files h4 {
  font-size: 14px;
  font-weight: 500;
  color: #727a91;
  margin: 20px 0 8px;
}
.chat-figure {
  margin: 15px 0;
  border: 1px solid #e5e6ef;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.chat-figure img {
  display: block;
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  margin: 0 auto;
}
.chat-figure figcaption {
  padding: 9px 12px;
  font-size: 13px;
  color: #9297a8;
  border-top: 1px solid #eeedf4;
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #262939;
  color: #aeb6cb;
  padding: 8px 13px;
  border-radius: 9px 9px 0 0;
  font:
    13px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  margin-top: 15px;
}
.code-toolbar button {
  border: 1px solid #404459;
  color: #b6bdd2;
  border-radius: 4px;
  padding: 3px 8px;
  background: none;
  font-size: 12px;
}
.message-content pre.highlighted-code {
  background: #1e2130;
  border-radius: 0 0 9px 9px;
  padding: 13px;
  margin-top: 0;
  font-size: 14px;
  line-height: 1.8;
}
.highlighted-code code.hljs {
  padding: 0;
  background: transparent;
}
.message-content math[display="block"] {
  display: block;
  padding: 20px 12px;
  margin: 16px 0;
  overflow-x: auto;
  background: #f6f5fb;
  border: 1px solid #eae6f4;
  border-radius: 8px;
}
.view:not([hidden]) {
  animation: workspace-enter 0.18s ease-out;
}
.toast {
  background: #343046;
  border-radius: 10px;
  font-size: 16px;
  box-shadow: 0 12px 35px #2720331a;
}
@keyframes activity-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}
@keyframes workspace-enter {
  from {
    opacity: 0.75;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1500px) {
  .home-view {
    max-width: 1080px;
    padding-top: 75px;
  }
  .home-view h1 {
    font-size: 42px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 195px;
    flex-basis: 195px;
    padding: 25px 14px;
  }
  main {
    margin-left: 195px;
  }
  .project-view {
    padding: 20px;
  }
  .project-heading {
    flex-direction: row;
    align-items: center;
  }
  .project-heading h1 {
    font-size: 19px;
  }
  .project-context {
    padding-left: 10px;
  }
  .conversation-column {
    padding-right: 10px;
  }
}
@media (max-width: 1000px) {
  wa-split-panel.project-layout[orientation="vertical"] {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 12px auto !important;
    --min: 0px;
    --max: 100%;
  }
  .conversation-column {
    height: 620px;
    min-height: 0;
    padding: 0;
  }
  .project-context {
    height: auto;
    min-height: 200px;
    max-height: 650px;
    display: block;
    padding: 15px 0 0;
    border-top: 1px solid #e8e6f0;
  }
  .project-context .context-section:last-child {
    display: block;
  }
  .project-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .messages {
    max-height: none;
  }
  .view {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
}
@media (max-width: 600px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 13px 17px;
    border: 0;
    gap: 12px;
  }
  .sidebar .brand {
    font-size: 20px;
    margin: 0;
  }
  .sidebar .new-project {
    margin: 0;
    padding: 6px 9px;
    box-shadow: none;
  }
  .sidebar .nav-item {
    font-size: 0;
    padding: 5px;
  }
  .sidebar .sidebar-runs {
    display: none;
  }
  main {
    margin: 0;
  }
  .topbar {
    height: 50px;
    padding: 0 18px;
  }
  .view {
    padding: 24px 18px;
  }
  .home-view {
    padding-top: 34px;
  }
  .home-view h1 {
    font-size: 30px;
  }
  .lead {
    font-size: 16px;
  }
  .project-view {
    padding: 18px 14px;
  }
  .project-heading h1 {
    font-size: 20px;
  }
  .agent-controls {
    padding: 10px;
  }
  .conversation-column {
    height: 580px;
  }
  .project-context {
    max-height: 720px;
  }
  .sidebar-bottom {
    display: none;
  }
  .agent-controls .model-control {
    max-width: none;
  }
  .home-modes {
    gap: 12px;
  }
  .conversation-heading {
    font-size: 12px;
  }
  .new-project span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .view:not([hidden]),
  .run-dot {
    animation: none !important;
  }
  .research-link-card {
    transition: none !important;
  }
}

/* Keep routing choices beside the message they apply to. */
.composer .agent-controls,
#home-agent-host .agent-controls {
  margin: 6px 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  gap: 6px;
  align-items: center;
}
.composer .agent-controls > div,
#home-agent-host .agent-controls > div {
  min-width: 0;
  flex: 0 1 auto;
}
.composer .agent-controls .model-control,
#home-agent-host .agent-controls .model-control {
  flex: 1 1 140px;
  max-width: 250px;
}
.composer .agent-controls label,
#home-agent-host .agent-controls label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.composer .agent-controls select,
#home-agent-host .agent-controls select {
  max-width: 100%;
  background: #f5f4fa;
  border-color: transparent;
  border-radius: 16px;
  min-height: 30px;
  padding: 5px 9px;
}
.composer .agent-controls .quiet,
#home-agent-host .agent-controls .quiet {
  margin-left: 0;
  padding: 5px;
}
.composer .agent-controls .field-help,
#home-agent-host .agent-controls .field-help {
  display: none;
}
.composer .agent-controls:focus-within .field-help,
#home-agent-host .agent-controls:focus-within .field-help {
  display: block;
}
#agent-label {
  display: none;
}
@media (min-width: 1001px) {
  .conversation-column,
  .project-context {
    height: calc(100dvh - 154px);
  }
}
@media (max-width: 600px) {
  .composer .agent-controls > div,
  #home-agent-host .agent-controls > div {
    flex: 1 1 100px;
  }
}
.composer-bottom .attach-button {
  margin-right: auto;
}

/* One composer toolbar: attachments, agent, model, effort, send. */
.composer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.composer-bottom .attach-button {
  margin-right: 0;
  flex: 0 0 auto;
}
.composer-bottom .agent-controls {
  flex: 1 1 320px;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.composer-bottom .agent-controls .model-control {
  flex: 1 1 100px;
  max-width: 220px;
}
.composer-bottom .agent-controls > div {
  max-width: 160px;
}
.composer-bottom .agent-controls .quiet {
  font-size: 0;
}
.composer-bottom .agent-controls .quiet::after {
  content: "↻";
  font-size: 18px;
}
.composer-bottom .primary,
.start-bottom > .primary {
  flex: 0 0 auto;
  margin-left: auto;
}
.start-bottom {
  flex-wrap: wrap;
  gap: 8px;
}
.start-bottom #home-agent-host {
  flex: 1 1 320px;
  min-width: 0;
}
.start-bottom #home-agent-host .agent-controls {
  margin: 0;
  padding: 0;
}
@media (max-width: 600px) {
  .composer-bottom .agent-controls {
    flex-basis: 200px;
  }
}
.conversation-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 3px;
}
.conversation-row .project-link {
  flex: 1;
  min-width: 0;
}
.delete-conversation {
  background: transparent;
  border: 0;
  color: #aeb6cb;
  font-size: 22px;
  padding: 4px 7px;
  border-radius: 6px;
}
.delete-conversation:hover {
  color: #ffd4d4;
  background: #603b48;
}
#delete-dialog {
  max-width: min(560px, calc(100vw - 32px));
}
#delete-path {
  display: block;
  overflow-wrap: anywhere;
  padding: 12px;
  background: var(--soft);
  border-radius: 6px;
}
#delete-error {
  color: #b33846;
}
.danger-button {
  background: #b53c4a;
  border: 1px solid #b53c4a;
  border-radius: 8px;
  color: white;
  padding: 10px 14px;
}
#theme-toggle {
  white-space: nowrap;
}
:root[data-theme="light"] {
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e4e6f0;
  --muted: #a4acc1;
  --paper: #131722;
  --white: #1c2230;
  --line: #343d51;
  --soft: #282942;
  --accent: #b5a7ff;
  --accent-dark: #c8bdff;
  --wa-color-brand-on-quiet: #c1b6ff;
}
[data-theme="dark"] body,
[data-theme="dark"] main {
  background: var(--paper);
  color: var(--ink);
}
[data-theme="dark"]
  :is(
    .topbar,
    .start-box,
    .panel,
    .tool-card,
    .prepared-brief,
    .study-card,
    .composer,
    dialog,
    .agent-controls,
    .chat-figure
  ) {
  background: #1c2230;
  color: var(--ink);
  border-color: var(--line);
}
[data-theme="dark"] :is(input, textarea, select) {
  background: #171d29;
  color: var(--ink);
  border-color: #414b63;
}
[data-theme="dark"] :is(input, textarea)::placeholder {
  color: #9ca6bc;
}
[data-theme="dark"]
  :is(
    h1,
    h2,
    h3,
    h4,
    strong,
    .brand,
    .message-content,
    .project-context,
    .page-intro,
    .lead,
    .section-line h2,
    .conversation-heading
  ) {
  color: var(--ink);
}
[data-theme="dark"]
  :is(
    .field-help,
    .muted,
    .composer-note,
    .message-role,
    .context-section p,
    .run-meta,
    .eyebrow,
    .sidebar-label,
    .tool-card p,
    .file-row small,
    .inspector-heading span,
    .connection-dot,
    .local-label,
    .section-line > span,
    .chat-figure figcaption
  ) {
  color: #a4acc1;
}
[data-theme="dark"] :is(a, .quiet, .file-row) {
  color: #bfb4ff;
}
[data-theme="dark"]
  :is(
    .secondary,
    .example,
    .preparation-option,
    .tool-note,
    .research-link-card,
    .mode-switch
  ) {
  background: #252c3e;
  color: #ddd7ff;
  border-color: #414761;
}
[data-theme="dark"] .mode-switch button {
  color: #bac1d3;
}
[data-theme="dark"] .mode-switch button.selected {
  background: #3a3659;
  color: #f2edff;
}
[data-theme="dark"] .message.user .message-content {
  background: #2b2b47;
  color: #eeeaff;
  border-color: #42405e;
}
[data-theme="dark"]
  :is(.composer .agent-controls, #home-agent-host .agent-controls) {
  background: transparent;
}
[data-theme="dark"]
  :is(
    .composer .agent-controls select,
    #home-agent-host .agent-controls select
  ) {
  background: #30364a;
  color: #e4e6f0;
}
[data-theme="dark"]
  :is(
    .context-section,
    .composer-bottom,
    .file-row,
    .section-line,
    .conversation-heading,
    .installed-variants > div
  ) {
  border-color: var(--line);
}
[data-theme="dark"] .simulation-item {
  background: #232a3a;
  color: #ddd8f4;
  border-color: #414761;
}
[data-theme="dark"] .simulation-item.selected {
  background: #353051;
}
[data-theme="dark"] :is(.tool-status.installed, .run-state.succeeded) {
  background: #1f4037;
  color: #a6e1c2;
}
[data-theme="dark"] :is(.tool-status.not-installed, .run-state) {
  background: #303749;
  color: #c4ccdf;
}
[data-theme="dark"] .chat-figure {
  background: #e9ebf1;
}
[data-theme="dark"] .chat-figure figcaption {
  background: #1c2230;
}
[data-theme="dark"] .message-content :not(pre) > code {
  background: #30354b;
  color: #e2dcff;
}
[data-theme="dark"] dialog::backdrop {
  background: #050710b8;
}
[data-theme="dark"] #delete-error {
  color: #ffb3b9;
}
@media (max-width: 600px) {
  .topbar-right {
    gap: 5px;
  }
  #theme-toggle {
    font-size: 13px;
    padding: 5px;
  }
}
[data-theme="dark"] .message-content math[display="block"] {
  background: #24293b;
  border-color: #434963;
  color: #f0edff;
}
.message-content math {
  color: inherit;
}

.agent-switch-warning {
  margin: 8px 0;
  padding: 9px 12px;
  border: 1px solid #dfc689;
  border-radius: 7px;
  background: #fff8e6;
  color: #6e5423;
  font-size: 13px;
  line-height: 1.6;
}
[data-theme="dark"] .agent-switch-warning {
  background: #342e21;
  color: #efd7a2;
  border-color: #78643d;
}

.agent-switch-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
#dismiss-agent-switch-warning {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}

.agent-current-action,
.agent-update {
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.agent-update {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}
.agent-activity-meta {
  color: var(--muted);
  font-size: 13px;
}
.agent-activity-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.agent-activity-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.agent-activity-list strong {
  font-size: 14px;
  font-weight: 500;
}
.agent-activity-list small {
  color: var(--muted);
  font-size: 12px;
}
.agent-activity-list span {
  flex-basis: 100%;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.agent-activity-history summary {
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

/* Keep reopen controls outside the panels and preserve the saved splitter size. */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
#left-sidebar-toggle,
#right-sidebar-toggle {
  flex-shrink: 0;
}
html[data-left-collapsed] .sidebar {
  display: none;
}
html[data-left-collapsed] main {
  margin-left: 0;
}
html[data-right-collapsed] #research-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
}
html[data-right-collapsed] #research-layout::part(divider),
html[data-right-collapsed] #research-layout::part(end),
html[data-right-collapsed] #research-inspector {
  display: none;
}
html[data-right-collapsed] .conversation-column {
  padding-right: 0;
}
@media (max-width: 700px) {
  .topbar-left #breadcrumb {
    display: none;
  }
  .topbar-left {
    gap: 0;
  }
}

.tool-failure {
  color: var(--danger, #b04435);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Edge tabs remain reachable when panels are collapsed. */
.panel-edge-tab {
  position: fixed;
  z-index: 20;
  top: 48%;
  width: 20px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  box-shadow: 0 2px 7px #00000012;
  cursor: col-resize;
  touch-action: none;
  font-size: 23px;
  line-height: 1;
}
.panel-edge-tab:hover,
.panel-edge-tab:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}
#left-sidebar-toggle {
  left: calc(var(--navigation-width, 224px) - 10px);
}
#right-sidebar-toggle {
  left: calc(var(--inspector-edge, 100vw) - 10px);
}
#left-sidebar-resizer {
  position: fixed;
  z-index: 15;
  top: 0;
  bottom: 0;
  left: calc(var(--navigation-width, 224px) - 5px);
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}
#left-sidebar-resizer:hover,
#left-sidebar-resizer:focus-visible {
  background: #8070dc33;
}
html[data-left-collapsed] #left-sidebar-resizer {
  display: none;
}
html[data-left-collapsed] #left-sidebar-toggle {
  left: 0;
  border-radius: 0 8px 8px 0;
}
html[data-right-collapsed] #right-sidebar-toggle {
  left: auto;
  right: 0;
  border-radius: 8px 0 0 8px;
}
html.resizing-panels,
html.resizing-panels * {
  cursor: col-resize !important;
  user-select: none !important;
}
wa-split-panel.project-layout {
  --min: 0px;
  --max: 65%;
}
@media (min-width: 601px) {
  .sidebar {
    width: var(--navigation-width, 224px);
    flex-basis: var(--navigation-width, 224px);
  }
  main {
    margin-left: var(--navigation-width, 224px);
  }
}
@media (max-width: 1000px) {
  #right-sidebar-toggle {
    left: auto;
    right: 0;
    border-radius: 8px 0 0 8px;
  }
}
@media (max-width: 600px) {
  #left-sidebar-resizer {
    display: none;
  }
  #left-sidebar-toggle {
    left: 0;
    border-radius: 0 8px 8px 0;
  }
}

/* Routine controls live in navigation; the conversation keeps the vertical space. */
.sidebar {
  overflow-y: auto;
}
.sidebar-location {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.sidebar-utilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sidebar-utilities .quiet {
  color: #bbc3d7;
  font-size: 12px;
  padding: 5px 0;
  text-align: left;
}
.sidebar-status {
  border: 0;
  background: #2b2c43;
  color: #e1ddfa;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 12px;
  text-align: left;
}
.sidebar-status:disabled {
  opacity: 1;
  color: #a9c9b3;
  cursor: default;
}
.sidebar-notice {
  background: #252a3c;
  color: #c7cee0;
  border-radius: 7px;
  padding: 10px;
  font-size: 12px;
  max-height: 32vh;
  overflow: auto;
}
.sidebar-notice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-notice-heading button {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0 4px;
  font-size: 20px;
}
.sidebar-notice p {
  margin: 7px 0;
  line-height: 1.5;
}
.sidebar-notice summary {
  cursor: pointer;
}
.sidebar-notice pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  color: inherit;
}
.project-heading {
  margin-bottom: 12px;
}
@media (min-width: 1001px) {
  .project-view {
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  #research-layout {
    flex: 1;
    min-height: 0;
  }
  .conversation-column,
  .project-context {
    height: 100%;
    min-height: 0;
  }
  #readonly:not([hidden]) ~ .project-view {
    height: calc(100dvh - 64px);
  }
}
@media (max-width: 600px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(var(--navigation-width, 224px), calc(100vw - 44px));
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    padding: 22px 18px;
    gap: 0;
    box-shadow: 4px 0 20px #0003;
  }
  .sidebar .brand {
    margin: 0 0 22px;
  }
  .sidebar .brand small,
  .sidebar .sidebar-label {
    display: block;
  }
  .sidebar .new-project {
    width: 100%;
    font-size: 14px;
    padding: 10px 8px;
    margin-bottom: 18px;
  }
  .sidebar .new-project span {
    display: inline;
  }
  .sidebar nav {
    display: block;
    margin: 0;
  }
  .sidebar .nav-item {
    font-size: 14px;
    padding: 10px 8px;
  }
  .sidebar .project-list {
    display: block;
    min-height: 75px;
  }
  .sidebar .sidebar-runs {
    display: block;
  }
  .sidebar .sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  #left-sidebar-toggle {
    left: calc(min(var(--navigation-width, 224px), 100vw - 44px) - 10px);
  }
  html[data-left-collapsed] #left-sidebar-toggle {
    left: 0;
  }
}

/* Keep routine machine metadata out of the conversation navigation. */
.sidebar-bottom {
  padding-top: 12px;
}
.workspace-details {
  font-size: 13px;
  margin-top: 8px;
}
.workspace-details summary {
  cursor: pointer;
  color: var(--muted);
}
.workspace-details > div {
  margin-top: 10px;
}
.sidebar-bottom .workspace-details a {
  margin: 10px 0 0;
  font-size: 13px;
}
#study-stage {
  color: var(--muted);
  margin: 4px 0 18px;
}

.research-action-dialog { max-width: 42rem; width: calc(100% - 3rem); max-height: 85vh; overflow: auto; }
.research-action-dialog label { display: block; margin: 1rem 0; }
.research-action-dialog textarea { display: block; width: 100%; box-sizing: border-box; }
.inherit-file-list { max-height: 14rem; overflow: auto; }
.inherit-file-list label { overflow-wrap: anywhere; }
.inherit-file-list input { width: auto; margin-right: .5rem; }
.form-error { color: var(--danger, #b91c1c); }

.continuation-chat-context { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: .75rem; font-size: .9rem; }
.continuation-chat-context[hidden] { display: none; }

/* Machines: compact inventory, quiet live status, two-field onboarding. */
.machines-view { max-width: 1160px; }
.machines-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.machines-heading h1 { margin: 2px 0 6px; font-size: 34px; letter-spacing: -1.1px; }
.machines-heading .eyebrow { font-size: 11px; letter-spacing: .17em; margin: 0; }
.machines-heading .lead { font-size: 15px; margin: 0; color: var(--muted); }
.machines-heading > button { flex: 0 0 auto; padding: 11px 18px; font-size: 14px; border-radius: 9px; display: flex; align-items: center; gap: 7px; }
.machines-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 12px; }
.machines-summary { display: flex; gap: 18px; color: var(--muted); }
.machines-summary strong { color: var(--ink); font-weight: 600; margin-right: 4px; }
.machines-live { display: flex; gap: 7px; align-items: center; color: var(--muted); }
.machines-live button { font-size: 21px; line-height: 1; padding: 4px 6px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #42a47e; flex: 0 0 auto; }
.machines-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.execution-machine { background: var(--white); border: 1px solid var(--line); border-radius: 15px; padding: 22px; box-shadow: 0 2px 8px #22203e04; min-width: 0; display: flex; flex-direction: column; }
.machine-card-top { display: flex; gap: 12px; align-items: flex-start; }
.machine-glyph { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--soft); color: var(--accent); flex: 0 0 auto; }
.machine-glyph svg { width: 23px; height: 23px; }
.machine-card-name { flex: 1; min-width: 0; }
.machine-card-name h2 { font-size: 16px; font-weight: 650; margin: 0 0 3px; line-height: 1.4; overflow-wrap: anywhere; }
.machine-address-line { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.machine-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; border-radius: 20px; padding: 5px 9px; background: var(--soft); color: var(--muted); }
.machine-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.machine-status.ready { background: #e7f4ed; color: #28805c; }
.machine-status.preparing,.machine-status.setup_needed { background: #fcf1d9; color: #96701c; }
.machine-status.offline { background: #f7e9ed; color: #ad566a; }
.machine-status.stale { background: var(--soft); color: var(--muted); }
.machine-resources { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; padding: 19px 0 16px; margin: 17px 0 0; border-top: 1px solid var(--line); }
.machine-resource strong { display: block; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.4px; }
.machine-resource span { font-size: 11px; color: var(--muted); }
.machine-instruments { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 27px; margin-bottom: 13px; }
.machine-instrument { background: var(--soft); border-radius: 5px; font-size: 10px; padding: 3px 7px; color: var(--muted); }
.machine-instruments .no-instruments { color: var(--muted); font-size: 12px; }
.machine-runtime { display: flex; gap: 8px; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 15px; }
.machine-note { color: var(--muted); font-size: 12px; padding: 10px 12px; border-radius: 8px; background: var(--soft); margin: 0 0 12px; overflow-wrap: anywhere; }
.machine-note summary { font-size: 12px; cursor: pointer; }
.machine-note pre { font-size: 11px; max-height: 160px; overflow: auto; white-space: pre-wrap; margin-bottom: 0; }
.machine-card-bottom { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding-top: 13px; margin-top: auto; }
.machine-card-bottom button { font-size: 12px; padding: 7px 10px; border-radius: 7px; white-space: nowrap; }
.machine-card-bottom .settings-button { margin-left: auto; }
.machine-card-bottom .quiet { color: var(--muted); }
.machine-card-bottom .quiet:hover { color: var(--ink); background: var(--soft); }
.machines-footnote { display: flex; align-items: center; gap: 12px; padding: 22px 2px; color: var(--muted); }
.machines-footnote > span { color: var(--accent); font-size: 21px; }
.machines-footnote p { font-size: 12px; line-height: 1.6; margin: 0; }
.text-button { background: transparent; border: 0; padding: 0; color: var(--accent); font-size: inherit; margin-left: 9px; text-decoration: underline; text-underline-offset: 3px; }
.machine-empty { grid-column: 1 / -1; padding: 70px 25px; text-align: center; border: 1px dashed var(--line); border-radius: 16px; background: var(--white); }
.machine-empty h2 { font-size: 19px; margin: 15px 0 5px; }
.machine-empty p { color: var(--muted); font-size: 14px; }
.machine-dialog { padding: 26px; width: 540px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: var(--white); box-shadow: 0 24px 80px #15132d26; }
.machine-dialog::backdrop { background: #15132966; backdrop-filter: blur(3px); }
.machine-dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.machine-dialog-heading .eyebrow { font-size: 10px; letter-spacing: .13em; margin: 0 0 3px; }
.machine-dialog-heading h2 { font-size: 23px; margin: 0; letter-spacing: -.5px; }
.machine-dialog-heading > button { font-size: 25px; line-height: 1; padding: 3px; }
.machine-dialog-intro { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 14px 0 22px; }
.machine-form > label, .machine-advanced-fields label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 600; }
.machine-form input,.machine-form textarea,.machine-form select { width: 100%; padding: 10px 12px; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 400; margin: 0; }
.machine-form input:focus { border-color: var(--accent); }
.machine-form input::placeholder,.machine-form textarea::placeholder { color: var(--muted); font-size: 12px; }
.machine-form > .field-help { font-size: 11px; margin: 6px 0 18px; }
.machine-advanced { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 15px; }
.machine-advanced > summary { font-size: 12px; font-weight: 600; cursor: pointer; }
.machine-advanced > summary span { float: right; font-weight: 400; color: var(--muted); font-size: 11px; }
.machine-advanced-fields { display: grid; gap: 15px; padding-top: 18px; }
.machine-advanced-fields .two-fields { gap: 13px; }
.machine-advanced-fields .field-help { font-size: 11px; margin: -8px 0 0; }
.machine-dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); padding-top: 19px; margin-top: 23px; }
.machine-dialog-footer button { font-size: 13px; padding: 10px 15px; border-radius: 8px; }
.machine-form-error { color: var(--danger); font-size: 12px; padding: 10px; background: var(--soft); border-radius: 7px; }
.machine-jobs-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); padding: 22px; }
.machine-panel-heading { display: flex; justify-content: space-between; align-items: center; }
.machine-panel-heading h2 { font-size: 17px; margin: 0 0 15px; }
.machine-job-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; border-top: 1px solid var(--line); padding: 10px 0; font-size: 12px; }
.machine-job-row code { font-size: 11px; color: var(--muted); }
.machine-jobs-panel details { font-size: 12px; margin-top: 15px; }
.machine-jobs-panel pre { max-height: 300px; overflow: auto; font-size: 11px; }
[data-theme="dark"] .machine-status.ready { background: #1d3c30; color: #85d9af; }
[data-theme="dark"] .machine-status.preparing,[data-theme="dark"] .machine-status.setup_needed { background: #403620; color: #e9c579; }
[data-theme="dark"] .machine-status.offline { background: #432933; color: #eea1b5; }
@media (max-width: 1150px) { .machines-grid { grid-template-columns: 1fr; } }
@media (max-width: 650px) {
  .machines-heading { align-items: flex-start; gap: 12px; margin-bottom: 23px; }
  .machines-heading h1 { font-size: 27px; }
  .machines-heading .lead { font-size: 12px; }
  .machines-heading > button { font-size: 12px; padding: 9px 11px; }
  .machines-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .execution-machine { padding: 18px; }
  .machine-card-top { gap: 9px; }
  .machine-status { font-size: 10px; padding: 4px 7px; }
  .machine-card-name h2 { font-size: 14px; }
  .machine-dialog { padding: 22px; }
  .machine-card-bottom { flex-wrap: wrap; }
  .machine-form .two-fields { grid-template-columns: 1fr; }
}
.machine-dialog-heading h2 { font-family: inherit; font-weight: 650; }

/* Research tool catalog: browse first; setup and study actions live in the dialog. */
.research-tools-view { max-width: 1160px; }
.research-tools-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.research-tools-heading h1 { font-size: 34px; letter-spacing: -1.1px; margin: 2px 0 7px; }
.research-tools-heading .eyebrow { font-size: 11px; letter-spacing: .17em; margin: 0; }
.research-tools-heading .lead { font-size: 14px; color: var(--muted); margin: 0; }
.research-tools-heading > button { font-size: 12px; white-space: nowrap; padding: 10px 14px; border-radius: 9px; }
.tool-collection-note { border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 13px 16px; margin-bottom: 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.tool-catalog-toolbar { display: flex; gap: 12px; align-items: stretch; }
.tool-search-field { position: relative; flex: 1; min-width: 0; }
.tool-search-field svg { position: absolute; width: 19px; height: 19px; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.tool-search-field input { width: 100%; height: 46px; border-radius: 10px; padding-left: 44px; font-size: 13px; }
.tool-catalog-toolbar select { width: 205px; border-radius: 10px; font-size: 12px; }
.tool-catalog-filters { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 15px 0 8px; flex-wrap: wrap; }
.tool-filter-group { display: flex; flex-wrap: wrap; gap: 5px; }
.tool-filter-group button { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 8px; padding: 8px 12px; font-size: 12px; }
.tool-filter-group button[aria-pressed="true"] { background: var(--soft); color: var(--accent); border-color: var(--line); font-weight: 600; }
#tool-results-count { color: var(--muted); font-size: 11px; }
.tool-search-empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line); border-radius: 13px; margin-top: 24px; }
.tool-search-empty h2 { font-family: inherit; font-weight: 600; font-size: 17px; }
.tool-search-empty p { color: var(--muted); font-size: 13px; }
.tool-search-empty button { font-size: 12px; }
.research-tools-view .inventory-heading { margin: 27px 0 13px; align-items: center; }
.research-tools-view .inventory-heading h2 { font-size: 15px; letter-spacing: -.1px; }
.research-tools-view .inventory-heading p { font-size: 11px; }
.research-tools-view .count-badge { font-size: 10px; padding: 2px 7px; background: var(--soft); color: var(--muted); }
.research-tool-grid { align-items: stretch; gap: 16px; }
.research-tool-card { position: relative; border: 1px solid var(--line); border-radius: 13px; padding: 20px; background: var(--white); display: flex; flex-direction: column; min-width: 0; min-height: 220px; box-shadow: 0 2px 8px #22203e03; transition: border-color .15s, box-shadow .15s; }
.research-tool-card:hover { border-color: var(--accent); box-shadow: 0 5px 18px #22203e0b; }
.research-tool-card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.tool-card-open { align-self: flex-start; padding: 0; margin-top: auto; border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 600; }
.tool-card-open::after { content: ""; position: absolute; inset: 0; border-radius: 13px; }
.tool-card-open:focus-visible { outline: none; }
.research-tool-card[data-category="Fluids & MHD"] .research-tool-icon { background: #e5f2f8; color: #277393; }
.research-tool-card[data-category="Materials & radiation"] .research-tool-icon { background: #fbf0e0; color: #996922; }
.research-tool-card[data-category="Analysis & data"] .research-tool-icon { background: #e7f3eb; color: #2f7c59; }
.research-tool-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 13px; }
.research-tool-icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: var(--soft); color: var(--accent); display: grid; place-items: center; font: 600 12px ui-monospace,SFMono-Regular,Consolas,monospace; }
.research-tool-name { flex: 1; min-width: 0; }
.research-tool-name h3 { margin: 0 0 4px; font-family: inherit; font-size: 14px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.research-tool-name small { color: var(--muted); font-size: 10px; display: block; }
.research-tool-card .tool-status { margin-left: auto; font-size: 9px; padding: 4px 7px; border-radius: 20px; white-space: nowrap; font-weight: 600; }
.research-tool-card .tool-status.installed { color: #28805c; background: #e7f4ed; }
.research-tool-card .tool-status.not-installed { color: var(--muted); background: var(--soft); }
.research-tool-card .tool-status.working { color: #7861c0; background: #eeeafa; }
.research-tool-card .tool-status.attention { color: #9b681b; background: #fcf1d9; }
.research-tool-description { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0 0 12px; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.research-tool-note { font-size: 10px; color: var(--muted); margin-bottom: 15px; min-height: 16px; }
.research-tool-note.attention { color: #9b681b; }
/* Tool setup: live stages, measured estimates and installer output. */
.research-tool-card[data-state="working"] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 6px 22px #6658d914; }
.research-tool-card[data-state="attention"] { border-color: #e6c58a; background: linear-gradient(180deg, #fffaf0 0, var(--white) 70px); }
.tool-status.working::before, #tool-detail-state.working::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: tool-pulse 1.4s ease-in-out infinite; }
#tool-detail-state { font-size: 11px; padding: 4px 9px; border-radius: 20px; white-space: nowrap; font-weight: 600; }
#tool-detail-state:empty { display: none; }
#tool-detail-state.installed { color: #28805c; background: #e7f4ed; }
#tool-detail-state.not-installed { color: var(--muted); background: var(--soft); }
#tool-detail-state.working { color: #6a52b8; background: #eeeafa; }
#tool-detail-state.attention { color: #9b681b; background: #fcf1d9; }
.tool-detail-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-run { display: grid; gap: 8px; margin: 2px 0 16px; padding: 12px; border-radius: 10px; background: var(--soft); }
.tool-run.large { padding: 18px; gap: 11px; margin: 0 0 20px; border: 1px solid var(--line); background: var(--white); }
.tool-run-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 11px; color: var(--ink); font-weight: 600; }
.tool-run.large .tool-run-head { font-size: 13px; }
.tool-run-time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tool-bar { display: flex; gap: 4px; height: 6px; }
.tool-run.large .tool-bar { height: 8px; }
.tool-bar-segment { position: relative; flex: 1; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tool-bar-segment.done { background: var(--accent); }
.tool-bar-segment.active::after { content: ""; position: absolute; inset: 0; width: 45%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: tool-sweep 1.6s ease-in-out infinite; }
.tool-bar-segment.measured::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--fill, 0%); border-radius: inherit; background: var(--accent); transition: width .9s linear; }
.tool-run-meta { font-size: 11px; color: var(--muted); }
.tool-run-activity { font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 4px; padding: 0; }
.tool-steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; color: var(--muted); }
.tool-steps strong { font-size: 12px; font-weight: 600; }
.tool-steps small { grid-column: 2; font-size: 10px; }
.tool-step-mark { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; border: 1.5px solid var(--line); background: var(--white); }
.tool-steps li.done { color: var(--ink); }
.tool-steps li.done .tool-step-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.tool-steps li.active { color: var(--ink); }
.tool-steps li.active .tool-step-mark { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.tool-callout { border-radius: 10px; padding: 14px 16px; margin: 0 0 20px; font-size: 12px; line-height: 1.6; border: 1px solid; }
.tool-callout > strong { display: block; font-size: 13px; margin-bottom: 6px; }
.tool-callout p { margin: 6px 0 0; }
.tool-callout.attention { background: #fff8eb; border-color: #f0d49e; color: #6f4a12; }
.tool-callout.ready { background: #eef8f2; border-color: #bfe3cd; color: #1f5d43; }
.tool-callout ul.tool-failure { margin: 0; padding-left: 18px; color: #8a3b2c; white-space: normal; }
.tool-callout ul.tool-failure li + li { margin-top: 6px; }
.tool-callout ul.tool-failure small { display: block; color: #6f4a12; font-size: 11px; margin-top: 2px; }
.tool-callout-help { color: #7a5a24; font-size: 11px; }
.tool-explainer { margin: 4px 0 4px; padding: 13px 15px; border-radius: 10px; border: 1px dashed var(--line); font-size: 12px; line-height: 1.6; color: var(--muted); }
.tool-explainer strong { color: var(--ink); font-size: 12px; }
.tool-explainer p { margin: 4px 0 0; font-size: 12px; line-height: 1.65; }
.tool-details-body details.tool-console { padding-top: 14px; }
.tool-console-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0 8px; font-size: 11px; color: var(--muted); }
.tool-console-bar button { font-size: 11px; padding: 5px 9px; }
.tool-details-body pre.tool-console-log { background: #12141f; color: #d6dae6; max-height: 320px; min-height: 90px; border-radius: 9px; padding: 13px 14px; white-space: pre-wrap; }
.tool-console-foot { font-size: 10px; color: var(--muted); margin: 8px 0 0; overflow-wrap: anywhere; }
.danger-text { color: #b04435; }
.nav-activity { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); box-shadow: 0 0 0 0 #8f80f080; animation: tool-ring 1.8s ease-out infinite; }
@keyframes tool-sweep { from { transform: translateX(-110%); } to { transform: translateX(230%); } }
@keyframes tool-pulse { 50% { opacity: .35; } }
@keyframes tool-ring { 70% { box-shadow: 0 0 0 6px #8f80f000; } 100% { box-shadow: 0 0 0 0 #8f80f000; } }
@media (prefers-reduced-motion: reduce) {
  .tool-bar-segment.active::after { animation: none; width: 100%; opacity: .45; }
  .tool-status.working::before, #tool-detail-state.working::before, .nav-activity { animation: none; }
}
[data-theme="dark"] .research-tool-card[data-state="attention"] { border-color: #6b5626; background: linear-gradient(180deg, #2c2717 0, var(--white) 70px); }
[data-theme="dark"] .tool-callout.attention { background: #2c2717; border-color: #6b5626; color: #ecd8a8; }
[data-theme="dark"] .tool-callout ul.tool-failure { color: #f0a594; }
[data-theme="dark"] .tool-callout ul.tool-failure small, [data-theme="dark"] .tool-callout-help { color: #d9c08a; }
[data-theme="dark"] .tool-callout.ready { background: #17302a; border-color: #2c5a49; color: #a9e3c7; }
[data-theme="dark"] #tool-detail-state.installed { color: #85d9af; background: #1d3c30; }
[data-theme="dark"] #tool-detail-state.working { color: #bfb1f2; background: #342c4c; }
[data-theme="dark"] #tool-detail-state.attention { color: #e9c579; background: #403620; }
[data-theme="dark"] .tool-details-body pre.tool-console-log { background: #0b0d14; }
[data-theme="dark"] .danger-text { color: #f0a594; }
@media (max-width: 650px) {
  .tool-steps { grid-template-columns: 1fr; }
  .tool-run.large { padding: 14px; }
}
.research-tools-footnote { font-size: 11px; color: var(--muted); padding-top: 22px; margin: 0; line-height: 1.7; }
.tool-details-dialog { width: 730px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--ink); box-shadow: 0 24px 80px #15132d26; }
.tool-details-dialog[open] { display: flex; flex-direction: column; }
.tool-details-dialog::backdrop { background: #15132966; backdrop-filter: blur(3px); }
.tool-dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 26px 19px; gap: 15px; border-bottom: 1px solid var(--line); }
.tool-dialog-heading .eyebrow { font-size: 10px; letter-spacing: .14em; margin: 0 0 4px; }
.tool-dialog-heading h2 { font: inherit; font-size: 22px; font-weight: 650; letter-spacing: -.4px; margin: 0; }
.tool-dialog-heading > button { font-size: 25px; line-height: 1; padding: 3px; }
.tool-details-body { padding: 20px 26px; overflow-y: auto; min-height: 0; }
.tool-details-body > p { font-size: 13px; line-height: 1.7; margin: 0 0 14px; color: var(--muted); }
.tool-about-heading { font-size: 13px; margin: 0 0 10px; }
.tool-detail-note { background: var(--soft); padding: 11px 13px; border-radius: 8px; font-size: 12px; line-height: 1.6; color: var(--muted); margin-bottom: 18px; }
.tool-detail-note.attention { color: #9b681b; }
.tool-details-body details { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 17px; }
.tool-details-body summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.tool-details-body .installed-variants > div { border-bottom: 1px solid var(--line); padding: 13px 0; }
.tool-details-body .installed-variants strong { font-size: 12px; font-weight: 600; display: block; }
.tool-details-body .installed-variants p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 5px 0 8px; }
.tool-details-body code { font-size: 11px; background: var(--soft); padding: 4px 6px; border-radius: 5px; overflow-wrap: anywhere; display: inline-block; }
.tool-details-body pre { font: 11px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; white-space: pre-wrap; overflow: auto; max-height: 300px; padding: 13px; background: var(--soft); border-radius: 8px; margin-bottom: 0; overflow-wrap: anywhere; }
.tool-dialog-footer { border-top: 1px solid var(--line); padding: 15px 26px; }
.tool-dialog-footer span { font-size: 11px; color: var(--muted); }
.tool-dialog-footer button { font-size: 12px; padding: 9px 12px; border-radius: 8px; }
.tool-detail-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-detail-actions:has(button:not([hidden])) { margin-top: 12px; }
#tool-detail-options { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; margin: 0; }
#tool-detail-options:empty { display: none; }
#tool-detail-options select { flex: 1 1 210px; min-width: 0; font-size: 12px; }
#tool-detail-action { margin-left: auto; }
#custom-tool-form { display: grid; gap: 17px; }
[data-theme="dark"] .research-tool-card .tool-status.installed { color: #85d9af; background: #1d3c30; }
[data-theme="dark"] .research-tool-card .tool-status.working { color: #bfb1f2; background: #342c4c; }
[data-theme="dark"] .research-tool-card .tool-status.attention { color: #e9c579; background: #403620; }
[data-theme="dark"] .research-tool-note.attention,[data-theme="dark"] .tool-detail-note.attention { color: #e9c579; }
[data-theme="dark"] .research-tool-card[data-category="Fluids & MHD"] .research-tool-icon { background: #203747; color: #9ccde5; }
[data-theme="dark"] .research-tool-card[data-category="Materials & radiation"] .research-tool-icon { background: #403620; color: #e9c579; }
[data-theme="dark"] .research-tool-card[data-category="Analysis & data"] .research-tool-icon { background: #1d3c30; color: #85d9af; }
@media (max-width: 1150px) { .research-tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 650px) {
  .research-tools-heading { align-items: flex-start; gap: 12px; flex-direction: column; }
  .research-tools-heading h1 { font-size: 27px; }
  .research-tools-heading .lead { font-size: 12px; }
  .research-tool-grid { grid-template-columns: 1fr; }
  .tool-catalog-toolbar { flex-direction: column; }
  .tool-catalog-toolbar select { width: 100%; }
  .research-tools-view .inventory-heading p { display: none; }
  .tool-dialog-heading { padding: 20px; }
  .tool-details-body { padding: 16px 20px; }
  .tool-dialog-footer { padding: 14px 20px; }
}

/* Benchmarks: compact tasks, comparable trials and measurable tradeoffs. */
.benchmark-view { max-width: 1480px; min-width: 0; }
.benchmark-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.benchmark-heading h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.15; letter-spacing: -1.1px; }
.benchmark-heading .lead { margin: 0; font-size: 14px; color: var(--muted); max-width: 590px; }
.benchmark-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 5px; }
.benchmark-actions button { font-size: 12px; padding: 9px 12px; border-radius: 9px; white-space: nowrap; }
.benchmark-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 28px; }
.benchmark-stat { border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 16px 20px; }
.benchmark-stat strong { display: block; color: var(--accent); font-size: 28px; font-weight: 650; line-height: 1.3; font-variant-numeric: tabular-nums; }
.benchmark-stat span { font-size: 12px; color: var(--muted); }
.benchmark-view .inventory-heading { margin-bottom: 14px; gap: 20px; }
.benchmark-view .inventory-heading h2 { margin: 0; font-size: 18px; }
.benchmark-view .field-help { font-size: 12px; line-height: 1.65; }
.benchmark-view .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 14px; }
.benchmark-view .tool-card { border-radius: 12px; padding: 19px 22px; background: var(--white); }
.benchmark-view .tool-card h2 { font-size: 16px; margin: 0 0 7px; }
.benchmark-view .tool-card p { font-size: 12px; color: var(--muted); margin: 0 0 15px; }
.benchmark-view .tool-card button { padding: 9px 14px; font-size: 12px; border-radius: 8px; border: 0; background: var(--accent); color: #fff; font-weight: 600; width: auto; }
.benchmark-explainer { font-size: 12px; color: var(--muted); max-width: 900px; margin: 13px 0 26px; }
.benchmark-board { padding: 23px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); margin-bottom: 18px; min-width: 0; }
.benchmark-filter { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); }
.benchmark-filter select { font-size: 12px; padding: 7px 9px; max-width: 390px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.benchmark-table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.benchmark-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.5; }
.benchmark-table th { text-align: left; white-space: nowrap; background: var(--soft); color: var(--muted); font-size: 10px; font-weight: 600; padding: 12px 15px; letter-spacing: .2px; }
.benchmark-table td { padding: 14px 15px; border-top: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.benchmark-table td strong { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; }
.benchmark-table td small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.benchmark-table td:not(:first-child) { min-width: 85px; }
.benchmark-badge { display: inline-block; padding: 4px 8px; background: var(--soft); color: var(--muted); border-radius: 6px; font-size: 10px; white-space: nowrap; }
.benchmark-badge.frontier { color: var(--accent); border: 1px solid var(--accent); background: var(--paper); }
.benchmark-tradeoff-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 25px 0 3px; }
.benchmark-tradeoff-heading h3 { font-size: 15px; margin: 0; }
#benchmark-tradeoff svg { display: block; width: 100%; max-height: 400px; }
#benchmark-tradeoff svg text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.benchmark-gridline { stroke: var(--line); stroke-width: 1; }
.benchmark-dot { cursor: pointer; stroke: var(--white); stroke-width: 2; }
.benchmark-dot.frontier { stroke: var(--ink); stroke-width: 2; }
.benchmark-dot:focus { outline: none; stroke-width: 4; stroke: var(--accent); }
.benchmark-highlight { background: var(--soft); }
.benchmark-empty { border: 1px dashed var(--line); border-radius: 11px; background: var(--paper); padding: 30px 24px; text-align: center; }
.benchmark-empty-icon { font-size: 27px; color: var(--accent); }
.benchmark-empty h3 { font-size: 15px; margin: 3px 0 6px; }
.benchmark-empty p { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 12px; }
.benchmark-details { background: var(--white); border: 1px solid var(--line); border-radius: 11px; margin: 12px 0; padding: 15px 20px; }
.benchmark-details summary { font-size: 13px; font-weight: 600; cursor: pointer; }
.benchmark-details summary span { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 8px; }
.benchmark-details pre { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; max-height: 450px; }
@media (max-width: 1000px) {
  .benchmark-heading { flex-direction: column; gap: 12px; }
  .benchmark-board .inventory-heading { align-items: flex-start; flex-direction: column; }
  .benchmark-filter { width: 100%; }
  .benchmark-filter select { flex: 1; min-width: 0; }
}
@media (max-width: 650px) {
  .benchmark-heading h1 { font-size: 27px; }
  .benchmark-overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .benchmark-stat { padding: 12px 15px; }
  .benchmark-view .tool-grid { grid-template-columns: 1fr; }
  .benchmark-board { padding: 16px; }
  .benchmark-empty { padding: 23px 16px; }
  .benchmark-details { padding: 13px 15px; }
  .benchmark-tradeoff-heading .field-help { font-size: 10px; }
  #benchmark-tradeoff svg text { font-size: 22px; }
  .benchmark-dot { r: 11px; }
}
.benchmark-campaigns { display: grid; gap: 12px; margin: 18px 0; }
.benchmark-campaign { padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); display: grid; gap: 8px; }
.benchmark-campaign progress { width: 100%; height: 8px; accent-color: var(--accent); }
.benchmark-campaign p { margin: 0; }
.benchmark-run-dialog { width: min(580px, calc(100vw - 32px)); }
.benchmark-run-dialog form { display: grid; gap: 16px; }
.benchmark-run-dialog fieldset { border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; }
.benchmark-run-dialog fieldset label { display: flex; align-items: center; gap: 10px; }
.benchmark-run-dialog fieldset input { width: auto; }

/* The published leaderboard leads; trial preparation lives in the workbench. */
.benchmark-publication-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 0 18px; color:var(--muted); font-size:12px; }
.benchmark-publication-bar p { margin:0; }
.benchmark-publication-bar label { display:flex; align-items:center; gap:10px; white-space:nowrap; }
.benchmark-publication-bar select,.benchmark-controls select,.benchmark-controls input { background:var(--white); color:var(--ink); border:1px solid var(--line); border-radius:8px; padding:9px 10px; font-size:12px; }
.benchmark-overview { margin-bottom:20px; }
.benchmark-task-tabs { display:flex; gap:6px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--paper); }
.benchmark-task-tab { background:transparent; border:0; border-radius:7px; padding:9px 13px; font-size:12px; color:var(--muted); }
.benchmark-task-tab[aria-pressed="true"] { background:var(--white); color:var(--accent); box-shadow:0 1px 4px #0000000d; font-weight:600; }
.benchmark-task-brief { border-bottom:1px solid var(--line); padding:0 0 18px; margin-bottom:18px; }
.benchmark-task-brief p { margin:0 0 8px; max-width:850px; font-size:13px; line-height:1.7; }
.benchmark-task-brief span { display:inline-block; color:var(--muted); font-size:11px; margin-right:20px; }
.benchmark-controls { display:grid; grid-template-columns:minmax(180px,1.2fr) repeat(3,minmax(135px,1fr)); gap:12px; }
.benchmark-controls label { display:grid; gap:7px; color:var(--muted); font-size:11px; }
.benchmark-controls input,.benchmark-controls select { width:100%; min-width:0; }
#benchmark-tradeoff { position:relative; border:1px solid var(--line); border-radius:12px; background:var(--paper); margin-top:12px; }
#benchmark-tradeoff svg { max-height:470px; }
#benchmark-tradeoff .benchmark-axis-title { font-size:12px; font-weight:500; }
#benchmark-tradeoff .benchmark-effort-label { font-size:10px; font-weight:600; paint-order:stroke; stroke:var(--paper); stroke-width:3px; }
.benchmark-official-dot { cursor:pointer; transition:stroke-width .1s; }
.benchmark-official-dot:hover,.benchmark-official-dot:focus { stroke-width:4; outline:none; }
.benchmark-plot-tooltip { position:absolute; top:12px; right:12px; display:grid; gap:5px; max-width:340px; padding:12px 15px; border:1px solid var(--line); border-radius:9px; background:var(--white); box-shadow:0 4px 20px #00000010; pointer-events:none; }
.benchmark-plot-tooltip strong { font-size:12px; }.benchmark-plot-tooltip span { font-size:12px; }.benchmark-plot-tooltip small { font-size:10px; color:var(--muted); }
.benchmark-series-legend { display:flex; flex-wrap:wrap; gap:8px 18px; margin:12px 0 24px; }
.benchmark-series-button { display:flex; align-items:center; gap:7px; padding:3px 0; background:transparent; border:0; color:var(--muted); font-size:11px; }
.benchmark-series-swatch { display:block; width:10px; height:10px; border:0; border-radius:50%; }
.benchmark-model-identity { min-width:200px; }
.benchmark-model-identity details { margin-top:7px; }.benchmark-model-identity summary { font-size:10px; color:var(--muted); cursor:pointer; }
.benchmark-model-identity details[open] { min-width:680px; }
.benchmark-model-identity details table { margin:10px 0; }.benchmark-model-identity details th { font-size:9px; }
.benchmark-table td a { display:block; color:var(--muted); font-size:10px; margin-top:3px; text-decoration:underline; text-underline-offset:2px; }
.benchmark-table td:first-child { width:42px; min-width:42px; }
.benchmark-sort-heading { padding:0; border:0; background:transparent; color:inherit; font-size:inherit; font-weight:inherit; text-align:left; }
.benchmark-submit-link { display:inline-flex; align-items:center; text-decoration:none; padding:9px 12px; border-radius:9px; font-size:12px; color:var(--accent); border:1px solid var(--line); background:var(--white); }
.benchmark-rank-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:20px 0 0; }
.benchmark-rank-card { background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:16px; min-width:0; }
.benchmark-rank-card h3 { margin:0 0 5px; font-size:14px; }
.benchmark-rank-card > p { margin:0 0 12px; font-size:11px; }
.benchmark-bar-scroll { max-height:380px; overflow-y:auto; scrollbar-width:thin; padding-right:5px; }
.benchmark-bar-axis { display:flex; justify-content:space-between; position:sticky; top:0; z-index:1; padding:0 0 9px; background:var(--paper); color:var(--muted); font-size:10px; }
.benchmark-bar-axis span:first-child { margin-left:calc(40% + 28px); }
.benchmark-bar-list { list-style:none; margin:0; padding:0; display:grid; gap:3px; }
.benchmark-bar-row { display:grid; grid-template-columns:22px minmax(105px,1.25fr) minmax(45px,1fr) 96px; align-items:center; gap:8px; min-height:43px; padding:4px 2px; border-radius:5px; cursor:pointer; }
.benchmark-bar-row:hover,.benchmark-bar-row:focus { background:var(--soft); outline:1px solid var(--line); }
.benchmark-bar-rank { color:var(--muted); font-size:10px; text-align:right; }
.benchmark-bar-label { min-width:0; }.benchmark-bar-label strong { display:block; font-size:10px; font-weight:550; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.benchmark-bar-label small { display:block; color:var(--muted); font-size:9px; }
.benchmark-bar-track { display:flex; align-items:center; height:11px; background:var(--line); border-radius:3px; }
.benchmark-bar-fill { display:block; height:11px; border-radius:3px; min-width:0; }
.benchmark-bar-fill.partial { opacity:.5; background-image:repeating-linear-gradient(135deg,transparent,transparent 3px,#ffffff80 3px,#ffffff80 6px); }
.benchmark-bar-value { text-align:right; font-size:10px; font-variant-numeric:tabular-nums; }
.benchmark-bar-row.unfinished { background:color-mix(in srgb, #dc524c 7%, transparent); }
.benchmark-bar-row.unfinished .benchmark-bar-value,.benchmark-bar-row.unfinished .benchmark-bar-label strong,.benchmark-unfinished td:nth-child(4) strong { color:#dc524c; }
#benchmark-bar-note { margin:8px 0 0; font-size:11px; }
#benchmark-tradeoff .benchmark-better-corner { fill:var(--accent); font-size:11px; font-weight:650; }
.benchmark-pareto-front { pointer-events:none; }
.benchmark-view [hidden] { display:none !important; }
.benchmark-stat { padding:12px 16px; }.benchmark-stat strong { font-size:25px; }
.benchmark-task-brief { padding-bottom:12px; margin-bottom:14px; }
.benchmark-controls label { margin:0; padding:0; line-height:1.4; }
.benchmark-tradeoff-heading { margin-top:18px; align-items:flex-start; }
.benchmark-tradeoff-heading > div { flex:1; min-width:0; }
.benchmark-tradeoff-heading p { margin:4px 0 0; line-height:1.5; max-width:870px; }
.benchmark-tradeoff-heading .benchmark-filter { width:auto; margin:0; }
#benchmark-tradeoff svg { max-height:360px; }
@media(max-width:950px) {
  .benchmark-rank-grid { grid-template-columns:1fr; }
  .benchmark-publication-bar { align-items:flex-start; flex-direction:column; gap:12px; }
  .benchmark-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
  .benchmark-task-tabs { width:100%; }.benchmark-task-tab { flex:1; padding:8px; font-size:11px; }
  .benchmark-task-brief span { display:block; margin-top:5px; }
  .benchmark-controls { gap:10px; }
  #benchmark-tradeoff { overflow-x:auto; }
  #benchmark-tradeoff svg { min-width:650px; }
  #benchmark-tradeoff svg text { font-size:12px; }
  .benchmark-plot-tooltip { position:sticky; right:auto; top:auto; margin:8px; }
}

.benchmark-methodology-link { display:block; width:fit-content; margin:8px 0 0 auto; color:var(--muted); font-size:11px; text-decoration:underline; text-underline-offset:3px; }

/* Wider fallback system fonts must not wrap sidebar labels or misalign cards. */
.new-project { white-space: nowrap; overflow: hidden; font-size: 13.5px; letter-spacing: -.2px; gap: 8px; padding-inline: 12px; }
.new-project span { overflow: hidden; text-overflow: ellipsis; }
.nav-item { white-space: nowrap; font-size: 15px; }
.example { display: flex; flex-direction: column; justify-content: flex-start; }
.example p { max-width: none; }
.example .arrow { margin-top: auto; }

.project-heading-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.subagent-panel { position: relative; }
.subagent-panel summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.subagent-panel summary::-webkit-details-marker { display: none; }
.subagent-panel summary:hover, .subagent-panel[open] summary { background: var(--surface-soft); }
#subagent-count { color: var(--accent); font-variant-numeric: tabular-nums; }
#subagent-list {
  position: absolute;
  z-index: 12;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  width: min(305px, calc(100vw - 32px));
  max-height: min(360px, 50vh);
  overflow: auto;
  padding: 5px;
  background: var(--surface, white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px #20233226;
}
.subagent-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}
.subagent-row span { overflow-wrap: anywhere; }
.subagent-row small { flex: none; color: var(--muted); }
.subagent-row[data-status="running"] small { color: var(--accent); }
.subagent-row:hover, .subagent-row:focus-visible { background: var(--surface-soft); }
.message-content.live-answer { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .project-heading-controls { width: 100%; justify-content: space-between; gap: 5px; }
  .subagent-panel { margin-inline-start: auto; }
}
