/* The agents UI. Built on site.css: same type, palette, gutters and buttons.
   Only what a working tool needs on top: tables, a toggle, a code-like editor. */

.agents { padding-top: 64px; }
.agents:focus { outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding-bottom: 40px; }
.page-head h1 { font-size: clamp(36px, 4vw, 56px); }
.page-head .lead { margin-top: 16px; }
.page-head .button-row { flex-shrink: 0; }
.wordmark .faint { font-weight: 400; }
.nav button { font-family: inherit; }

.block { border-top: 1px solid var(--line); padding: 40px 0; }
.block h2 { font-size: 28px; line-height: 1.2; }
.block > .stack { gap: 20px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--faint); }
.meta b { font-weight: 500; color: var(--ink); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 400; font-size: 14px; color: var(--faint); padding: 0 16px 12px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; }
td .faint { font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.status-failed { color: #a23b2a; }
.status-partial, .status-running { color: var(--muted); }
pre.summary { margin: 0; font: inherit; font-size: 14px; color: var(--muted); white-space: pre-wrap; max-width: 560px; }

select { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper); font: inherit; font-size: 17px; color: var(--ink); }
select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.field.inline { flex-direction: row; align-items: center; gap: 12px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields .full { grid-column: 1 / -1; }
textarea.body { min-height: 300px; font-size: 16px; }

.toggle { display: inline-flex; align-items: center; gap: 12px; font-size: 16px; color: var(--ink); cursor: pointer; }
.toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }

.step-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step-edit + .step-edit { margin-top: 20px; }
.variant { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.variant:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.lint { font-size: 15px; }
.lint li { margin: 4px 0; }
.lint .error { color: #a23b2a; }
.lint ul { margin: 8px 0 0; padding-left: 20px; }
.preview { white-space: pre-wrap; font-size: 16px; line-height: 1.55; }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.stat p:first-child { font-size: 36px; letter-spacing: -0.02em; line-height: 1.1; }
.stat p:last-child { font-size: 14px; color: var(--faint); margin-top: 4px; }

.sign-in { max-width: 440px; padding-top: 48px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 12px 22px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity 160ms; max-width: calc(100% - 40px); }
.toast.show { opacity: 1; }
.toast.error { background: #a23b2a; }

@media (max-width: 960px) {
  .agents { padding-top: 32px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 24px; }
  .fields, .fields.three { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-edit { padding: 20px; }
  .nav .button { width: 100%; }
}

[hidden] { display: none !important; }
