:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #18263c;
  background: #fff;
  font-synthesis: none;
  --blue: #254f9b;
  --line: #d8e0ec;
  --muted: #53657d;
  --surface: #f4f6fa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #a85815;
  outline-offset: 4px;
}
button,
.button-link {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.secondary {
  background: #fff;
  color: #263953;
}
.primary:hover {
  background: #203eae;
}
.secondary:hover {
  background: var(--surface);
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
  line-height: 1.6;
}
.numeric {
  font-variant-numeric: tabular-nums;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
.topbar {
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
}
.brand {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.8px;
  text-decoration: none;
  color: #172c49;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand span {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-actions > span {
  font-size: 12px;
  margin-right: 12px;
}
.notice {
  padding: 12px 28px;
  background: #fff4df;
  color: #745015;
  font-size: 13px;
  border-bottom: 1px solid #e7d5ad;
}
.notice.info {
  background: #edf2ff;
  color: #2945a9;
  border-bottom-color: #d6dfff;
}
.workspace {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: calc(100vh - 78px);
}
.inbox {
  border-right: 1px solid var(--line);
  background: #fafbfd;
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.inbox-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 24px;
}
.inbox h1 {
  font-size: 17px;
  margin: 0;
}
.inbox-heading span {
  font-size: 12px;
}
.filter-label {
  font-size: 12px;
  color: var(--muted);
  padding-left: 10px;
  margin-bottom: 7px;
}
.inbox select {
  margin: 0 8px 18px;
  width: calc(100% - 16px);
  font-size: 12px;
}
.run-list {
  display: grid;
  gap: 7px;
  align-content: start;
}
.run-item {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  content-visibility: auto;
  contain-intrinsic-size: auto 83px;
  text-align: left;
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  padding: 13px 11px;
  border-radius: 6px;
  font-weight: 400;
  min-width: 0;
}
.run-item:hover {
  background: #f0f3f9;
}
.run-item[aria-current="true"] {
  border-color: #cbd5ff;
  background: #edf1ff;
}
.run-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.run-item .run-line {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
  margin-top: 7px;
  font-size: 11px;
  color: var(--muted);
}
.inbox-foot {
  margin-top: auto;
  padding: 48px 10px 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.inbox-foot strong {
  font-size: 12px;
  color: #344a65;
}
.inbox-foot p {
  margin: 7px 0 13px;
}
.empty-note {
  font-size: 13px;
  color: var(--muted);
  padding: 14px 10px;
  line-height: 1.6;
}
.detail {
  padding: 35px 40px 45px;
  min-width: 0;
  max-width: 1200px;
  width: 100%;
  margin: auto;
}
.empty-state {
  max-width: 600px;
  padding: 75px 20px;
  margin: auto;
}
.empty-symbol {
  font-size: 45px;
  color: var(--blue);
}
.empty-state h2 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.8px;
}
.empty-state p {
  max-width: 500px;
  font-size: 15px;
  line-height: 1.7;
}
.empty-state .muted {
  font-size: 12px;
  margin-top: 22px;
}
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
}
.detail-header h2 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.6px;
  margin: 9px 0 12px;
  overflow-wrap: anywhere;
}
.detail-header .muted {
  font-size: 11px;
  margin: 0;
  overflow-wrap: anywhere;
}
.description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 680px;
  margin: 0;
}
.badge {
  display: inline-block;
  white-space: nowrap;
  background: #edf1ff;
  color: #2945a9;
  border-radius: 4px;
  font-size: 11px;
  padding: 6px 8px;
  line-height: 1.3;
}
.badge.hold,
.badge.error {
  background: #fff1d7;
  color: #85500a;
}
.badge.eligible {
  background: #e8f4ec;
  color: #276743;
}
.badge.cancelled,
.badge.interrupted {
  background: #edf0f4;
  color: #52647c;
}
.context-note {
  background: var(--surface);
  padding: 12px 15px;
  border-left: 3px solid #bac8e5;
  font-size: 12px;
  line-height: 1.7;
  color: #4b6079;
  margin-top: 20px;
}
.stack-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 16px 0;
  border-block: 1px solid var(--line);
  margin: 22px 0 0;
}
.stack-summary dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.stack-summary dd {
  margin: 0;
  font:
    11px/1.7 Consolas,
    monospace;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}
.progress-region {
  margin: 20px 0 24px;
}
.progress-region > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 9px;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--blue);
}
.decision {
  background: #f5f7fc;
  border: 1px solid #dce4f0;
  border-radius: 7px;
  padding: 18px 21px;
  margin: 23px 0;
}
.decision h3 {
  margin: 0 0 7px;
  font-size: 15px;
}
.decision p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  color: #4c6079;
}
.decision.hold,
.decision.error {
  background: #fff9ef;
  border-color: #ead5af;
}
.decision.eligible {
  background: #f1f8f4;
  border-color: #bfdcc9;
}
.review-record {
  font-size: 13px;
  line-height: 1.6;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
section {
  margin-bottom: 28px;
}
section > h3,
.section-heading h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 15px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.section-heading span {
  font-size: 11px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
th {
  color: #4f637c;
  font-size: 11px;
  font-weight: 400;
  background: #f7f9fc;
}
td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}
.metrics-table td:first-child {
  width: 40%;
}
.checks {
  border-top: 1px solid var(--line);
}
.check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.check .symbol {
  font-size: 17px;
  color: #376c53;
}
.check.fail .symbol {
  color: #a2620e;
}
.check.inconclusive .symbol {
  color: #667e9b;
}
.check strong {
  font-size: 13px;
  font-weight: 600;
}
.check p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.check .outcome {
  font-size: 11px;
  color: var(--muted);
  padding-top: 2px;
}
.events {
  list-style: none;
  margin: 0;
  padding: 0;
}
.events li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 13px;
  font-size: 12px;
  line-height: 1.65;
  border-left: 1px solid var(--line);
  padding: 0 0 15px 16px;
}
.events time {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.events span {
  overflow-wrap: anywhere;
}
details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.6;
}
summary + p {
  margin-top: 15px;
}
pre {
  font:
    11px/1.7 Consolas,
    monospace;
  color: #405875;
  background: #f7f9fc;
  padding: 17px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 5px;
  max-width: 100%;
}
.identities {
  font-size: 12px;
  margin-top: 20px;
}
.identities dt {
  font-weight: 600;
  margin: 14px 0 5px;
}
.identities dd {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
}
.artifacts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}
.artifacts a {
  font-size: 12px;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.detail-footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
dialog {
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: min(650px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px 30px;
  color: #18263c;
}
dialog::backdrop {
  background: #17284366;
}
dialog p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.dialog-heading h2 {
  font-size: 25px;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
.close {
  border: 0;
  background: var(--surface);
  padding: 0;
  min-width: 34px;
  min-height: 34px;
  font-size: 23px;
  font-weight: 400;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
label {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 600;
  margin-top: 16px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #c5cfdd;
  border-radius: 5px;
  background: #fff;
  color: #263953;
  padding: 10px 11px;
  font-size: 14px;
  margin-top: 7px;
  min-height: 40px;
}
input[type="file"] {
  font-size: 12px;
  max-width: 100%;
}
textarea {
  resize: vertical;
}
.form-grid label {
  margin: 0;
}
.advanced {
  margin-top: 22px;
}
.advanced summary {
  font-size: 13px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}
.form-error {
  color: #9b321f !important;
  background: #fff4ef;
  padding: 10px;
  border-left: 3px solid #c55a37;
}
.stack-preview {
  font-size: 11px;
  line-height: 1.6;
  font-family: Consolas, monospace;
  background: var(--surface);
  padding: 12px 14px;
  overflow-wrap: anywhere;
  border-radius: 5px;
}
.stack-preview p {
  font-size: 11px;
  margin: 4px 0;
}
.stack-preview strong {
  color: #344a65;
}
@media (min-width: 1600px) {
  .detail {
    padding-inline: 65px;
  }
  .workspace {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .detail {
    padding: 28px 24px;
  }
  .brand span {
    display: none;
  }
  .topbar {
    padding: 16px 22px;
  }
  .top-actions > span {
    margin-right: 3px;
  }
  .detail-header h2 {
    font-size: 25px;
  }
}
@media (max-width: 760px) {
  .workspace {
    display: block;
  }
  .inbox {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 16px;
  }
  .inbox-heading {
    margin-bottom: 15px;
  }
  .inbox-foot {
    display: none;
  }
  .run-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 260px;
    overflow-y: auto;
  }
  .inbox select {
    max-width: 280px;
  }
  .filter-label {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
  }
  .detail {
    padding: 28px 20px;
  }
  .top-actions > span {
    display: none;
  }
  .topbar {
    gap: 12px;
    padding: 16px;
  }
  .brand {
    font-size: 22px;
  }
  .top-actions {
    gap: 7px;
  }
  .top-actions button {
    font-size: 12px;
    padding-inline: 10px;
  }
  .detail-header {
    flex-direction: column;
    gap: 10px;
  }
  .detail-header h2 {
    font-size: 25px;
  }
  .empty-state {
    padding: 35px 0;
  }
  .empty-state h2 {
    font-size: 28px;
  }
  .section-heading {
    display: block;
  }
  .section-heading span {
    display: block;
    margin: -5px 0 12px;
  }
  .metrics-table td:first-child {
    width: auto;
  }
}
@media (max-width: 430px) {
  .stack-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .top-actions {
    width: 100%;
    justify-content: space-between;
  }
  .top-actions button {
    flex: 1;
  }
  .run-list {
    grid-template-columns: 1fr;
    max-height: 210px;
  }
  .detail {
    padding: 24px 16px;
  }
  dialog {
    padding: 23px 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .action-row > * {
    flex: 1 1 auto;
  }
  .events li {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
  }
  .check {
    gap: 8px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
  }
  th,
  td {
    padding-inline: 6px;
    font-size: 12px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .check .outcome {
    max-width: 70px;
    overflow-wrap: anywhere;
  }
}
@media (pointer: coarse) {
  button,
  .button-link,
  summary {
    min-height: 44px;
  }
  input,
  select {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.demo-banner {
  margin: 0;
  padding: 0.6rem 1rem;
  background: #fff4d6;
  color: #4a3a00;
  border-bottom: 1px solid #e6d28f;
  font-size: 0.9rem;
  text-align: center;
}

:root[data-demo] #import-open,
:root[data-demo] #new-open,
:root[data-demo] #empty-new,
:root[data-demo] #cancel,
:root[data-demo] #rerun,
:root[data-demo] #review-open {
  display: none !important;
}
