/* Additions on top of Pico. Colours follow Pico's light/dark variables. */
:root {
  --pico-font-size: 93.75%;
  --ok: #2f9e44;
  --bad: #e03131;
  --warn: #e8890c;
  --idle: #868e96;
  --busy: #1c7ed6;
}
body > header, body > main, body > footer { padding-block: 1rem; }
nav.top { border-bottom: 1px solid var(--pico-muted-border-color); margin-bottom: 1.5rem; }
nav.top a[aria-current] { font-weight: 700; text-decoration: underline; }
nav.top form { margin: 0; }
nav.top button { margin: 0; padding: .3rem .8rem; }
h1 { font-size: 1.6rem; margin-bottom: .4rem; }
h2 { font-size: 1.2rem; margin-top: 2rem; }
.sub { color: var(--pico-muted-color); margin-bottom: 1.5rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.row form, .row button, .row [role=button] { margin: 0; width: auto; }
.inline { display: inline; margin: 0; }
button.small, [role=button].small { padding: .25rem .7rem; font-size: .85rem; width: auto; }
button.danger { --pico-background-color: var(--bad); --pico-border-color: var(--bad); }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 1rem; font-size: .78rem;
  font-weight: 600; color: #fff; background: var(--idle); white-space: nowrap; }
.badge.succeeded, .badge.ready, .badge.healthy, .badge.reused, .badge.active { background: var(--ok); }
.badge.failed, .badge.unreachable, .badge.unhealthy, .badge.exited, .badge.dead { background: var(--bad); }
/* "running" is a job in progress (busy); a running environment is shown as .up (good). */
.badge.running, .badge.starting, .badge.building, .badge.deploying, .badge.creating { background: var(--busy); }
.badge.up { background: var(--ok); }
.badge.cancelled, .badge.pending_host_key, .badge.unverified { background: var(--warn); }

.notice, .error { padding: .7rem 1rem; border-radius: var(--pico-border-radius); margin-bottom: 1rem;
  border-left: 4px solid var(--busy); background: var(--pico-card-sectioning-background-color); }
.error { border-left-color: var(--bad); }
.notice.warn { border-left-color: var(--warn); }

table td, table th { padding: .45rem .6rem; }
td.num, th.num { text-align: right; }
.muted { color: var(--pico-muted-color); }
.mono, code.block { font-family: var(--pico-font-family-monospace); font-size: .85rem; }
code.block { display: block; padding: .7rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.fingerprint { font-family: var(--pico-font-family-monospace); font-size: 1.05rem; font-weight: 600;
  overflow-wrap: anywhere; }
.empty { color: var(--pico-muted-color); padding: 1.5rem 0; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.2rem; }
dl.facts dt { color: var(--pico-muted-color); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.narrow { max-width: 28rem; margin-inline: auto; }

ol.steps { list-style: none; padding: 0; margin: 1rem 0; }
ol.steps li { display: flex; gap: .6rem; align-items: baseline; padding: .3rem 0; list-style: none; }
ol.steps .mark { width: 1.2rem; text-align: center; font-weight: 700; }
ol.steps li.succeeded .mark { color: var(--ok); }
ol.steps li.failed .mark { color: var(--bad); }
ol.steps li.running .mark { color: var(--busy); animation: pulse 1.2s ease-in-out infinite; }
ol.steps li.cancelled .mark { color: var(--warn); }
ol.steps li.pending, ol.steps li.skipped { color: var(--pico-muted-color); }
ol.steps .why { color: var(--bad); font-size: .85rem; }
@keyframes pulse { 50% { opacity: .25; } }

.log { background: #12161c; color: #d5dbe3; font-family: var(--pico-font-family-monospace);
  font-size: .8rem; line-height: 1.45; padding: .7rem .9rem; border-radius: var(--pico-border-radius);
  height: 60vh; min-height: 16rem; overflow: auto; }
.log .ln { display: flex; gap: .8rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.log .ts { color: #66707d; flex: none; user-select: none; }
.log .ln-stderr { color: #ffb4a8; }
.log .ln-system { color: #8ab4f8; }
.log:empty::before { content: "Waiting for output…"; color: #66707d; }
.log-tools { margin: 1.2rem 0 .4rem; }
.log-tools label { margin: 0; }
.narrow-left { max-width: 34rem; }
details summary { cursor: pointer; }
nav.top details.dropdown { margin: 0; }
nav.top details.dropdown summary { border: 0; background: none; padding: 0 1.2rem 0 0; height: auto; color: var(--pico-primary); }
nav.top details.dropdown summary[aria-current] { font-weight: 700; text-decoration: underline; }
td form.row input, td form.row select { margin: 0; padding: .25rem .5rem; height: auto; font-size: .9rem; }
form.row input, form.row select { margin: 0; width: auto; flex: 1 1 12rem; }
fieldset { margin: 1rem 0; }
fieldset label { display: inline-block; margin-right: 1.2rem; }
fieldset label.block { display: block; margin-right: 0; }
