:root {
  color-scheme: light dark;
  --bg: #f8f6f1;
  --surface: #fffdf9;
  --sidebar: #f0ede5;
  --raised: #f3f0e8;
  --ink: #1c2422;
  --muted: #5f6a65;
  --faint: #89918c;
  --line: #e3dfd4;
  --line-strong: #cfcabc;
  --accent: #0f6660;
  --accent-hover: #0b524d;
  --on-accent: #ffffff;
  --accent-soft: #dcefec;
  --accent-text: #0c5a55;
  --warn: #8a5300;
  --warn-soft: #fbf0d9;
  --warn-line: #ecd6a6;
  --danger: #ad3227;
  --danger-soft: #fbe7e3;
  --danger-line: #f1c6bf;
  --ok: #24724a;
  --shadow: 0 1px 2px rgb(40 35 20 / 8%), 0 4px 16px rgb(40 35 20 / 6%);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Charts: one emphasis hue and a context grey, checked for colour-blind separation and
     contrast against --surface in both themes. */
  --viz-accent: #2a78d6;
  --viz-context: #89918c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141917;
    --surface: #1b211f;
    --sidebar: #101412;
    --raised: #232b28;
    --ink: #e8ece9;
    --muted: #a3aea9;
    --faint: #76817c;
    --line: #2b3431;
    --line-strong: #3d4945;
    --accent: #3fb2a7;
    --accent-hover: #5cc5ba;
    --on-accent: #06211e;
    --accent-soft: #17332f;
    --accent-text: #7fd6cc;
    --warn: #e9b25c;
    --warn-soft: #2d2415;
    --warn-line: #54421f;
    --danger: #f08a7d;
    --danger-soft: #331d1a;
    --danger-line: #5c2f29;
    --ok: #6fce9b;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
    --viz-accent: #3987e5;
    --viz-context: #76817c;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: -0.012em; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 600; }
a { color: var(--accent-text); }
code, pre { font-family: var(--mono); font-size: 12.5px; }
pre {
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  max-height: 340px;
  border-radius: 7px;
  background: var(--raised);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button, input, select, textarea { font: inherit; color: inherit; }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
button:hover:not(:disabled) { background: var(--raised); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger { color: var(--danger); border-color: var(--danger-line); }
button.danger:hover:not(:disabled) { background: var(--danger-soft); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover:not(:disabled) { background: var(--raised); color: var(--ink); }
button.small { min-height: 27px; padding: 2px 9px; font-size: 12.5px; }

input, select, textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
}
select { padding-right: 6px; }
textarea { resize: none; line-height: 1.5; }
label { display: grid; gap: 4px; font-size: 13px; font-weight: 550; }
label .hint, .hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }

/* ------------------------------------------------------------------ frame */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); height: 100vh; }
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 10px 10px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 6px 12px; color: inherit; font-weight: 680; font-size: 16px; text-decoration: none; }
.new-task { width: 100%; margin-bottom: 12px; }
.section-label {
  padding: 4px 8px;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.task-list { flex: 1; min-height: 0; overflow-y: auto; }
.task-link, .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 450;
  text-align: left;
  text-decoration: none;
}
.task-link:hover, .nav-link:hover { background: var(--raised); }
.task-link.active, .nav-link.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 560; }
.task-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.RUNNING, .dot.QUEUED { background: var(--accent); animation: pulse 1.3s ease-in-out infinite; }
.dot.WAITING_APPROVAL, .dot.WAITING_USER { background: #d9962c; }
.dot.COMPLETED { background: var(--ok); }
.dot.SLEEPING { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.dot.FAILED { background: var(--danger); }
.nav { display: grid; gap: 1px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.count {
  margin-left: auto;
  min-width: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--raised);
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}
.count.alert { background: #d9962c; color: #241700; font-weight: 650; }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .dot.RUNNING, .dot.QUEUED, .spinner { animation: none; }
}

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 22px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head select { width: auto; max-width: 250px; padding: 4px 6px; font-size: 13px; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; }
.column { width: 100%; max-width: 780px; margin: 0 auto; padding: 22px 24px 28px; }
.column.wide { max-width: 940px; }

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--warn-line);
  border-radius: 9px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13.5px;
}
.banner > span { flex: 1; }

/* ------------------------------------------------------------------- home */
.home { display: flex; flex-direction: column; justify-content: center; flex: 1; min-height: 0; overflow-y: auto; }
.home-inner { display: grid; gap: 18px; width: 100%; max-width: 680px; margin: 0 auto; padding: 24px; }
.home h1 { font-size: 27px; }
.home .lede { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border-radius: 16px; color: var(--muted); font-weight: 450; }

/* --------------------------------------------------------------- composer */
.composer-wrap { padding: 10px 24px 16px; }
.composer {
  width: 100%;
  max-width: 732px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.composer:focus-within { border-color: var(--accent); }
.composer textarea { display: block; padding: 12px 14px 4px; border: 0; background: transparent; outline: none; max-height: 220px; }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px 12px; }
.composer-bar select { width: auto; max-width: 300px; padding: 3px 4px; border-color: transparent; background: transparent; color: var(--muted); font-size: 13px; }
.composer-bar .spacer { flex: 1; }
.home .composer-wrap { padding: 0; }
.home .composer { max-width: none; }

/* --------------------------------------------------------------- timeline */
.timeline { display: grid; gap: 12px; }
.bubble-user {
  justify-self: end;
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 13px 13px 3px 13px;
  background: var(--accent-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reply { display: grid; gap: 4px; }
.prose { display: grid; gap: 9px; overflow-wrap: anywhere; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; }
.prose li + li { margin-top: 3px; }
.prose h1, .prose h2, .prose h3 { font-size: 15.5px; font-weight: 650; }
.prose :not(pre) > code { padding: 1px 4px; border-radius: 4px; background: var(--raised); }
.caption { color: var(--faint); font-size: 12px; }
.steps { display: grid; gap: 2px; }
.step { border-radius: 7px; }
.step-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-height: 29px;
  padding: 3px 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 450;
  text-align: left;
  white-space: normal;
}
.step-row:hover:not(:disabled) { color: var(--ink); }
.step-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-mark { flex: none; width: 16px; text-align: center; font-weight: 700; }
.step.done .step-mark { color: var(--ok); }
.step.failed .step-mark, .step.blocked .step-mark { color: var(--danger); }
.step.waiting .step-mark { color: var(--warn); }
.tag {
  flex: none;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--raised);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.tag.T2 { background: var(--warn-soft); color: var(--warn); }
.tag.T3, .tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag.good { background: var(--accent-soft); color: var(--accent-text); }
.step-detail { display: grid; gap: 8px; padding: 4px 7px 10px 31px; font-size: 13px; }
.step-detail h3 { color: var(--muted); font-size: 12px; font-weight: 600; }
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.notice { padding: 9px 13px; border-radius: 9px; background: var(--raised); color: var(--muted); font-size: 13.5px; }
.notice.error { background: var(--danger-soft); color: var(--danger); overflow-wrap: anywhere; }
.notice.question { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--warn-line); }
.working { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13.5px; }

.approval { display: grid; gap: 10px; padding: 14px 15px; border: 1px solid var(--warn-line); border-radius: 11px; background: var(--warn-soft); }
.approval.T3 { border-color: var(--danger-line); background: var(--danger-soft); }
.approval-head { display: flex; align-items: center; gap: 8px; }
.approval-head h2 { flex: 1; }
.approval-target { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.approval ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.approval pre { background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions .spacer, .row .spacer, .live-bar .spacer { flex: 1; }

/* ---------------------------------------------------------- settings pages */
.stack { display: grid; gap: 22px; }
.section { display: grid; gap: 10px; }
.section-head { display: flex; align-items: baseline; gap: 10px; }
.section-head h2 { flex: 1; }
.lede { color: var(--muted); font-size: 14px; }
.card { display: grid; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-head > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-head .spacer { flex: 1; }
.meta { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.rows { display: grid; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 38px; padding: 5px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 180px; overflow-wrap: anywhere; }
.row .result { flex-basis: 100%; font-size: 12.5px; }
.result:empty { display: none; }
.model-settings { padding: 10px 0 6px; }
.result.good { color: var(--ok); }
.result.bad { color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid > label { align-content: start; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.tier-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tier-row:first-child { border-top: 0; }
.tier-models { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; padding: 1px 2px 1px 9px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; font-weight: 550; }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill button { min-height: 21px; width: 21px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.tier-models select { width: auto; max-width: 190px; padding: 2px 4px; font-size: 12.5px; }
.empty { padding: 26px 12px; color: var(--muted); text-align: center; font-size: 14px; }
.fact-value { white-space: pre-wrap; }
.path { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; color: var(--muted); font-size: 13.5px; }
.file-row { justify-content: flex-start; border: 0; background: transparent; width: 100%; font-weight: 450; }
.split { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; }
.split pre { max-height: 66vh; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; }
th, td { padding: 6px 8px 6px 0; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
tr:first-child th { border-top: 0; }
td.num, th.num { text-align: right; }
.table-scroll { overflow-x: auto; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 10; }
.toast { max-width: 360px; padding: 9px 13px; border-radius: 9px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: 13.5px; }
.toast.error { background: var(--danger); color: #fff; }

body.login { display: grid; place-items: center; min-height: 100%; }
.login main { display: grid; justify-items: center; gap: 10px; max-width: 360px; padding: 24px; text-align: center; }
.login p { color: var(--muted); }
.login .notice { text-align: left; color: var(--ink); }

a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}
a.button:hover { background: var(--raised); }
a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sso-list { display: grid; gap: 8px; width: 100%; margin-top: 6px; }
.password-form { display: grid; gap: 10px; width: 100%; margin-top: 6px; text-align: left; }
.password-form label { display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }
.password-form input { width: 100%; }
.password-form button { min-height: 40px; font-size: 14.5px; }
a.button.sso { min-height: 40px; font-size: 14.5px; }

/* --------------------------------------------------------------- settings */
.settings-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.steps-list { display: grid; gap: 4px; margin: 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.copy-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.copy-row code { flex: 1; min-width: 0; padding: 5px 8px; border-radius: 6px; background: var(--raised); overflow-wrap: anywhere; }
.field { display: grid; gap: 4px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.stack-tight { display: grid; gap: 5px; }
.history { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--line); }
.proposal { align-items: flex-start; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 450; }
.checks label { display: flex; align-items: center; gap: 5px; font-weight: 450; }
.checks input { width: auto; }

/* ----------------------------------------------------------- live browser */
.live { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.live.ask { border-color: var(--warn-line); background: var(--warn-soft); }
.live-bar { display: flex; align-items: center; gap: 8px; }
.live-address { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; }
.live-surface {
  position: relative;
  width: 100%;
  max-height: 62vh;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--raised);
  outline: none;
}
.live-surface.controlling { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); cursor: pointer; }
.live-frame { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.live-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; color: var(--muted); font-size: 13.5px; text-align: center; }

/* ------------------------------------------------------- replay and streaming */
button.link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  cursor: pointer;
}
button.link:hover:not(:disabled) { background: none; text-decoration: underline; }
.replay-form { margin-top: 6px; }
.replay-form select { width: auto; max-width: 300px; }
.reply.streaming .prose > :last-child::after { content: "▍"; margin-left: 2px; color: var(--faint); }

/* ------------------------------------------------------------------- jobs */
.job .card-head { flex-wrap: wrap; }
.job-instruction { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.runs { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.run-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; text-decoration: none; }
.run-link:hover { color: var(--ink); }
.hint.bad { color: var(--danger); }
.inline-form select { width: auto; }
.inbox-item.unread strong { color: var(--accent-text); }
.inbox-item .prose { margin-top: 4px; font-size: 13.5px; }

/* -------------------------------------------------------------------- lab */
.label-text { font-size: 13px; font-weight: 550; }
.suite { display: grid; gap: 4px; padding: 6px 0; border-top: 1px solid var(--line); }
.suite:first-of-type { border-top: 0; }
.suite summary { color: var(--muted); font-size: 12.5px; cursor: pointer; }
.case-list { display: grid; gap: 4px; padding: 6px 0 2px 22px; }
.case-list label { justify-content: space-between; }
.row.selected { background: var(--accent-soft); border-radius: 7px; }
.run-pick { display: grid; flex: 1; min-width: 0; justify-content: stretch; justify-items: start; gap: 1px; padding: 4px 6px; text-align: left; font-weight: 450; white-space: normal; }
.run-pick strong { font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tile { display: grid; gap: 3px; align-content: start; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tile-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.tile-value { font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; }
.tile-detail { color: var(--muted); font-size: 12.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 12.5px; }
.legend .key { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; vertical-align: 0; }
.legend .key.best { background: var(--viz-accent); }
.legend .key.other { background: var(--viz-context); }
.chart { position: relative; padding: 8px 6px 4px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .tick { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .label { fill: var(--muted); font-size: 12px; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.best { fill: var(--viz-accent); }
.chart .dot.other { fill: var(--viz-context); }
.chart .hit { fill: transparent; outline: none; }
.chart .hit:focus-visible { stroke: var(--ink); stroke-width: 1.5; }
.chart-tip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 1px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  pointer-events: none;
}
.chart-tip.below { transform: translate(-50%, 12px); }
.chart-tip strong { color: var(--ink); font-weight: 650; }
.chart-tip span { color: var(--muted); }
button.cell { width: 26px; min-height: 24px; margin: 0 3px 3px 0; padding: 0; font-weight: 700; }
button.cell.pass { color: var(--ok); }
button.cell.fail { color: var(--danger); }
button.cell.unreached { color: var(--warn); }
.check-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.check-list li { display: flex; gap: 8px; }
.check-list .mark { flex: none; width: 14px; font-weight: 700; }
.check-list .pass .mark { color: var(--ok); }
.check-list .fail .mark { color: var(--danger); }
.transcript { padding-top: 8px; }
.transcript pre { max-height: 220px; overflow: auto; }
.transcript .call { display: block; padding: 3px 6px; border-radius: 5px; background: var(--raised); overflow-wrap: anywhere; }

/* Connectors */
.approval .approval-preview { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.tool-row { align-items: flex-start; }
.tool-row select { width: auto; max-width: 100%; }
.tool-row .tag { margin-left: 6px; }
.tool-desc { margin-top: 3px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; white-space: pre-line; max-height: 7.5em; overflow: auto; }
.value-row input[aria-label="Name"] { flex: 0 1 180px; min-width: 0; }
.value-row input[aria-label="Value"] { flex: 1 1 200px; min-width: 0; }
.value-row .checks { flex: 0 0 auto; }
.notice pre.log { margin: 8px 0 0; max-height: 180px; overflow: auto; font-size: 12px; background: var(--surface); color: var(--ink); white-space: pre-wrap; }
.connector .meta code { overflow-wrap: anywhere; }
details.card > summary { cursor: pointer; font-weight: 600; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { min-width: 0; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding-bottom: 6px; }
  .new-task, .sidebar .section-label, .task-list { display: none; }
  .nav { display: flex; gap: 3px; margin: 0; padding: 0; border: 0; overflow-x: auto; }
  .nav-link { width: auto; flex: none; }
  .column { padding: 16px; }
  .page-head { padding: 8px 16px; flex-wrap: wrap; }
  .composer-wrap { padding: 8px 12px 12px; }
  .form-grid, .split, .tier-row { grid-template-columns: minmax(0, 1fr); }
}
