@font-face {
  font-family: "Departure Mono"; src: url("fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Albert Sans Variable"; src: url("fonts/AlbertSans-Variable.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #110d14; --panel: rgb(25 20 29 / 0.94); --panel-2: rgb(33 27 38 / 0.95); --panel-solid: #19141d; --panel-2-solid: #211b26;
  --hairline: #2d2631; --hairline-strong: #3d3443;
  --text: #efe6dc; --muted: #a89c98; --faint: #776d72;
  --accent: #f08a6e; --accent-2: #8f9be0; --sky: #3b2756;
  --good: #65b8b6; --warn: #cbb16c; --bad: #e8607a;
  --sans: "Albert Sans Variable", "Helvetica Neue", Arial, sans-serif;
  --display: "Departure Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --column: min(calc(100% - 2rem), max(46rem, 66vw), 76rem);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--sky); }
body {
  margin: 0; color: var(--text); font: 0.875rem/1.45 var(--sans); font-synthesis-weight: none;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
#scene {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; image-rendering: pixelated;
  background: url("art/island_sunset_wide.png") center top / cover no-repeat, var(--sky);
}
.muted { color: var(--muted); }
.hidden { display: none !important; }
.missing { color: var(--faint); }
a { color: var(--accent); text-underline-offset: 3px; }
code { font: 0.8125rem var(--mono); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-2); outline-offset: 2px;
}

header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem;
  min-height: 3.75rem; padding: 0.5rem 2rem; background: var(--sky);
}
.brand { display: flex; align-items: center; gap: 0.75rem; margin-right: 0.5rem; }
.brand img { width: 2rem; height: 2rem; image-rendering: pixelated; }
header h1 { margin: 0; color: var(--text); font: 400 1.25rem/1 var(--display); }
.spacer { flex: 1; }
select, input[type="search"] {
  min-height: 2rem; max-width: 100%; padding: 0.25rem 0.625rem; border: 1px solid var(--hairline-strong); border-radius: 4px;
  background: var(--panel-solid); color: var(--text); font: 400 0.8125rem/1.25 var(--sans);
}
select:hover:not(:disabled) { background: var(--panel-2-solid); border-color: var(--muted); }
input[type="search"] { background: var(--bg); }
input[type="search"]::placeholder { color: var(--faint); opacity: 1; }
#run-select { max-width: 21rem; }
.updated { color: var(--muted); font-size: 0.8125rem; }
.updated.stale { color: var(--warn); }

.hero { width: var(--column); margin: 0 auto; padding: 2.5rem 0 0; }
.hero-inner { display: grid; gap: 0.75rem; width: fit-content; max-width: 100%; padding: 1.25rem 1.5rem; background: var(--panel); border: 1px solid var(--hairline); }
.hero-kicker { margin: 0; color: var(--muted); font: 400 0.75rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.hero-title { margin: 0; color: var(--text); font: 400 2rem/1.05 var(--display); }

main { width: var(--column); margin: 0 auto; padding: 2.5rem 0 7rem; }
.banner {
  margin-bottom: 0.75rem; padding: 0.75rem 1rem; background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--bad) 55%, var(--hairline)); color: var(--text);
}

.pill {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.0625rem 0.5rem; border: 1px solid var(--hairline-strong);
  border-radius: 999px; color: var(--muted); font: 500 0.75rem/1.4 var(--sans); white-space: nowrap;
}
.pill.good { color: var(--good); }
.pill.warn { color: var(--warn); }
.pill.bad { border-color: var(--bad); color: var(--bad); }
.pill.live::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: currentColor; animation: blink 1.2s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pill.live::before { animation: none; } }

.section { margin-top: 2.5rem; padding: 1.5rem; background: var(--panel); border: 1px solid var(--hairline); }
.section-title { margin: 0 0 1rem; color: var(--text); font: 600 1.25rem/1.25 var(--sans); }
.section-title::first-letter { text-transform: uppercase; }
.section-title .muted { margin-left: 0.5rem; font: 400 0.8125rem/1.5 var(--sans); }
.card { padding: 0.75rem 1rem; background: var(--bg); border: 1px solid var(--hairline); }
.card .section-title, .two-col .section-title { margin-bottom: 0.5rem; color: var(--muted); font: 500 0.8125rem/1.3 var(--sans); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
table.tbl th, table.tbl td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: middle; }
table.tbl th { border-bottom-color: var(--hairline-strong); color: var(--muted); font: 500 0.8125rem/1.3 var(--sans); white-space: nowrap; }
table.tbl tbody tr:hover { background: var(--panel-2); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 0; }
.card > .table-wrap { margin: 0 -1rem -0.75rem; }
.table-wrap > .muted, .table-wrap > .hint { display: block; margin: 0; padding: 0.75rem 1rem; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }

.strip {
  display: grid; grid-template-columns: minmax(0, 1.3fr) auto auto minmax(14rem, 1.2fr); gap: 1.5rem 2.5rem; align-items: center;
  padding: 1.25rem 1.5rem; background: var(--panel); border: 1px solid var(--hairline);
}
.strip-name { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.strip-name b { font: 600 1rem/1.3 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-big { font: 600 1.75rem/1.1 var(--sans); white-space: nowrap; }
.strip-big small { color: var(--muted); font-size: 0.9375rem; font-weight: 400; }
.strip-clock { display: flex; flex-direction: column; gap: 0.25rem; }
.strip-clock .v { font-size: 1.125rem; font-weight: 600; }
.strip-clock .k { color: var(--muted); font-size: 0.8125rem; }
.phase { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.phase-track { position: relative; height: 6px; border-radius: 2px; background: var(--hairline-strong); overflow: hidden; }
.phase-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-2); }
.phase-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 0.5rem; color: var(--muted); font-size: 0.8125rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); overflow: hidden; background: var(--bg); border: 1px solid var(--hairline); }
.kpi {
  display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; margin: 0 -1px -1px 0; padding: 0.75rem 1rem;
  border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.kpi .v { order: -1; font-size: 1.375rem; font-weight: 600; line-height: 1.1; }
.kpi .k { color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .s { color: var(--muted); font-size: 0.75rem; }

.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.625rem; }
.card-title { color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-val { font-size: 1rem; font-weight: 600; white-space: nowrap; }
.card-val small { color: var(--muted); font-size: 0.75rem; font-weight: 400; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
.log {
  max-height: 26rem; margin: 0.75rem 0 0; padding: 0.75rem 0 0; overflow: auto; border-top: 1px solid var(--hairline);
  font: 0.75rem/1.5 var(--mono); white-space: pre-wrap; word-break: break-word;
}

@media (max-width: 900px) {
  .strip { grid-template-columns: 1fr auto; }
  .phase { grid-column: 1 / -1; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  header { padding: 0.5rem 1rem; }
  #run-select { max-width: 100%; flex: 1 1 100%; }
  .hero { padding: 1.5rem 0 0; }
  .hero-title { font-size: 1.5rem; }
  main { padding: 1.5rem 0 4rem; }
  .section { margin-top: 1.5rem; }
  .section { padding: 1rem; }
}
