:root {
  color-scheme: light;
  --ink: #17201c;
  --pitch: #050505;
  --muted: #68726d;
  --line: #d9dfdc;
  --panel: #ffffff;
  --page: #f5f7f4;
  --accent: #1f7a5b;
  --acid: #c8ff49;
  --coral: #f06a4f;
  --accent-ink: #ffffff;
  --blue: #315d92;
  --amber: #a36516;
  --red: #aa3434;
  --shadow: 0 1px 2px rgba(23, 32, 28, 0.06), 0 8px 30px rgba(23, 32, 28, 0.05);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f6f5ef;
  color: var(--ink);
  display: grid;
  grid-template-columns: 240px 1fr;
}

a {
  color: var(--blue);
  text-decoration: none;
}

.sidebar {
  min-height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  font-size: 18px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #20352e;
  color: white;
}

nav {
  display: grid;
  gap: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-link {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 650;
}

.icon-nav {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
}

.icon-nav svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link.active,
.nav-link:hover {
  color: var(--ink);
  background: #edf2ee;
}

.icon-nav.active {
  border-color: #111;
  background: #fff;
}

.shell {
  padding: 32px;
  max-width: 1320px;
  width: 100%;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
}

h1,
h2 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-size: 17px;
}

.notice {
  border: 1px solid #b9d6c9;
  background: #edf8f2;
  color: #19563f;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.home-head {
  min-height: 148px;
}

.home-run-panel {
  min-height: 420px;
}

.knowledge-graph-view {
  margin-bottom: 18px;
  border: 1px solid #111;
  border-radius: 8px;
  background: #101216;
  color: #e6edf7;
  box-shadow: 8px 8px 0 #050505;
  overflow: hidden;
}

.graph-toolbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: #171a20;
}

.graph-title {
  min-width: 0;
}

.graph-title .eyebrow {
  margin-bottom: 3px;
  color: #c8ff49;
}

.graph-title h1 {
  color: #f5f7fb;
  font-size: 28px;
  line-height: 1;
}

.graph-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(62px, 1fr));
  gap: 8px;
  margin: 0;
}

.graph-stats div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.graph-stats dt,
.graph-stats dd {
  margin: 0;
}

.graph-stats dt {
  color: #9aa8bb;
  font-size: 11px;
  font-weight: 780;
}

.graph-stats dd {
  margin-top: 3px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  font-weight: 860;
}

.graph-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.graph-actions form {
  margin: 0;
}

.knowledge-graph-view button,
.knowledge-graph-view .button {
  border-color: rgba(255, 255, 255, 0.22);
  background: #222730;
  color: #f5f7fb;
}

.knowledge-graph-view button:hover,
.knowledge-graph-view .button:hover {
  background: #2c333e;
}

.knowledge-graph-view .primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.knowledge-graph-view .primary:hover {
  background: #196b4f;
}

.graph-status-line {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #aeb9c8;
  font-size: 12px;
  font-weight: 760;
}

.graph-status-line strong {
  margin-left: auto;
  color: #f5f7fb;
}

.graph-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.graph-dot.knowledge {
  background: #b8c7d9;
}

.graph-dot.database {
  background: #7fb6ff;
}

.graph-dot.proposal {
  border-radius: 2px;
  background: #f06a4f;
  transform: rotate(45deg);
}

.graph-workspace {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
}

.graph-canvas {
  min-width: 0;
  min-height: 560px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px),
    #101216;
  background-size: 28px 28px;
}

.graph-canvas canvas {
  display: block;
}

.graph-empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  color: #dce6f3;
  pointer-events: none;
  text-align: center;
  z-index: 2;
}

.graph-empty-state[hidden] {
  display: none;
}

.graph-empty-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #c8ff49;
  border-radius: 999px;
  animation: graph-spin 760ms linear infinite;
}

.graph-empty-state strong,
.graph-empty-state small {
  display: block;
}

.graph-empty-state strong {
  color: #fff;
  font-size: 13px;
  font-weight: 840;
}

.graph-empty-state small {
  color: #aeb9c8;
  font-size: 12px;
  font-weight: 720;
}

@keyframes graph-spin {
  to {
    transform: rotate(360deg);
  }
}

.graph-inspector {
  min-width: 0;
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: #15181e;
  display: grid;
  align-content: start;
  gap: 12px;
}

.graph-inspector-kicker {
  margin: 0;
  color: #c8ff49;
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.graph-inspector h2 {
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.graph-inspector p {
  margin: 0;
  color: #c7d1df;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.graph-inspector dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.graph-inspector dl:empty {
  display: none;
}

.graph-inspector dl div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.graph-inspector dt,
.graph-inspector dd {
  margin: 0;
}

.graph-inspector dt {
  color: #8896a8;
  font-size: 11px;
  font-weight: 800;
}

.graph-inspector dd {
  color: #f5f7fb;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.graph-inspector-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.graph-inspector-actions:empty {
  display: none;
}

.graph-proposal-diff dd {
  display: grid;
  gap: 6px;
}

.diff-line {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border-radius: 6px;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.diff-line span {
  font-weight: 850;
}

.diff-line p {
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: 1.45;
  white-space: pre-wrap;
}

.diff-line.remove {
  background: rgba(255, 95, 95, 0.12);
  color: #ffd7d7;
}

.diff-line.add {
  background: rgba(70, 201, 137, 0.13);
  color: #d9ffe9;
}

.run-overview {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid #d7ddd8;
  padding-bottom: 14px;
}

.run-status-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.run-status-line span,
.run-facts dt,
.run-board-head,
.run-item-title small {
  color: #68726d;
  font-size: 12px;
  font-weight: 780;
}

.run-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.run-facts div {
  min-width: 0;
  padding: 0 14px;
  border-left: 1px solid #d7ddd8;
}

.run-facts div:first-child {
  padding-left: 0;
  border-left: 0;
}

.run-facts dt,
.run-facts dd {
  margin: 0;
}

.run-facts dd {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 860;
}

.run-facts dd small {
  color: #68726d;
  font-size: 12px;
  font-weight: 720;
}

.run-board {
  display: grid;
  border-top: 1px solid #111;
}

.run-board-head,
.run-board-row {
  display: grid;
  grid-template-columns: 78px minmax(180px, 1.4fr) minmax(120px, 0.8fr) minmax(90px, 0.6fr) minmax(88px, 0.5fr);
  gap: 12px;
  align-items: center;
}

.run-board-head {
  min-height: 38px;
  border-bottom: 1px solid #111;
}

.run-board-row {
  min-height: 58px;
  border-bottom: 1px solid #d7ddd8;
  color: #111;
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.run-board-row:hover {
  background: #f8f7f0;
}

.run-item-kind {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 820;
  background: #eef1ef;
}

.run-item-kind.proposal {
  background: #fff1d8;
  color: #85510f;
}

.run-item-kind.applied {
  background: #e4f5ed;
  color: #176348;
}

.run-item-title,
.run-item-detail,
.run-item-status,
.run-item-time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-item-title strong,
.run-item-title small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-item-detail,
.run-item-status,
.run-item-time {
  color: #4f5c54;
  font-size: 13px;
  font-weight: 720;
}

.run-board-empty {
  border-top: 1px solid #111;
  padding: 18px 0 4px;
}

.run-board-empty strong,
.run-board-empty span {
  display: block;
}

.run-board-empty span {
  color: #68726d;
  margin-top: 4px;
}

.proposal-dialog {
  width: min(820px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  border: 1px solid #111;
  border-radius: 8px;
  padding: 0;
  color: #111;
  background: #fffef8;
  box-shadow: 12px 12px 0 #111;
}

.proposal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.36);
}

.proposal-dialog-box {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: min(820px, calc(100vh - 28px));
}

.proposal-dialog header,
.proposal-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.proposal-dialog header {
  border-bottom: 1px solid #d7ddd8;
}

.proposal-dialog h2 {
  font-size: 22px;
  line-height: 1.2;
}

.proposal-dialog-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px 0;
}

.proposal-dialog-meta span {
  border: 1px solid #d7ddd8;
  border-radius: 999px;
  padding: 5px 9px;
  color: #4f5c54;
  font-size: 12px;
  font-weight: 760;
}

.proposal-dialog-scroll {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 16px;
}

.proposal-dialog .proposal-diff {
  display: grid;
  gap: 8px;
  border: 1px solid #d7ddd8;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.proposal-dialog .proposal-diff[hidden] {
  display: none;
}

.proposal-dialog .proposal-diff h3 {
  font-size: 14px;
}

.proposal-dialog .diff-line.remove {
  background: #fff0f0;
  color: #8f2525;
}

.proposal-dialog .diff-line.add {
  background: #edf9f2;
  color: #176348;
}

.notion-render {
  display: grid;
  gap: 10px;
}

.notion-render h1 {
  font-size: 24px;
  line-height: 1.2;
}

.notion-render h2 {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.25;
}

.notion-render p,
.notion-render li,
.notion-render blockquote {
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.notion-render ul {
  margin: 0;
  padding-left: 20px;
}

.notion-render blockquote {
  margin: 0;
  border-left: 3px solid #111;
  padding: 8px 10px;
  background: #f7f8f2;
}

.proposal-dialog footer {
  border-top: 1px solid #d7ddd8;
}

.proposal-dialog footer span {
  min-width: 0;
  margin-right: auto;
  color: #4f5c54;
  font-size: 13px;
  font-weight: 720;
}

.proposal-dialog footer span[data-tone="error"] {
  color: #8f2525;
}

.settings-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.settings-switch a {
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 9px 12px;
  font-weight: 780;
  white-space: nowrap;
}

.settings-switch a.active,
.settings-switch a:hover {
  background: #111;
  color: #fff;
}

.settings-section {
  scroll-margin-top: 18px;
}

.settings-view {
  display: grid;
  gap: 14px;
}

.settings-view .panel-head {
  margin-bottom: 0;
}

.settings-connection-line,
.settings-email-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #d7ddd8;
  border-bottom: 1px solid #d7ddd8;
}

.settings-connection-line > span,
.settings-email-line > span {
  color: #68726d;
  font-size: 12px;
  font-weight: 780;
}

.settings-connection-line strong,
.settings-email-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-inline-actions form {
  margin: 0;
}

.settings-divider {
  height: 1px;
  background: #d7ddd8;
}

.settings-email-forms {
  display: grid;
  gap: 12px;
}

.settings-email-forms .inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.settings-table {
  margin-top: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.metric {
  min-height: 88px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.metric strong {
  font-size: 28px;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.columns > *,
.connection-list > * {
  min-width: 0;
}

.panel {
  padding: 18px;
  margin-bottom: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef1ef;
  color: #4e5954;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.pill.ok {
  background: #e4f5ed;
  color: #176348;
}

.pill.warn {
  background: #fff1d8;
  color: #85510f;
}

.pill.status-success {
  background: #e4f5ed;
  color: #176348;
}

.pill.status-partial_success,
.pill.status-running {
  background: #fff1d8;
  color: #85510f;
}

.pill.status-failed {
  background: #f7dddd;
  color: #8f2525;
}

.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  margin: 0;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.connection-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.connection-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.connection-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.stack {
  display: grid;
  gap: 12px;
}

.stack.compact {
  margin-top: 12px;
  grid-template-columns: 1fr auto;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd3cf;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: white;
  font: inherit;
}

textarea {
  min-height: 148px;
  resize: vertical;
  line-height: 1.5;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.checkline input {
  width: 16px;
  min-height: 16px;
}

.agent-settings-form {
  display: grid;
  gap: 14px;
}

.agent-option-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid #d7ddd8;
  border-bottom: 1px solid #d7ddd8;
  padding: 12px 0;
}

.agent-option-list .checkline {
  justify-content: start;
  align-items: start;
  min-height: 28px;
  color: #27312c;
}

.agent-option-list .checkline span {
  line-height: 1.45;
}

.target-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.target-search-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.target-picker-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.target-picker-status:empty {
  display: none;
}

.target-picker-status[data-tone="ok"] {
  color: var(--accent);
}

.target-picker-status[data-tone="error"] {
  color: var(--red);
}

.target-picker-status[data-tone="loading"] {
  color: #4f5c54;
}

.target-result-list {
  display: grid;
  gap: 4px;
  max-height: 360px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #111;
  border-radius: 8px;
  background: #f8f7f0;
}

.target-tree-group,
.target-tree-row {
  width: min(100%, 540px);
  max-width: calc(100% - calc(var(--depth, 0) * 18px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  margin-left: calc(var(--depth, 0) * 18px);
}

.target-tree-group {
  min-height: 34px;
  padding: 7px 10px;
  color: #4f5c54;
  font-size: 12px;
  font-weight: 820;
}

.target-tree-group strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-tree-group span {
  color: #68726d;
}

.target-tree-row {
  min-height: 48px;
  grid-template-columns: 28px minmax(0, 1fr) auto 30px;
  text-align: left;
  background: #fff;
  border: 1px solid #111;
  border-radius: 8px;
  padding: 6px 9px 6px 6px;
  position: relative;
  justify-content: stretch;
}

.target-tree-row::before {
  content: "";
  position: absolute;
  left: -13px;
  top: -4px;
  bottom: -4px;
  width: 1px;
  background: #c5cbc7;
  display: none;
}

.target-tree-row[style*="--depth: 1"]::before,
.target-tree-row[style*="--depth: 2"]::before,
.target-tree-row[style*="--depth: 3"]::before,
.target-tree-row[style*="--depth: 4"]::before {
  display: block;
}

.target-tree-row:hover,
.target-tree-row.selected {
  background: #e8ffd4;
}

.target-tree-row.selected {
  box-shadow: inset 0 0 0 2px #111;
}

.target-tree-row.excluded {
  background: #fff1d8;
}

.target-tree-row.excluded .target-select strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.target-expander {
  width: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: #111;
  font-size: 20px;
  line-height: 1;
  box-shadow: none;
}

.target-expander:hover {
  background: #e4ebe7;
}

.target-expander:disabled {
  color: #a5aaa6;
  cursor: default;
}

.target-expander:disabled:hover {
  background: transparent;
}

.target-select {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #111;
  display: grid;
  gap: 1px;
  justify-items: start;
  text-align: left;
  box-shadow: none;
}

.target-select:hover {
  background: transparent;
}

.target-select strong,
.target-select small,
.target-type {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-select small,
.target-type {
  color: #68645e;
  font-size: 12px;
  font-weight: 680;
}

.target-type {
  justify-self: end;
  max-width: 88px;
}

.target-exclude {
  width: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 0;
  background: #f8f7f0;
  color: #111;
  box-shadow: none;
}

.target-exclude:hover {
  background: #111;
  color: #fff;
}

.target-exclude:disabled,
.target-exclude:disabled:hover {
  border-color: #c5cbc7;
  background: #f4f1e9;
  color: #a5aaa6;
  cursor: default;
}

.target-exclude svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.target-loading,
.target-empty {
  width: min(100%, 540px);
  max-width: calc(100% - calc(var(--depth, 0) * 18px));
  min-height: 42px;
  margin-left: calc(var(--depth, 0) * 18px);
  display: flex;
  align-items: center;
  gap: 9px;
  color: #58625c;
  font-size: 13px;
  font-weight: 720;
}

.target-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #cbd3cf;
  border-top-color: #111;
  border-radius: 999px;
  animation: target-spin 700ms linear infinite;
}

.target-spinner.tiny {
  width: 14px;
  height: 14px;
}

@keyframes target-spin {
  to {
    transform: rotate(360deg);
  }
}

.target-selection {
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: 0;
  background: transparent;
  padding: 8px 0 8px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.target-selection[hidden] {
  display: none;
}

.target-selection span,
.target-selection small {
  color: #4f5c54;
  font-size: 12px;
  font-weight: 760;
}

.target-selection strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-exclusion-list {
  display: grid;
  gap: 8px;
  border-left: 4px solid #d97831;
  padding: 8px 0 8px 12px;
}

.target-exclusion-list[hidden] {
  display: none;
}

.target-exclusion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #4f5c54;
  font-size: 12px;
  font-weight: 820;
}

.target-exclusion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.target-exclusion-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff8ea;
  padding: 4px 5px 4px 10px;
  font-size: 12px;
  font-weight: 760;
}

.target-exclusion-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-exclusion-chip button {
  width: 22px;
  min-height: 22px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #111;
  color: #fff;
  box-shadow: none;
  line-height: 1;
}

button,
.button {
  min-height: 40px;
  border: 1px solid #bfc9c4;
  border-radius: 8px;
  padding: 9px 13px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover,
.button:hover {
  background: #f0f3f1;
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.primary:hover {
  background: #196b4f;
}

.ghost {
  background: transparent;
}

.danger {
  border-color: #e0c4c4;
}

.danger-button {
  border-color: var(--red);
  color: var(--red);
}

.icon-button {
  width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.limit-form {
  display: flex;
  align-items: end;
  gap: 8px;
}

.limit-form label {
  min-width: 128px;
}

.panel-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.run-table {
  min-width: 980px;
}

.audit-table {
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  max-width: 280px;
  overflow-wrap: anywhere;
}

.run-error-text,
.run-error-trigger,
.log-error-trigger {
  color: #8f2525;
  font-weight: 800;
}

.run-error-trigger,
.log-error-trigger {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.run-error-trigger {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.log-error-trigger {
  max-width: 560px;
  font-size: 12px;
  line-height: 1.45;
}

.run-error-trigger:hover,
.log-error-trigger:hover {
  background: transparent;
  color: #651717;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}

.run-id-cell code {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid #111;
  border-radius: 8px;
  background: #f8f7f0;
  padding: 4px 7px;
}

.time-range,
.count-group {
  display: grid;
  gap: 5px;
}

time {
  display: grid;
  gap: 1px;
}

time strong {
  font-size: 14px;
  line-height: 1.1;
}

time small,
.time-range span,
.count-group span,
.log-summary {
  color: #565f59;
  font-size: 12px;
}

.time-range span {
  font-weight: 720;
}

.count-group {
  grid-template-columns: repeat(2, max-content);
  column-gap: 10px;
  row-gap: 4px;
}

.count-group span {
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}

.count-group b {
  color: #111;
}

.event-cell {
  min-width: 160px;
}

.event-cell small {
  max-width: 180px;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #111;
  border-radius: 8px;
  background: #eef1ef;
  color: #17201c;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.event-badge.level-warning {
  background: #fff1d8;
}

.event-badge.level-error {
  background: #f7dddd;
  color: #8f2525;
}

.runs-live {
  display: block;
}

.runs-refresh-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 6px 9px;
  white-space: nowrap;
}

.runs-refresh-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.runs-refresh-button span {
  min-width: 16px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.runs-refresh-button small {
  color: inherit;
  font-size: 11px;
  font-weight: 780;
}

.runs-refresh-button.is-refreshing svg {
  animation: runs-spin 700ms linear infinite;
}

.run-error-dialog {
  width: min(640px, calc(100vw - 32px));
  border: 1px solid #111;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 8px 8px 0 #050505;
}

.run-error-dialog::backdrop {
  background: rgba(12, 16, 14, 0.42);
}

.run-error-dialog-box {
  display: grid;
  gap: 0;
}

.run-error-dialog header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.run-error-dialog h2 {
  font-size: 19px;
}

.run-error-dialog-body {
  max-height: min(520px, 70vh);
  overflow: auto;
  padding: 4px 16px 16px;
}

.run-error-dialog-body dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.run-error-dialog-body dl div {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.run-error-dialog-body dl div:last-child {
  border-bottom: 0;
}

.run-error-dialog-body dt,
.run-error-dialog-body dd {
  margin: 0;
}

.run-error-dialog-body dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.run-error-dialog-body dd {
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.stagger-row {
  animation: row-stagger 360ms ease both;
  animation-delay: calc(var(--stagger, 0) * 42ms);
}

@keyframes row-stagger {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes runs-spin {
  to {
    transform: rotate(360deg);
  }
}

.log-summary {
  max-width: 560px;
  line-height: 1.45;
}

.empty {
  color: var(--muted);
}

.app-body {
  display: block;
  padding: 28px;
  background: #f6f5ef;
}

.app-capsule {
  max-width: 1180px;
  margin: 0 auto 28px;
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--pitch);
  border-radius: 999px;
  color: white;
}

.app-capsule .brand {
  margin: 0;
  min-height: 46px;
  padding: 4px 14px 4px 4px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.app-capsule .brand img,
.tutorial-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: block;
}

.app-capsule nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

.app-capsule .nav-link {
  color: white;
  border-radius: 999px;
  padding: 11px 13px;
  white-space: nowrap;
}

.app-capsule .icon-nav {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.app-capsule .icon-nav svg {
  width: 22px;
  height: 22px;
}

.app-capsule .nav-link.active,
.app-capsule .nav-link:hover {
  background: var(--acid);
  color: #050505;
}

.capsule-action {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  color: #050505;
}

.capsule-action svg,
.start-button svg,
.icon-back svg,
.task-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
}

.app-shell .page-head {
  align-items: end;
  border: 1px solid #111;
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 #050505;
  padding: 22px;
  margin-bottom: 18px;
}

.app-shell .page-head h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.95;
}

.app-shell .eyebrow {
  color: #6b645d;
  text-transform: uppercase;
  letter-spacing: 0;
}

.app-shell .metric,
.app-shell .panel,
.app-shell .connection-list div {
  border: 1px solid #111;
  border-radius: 8px;
  box-shadow: 6px 6px 0 #050505;
}

.app-shell .metric {
  min-height: 116px;
  background: #fff;
}

.app-shell .metric:nth-child(2) {
  background: #e8ffd4;
}

.app-shell .metric:nth-child(3) {
  background: #fff7df;
}

.app-shell .metric strong {
  font-size: 38px;
}

.app-shell .panel {
  background: #fff;
}

.app-shell table {
  border-collapse: separate;
  border-spacing: 0;
}

.app-shell th {
  color: #050505;
  background: #f3f2eb;
}

.app-shell th,
.app-shell td {
  border-bottom: 1px solid #111;
}

.app-shell input,
.app-shell select,
.onboarding-form input,
.onboarding-form select,
.time-strip input {
  border-color: #111;
  border-radius: 8px;
}

.app-shell button,
.app-shell .button {
  border-color: #111;
}

.intro-body {
  display: block;
  min-height: 100vh;
  background: #f6f5ef;
  color: #050505;
}

.intro-shell {
  min-height: 100vh;
}

.intro-notice {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  background: var(--acid);
  border: 1px solid #111;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 760;
}

.intro-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 28px;
  text-align: center;
}

.intro-icon {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  box-shadow: 8px 8px 0 #050505;
}

.intro-hero h1 {
  margin: 0;
  font-size: clamp(58px, 13vw, 148px);
  line-height: 0.88;
  letter-spacing: 0;
}

.start-button {
  min-height: 66px;
  padding: 0 18px 0 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #050505;
  color: white;
  font-size: 20px;
  font-weight: 860;
  box-shadow: 6px 6px 0 var(--acid);
}

.start-button svg {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  padding: 7px;
  background: var(--acid);
  color: #050505;
}

.tutorial-body {
  display: block;
  min-height: 100vh;
  background: #f6f5ef;
  color: #050505;
}

.tutorial {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
}

.tutorial-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.tutorial-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #050505;
  font-weight: 860;
}

.tutorial-notice {
  border: 1px solid #111;
  background: var(--acid);
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 760;
  margin-bottom: 14px;
}

.tutorial-card {
  border: 1px solid #111;
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 #050505;
  min-height: 680px;
  padding: 18px;
  display: grid;
  grid-template-rows: 1fr;
}

.icon-back {
  width: 42px;
  height: 42px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  color: #050505;
  padding: 0;
  margin-bottom: 4px;
}

.task-button {
  gap: 10px;
}

.onboarding-body {
  display: block;
  min-height: 100vh;
  background: #f6f5ef;
  color: #050505;
}

.onboarding {
  min-height: 100vh;
  padding: 28px;
}

.onboarding-rail {
  min-height: 60px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: white;
  margin-bottom: 26px;
}

.onboarding-brand,
.onboarding-menu,
.onboarding-marquee {
  min-height: 60px;
  background: var(--pitch);
  color: white;
  border-radius: 999px;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.onboarding-brand {
  gap: 10px;
  padding: 8px 16px 8px 8px;
  font-weight: 860;
}

.onboarding-brand span {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--acid);
}

.onboarding-menu {
  padding: 0 18px;
  font-weight: 760;
}

.onboarding-marquee {
  overflow: hidden;
  gap: 24px;
  padding: 0 22px;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 780;
}

.onboarding-marquee span {
  animation: soft-slide 10s linear infinite;
}

@keyframes soft-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-140px);
  }
}

.onboarding-notice {
  max-width: 1180px;
  margin: 0 auto 14px;
  border: 1px solid #111;
  background: var(--acid);
  color: #111;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 760;
}

.onboarding-stage {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.onboarding-side,
.onboarding-card {
  border: 1px solid #111;
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 #050505;
}

.onboarding-side {
  display: grid;
  grid-template-rows: 220px auto auto;
  overflow: hidden;
  background: #c9cac3;
}

.side-photo {
  position: relative;
  min-height: 220px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.12) 1px, transparent 1px),
    #e9e6dd;
  background-size: 22px 22px;
  display: grid;
  place-items: center;
}

.paper-stack {
  width: 168px;
  height: 128px;
  position: relative;
}

.paper-stack span {
  position: absolute;
  inset: 0;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
}

.paper-stack span:nth-child(1) {
  transform: translate(-16px, 14px) rotate(-5deg);
  background: #fbf3d0;
}

.paper-stack span:nth-child(2) {
  transform: translate(12px, 2px) rotate(4deg);
  background: #d9f2ff;
}

.paper-stack span:nth-child(3) {
  display: grid;
  background:
    linear-gradient(#111 0 0) 22px 28px / 82px 8px no-repeat,
    linear-gradient(#111 0 0) 22px 52px / 122px 6px no-repeat,
    linear-gradient(#111 0 0) 22px 74px / 96px 6px no-repeat,
    #fff;
}

.scan-line {
  position: absolute;
  left: 34px;
  right: 34px;
  top: 64px;
  height: 4px;
  background: var(--coral);
  box-shadow: 0 0 0 2px #111;
  animation: scan-sweep 2.8s ease-in-out infinite alternate;
}

@keyframes scan-sweep {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(96px);
  }
}

.side-copy {
  padding: 22px;
  font-size: 16px;
  line-height: 1.34;
  font-weight: 650;
}

.side-copy p {
  margin: 0 0 16px;
}

.setup-score {
  margin: 0 18px 18px;
  background: #050505;
  color: white;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.setup-score strong {
  color: var(--acid);
  font-size: 34px;
  line-height: 1;
}

.setup-score span {
  font-weight: 760;
}

.onboarding-card {
  min-height: 640px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-dot {
  min-height: 54px;
  border: 1px solid #111;
  background: #f3f2eb;
  color: #111;
  border-radius: 8px;
  padding: 7px;
  justify-content: flex-start;
  gap: 8px;
  font-size: 12px;
}

.onboarding-dot span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  flex: 0 0 auto;
}

.onboarding-dot.done {
  background: #e8ffd4;
}

.onboarding-dot.active {
  background: #111;
  color: #fff;
}

.onboarding-dot.active span {
  background: var(--acid);
  color: #111;
}

.onboarding-step {
  display: none;
  min-height: 0;
}

.onboarding-step.active {
  display: grid;
  align-content: start;
  gap: 18px;
  animation: step-in 220ms ease-out;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kicker {
  margin: 4px 0 0;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 860;
  color: #6b645d;
}

.onboarding-step h1 {
  max-width: 780px;
  font-size: clamp(34px, 5.8vw, 64px);
  line-height: 0.98;
  margin: 0;
  letter-spacing: 0;
}

.step-lede {
  max-width: 640px;
  margin: 0;
  font-size: 19px;
  line-height: 1.4;
  color: #3f453f;
  font-weight: 620;
}

.connection-hero,
.tutorial-board,
.launch-grid,
.notification-duo {
  border: 1px solid #111;
  border-radius: 8px;
  background: #f8f7f0;
}

.connection-hero {
  min-height: 142px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.connection-hero span {
  display: block;
  color: #706b64;
  font-weight: 760;
  margin-bottom: 8px;
}

.connection-hero strong {
  font-size: 30px;
  overflow-wrap: anywhere;
}

.setup-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #d7ddd8;
  border-bottom: 1px solid #d7ddd8;
  padding: 16px 0;
}

.setup-line span {
  color: #6f756f;
  font-size: 13px;
  font-weight: 820;
}

.setup-line strong {
  min-width: 0;
  font-size: 24px;
  overflow-wrap: anywhere;
}

.setup-checklist {
  display: grid;
  border-top: 1px solid #d7ddd8;
}

.setup-checklist div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #d7ddd8;
}

.setup-checklist strong {
  font-size: 20px;
}

.step-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.step-actions form {
  margin: 0;
}

.ink-button {
  background: #050505;
  border-color: #050505;
  color: #fff;
}

.ink-button:hover {
  background: #202020;
}

.tutorial-board,
.launch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #111;
}

.tutorial-board div,
.launch-grid div {
  background: #fff;
  min-height: 132px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.tutorial-board span {
  color: var(--coral);
  font-weight: 860;
}

.tutorial-board strong,
.launch-grid strong {
  font-size: 24px;
  line-height: 1.1;
}

.onboarding-form {
  display: grid;
  gap: 12px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.compact-form .checkline,
.compact-form button {
  min-height: 42px;
}

.target-chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  border-top: 1px solid #d7ddd8;
}

.target-chip-list li {
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid #d7ddd8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.target-chip-list strong,
.target-chip-list span {
  display: block;
}

.target-chip-list span {
  color: #68645e;
  font-size: 12px;
  margin-top: 0;
}

.notification-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.email-stack {
  display: grid;
  gap: 12px;
}

.inline-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.time-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.launch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .app-body {
    padding: 14px;
  }

  .app-capsule {
    grid-template-columns: 1fr;
    border-radius: 28px;
    align-items: start;
  }

  .app-capsule nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding: 2px;
  }

  .app-shell {
    padding: 0;
  }

  .app-shell .page-head h1 {
    font-size: 36px;
  }

  .sidebar {
    min-height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px;
  }

  nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 2px;
  }

  .nav-link {
    flex: 0 0 auto;
    text-align: center;
    padding: 9px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .shell {
    padding: 20px;
  }

  .metric-grid,
  .columns,
  .graph-toolbar,
  .graph-workspace,
  .run-facts,
  .run-board-head,
  .run-board-row,
  .connection-list,
  .form-grid,
  .target-search-row,
  .target-selection {
    grid-template-columns: 1fr;
  }

  .run-facts div {
    padding: 10px 0;
    border-left: 0;
    border-top: 1px solid #d7ddd8;
  }

  .run-facts div:first-child {
    border-top: 0;
  }

  .graph-toolbar {
    align-items: stretch;
  }

  .graph-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .graph-actions {
    justify-content: flex-start;
  }

  .graph-status-line strong {
    width: 100%;
    margin-left: 0;
  }

  .graph-workspace {
    min-height: 0;
  }

  .graph-canvas {
    min-height: 440px;
  }

  .graph-inspector {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .run-board-head {
    display: none;
  }

  .run-board-row {
    gap: 5px;
    align-items: start;
    padding: 10px 0;
  }

  .settings-connection-line,
  .settings-email-line,
  .settings-email-forms .inline-form {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .settings-inline-actions {
    flex-wrap: wrap;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro-hero {
    padding: 18px;
  }

  .intro-icon {
    width: 88px;
    height: 88px;
  }

  .intro-hero h1 {
    font-size: 56px;
  }

  .tutorial {
    padding: 14px;
  }

  .tutorial-head {
    align-items: flex-start;
  }

  .tutorial-card {
    min-height: auto;
    padding: 12px;
  }

  .onboarding {
    padding: 14px;
  }

  .onboarding-rail {
    grid-template-columns: 1fr auto;
  }

  .onboarding-marquee {
    grid-column: 1 / -1;
    order: 3;
    min-height: 44px;
    font-size: 14px;
  }

  .onboarding-stage {
    grid-template-columns: 1fr;
  }

  .onboarding-side {
    grid-template-rows: 160px auto;
  }

  .setup-score {
    margin-top: 0;
  }

  .onboarding-card {
    min-height: auto;
    padding: 12px;
  }

  .onboarding-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .onboarding-step h1 {
    font-size: 36px;
  }

  .setup-line {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .setup-line .pill {
    justify-self: start;
  }

  .tutorial-board,
  .launch-grid,
  .notification-duo,
  .compact-form,
  .time-strip {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }
}
