:root {
  --charcoal: #26221f;
  --slate: #5b6169;
  --burgundy: #7a4a3a;
  --pale-charcoal: #e7e7e7;
  --light-grey: #f2f2f2;
  --cobalt: var(--brand-text);
  --jade: #009966;
  --gold: #d67900;
  --white: #ffffff;
  --rule: 1px solid var(--pale-charcoal);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

body::before {
  background: #db6a3f;
  content: "";
  height: 10px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 30;
}

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

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-header {
  align-items: center;
  background: var(--white);
  border-bottom: var(--rule);
  display: flex;
  justify-content: space-between;
  min-height: 82px;
  padding: 10px 44px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: var(--charcoal);
  display: flex;
  font-size: 18px;
  font-weight: 700;
  gap: 14px;
  min-height: 58px;
}

.brand img {
  height: auto;
  width: 154px;
}

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

.header-actions form {
  margin: 0;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-avatar {
  align-items: center;
  background: var(--charcoal);
  border: 1px solid var(--charcoal);
  border-radius: 50%;
  color: var(--white);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  min-width: 40px;
  width: 40px;
}

.user-menu-panel {
  background: var(--white);
  border: var(--rule);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 6px;
  min-width: 210px;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
}

.user-menu:not([open]) .user-menu-panel {
  display: none;
}

.user-menu:hover .user-menu-panel,
.user-menu:focus-within .user-menu-panel {
  display: grid;
}

.user-menu-panel a,
.user-menu-panel button {
  background: transparent;
  border: 0;
  color: var(--charcoal);
  cursor: pointer;
  display: block;
  padding: 8px 4px;
  text-align: left;
  text-decoration: none;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover,
.user-menu-panel a:focus,
.user-menu-panel button:focus {
  background: var(--off-white);
  outline: 0;
}

.runner-status {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 2px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  letter-spacing: 0;
  text-decoration: none;
  width: 40px;
}

.runner-status-dot {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
  display: block;
  height: 8px;
  width: 8px;
}

.runner-status:hover {
  text-decoration: none;
}

.runner-status-connected {
  background: #e6f4ef;
  color: var(--jade);
}

.runner-status-needs_login,
.runner-status-offline {
  background: #fff1f3;
  color: var(--brand-fill);
}

.development-hero {
  align-items: end;
}

.development-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
}

.development-stats span {
  border: var(--rule);
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 10px 12px;
}

.development-stats strong {
  color: var(--brand-fill);
  font-size: 28px;
  line-height: 1;
}

.development-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.25fr);
}

.development-queue-panel,
.development-detail-panel {
  min-width: 0;
}

.request-row.selected {
  border-left-color: var(--charcoal);
  background: #f6f7f8;
}

.development-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
}

.development-detail-grid article {
  border: var(--rule);
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 12px;
}

.development-detail-grid strong {
  font-size: 20px;
}

.test-phase-workflow {
  border: var(--rule);
  margin: 18px 0;
  padding: 16px;
}

.test-phase-heading,
.test-phase-card-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.test-phase-heading h3,
.test-phase-audit h4 {
  margin: 2px 0 0;
}

.test-phase-timeline {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.test-phase-card {
  border: 1px solid #cbd2d9;
  border-top: 4px solid #66717d;
  min-width: 0;
  padding: 14px;
}

.test-phase-card.phase-environment_preparation {
  border-top-color: #1d70b8;
}

.test-phase-card.phase-application_testing {
  border-top-color: #247a3d;
}

.test-phase-card.phase-code_repair {
  border-top-color: #6f42a1;
}

.test-phase-card.phase-running {
  background: #eef6ff;
  border-top-color: #1d70b8;
}

.test-phase-card.phase-succeeded {
  background: #f1f8f3;
  border-top-color: #247a3d;
}

.test-phase-card.phase-infrastructure,
.test-environment-warning {
  background: #fff1f0;
  border-color: #b42318;
}

.pill.phase-infrastructure {
  background: #fff1f0;
  border-color: #b42318;
  color: #8a1c13;
}

.test-phase-card.phase-failed {
  background: #fff5f5;
  border-top-color: #b42318;
}

.test-phase-card.phase-skipped {
  background: #f8f5fb;
  border-top-color: #6f42a1;
}

.test-phase-index {
  align-items: center;
  background: #263746;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 28px;
  height: 28px;
  justify-content: center;
}

.test-phase-card-heading > div {
  display: grid;
  flex: 1;
  gap: 4px;
}

.test-phase-status {
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 7px;
  white-space: nowrap;
}

.test-evidence-list {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
}

.test-evidence-list > div {
  border-top: 1px solid #d9dee3;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(105px, 0.4fr) minmax(0, 1fr);
  padding-top: 7px;
}

.test-evidence-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.test-evidence-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.test-environment-warning,
.test-recovery-action {
  border: 1px solid;
  margin-top: 14px;
  padding: 14px;
}

.test-recovery-action {
  background: #f8f5fb;
  border-color: #6f42a1;
}

.test-operator-action {
  margin-top: 12px;
}

.test-operator-action summary,
.test-recovery-action summary {
  cursor: pointer;
  font-weight: 700;
}

.test-phase-audit {
  border-top: var(--rule);
  margin-top: 18px;
  padding-top: 14px;
}

.test-phase-audit-table {
  display: grid;
  margin-top: 10px;
}

.test-phase-audit-row {
  border-top: 1px solid #d9dee3;
  display: grid;
  gap: 10px;
  grid-template-columns: 130px minmax(220px, 1fr) minmax(140px, 0.5fr) minmax(140px, 0.5fr);
  padding: 8px 0;
}

.development-section {
  border-top: var(--rule);
  padding-top: 16px;
}

.development-section + .development-section {
  margin-top: 16px;
}

.development-overview {
  border: var(--rule);
  box-shadow: 0 8px 24px rgba(30, 38, 55, 0.06);
  margin-bottom: 18px;
  padding: 16px;
}

.development-overview h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.development-overview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.overview-card {
  align-items: center;
  border: 1px solid #d9dee7;
  display: flex;
  gap: 12px;
  min-height: 70px;
  padding: 12px;
}

.overview-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.overview-card span,
.overview-card small {
  color: var(--charcoal);
  display: block;
}

.overview-icon {
  align-items: center;
  border-radius: 50%;
  color: var(--white) !important;
  display: inline-flex !important;
  flex: 0 0 42px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.overview-blue .overview-icon {
  background: var(--brand-ink);
}

.overview-gold .overview-icon {
  background: var(--cobalt);
}

.overview-purple .overview-icon {
  background: var(--burgundy);
}

.overview-red .overview-icon {
  background: var(--brand-fill);
}

.overview-blue {
  border-top: 4px solid var(--brand-ink);
}

.overview-gold {
  border-top: 4px solid var(--cobalt);
}

.overview-purple {
  border-top: 4px solid var(--burgundy);
}

.overview-red {
  border-top: 4px solid var(--brand-fill);
}

.overview-compact {
  align-items: start;
  display: grid;
}

.runner-overview {
  align-items: start;
  display: grid;
}

.runner-overview strong::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 9px;
  margin-right: 6px;
  width: 9px;
}

.runner-online strong {
  color: var(--jade);
}

.runner-offline strong {
  color: var(--brand-fill);
}

.development-tabs {
  border-bottom: var(--rule);
  display: flex;
  gap: 18px;
  margin-bottom: 0;
  padding-left: 16px;
}

.development-tabs a {
  color: var(--charcoal);
  font-weight: 700;
  padding: 18px 10px 14px;
  text-decoration: none;
}

.development-tabs a.active {
  border-bottom: 4px solid var(--brand-fill);
}

.development-ajax-shell {
  position: relative;
}

.development-loading {
  align-items: center;
  background: #fff;
  border: var(--rule);
  border-top: 4px solid var(--brand-fill);
  box-shadow: 0 8px 24px rgba(29, 31, 34, 0.08);
  color: var(--charcoal);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
  left: 18px;
  padding: 10px 14px;
  position: absolute;
  text-transform: uppercase;
  top: 18px;
  z-index: 3;
}

.development-loading[hidden] {
  display: none;
}

.development-loading span {
  animation: development-loader-pulse 0.8s ease-in-out infinite alternate;
  background: var(--brand-fill);
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

[data-development-workbench-frame][aria-busy="true"] {
  opacity: 0.52;
  pointer-events: none;
}

@keyframes development-loader-pulse {
  from {
    transform: scale(0.75);
  }

  to {
    transform: scale(1);
  }
}

.development-workbench {
  border: var(--rule);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(300px, 0.34fr) minmax(0, 1fr);
  min-height: 640px;
}

.development-list-panel,
.development-main-panel {
  min-width: 0;
  padding: 18px;
}

.development-list-panel {
  border-right: var(--rule);
}

.compact-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.compact-heading h2 {
  font-size: 18px;
  margin: 0;
}

.filter-icon {
  border: var(--rule);
  color: var(--slate);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.development-filter-bar {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
}

.development-filter-bar input,
.development-filter-bar select {
  border: var(--rule);
  min-height: 36px;
  padding: 8px 10px;
  width: 100%;
}

.development-filter-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.development-task-list {
  display: grid;
  gap: 10px;
}

.development-task-card {
  border: var(--rule);
  border-left: 5px solid var(--brand-ink);
  color: var(--charcoal);
  display: grid;
  gap: 5px;
  padding: 12px;
  text-decoration: none;
}

.development-task-card.selected {
  background: #f6f8fb;
  box-shadow: inset 0 0 0 1px #d9dee7;
}

.development-task-card.blocked {
  border-left-color: var(--brand-fill);
}

.development-task-card strong {
  font-size: 14px;
}

.development-task-card small,
.development-task-card span {
  color: var(--slate);
  font-size: 12px;
}

.development-task-card em {
  color: var(--brand-ink);
  font-size: 12px;
  font-style: normal;
  justify-self: end;
}

.development-detail-header {
  align-items: start;
  border-bottom: var(--rule);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 18px;
}

.development-detail-header h1 {
  display: inline-block;
  font-size: 22px;
  margin: 0 8px 8px 0;
}

.development-detail-header h2 {
  font-size: 23px;
  margin: 0 0 6px;
}

.development-detail-header p {
  color: var(--slate);
  margin: 0;
}

.development-status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 18px 0;
}

.development-status-grid article {
  border: 1px solid #d9dee7;
  border-top: 4px solid var(--brand-ink);
  display: grid;
  gap: 8px;
  min-height: 110px;
  padding: 14px;
}

.development-status-grid span {
  color: var(--slate);
  font-size: 12px;
  font-weight: 800;
}

.development-status-grid strong,
.development-status-grid small {
  overflow-wrap: anywhere;
}

.development-brief-card {
  border: var(--rule);
  margin-bottom: 16px;
  padding: 14px;
}

.development-brief-card h3,
.development-brief-card p {
  margin: 0;
}

.development-brief-card p {
  color: var(--slate);
  line-height: 1.5;
  margin-top: 10px;
}

.development-detail-columns {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.task-steps-panel,
.task-information-panel {
  border: var(--rule);
  min-width: 0;
  padding: 14px;
}

.task-detail-tabs {
  border-bottom: var(--rule);
  display: flex;
  gap: 22px;
  margin-bottom: 0;
}

.task-detail-tabs a {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
  padding: 0 0 12px;
  text-decoration: none;
}

.task-detail-tabs a.active {
  border-bottom: 3px solid var(--brand-fill);
}

.task-detail-ajax-shell {
  position: relative;
}

.task-detail-loading {
  align-items: center;
  background: #fff;
  border: var(--rule);
  border-top: 3px solid var(--brand-fill);
  box-shadow: 0 8px 24px rgba(29, 31, 34, 0.08);
  color: var(--charcoal);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  left: 0;
  padding: 9px 12px;
  position: absolute;
  text-transform: uppercase;
  top: 12px;
  z-index: 2;
}

.task-detail-loading[hidden] {
  display: none;
}

.task-detail-loading span {
  animation: development-loader-pulse 0.8s ease-in-out infinite alternate;
  background: var(--brand-fill);
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  width: 9px;
}

[data-development-detail-frame][aria-busy="true"] {
  opacity: 0.52;
  pointer-events: none;
}

.task-detail-section {
  padding-top: 12px;
}

.task-step-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.task-step-list li {
  align-items: center;
  border-bottom: var(--rule);
  display: grid;
  gap: 12px;
  grid-template-columns: 34px 1fr minmax(110px, auto);
  min-height: 64px;
}

.task-step-list li > span {
  align-items: center;
  border: var(--rule);
  border-radius: 50%;
  color: var(--slate);
  display: inline-flex;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.task-step-list li.active > span {
  border-color: var(--brand-ink);
  color: var(--brand-ink);
}

.task-step-list li.done > span {
  border-color: var(--success);
  color: var(--success);
}

.task-step-list li.blocked > span {
  border-color: var(--brand-fill);
  color: var(--brand-fill);
}

.task-step-list li.blocked em {
  color: var(--brand-fill);
  font-weight: 700;
}

.task-step-list strong,
.task-step-list small {
  display: block;
}

.task-step-list small,
.task-step-list em {
  color: var(--slate);
  font-size: 12px;
}

.task-step-list em {
  font-style: normal;
  justify-self: end;
}

.task-information-panel h3 {
  border-bottom: var(--rule);
  font-size: 18px;
  margin: 0 0 12px;
  padding-bottom: 12px;
}

.task-information-panel dl {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
}

.task-information-panel dt {
  color: var(--slate);
  font-size: 12px;
  font-weight: 800;
}

.task-information-panel dd {
  line-height: 1.35;
  margin: 0 0 10px;
}

.full-width {
  justify-content: center;
  width: 100%;
}

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

.section-title-row {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.section-title-row h3,
.section-title-row p {
  margin-top: 0;
}

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

.runner-feedback-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.runner-feedback-grid article {
  border: var(--rule);
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
}

.runner-feedback-grid strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.runner-feedback-grid small {
  overflow-wrap: anywhere;
}

.runner-warning-list {
  border: 1px solid #f2bd3a;
  border-left: 6px solid #f2bd3a;
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 10px 12px;
}

.runner-warning-list p {
  margin: 0;
}

.runner-output-stack {
  border-top: var(--rule);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
}

.runner-output-stack h3 {
  margin: 0;
}

.runner-two-column {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.runner-two-column h4 {
  margin: 0 0 8px;
}

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

.development-people-grid article {
  border: var(--rule);
  border-left: 4px solid var(--brand-ink);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.development-people-grid strong,
.development-people-grid span,
.development-people-grid small {
  overflow-wrap: anywhere;
}

.development-people-grid span,
.development-people-grid small {
  color: var(--slate);
  font-size: 12px;
}

.activity-timeline {
  border-top: var(--rule);
  display: grid;
}

.activity-timeline article {
  border-bottom: var(--rule);
  display: grid;
  gap: 12px;
  grid-template-columns: 132px minmax(0, 1fr);
  padding: 12px 0;
}

.activity-timeline time,
.activity-timeline span {
  color: var(--slate);
  font-size: 12px;
}

.activity-timeline strong,
.activity-timeline span {
  display: block;
}

.activity-timeline p {
  margin: 6px 0 0;
}

.runner-log-list {
  display: grid;
  gap: 12px;
}

.runner-log-list article {
  border: var(--rule);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.runner-log-list header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.runner-log-list strong,
.runner-log-list span {
  display: block;
}

.runner-log-list span,
.runner-log-list time {
  color: var(--slate);
  font-size: 12px;
}

.runner-error {
  border-left: 4px solid var(--brand-fill);
}

.github-summary-grid,
.github-panel-grid {
  display: grid;
  gap: 12px;
}

.github-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.github-summary-grid article,
.github-panel-grid section,
.github-commit-list article {
  border: var(--rule);
  min-width: 0;
  padding: 12px;
}

.github-summary-grid article {
  border-left: 4px solid var(--brand-ink);
  display: grid;
  gap: 5px;
}

.github-summary-grid span,
.github-summary-grid small,
.github-commit-list span,
.github-commit-list small,
.github-commit-list em {
  color: var(--slate);
  font-size: 12px;
}

.github-summary-grid strong,
.github-summary-grid a,
.github-commit-list strong,
.github-commit-list a,
.github-commit-list em {
  overflow-wrap: anywhere;
}

.github-panel-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.github-panel-grid h4 {
  margin: 0 0 10px;
}

.github-commit-list {
  display: grid;
  gap: 10px;
}

.github-commit-list article {
  display: grid;
  gap: 5px;
}

.github-commit-list em {
  font-style: normal;
}

.compact-github-events article {
  grid-template-columns: 120px minmax(0, 1fr);
}

.development-section h3 {
  margin-bottom: 10px;
}

.compact-list {
  gap: 8px;
}

.development-human-assisted {
  border-top: var(--rule);
  margin-top: 18px;
  padding-top: 16px;
}

.development-human-assisted h3 {
  margin: 0 0 10px;
}

.human-assisted-row {
  background: #fff7e8;
  border-left-color: #f2bd3a;
}

.notification-link {
  align-items: center;
  border: var(--rule);
  border-radius: 2px;
  color: var(--charcoal);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  position: relative;
  text-decoration: none;
  width: 44px;
}

.notification-icon {
  border: 2px solid var(--charcoal);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  height: 19px;
  position: relative;
  width: 17px;
}

.notification-icon::before {
  background: var(--charcoal);
  border-radius: 50%;
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  width: 4px;
}

.notification-icon::after {
  background: var(--charcoal);
  border-radius: 50%;
  bottom: -7px;
  content: "";
  height: 5px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 5px;
}

.notification-count {
  align-items: center;
  background: var(--brand-fill);
  border-radius: 999px;
  color: var(--white);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  min-height: 20px;
  min-width: 20px;
  padding: 2px 5px;
  position: absolute;
  right: -7px;
  top: -8px;
}

.app-main {
  margin: 0 auto;
  max-width: 1440px;
  padding: 34px 44px 54px;
  position: relative;
}

.app-main::before {
  background: var(--brand-fill);
  content: "";
  height: 118px;
  left: 0;
  position: absolute;
  top: 34px;
  width: 14px;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  text-decoration: none;
}

.button img,
.pill img,
.state-badge img,
.request-row small img {
  height: 16px;
  object-fit: contain;
  width: 16px;
}

.button-primary img,
.pill img,
.state-badge img {
  filter: brightness(0) invert(1);
}

.button-primary {
  background: var(--brand-fill);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--brand-fill-hover);
  text-decoration: none;
}

.button-light {
  background: var(--white);
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.button-dark {
  background: var(--charcoal);
  color: var(--white);
}

.button-ghost {
  background: transparent;
  color: var(--charcoal);
}

.page-heading {
  align-items: end;
  border-bottom: 8px solid var(--brand-fill);
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  min-height: 116px;
  padding: 8px 0 22px 34px;
}

.page-heading h1 {
  font-size: clamp(36px, 4.8vw, 68px);
  line-height: 1.02;
  margin: 0;
}

.eyebrow {
  color: var(--brand-fill);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.admin-section {
  border-top: 8px solid var(--charcoal);
  margin-bottom: 28px;
  padding: 24px;
}

.runner-detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.compact-runner-grid {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.runner-console-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.runner-console-card {
  min-width: 0;
}

.runner-kv-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
}

.runner-kv-list div {
  border: var(--rule);
  min-width: 0;
  padding: 12px;
}

.runner-kv-list dt {
  color: var(--slate);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.runner-kv-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.field-label {
  color: var(--slate);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.code-block {
  background: var(--charcoal);
  color: var(--white);
  margin: 16px 0 0;
  overflow-x: auto;
  padding: 18px;
}

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

.metric {
  background: var(--white);
  border-bottom: var(--rule);
  border-right: var(--rule);
  border-top: var(--rule);
  display: grid;
  grid-column: span 3;
  grid-template-columns: 52px 1fr;
  min-height: 132px;
  padding: 24px;
}

.metric:first-child {
  border-left: var(--rule);
}

.metric-red {
  border-top: 10px solid var(--brand-fill);
}

.metric-charcoal {
  border-top: 10px solid var(--charcoal);
}

.metric-slate {
  border-top: 10px solid var(--slate);
}

.metric img {
  grid-row: span 2;
  height: 42px;
  width: 42px;
}

.metric span {
  color: var(--slate);
  font-weight: 700;
}

.metric strong {
  font-size: 36px;
  line-height: 1;
}

.panel {
  background: var(--white);
  border-bottom: var(--rule);
  border-left: var(--rule);
  border-right: var(--rule);
  border-top: 8px solid var(--charcoal);
  border-radius: 0;
  padding: 26px;
}

.panel.narrow {
  max-width: 760px;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  border-bottom: var(--rule);
  margin-bottom: 20px;
  padding-bottom: 14px;
}

.panel-heading h2 {
  font-size: 22px;
  margin: 0;
}

.panel-heading img {
  height: 34px;
  width: 34px;
}

.monitoring-admin {
  display: grid;
  gap: 18px;
}

.monitoring-header {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #d0d5dd;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 22px;
}

.monitoring-header h2 {
  font-size: 26px;
  margin: 0 0 6px;
}

.monitoring-header p {
  margin: 0;
}

.monitoring-run-status {
  align-items: flex-start;
  background: var(--white);
  border: 1px solid #d0d5dd;
  display: grid;
  gap: 4px;
  min-width: 260px;
  padding: 14px;
}

.monitoring-run-status span {
  color: var(--slate);
  font-size: 13px;
}

.monitoring-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.monitoring-kpis div {
  background: #f9fafb;
  border: 1px solid #d0d5dd;
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
}

.monitoring-kpis span {
  color: var(--slate);
  font-weight: 700;
}

.monitoring-kpis strong {
  font-size: 30px;
  line-height: 1;
}

.monitoring-filters {
  align-items: end;
  border: 1px solid #d0d5dd;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  padding: 16px;
}

.monitoring-filters label {
  display: grid;
  gap: 5px;
}

.monitoring-check {
  align-items: center;
  display: flex !important;
  gap: 8px;
  min-height: 40px;
}

.monitoring-check input {
  height: 16px;
  width: 16px;
}

.monitoring-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(340px, 0.9fr);
}

.monitoring-table-panel,
.monitoring-detail-panel {
  border: 1px solid #d0d5dd;
  min-width: 0;
}

.monitoring-table-panel {
  background: var(--white);
}

.monitoring-detail-panel {
  background: #fff7ed;
  padding: 18px;
}

.selected-row {
  background: #eef4ff;
}

.tag.severity-critical {
  background: #fff1f3;
  color: var(--brand-fill);
}

.tag.severity-error {
  background: #fff7ed;
  color: #b54708;
}

.tag.severity-warning {
  background: #fffbeb;
  color: #92400e;
}

.tag.severity-info {
  background: #eef4ff;
  color: var(--cobalt);
}

.monitoring-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 18px;
}

.monitoring-summary div,
.monitoring-bug-link {
  background: var(--white);
  border: 1px solid #fed7aa;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.monitoring-summary dt,
.monitoring-bug-link span {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.monitoring-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.monitoring-log {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
}

.compact-timeline article {
  padding: 10px 0;
}

.monitoring-workflow {
  align-items: center;
  background: #ecfdf3;
  border: 1px dashed #12b76a;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
}

.monitoring-workflow span {
  background: var(--white);
  border: 1px solid #abefc6;
  padding: 6px 8px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: var(--rule);
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--slate);
  font-size: 12px;
  text-transform: uppercase;
}

.row-done td {
  background: rgba(0, 153, 102, 0.1);
}

.row-canceled td {
  background: var(--light-grey);
  color: var(--slate);
}

.filter-bar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-bar label {
  color: var(--slate);
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
  text-transform: uppercase;
}

.filter-bar input,
.filter-bar select {
  background: var(--white);
  border: var(--rule);
  border-radius: 2px;
  min-height: 38px;
  min-width: 150px;
  padding: 8px 10px;
}

.filter-bar .checkbox-line {
  align-items: center;
  display: flex;
  min-height: 38px;
}

.filter-bar .checkbox-line input {
  min-height: auto;
  min-width: auto;
  width: auto;
}

.compact-filter {
  justify-content: flex-start;
}

.request-list {
  display: grid;
  gap: 10px;
}

.notification-list {
  display: grid;
  gap: 0;
}

.notification-item {
  border-top: var(--rule);
  display: grid;
  gap: 8px;
  padding: 16px 0;
}

.notification-item.unread {
  border-left: 6px solid var(--brand-fill);
  padding-left: 14px;
}

.notification-item div {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.notification-item strong,
.notification-item span {
  display: block;
}

.notification-item span,
.notification-item p {
  color: var(--slate);
}

.notification-item p {
  line-height: 1.45;
  margin: 0;
}

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

.preference-form fieldset {
  border: var(--rule);
  margin: 0;
  padding: 14px;
}

.preference-form legend {
  color: var(--charcoal);
  font-weight: 800;
  padding: 0 6px;
}

.form-switch-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.form-switch-row input {
  height: 18px;
  width: 18px;
}

.event-type-list ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.tab-list {
  border-bottom: var(--rule);
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.tab-list a {
  color: var(--slate);
  font-weight: 800;
  padding: 0 0 12px;
  text-decoration: none;
}

.tab-list a.active {
  border-bottom: 3px solid var(--brand-fill);
  color: var(--charcoal);
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-row {
  border: var(--rule);
  display: grid;
  gap: 4px;
  padding: 12px;
}

.audit-row span {
  color: var(--slate);
  font-size: 13px;
}

.request-row {
  border: var(--rule);
  border-left: 6px solid var(--brand-fill);
  border-radius: 0;
  color: var(--charcoal);
  display: grid;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 12px;
}

.request-row > * {
  max-width: 100%;
  min-width: 0;
}

.request-row span {
  font-weight: 700;
}

.request-row small {
  align-items: center;
  color: var(--slate);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow-wrap: anywhere;
}

.request-row.blocked {
  border-left-color: var(--brand-fill);
  background: #fff8f8;
}

.linked-request-panel {
  border-top: var(--rule);
  margin-top: 18px;
  padding-top: 18px;
}

.linked-request-form {
  border-top: var(--rule);
  margin-top: 12px;
  padding-top: 12px;
}

.agent-log-row a {
  color: inherit;
}

.agent-log-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.agent-log-actions details {
  border: var(--rule);
  padding: 10px;
}

.agent-log-actions summary {
  cursor: pointer;
  font-weight: 700;
}

.agent-json-block {
  margin-top: 10px;
  max-height: 360px;
}

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

td small {
  color: var(--slate);
  display: block;
  margin-top: 4px;
}

.task-failed td {
  background: #fff1f1;
}

.task-stale td {
  background: #fff8e8;
}

.roadmap-board {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roadmap-card {
  border: var(--rule);
  border-top: 8px solid var(--brand-fill);
  display: grid;
  gap: 14px;
  padding: 20px;
}

.roadmap-card-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.roadmap-card-header span {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.roadmap-card h2 {
  font-size: 22px;
  margin: 0;
}

.roadmap-card p,
.roadmap-summary {
  line-height: 1.55;
  margin: 0;
}

.roadmap-summary {
  border-top: var(--rule);
  color: var(--slate);
  margin-top: 16px;
  padding-top: 12px;
}

.handoff-box {
  border-top: var(--rule);
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
}

.handoff-box span,
.handoff-box small {
  color: var(--slate);
}

.error-text {
  color: var(--brand-fill) !important;
}

.form-warning {
  background: #fff6df;
  border-left: 4px solid var(--gold);
  color: var(--charcoal);
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 10px 12px;
}

.workflow-strip {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  overflow-x: auto;
}

.workflow-strip span {
  background: var(--light-grey);
  border-right: 2px solid var(--white);
  border-bottom: 6px solid var(--slate);
  border-radius: 0;
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 700;
  min-height: 58px;
  padding: 10px;
}

.workflow-strip span.current {
  background: var(--charcoal);
  border-bottom-color: var(--brand-fill);
  color: var(--white);
}

.state-badge,
.pill {
  background: var(--charcoal);
  border-radius: 2px;
  color: var(--white);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  align-items: center;
  padding: 7px 11px;
}

.pill-bug {
  background: var(--brand-fill);
}

.bug-fast-track {
  align-items: center;
  background: var(--brand-fill);
  color: var(--white);
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto auto;
  margin: -8px 0 28px;
  padding: 18px 26px;
}

.bug-fast-track strong,
.bug-fast-track span {
  display: block;
}

.bug-fast-track span {
  margin-top: 3px;
}

.bug-fast-track form {
  margin: 0;
}

.bug-fast-track .button-light {
  border-color: var(--white);
}

.bug-fast-track .button-primary {
  background: var(--charcoal);
}

.communication-panel {
  margin-bottom: 28px;
}

.proposal-panel {
  margin-bottom: 28px;
}

.communication-flow {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  overflow-x: auto;
}

.communication-flow article {
  background: var(--light-grey);
  border-bottom: 6px solid var(--slate);
  border-right: 2px solid var(--white);
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 14px;
}

.communication-flow article.done {
  border-bottom-color: var(--jade);
}

.communication-flow article.stopped {
  border-bottom-color: var(--status-danger-fg, #dc2626);
}

.communication-flow article.current {
  background: var(--charcoal);
  border-bottom-color: var(--brand-fill);
  color: var(--white);
}

.communication-flow strong,
.communication-flow span {
  display: block;
}

.communication-flow span {
  color: inherit;
  font-size: 12px;
}

.communication-flow form {
  align-self: end;
  margin: 0;
}

.meta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  margin: 18px 0 0;
}

.meta-grid div {
  border-top: var(--rule);
  padding-top: 10px;
}

.meta-grid dt {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.meta-grid dd {
  margin: 4px 0 0;
}

.inline-button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.inline-button-row form {
  margin: 0;
}

.deploy-key-list,
.repository-bootstrap-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.deploy-key-list article,
.repository-bootstrap-list article,
.deployment-run-log {
  border-top: var(--rule);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.deploy-key-list article > div,
.repository-bootstrap-list article > div,
.deployment-run-log > div {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.deploy-key-list small,
.repository-bootstrap-list small,
.deployment-run-log small {
  color: var(--slate);
  overflow-wrap: anywhere;
}

.deploy-key-list textarea,
.repository-bootstrap-list textarea,
.deployment-run-log textarea {
  background: var(--light-grey);
  border: var(--rule);
  color: var(--charcoal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  min-height: 84px;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.copy-field {
  display: grid;
  gap: 8px;
}

.copy-field .button {
  justify-self: start;
}

.api-key-output input {
  background: var(--light-grey);
  border: var(--rule);
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  padding: 9px 10px;
  width: 100%;
}

.admin-tabs {
  border-bottom: var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.admin-tab {
  border: var(--rule);
  border-bottom: 0;
  color: var(--charcoal);
  font-weight: 700;
  padding: 12px 16px;
  text-decoration: none;
}

.admin-tab.active {
  background: var(--charcoal);
  color: var(--white);
}

.body-copy {
  line-height: 1.6;
  white-space: pre-line;
}

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

.project-mode-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.project-mode-fieldset legend {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.project-mode-fieldset #id_onboarding_mode,
.project-mode-fieldset ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-mode-fieldset #id_onboarding_mode > div {
  min-width: 0;
}

.project-mode-fieldset #id_onboarding_mode > div label,
.project-mode-fieldset li label {
  align-items: center;
  border: var(--rule);
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  position: relative;
  text-align: center;
  text-transform: none;
}

.project-mode-fieldset #id_onboarding_mode > div + div label,
.project-mode-fieldset li + li label {
  border-left: 0;
}

.project-mode-fieldset #id_onboarding_mode input[type="radio"] {
  block-size: 1px;
  inline-size: 1px;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  pointer-events: none;
  position: absolute;
}

.project-mode-fieldset #id_onboarding_mode label:has(input:checked) {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}

.project-mode-fieldset #id_onboarding_mode label:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--brand-fill) 40%, transparent);
  outline-offset: 2px;
}

.modernization-create-fields {
  border-left: 4px solid var(--brand-fill);
  display: grid;
  gap: 14px;
  padding-left: 16px;
}

.modernization-create-fields[hidden] {
  display: none;
}

.form-stack,
.stacked-form {
  display: grid;
  gap: 16px;
}

.stacked-form {
  border-top: var(--rule);
  padding-top: 16px;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-grid .span-2 {
  grid-column: span 2;
}

.admin-panel {
  display: grid;
  gap: 18px;
}

.admin-section-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.admin-section-head.compact {
  margin-bottom: 12px;
}

.admin-section-head h2,
.admin-section-head h3 {
  margin: 0;
}

.admin-section-head p {
  color: var(--slate);
  margin: 5px 0 0;
}

.admin-card {
  background: var(--white);
  border: var(--rule);
  padding: 18px;
}

.ghost-button,
.solid-button {
  align-items: center;
  border: var(--rule);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
}

.ghost-button {
  background: var(--white);
  color: var(--charcoal);
}

.solid-button {
  background: var(--brand-fill);
  border-color: var(--brand-fill);
  color: var(--white);
}

.tag {
  border: var(--rule);
  color: var(--charcoal);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}

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

.field,
.check-field {
  display: grid;
  gap: 6px;
}

.field span,
.check-field span {
  color: var(--slate);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.check-field {
  align-items: center;
  grid-template-columns: auto 1fr;
}

.agent-admin-layout {
  display: block;
}

.agent-admin-list {
  align-content: start;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.agent-admin-item {
  background: #fbfbfb;
  border: var(--rule);
  border-left: 5px solid transparent;
  color: var(--charcoal);
  cursor: pointer;
  display: grid;
  font: inherit;
  font-weight: 900;
  gap: 4px;
  isolation: isolate;
  min-height: 76px;
  padding: 10px 12px;
  position: relative;
  text-align: left;
  width: 100%;
}

.agent-admin-item > * {
  position: relative;
  z-index: 1;
}

.agent-admin-item:hover,
.agent-admin-item.active {
  background: var(--white);
  border-left-color: var(--brand-fill);
  box-shadow: 0 0 0 3px rgba(192, 87, 51, .10);
}

.agent-admin-item strong,
.agent-admin-item span,
.agent-admin-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-admin-item span,
.agent-admin-item small {
  color: var(--slate);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.agent-admin-item.is-inactive {
  background: #eef1f5;
  border-color: #c9d1dc;
  border-left-color: #8b98a8;
  box-shadow: inset 0 0 0 1px rgba(105, 117, 134, .08);
  color: #697586;
}

.agent-admin-item.is-inactive::after {
  bottom: -16px;
  color: rgba(105, 117, 134, .14);
  content: "inactive";
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  right: 14px;
  text-transform: uppercase;
}

.agent-admin-status {
  background: #e2e7ee;
  border: 1px solid #b8c2cf;
  color: #4b5565;
  font-size: 10px;
  font-weight: 900;
  justify-self: start;
  padding: 2px 6px;
  text-transform: uppercase;
}

.agent-editor {
  background: rgba(34, 34, 34, .35);
  display: grid;
  inset: 0;
  padding: 24px;
  place-items: stretch;
  position: fixed;
  z-index: 1200;
}

.agent-editor[hidden] {
  display: none;
}

.agent-editor-backdrop {
  background: transparent;
  border: 0;
  cursor: default;
  inset: 0;
  position: absolute;
}

.agent-editor-content {
  display: contents;
}

.agent-editor-panel {
  background: var(--white);
  border: var(--rule);
  border-top: 6px solid var(--brand-fill);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
  margin: auto;
  max-height: calc(100vh - 48px);
  overflow: auto;
  position: relative;
  width: min(1280px, calc(100vw - 48px));
  z-index: 1;
}

.agent-editor-panel form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.agent-editor-heading {
  align-items: start;
  background: #fbfbfb;
  border: var(--rule);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

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

.agent-editor-heading h3 {
  color: var(--charcoal);
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
}

.agent-editor-heading p,
.agent-training-panel p,
.agent-prompt-test p {
  color: var(--slate);
  font-size: 12px;
  line-height: 1.4;
  margin: 5px 0 0;
}

.agent-editor-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-editor textarea {
  max-height: 300px;
  min-height: 92px;
}

.agent-editor textarea[name="prompt"] {
  background: #f7f7f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  min-height: 220px;
}

.agent-lock-status,
.agent-save-status,
.field-help {
  background: #fbfbfb;
  border: var(--rule);
  color: var(--slate);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  margin: 0;
  padding: 10px 12px;
}

.agent-save-status.is-saving {
  background: #fff8e8;
  border-color: #d9b36a;
  color: #7b4b00;
}

.agent-save-status.is-saved {
  background: #eefaf4;
  border-color: #6ac69a;
  color: #006b3f;
}

.agent-save-status.is-error {
  background: #fff5f7;
  border-color: #ffb5c0;
  color: var(--burgundy);
}

.agent-training-panel,
.agent-prompt-test {
  background: #fbfbfb;
  border: var(--rule);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.admin-toggle-grid {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.agent-test-output {
  background: var(--white);
  border: 1px dashed var(--pale-charcoal);
  color: var(--charcoal);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0;
  max-height: 320px;
  min-height: 120px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.agent-version-list {
  display: grid;
  gap: 8px;
}

.agent-version-row {
  align-items: center;
  background: #fbfbfb;
  border: var(--rule);
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px;
}

.agent-version-row-detail {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.agent-version-row strong,
.agent-version-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-line-editor {
  display: grid;
  gap: 8px;
}

.rule-line {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr);
}

.rule-line span {
  background: var(--soft-gray);
  border: var(--rule);
  border-radius: 2px;
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  min-height: 40px;
  padding: 10px 8px;
  text-align: center;
}

.form-errors {
  background: #fff2f4;
  border-left: 4px solid var(--brand-fill);
  color: var(--charcoal);
  font-weight: 700;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.success-callout {
  background: #effaf3;
  border-left: 4px solid #1fa463;
  color: var(--charcoal);
  font-weight: 700;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.stack-form p {
  display: grid;
  gap: 6px;
  margin: 0;
}

.stacked-form label,
.stack-form label {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stacked-form input,
.stacked-form select,
.stacked-form textarea,
.stack-form input,
.stack-form select,
.stack-form textarea,
.inline-actions input,
.inline-actions select {
  background: var(--white);
  border: var(--rule);
  border-radius: 2px;
  min-height: 40px;
  padding: 9px 10px;
  width: 100%;
}

.dropzone {
  align-items: center;
  background: var(--white);
  border: 2px dashed var(--slate);
  border-radius: 2px;
  color: var(--charcoal);
  cursor: pointer;
  display: grid;
  gap: 7px;
  min-height: 120px;
  padding: 18px;
  text-align: center;
  text-transform: none;
  transition: border-color 120ms ease, background 120ms ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  background: var(--light-grey);
  border-color: var(--brand-fill);
}

.dropzone .dropzone-input {
  border: 0;
  block-size: 1px;
  inline-size: 1px;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: auto;
}

.dropzone-title {
  font-size: 18px;
  font-weight: 700;
}

.dropzone-copy,
.dropzone-files {
  color: var(--slate);
  font-size: 13px;
  font-weight: 400;
}

.upload-progress {
  background: var(--light-grey);
  border: var(--rule);
  display: block;
  height: 8px;
  overflow: hidden;
  width: 100%;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-bar {
  background: var(--brand-fill);
  display: block;
  height: 100%;
  transition: width 900ms ease;
  width: 0;
}

.compact textarea {
  min-height: 116px;
}

.inline-actions {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
  margin-top: 16px;
}

.document-stack {
  display: grid;
  gap: 18px;
}

.document-panel {
  display: grid;
  gap: 14px;
}

.document-editor,
.document-history {
  border-top: var(--rule);
  padding-top: 12px;
}

.document-editor summary,
.document-history summary {
  align-items: center;
  color: var(--charcoal);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  margin-bottom: 12px;
}

.document-editor summary img {
  height: 16px;
  width: 16px;
}

.document-preview {
  max-height: 260px;
}

.designer-artifact-panel {
  border-top: var(--rule);
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.designer-artifact-grid {
  display: grid;
  gap: 10px;
}

.designer-artifact-card {
  align-items: center;
  border: var(--rule);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.designer-artifact-card strong,
.designer-artifact-card small,
.designer-artifact-card p {
  display: block;
}

.designer-artifact-card small,
.designer-artifact-card p {
  color: var(--slate);
}

.designer-artifact-card p {
  margin-top: 6px;
}

.artifact-preview-modal {
  border: 0;
  box-shadow: var(--shadow-strong);
  max-width: min(1120px, 94vw);
  padding: 0;
  width: 94vw;
}

.artifact-preview-modal::backdrop {
  background: rgb(32 38 46 / 62%);
}

.artifact-preview-shell {
  background: var(--white);
  display: grid;
  gap: 0;
  min-height: min(760px, 88vh);
}

.artifact-preview-shell header {
  align-items: center;
  border-bottom: var(--rule);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.artifact-preview-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.artifact-preview-actions form {
  margin: 0;
}

.artifact-preview-content {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: min(700px, 78vh);
  overflow: auto;
  padding: 16px;
}

.artifact-preview-content img {
  display: block;
  max-height: calc(78vh - 32px);
  max-width: 100%;
  object-fit: contain;
}

.artifact-preview-content iframe {
  border: 0;
  height: min(700px, 78vh);
  width: 100%;
}

.artifact-preview-content pre {
  background: var(--paper);
  border: var(--rule);
  margin: 0;
  max-height: min(700px, 78vh);
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  width: 100%;
}

.artifact-preview-loading,
.artifact-preview-error {
  color: var(--slate);
  font-weight: 700;
}

.version-row,
.palette-row {
  border-top: var(--rule);
  display: grid;
  gap: 10px;
  padding: 14px 0;
}

.version-row div,
.palette-row div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.version-row span,
.palette-row span {
  color: var(--slate);
}

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

.field-grid section {
  border-top: var(--rule);
  min-width: 0;
  padding-top: 10px;
}

.field-grid small,
.approval-status,
.approval-pair {
  color: var(--slate);
  font-size: 12px;
}

.field-grid small {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.field-grid p {
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.approval-pair {
  border-top: var(--rule);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 12px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-row form {
  margin: 0;
}

.doc-block {
  background: var(--light-grey);
  border: var(--rule);
  box-sizing: border-box;
  color: var(--charcoal);
  font: 13px/1.55 "Trebuchet MS", Arial, sans-serif;
  margin: 0;
  max-height: 520px;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 16px;
  white-space: pre-wrap;
}

.compact-doc {
  margin-bottom: 16px;
  max-height: 220px;
}

.markdown-content {
  white-space: normal;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  color: var(--charcoal);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
  margin: 18px 0 8px;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child,
.markdown-content h5:first-child,
.markdown-content h6:first-child,
.markdown-content p:first-child,
.markdown-content ul:first-child,
.markdown-content ol:first-child,
.markdown-content pre:first-child {
  margin-top: 0;
}

.markdown-content h1 {
  font-size: 22px;
}

.markdown-content h2 {
  font-size: 19px;
}

.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-size: 16px;
}

.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content pre {
  margin: 0 0 12px;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 24px;
}

.markdown-content li + li {
  margin-top: 4px;
}

.markdown-content code {
  background: #fff;
  border: var(--rule);
  border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 1px 4px;
}

.markdown-content pre {
  background: #fff;
  border: var(--rule);
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.markdown-content pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

.discussion-list {
  margin-top: 18px;
}

.article-form {
  border-top: var(--rule);
  margin-top: 18px;
  padding-top: 18px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatches i {
  border: var(--rule);
  border-radius: 0;
  display: block;
  height: 28px;
  width: 44px;
}

.member-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.member-list div {
  border: var(--rule);
  border-left: 6px solid var(--slate);
  border-radius: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.member-list span {
  color: var(--slate);
}

.timeline {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
}

.timeline article {
  border-left: 4px solid var(--brand-fill);
  min-width: 0;
  padding-left: 12px;
}

.timeline article > * {
  max-width: 100%;
  min-width: 0;
}

.timeline span {
  color: var(--slate);
  font-size: 12px;
}

.timeline small,
.timeline span,
.timeline strong {
  overflow-wrap: anywhere;
}

.timeline strong {
  display: block;
  margin: 3px 0;
}

.timeline p {
  margin: 0;
  overflow-wrap: anywhere;
}

.messages {
  left: 50%;
  max-width: 860px;
  position: fixed;
  top: 92px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  z-index: 20;
}

.message {
  background: var(--charcoal);
  border-radius: 2px;
  color: var(--white);
  margin-bottom: 8px;
  padding: 12px 16px;
}

.message-error {
  background: var(--burgundy);
}

.message-success {
  background: var(--jade);
}

.empty {
  color: var(--slate);
  margin: 0;
  padding: 14px 0;
}

.login-shell {
  align-items: center;
  background: var(--white);
  display: grid;
  grid-template-columns: minmax(320px, 48%) 1fr;
  min-height: 100vh;
  overflow: hidden;
  padding: 52px 8vw;
  position: relative;
}

.login-body::before {
  height: 18px;
}

.login-body .app-main {
  max-width: none;
  padding: 0;
}

.login-body .app-main::before {
  display: none;
}

.login-accent {
  background: #db6a3f;
  height: 6px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.login-panel {
  position: relative;
  z-index: 1;
}

.login-logo {
  height: auto;
  margin-bottom: 42px;
  width: 184px;
}

.login-panel h1 {
  font-size: clamp(52px, 6vw, 86px);
  line-height: 0.95;
  margin: 0 0 22px;
}

.login-panel p {
  color: var(--slate);
  font-size: 19px;
  line-height: 1.45;
  max-width: 520px;
}

.sign-in {
  margin-top: 18px;
  min-width: 230px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  max-width: 360px;
}

.login-form p {
  display: grid;
  gap: 6px;
  margin: 0;
}

.login-form label {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-form input {
  background: var(--white);
  border: var(--rule);
  border-radius: 2px;
  min-height: 44px;
  padding: 9px 10px;
  width: 100%;
}

.login-form .errorlist {
  color: var(--burgundy);
  font-size: 13px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.login-metrics {
  align-self: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  justify-self: end;
  max-width: 460px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.login-metrics div {
  background: rgba(255, 255, 255, 0.94);
  border: var(--rule);
  border-top: 8px solid var(--brand-fill);
  border-radius: 0;
  padding: 18px;
}

.login-metrics strong {
  display: block;
  font-size: 30px;
}

.login-metrics span {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}



/* Request detail layout */
.request-detail-hero {
  border-bottom: 8px solid var(--brand-fill);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  margin-bottom: 28px;
  min-height: 260px;
  padding: 10px 0 28px 34px;
}

.request-detail-hero-main {
  align-self: end;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.request-detail-hero-main h1 {
  font-size: clamp(38px, 4.4vw, 66px);
  line-height: 1.02;
  margin: 0;
  overflow-wrap: anywhere;
}

.request-detail-hero-main p:not(.eyebrow) {
  color: var(--slate);
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
  max-width: 880px;
}

.request-detail-hero-side {
  align-self: stretch;
  border-left: var(--rule);
  display: grid;
  gap: 14px;
  grid-template-rows: 1fr auto;
  padding-left: 22px;
}

.request-status-card {
  background: var(--charcoal);
  border-bottom: 8px solid var(--brand-fill);
  color: var(--white);
  display: grid;
  gap: 8px;
  min-height: 152px;
  padding: 22px;
}

.request-status-card img {
  height: 34px;
  width: 34px;
}

.request-status-card span,
.request-fact-grid span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.request-status-card strong {
  align-self: end;
  font-size: 25px;
  line-height: 1.1;
}

.request-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.request-hero-actions form {
  margin: 0;
}

.request-fact-grid {
  border: var(--rule);
  border-bottom: 0;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.request-fact-grid article {
  border-bottom: var(--rule);
  border-right: var(--rule);
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 16px;
}

.request-fact-grid article:nth-child(6n) {
  border-right: 0;
}

.request-fact-grid span {
  color: var(--slate);
}

.request-fact-grid strong {
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.request-primary-tabs {
  align-items: stretch;
  border-bottom: var(--rule);
  display: flex;
  margin: -28px 0 28px;
  min-height: 50px;
}

.request-primary-tab {
  background: var(--white);
  border: 0;
  border-right: var(--rule);
  color: var(--charcoal);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 15px 20px;
  text-transform: uppercase;
}

.request-primary-tab:hover,
.request-primary-tab:focus-visible {
  background: var(--light-grey);
  outline: 2px solid var(--brand-ink);
  outline-offset: -2px;
}

.request-primary-tab.is-active {
  background: var(--charcoal);
  color: var(--white);
}

.runner-live-dot {
  background: var(--slate);
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  margin-right: 8px;
  width: 8px;
}

.runner-live-dot[data-state="queued"],
.runner-live-dot[data-state="running"],
.runner-live-dot[data-state="streaming"] {
  background: var(--jade);
  box-shadow: 0 0 0 4px rgba(0, 153, 102, 0.18);
}

.runner-live-dot[data-state="failed"],
.runner-live-dot[data-state="degraded"] {
  background: var(--brand-fill);
}

.runner-live-dot[data-state="terminal"],
.runner-live-dot[data-state="succeeded"] {
  background: var(--gold);
}

.runner-live-panel {
  border: var(--rule);
  border-top: 8px solid var(--brand-fill);
  margin-bottom: 28px;
  min-width: 0;
}

.runner-live-panel[hidden] {
  display: none;
}

.manual-review-panel[hidden] {
  display: none;
}

.manual-review-summary {
  border-bottom: var(--rule);
  border-top: var(--rule);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manual-review-summary > div {
  min-width: 0;
  padding: 18px 20px;
}

.manual-review-summary > div + div {
  border-left: var(--rule);
}

.manual-review-summary code,
.manual-review-finding-heading code {
  overflow-wrap: anywhere;
}

.manual-review-note,
.manual-review-acknowledge,
.manual-review-findings {
  margin: 20px 24px;
}

.manual-review-findings ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.manual-review-findings li {
  border-top: var(--rule);
  padding: 18px 0;
}

.manual-review-finding-heading {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .manual-review-summary {
    grid-template-columns: 1fr;
  }

  .manual-review-summary > div + div {
    border-left: 0;
    border-top: var(--rule);
  }

  .manual-review-finding-heading {
    display: grid;
  }
}

.runner-live-header {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 22px 24px;
}

.runner-live-header h2,
.runner-live-controls h3 {
  margin: 0;
}

.runner-live-state {
  border-left: 4px solid var(--brand-fill);
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 7px 0 7px 16px;
}

.runner-live-state span,
.runner-live-summary dt,
.runner-live-controls-heading span {
  color: var(--slate);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.runner-live-state strong {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.runner-agents {
  border-top: var(--rule);
  padding: 18px 24px 22px;
}

.runner-agents-headline {
  font-weight: 800;
  margin: 0 0 12px;
}

.runner-agent-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.runner-agent {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
}

.runner-agent-icon {
  font-weight: 800;
  text-align: center;
}

.runner-agent-name {
  overflow-wrap: anywhere;
}

.runner-agent-state {
  color: var(--slate);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.runner-agent-waiting .runner-agent-icon,
.runner-agent-waiting .runner-agent-name {
  color: var(--slate);
}

.runner-agent-working .runner-agent-icon {
  color: var(--status-info-fg, #2563eb);
}

.runner-agent-done .runner-agent-icon {
  color: var(--status-success-fg, #15803d);
}

.runner-agent-failed .runner-agent-icon,
.runner-agent-failed .runner-agent-state,
.runner-agents-failure {
  color: var(--status-danger-fg, #dc2626);
}

.runner-agents-failure {
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}

.runner-chat {
  border-top: var(--rule);
  padding: 18px 24px 22px;
}

.runner-chat[hidden],
.runner-chat-questions[hidden] {
  display: none;
}

.runner-chat h3 {
  margin: 0 0 12px;
}

.runner-chat-questions {
  background: var(--status-warning-bg, #fbefd9);
  border-left: 4px solid var(--status-warning-fg, #b45309);
  margin-bottom: 16px;
  padding: 12px 16px;
}

.runner-chat-questions p {
  margin: 4px 0 8px;
}

.runner-chat-questions ol {
  margin: 0;
  padding-left: 20px;
}

.runner-chat-questions li + li {
  margin-top: 8px;
}

.runner-chat-columns {
  column-gap: 16px;
  display: grid;
  grid-template-columns: repeat(var(--runner-chat-columns, 1), minmax(0, 1fr));
  row-gap: 10px;
}

.runner-chat-team { grid-template-columns: minmax(0, 1fr); }
.runner-chat-team > .runner-chat-column-label { display: none; }
.runner-chat-team > .runner-chat-turn { grid-column: 1 !important; }
.runner-chat-body.markdown-content { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.runner-chat-body pre { overflow-x: auto; max-width: 100%; white-space: pre; }
.runner-chat-body table { display: block; max-width: 100%; overflow-x: auto; }
.runner-chat-progress { display: flex; align-items: center; gap: 8px; color: #58616b; }
.runner-chat-spinner { width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid #c7ccd1; border-top-color: #27766b; border-radius: 50%; animation: runner-chat-spin 0.9s linear infinite; }
@keyframes runner-chat-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .runner-chat-spinner { animation: none; } }

.runner-chat-column-label {
  color: var(--slate);
  font-size: 11px;
  font-weight: 800;
  grid-row: 1;
  text-transform: uppercase;
}

.runner-chat-column-agent {
  display: block;
  font-weight: 600;
  text-transform: none;
}

.runner-chat-waiting {
  border: 1px dashed var(--status-neutral-bg, #d5d9de);
  border-radius: 8px;
  color: var(--slate);
  font-size: 12px;
  margin: 0;
  padding: 10px 14px;
}

.runner-chat-turn {
  background: var(--status-neutral-bg, #eef0f2);
  border-radius: 8px;
  min-width: 0;
  padding: 10px 14px;
}

.runner-chat-claude,
.runner-chat-second-agent {
  background: var(--status-info-bg, #e7effc);
}

.runner-chat-synthesis {
  border: 2px solid var(--status-success-fg, #15803d);
}

.runner-chat-meta,
.runner-chat-handoff {
  color: var(--slate);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.runner-chat-body {
  margin: 6px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .runner-chat-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .runner-chat-column-label {
    display: none;
  }

  .runner-chat-turn,
  .runner-chat-waiting {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

.runner-chat-omitted {
  margin: 0;
  color: var(--slate);
  font-size: 12px;
}

.runner-chat-answers {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.runner-chat-answers[hidden],
.runner-answer[hidden] {
  display: none;
}

.runner-chat-answer {
  background: var(--status-warning-bg, #fbefd9);
  border-radius: 8px;
  padding: 10px 14px;
}

.runner-answer {
  border-top: var(--rule);
  display: grid;
  gap: 8px;
  padding: 18px 24px 22px;
}

.runner-answer h3,
.runner-answer p {
  margin: 0;
}

.runner-answer textarea {
  width: 100%;
}

.runner-answer button {
  justify-self: start;
}

.runner-live-details {
  border-top: var(--rule);
}

.runner-live-details > summary {
  color: var(--slate);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  padding: 14px 24px;
  text-transform: uppercase;
}

.runner-live-summary {
  border-bottom: var(--rule);
  border-top: var(--rule);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.runner-live-summary div {
  border-right: var(--rule);
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 18px;
}

.runner-live-summary div:last-child {
  border-right: 0;
}

.runner-live-summary dd {
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
}

.runner-live-console {
  background: #242424;
  color: #f7f7f7;
  height: min(48vh, 520px);
  min-height: 320px;
  overflow: auto;
  padding: 12px 0;
  scrollbar-color: var(--slate) #242424;
}

.runner-live-console:focus-visible {
  outline: 3px solid var(--brand-ink);
  outline-offset: -3px;
}

.runner-live-events {
  list-style: none;
  margin: 0;
  padding: 0;
}

.runner-live-event {
  border-bottom: 1px solid #494949;
  display: grid;
  gap: 6px;
  padding: 12px 18px;
}

.runner-live-event:last-child {
  border-bottom: 0;
}

.runner-live-event-failed,
.runner-live-event-error {
  border-left: 5px solid var(--brand-fill);
}

.runner-live-event-succeeded,
.runner-live-event-completed {
  border-left: 5px solid var(--jade);
}

.runner-live-event-meta {
  align-items: center;
  color: #c9d1d9;
  display: grid;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.runner-live-event-meta strong {
  color: var(--white);
  overflow-wrap: anywhere;
}

.runner-live-event pre {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.runner-live-empty {
  color: #c9d1d9;
  margin: 0;
  padding: 40px 18px;
  text-align: center;
}

.runner-live-controls {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
}

.runner-live-controls-heading,
.runner-live-control-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.runner-live-control-row {
  justify-content: flex-start;
}

.runner-live-steer {
  display: grid;
  gap: 7px;
}

.runner-live-steer > div {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.runner-live-steer textarea {
  min-height: 64px;
  resize: vertical;
}

.runner-live-feedback {
  color: var(--slate);
  margin: 0;
  min-height: 20px;
}

.request-command-center {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 0.42fr) minmax(0, 1fr);
  margin-bottom: 28px;
}

.request-command-center > .panel {
  margin-bottom: 0;
  min-width: 0;
}

.request-command-center > .communication-panel:only-child {
  grid-column: 1 / -1;
}

.request-command-center .request-approval-panel {
  border-top-color: var(--brand-fill);
}

.request-command-center .communication-panel {
  border-top-color: var(--brand-ink);
}

.request-review-tabs {
  align-items: center;
  background: var(--white);
  border-bottom: var(--rule);
  border-top: 4px solid var(--charcoal);
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 28px;
}

.request-review-tabs a {
  border-right: var(--rule);
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 800;
  min-height: 46px;
  padding: 15px 18px;
  text-decoration: none;
  text-transform: uppercase;
}

.request-review-tabs a:hover,
.request-review-tabs a:focus {
  background: var(--light-grey);
  color: var(--brand-fill);
  outline: 0;
  text-decoration: none;
}

.request-overview-grid,
.request-delivery-grid,
.request-collaboration-grid {
  gap: 18px;
}

.request-overview-grid .panel,
.request-delivery-grid .panel,
.request-collaboration-grid .panel {
  min-width: 0;
}

.request-overview-grid .span-7 {
  grid-column: span 7;
}

.request-overview-grid .span-5 {
  grid-column: span 5;
}

.request-delivery-grid .request-row,
.request-collaboration-grid .request-row {
  min-width: 0;
}

.request-document-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 28px;
}

.document-panel .panel-heading {
  gap: 12px;
}

.document-panel .panel-heading > div {
  min-width: 0;
}

.document-panel .panel-heading > h2 {
  margin-right: auto;
}

@media (max-width: 980px) {

  .request-detail-hero {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .request-detail-hero-side {
    border-left: 0;
    grid-template-rows: auto;
    padding-left: 0;
  }

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

  .request-fact-grid article:nth-child(3n),
  .request-fact-grid article:nth-child(6n) {
    border-right: 0;
  }

  .runner-live-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .runner-live-summary div:nth-child(2n) {
    border-right: 0;
  }

  .request-overview-grid .span-7,
  .request-overview-grid .span-5 {
    grid-column: span 12;
  }

  .request-command-center,
  .communication-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .request-command-center .communication-flow {
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .request-document-stack {
    grid-template-columns: 1fr;
  }

  .app-header,
  .app-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .metric,
  .monitoring-detail-panel,
  .monitoring-table-panel,
  .roadmap-card,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 12;
  }

  .monitoring-header,
  .monitoring-layout {
    grid-template-columns: 1fr;
  }

  .monitoring-header {
    align-items: stretch;
    flex-direction: column;
  }

  .monitoring-kpis,
  .monitoring-filters,
  .monitoring-summary {
    grid-template-columns: 1fr;
  }

  .page-heading,
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading {
    gap: 14px;
  }

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

  .communication-flow {
    grid-template-columns: repeat(7, minmax(180px, 1fr));
  }

  .field-grid,
  .runner-detail-grid,
  .runner-console-grid,
  .runner-kv-list,
  .development-layout,
  .development-workbench,
  .development-overview-grid,
  .development-detail-grid,
  .development-status-grid,
  .development-detail-columns,
  .development-people-grid,
  .github-summary-grid,
  .github-panel-grid,
  .runner-feedback-grid,
  .runner-two-column,
  .approval-pair,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .test-phase-timeline,
  .test-phase-audit-row {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-metrics {
    justify-self: stretch;
    margin-top: 30px;
  }

  .development-stats {
    grid-template-columns: 1fr;
  }

  .development-list-panel {
    border-right: 0;
    border-bottom: var(--rule);
  }

  .roadmap-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {

  .test-phase-heading,
  .test-phase-card-heading {
    flex-wrap: wrap;
  }

  .test-phase-status {
    margin-left: 40px;
  }

  .test-evidence-list > div {
    grid-template-columns: 1fr;
  }

  .request-detail-hero-main h1 {
    font-size: 34px;
  }

  .request-fact-grid {
    grid-template-columns: 1fr;
  }

  .request-fact-grid article,
  .request-fact-grid article:nth-child(3n),
  .request-fact-grid article:nth-child(6n) {
    border-right: 0;
  }

  .request-primary-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-primary-tab {
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  .runner-live-header {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .runner-live-state {
    border-left: 0;
    border-top: 4px solid var(--brand-fill);
    min-width: 0;
    padding: 12px 0 0;
  }

  .runner-live-summary {
    grid-template-columns: 1fr;
  }

  .runner-live-summary div,
  .runner-live-summary div:nth-child(2n) {
    border-bottom: var(--rule);
    border-right: 0;
  }

  .runner-live-summary div:last-child {
    border-bottom: 0;
  }

  .runner-live-console {
    height: 52vh;
    min-height: 280px;
  }

  .runner-live-controls {
    padding: 18px;
  }

  .runner-live-steer > div {
    grid-template-columns: 1fr;
  }

  .runner-live-steer button {
    justify-self: stretch;
  }

  .request-review-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-review-tabs a {
    border-bottom: var(--rule);
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
    padding-top: 14px;
    position: static;
  }

  .metric-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .development-tabs,
  .task-detail-tabs,
  .development-detail-header {
    flex-direction: column;
  }

  .development-filter-row,
  .activity-timeline article,
  .task-step-list li {
    grid-template-columns: 1fr;
  }

  .metric {
    grid-column: span 1;
  }

  .login-metrics {
    grid-template-columns: 1fr;
  }
}

.solution-governance-warning {
  background: #fff8e6;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  color: #5a4100;
  font-weight: 700;
  margin: 16px 0;
  padding: 12px 14px;
}

.solution-stage-stepper {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
  margin: 16px 0 20px;
  padding: 0;
}

.solution-stage-step {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-height: 86px;
  padding: 12px;
}

.solution-stage-step strong,
.solution-stage-step small {
  display: block;
}

.solution-stage-step.complete {
  background: #edf7ee;
  border-color: #9acaa0;
}

.solution-stage-step.current {
  background: #eaf3ff;
  border-color: #72a6df;
}

.solution-stage-step.locked {
  background: #f7f7f7;
  color: #666;
}

.solution-workflow-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.solution-workflow-main,
.solution-workflow-side {
  display: grid;
  gap: 16px;
}

.solution-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

.solution-card h3 {
  margin-top: 0;
}

.solution-package-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.solution-package-form .form-field {
  margin: 0;
}

.solution-package-form button {
  justify-self: start;
}

.inline-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.artifact-json {
  background: #f6f7f8;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  max-height: 420px;
  max-width: 100%;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

#modernization-workflow .meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#modernization-workflow .meta-grid > div,
#modernization-workflow .meta-grid dd,
#modernization-workflow .meta-grid code {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 980px) {
  #modernization-workflow .meta-grid,
  .solution-stage-stepper,
  .solution-workflow-layout,
  .solution-package-form {
    grid-template-columns: 1fr;
  }
}

/* Runner decision surface — a blocked run has to be unmissable, not just present. */
.runner-decision-banner {
  background: #fff6f1;
  border: 1px solid var(--brand, #d2502a);
  border-left-width: 4px;
  border-radius: 6px;
  margin: 18px 0 0;
  padding: 16px 18px;
}

.runner-decision-banner > strong {
  color: #8a2d12;
  display: block;
  font-size: 15px;
  margin-bottom: 12px;
}

.runner-decision-list {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.runner-decision {
  background: var(--white, #fff);
  border: 1px solid #f0d4c8;
  border-radius: 5px;
  padding: 12px 14px;
}

.runner-decision-question {
  font-size: 14px;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.runner-decision-reason {
  border: 1px solid #d8dee4;
  border-radius: 4px;
  box-sizing: border-box;
  display: block;
  font: inherit;
  font-size: 13px;
  margin-bottom: 10px;
  padding: 8px 10px;
  width: 100%;
}

.runner-decision-reason:disabled {
  background: #f4f5f7;
  color: var(--slate, #5b6670);
}

.runner-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Count of open decisions, shown on the tab so it is visible from any other tab. */
.runner-decision-badge {
  background: var(--brand, #d2502a);
  border-radius: 999px;
  color: var(--white, #fff);
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
  min-width: 16px;
  padding: 3px 6px;
  text-align: center;
}

/* A human turn in the transcript, set apart from the runner's own output. */
.runner-live-event-human {
  border-left: 3px solid var(--brand, #d2502a);
}

.runner-live-event-human .runner-live-event-meta strong {
  color: #ffb59b;
}

.runner-live-hint {
  color: var(--slate, #5b6670);
  font-size: 13px;
  margin: 0 0 12px;
}

/* Task 30 §2.5: where the request is - the strip above the agent chat. */
.request-pipeline {
  background: var(--surface-card, #fff);
  border: 1px solid var(--border, rgba(20, 24, 32, 0.1));
  border-radius: var(--radius-card, 12px);
  box-shadow: 0 1px 2px rgba(20, 24, 32, 0.04);
  display: grid;
  gap: var(--sp-3, 12px);
  margin: 0 0 var(--sp-4, 16px);
  padding: var(--sp-4, 16px) var(--sp-5, 24px);
}

.request-pipeline-headline {
  color: var(--text-primary, var(--charcoal));
  font-size: var(--fs-lead, 16px);
  font-weight: var(--fw-medium, 500);
  margin: 0;
}

.request-pipeline-stations {
  counter-reset: station;
  display: grid;
  gap: var(--sp-2, 8px);
  grid-template-columns: repeat(8, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.request-pipeline-station {
  align-content: start;
  display: grid;
  gap: var(--sp-1, 4px);
  min-width: 0;
  position: relative;
}

.request-pipeline-marker {
  background: var(--status-neutral-bg, #eef0f2);
  border-radius: var(--radius-pill, 999px);
  display: block;
  height: 6px;
  transition: background-color 0.2s ease;
}

.request-pipeline-label {
  color: var(--text-secondary, var(--slate));
  font-size: var(--fs-small, 13px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-pipeline-detail {
  color: var(--text-muted, #8a9099);
  font-size: var(--fs-footnote, 12px);
  line-height: var(--lh-tight, 1.25);
}

.request-pipeline-detail:empty {
  display: none;
}

.request-pipeline-station.is-done .request-pipeline-marker { background: var(--status-success-fg, #15803d); }
.request-pipeline-station.is-done .request-pipeline-label { color: var(--text-primary, var(--charcoal)); }
.request-pipeline-station.is-current .request-pipeline-marker {
  animation: request-pipeline-pulse 1.6s ease-in-out infinite;
  background: var(--status-info-fg, #2563eb);
}
.request-pipeline-station.is-current .request-pipeline-label,
.request-pipeline-station.is-attention .request-pipeline-label,
.request-pipeline-station.is-returned .request-pipeline-label,
.request-pipeline-station.is-failed .request-pipeline-label {
  color: var(--text-primary, var(--charcoal));
  font-weight: var(--fw-medium, 500);
}
.request-pipeline-station.is-attention .request-pipeline-marker { background: var(--status-warning-fg, #b45309); }
.request-pipeline-station.is-returned .request-pipeline-marker {
  background: repeating-linear-gradient(90deg, var(--status-warning-fg, #b45309) 0 6px, var(--status-warning-bg, #fbefd9) 6px 10px);
}
.request-pipeline-station.is-failed .request-pipeline-marker { background: var(--status-danger-fg, #dc2626); }

@keyframes request-pipeline-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .request-pipeline-station.is-current .request-pipeline-marker { animation: none; }
}

.request-pipeline-review {
  background: var(--status-warning-bg, #fbefd9);
  border-radius: var(--radius, 8px);
  display: grid;
  gap: var(--sp-3, 12px);
  padding: var(--sp-3, 12px) var(--sp-4, 16px);
}

.request-pipeline-review p { margin: 0; }

.request-pipeline-review[hidden] { display: none; }

.request-pipeline-review-actions {
  align-items: start;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2, 8px);
}

.request-pipeline-return summary { cursor: pointer; list-style: none; }
.request-pipeline-return summary::-webkit-details-marker { display: none; }
.request-pipeline-return form {
  display: grid;
  gap: var(--sp-2, 8px);
  margin-top: var(--sp-2, 8px);
  min-width: min(420px, 100%);
}

@media (max-width: 640px) {
  .request-pipeline { padding: var(--sp-3, 12px) var(--sp-4, 16px); }
  .request-pipeline-stations { grid-template-columns: 1fr; }
  .request-pipeline-station {
    align-items: center;
    grid-template-columns: 10px 1fr;
  }
  .request-pipeline-marker { height: 10px; width: 10px; }
  .request-pipeline-detail { grid-column: 2; }
}

/* Task 30 §2.6: the development agents in the same chat. */
.runner-chat-server { background: var(--status-neutral-bg, #eef0f2); }
.runner-chat-human { background: var(--status-warning-bg, #fbefd9); }
.runner-chat-outcome-needs_changes { border-left: 3px solid var(--status-warning-fg, #b45309); }
.runner-chat-outcome-fail { border-left: 3px solid var(--status-danger-fg, #dc2626); }
.runner-chat-outcome-pass { border-left: 3px solid var(--status-success-fg, #15803d); }
