@font-face {
  font-family: Inter;
  src: url("/static/inter-monitor.woff") format("woff");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #f5f7f6;
  --paper: #fff;
  --text: #152824;
  --muted: #4f6560;
  --border: #dce6e2;
  --green: #14634f;
  --green-dark: #0f503f;
  --mint: #e3f4ec;
  --mint-border: #d1e8dd;
  --focus: #337e69;
  --warning: #794700;
  --warning-bg: #fff4df;
  --error: #9a293e;
  --error-bg: #fbe9ed;
  --radius: 18px;
  --gutter: 16px;
  --tab-height: 70px;
  --tab-inset: env(safe-area-inset-bottom, 0px);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.5;
  background: var(--page);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button, select { touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .7; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus, .heading h1:focus { outline: none; }
h1, h2, p, dd, dl { margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  transform: translateY(-200%);
  z-index: 3;
  inset: 8px auto auto 8px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--green);
  border-radius: 8px;
}
.skip-link:focus { transform: none; }

.wrap {
  max-width: 892px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}
.header { border-bottom: 1px solid var(--border); background: var(--paper); }
.header-inner {
  min-height: 65px;
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; font-weight: 760; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #183b32; }
.brand-mark img { display: block; width: 28px; height: 28px; }

.main { padding-top: 22px; padding-bottom: 24px; }
.loading { text-align: center; padding-top: clamp(20px, 8vh, 96px); color: var(--muted); }
.dashboard { padding-bottom: calc(var(--tab-height) + var(--tab-inset)); }
.heading { margin-bottom: 16px; }
.heading h1 { font-size: clamp(1.75rem, 4.7vw, 2.25rem); font-weight: 730; line-height: 1.1; letter-spacing: -.05em; overflow-wrap: anywhere; }
.notice {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #f1dcb5;
  border-radius: 10px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: .875rem;
}
.surface { border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); }
.button {
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 14px;
  font-size: .875rem;
  font-weight: 650;
  text-align: center;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover, .button-primary:active { background: var(--green-dark); }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover, .button-quiet:active { background: var(--page); }
.button-secondary { background: var(--paper); border-color: var(--border); color: var(--green-dark); }
.button-secondary:hover, .button-secondary:active { background: var(--mint); border-color: var(--mint-border); }

.access { display: grid; place-items: start center; padding-top: clamp(20px, 8vh, 96px); }
.access-card {
  width: min(100%, 420px);
  padding: clamp(20px, 5vw, 36px);
  box-shadow: 0 10px 32px #193e3010;
}
.access-card h1 { font-size: clamp(1.5rem, 5vw, 1.875rem); font-weight: 740; letter-spacing: -.045em; line-height: 1.15; }
.access-card > p { color: var(--muted); margin: 10px 0 24px; }
.access-card form { display: grid; gap: 10px; }
.access-card label { font-size: .875rem; font-weight: 650; }
.access-card input {
  width: 100%;
  min-height: 56px;
  padding: 8px 12px 8px calc(.32em + 12px);
  text-align: center;
  font-size: 1.375rem;
  font-weight: 670;
  font-variant-numeric: tabular-nums;
  letter-spacing: .32em;
  background: var(--page);
  border: 1px solid #7d978f;
  border-radius: 11px;
  color: var(--text);
}
.access-card input::placeholder { color: var(--muted); opacity: .77; }
.access-card input[aria-invalid="true"] { border-color: var(--error); }
.access-card .button { min-height: 48px; margin-top: 6px; }
.feedback { color: var(--error); font-size: .875rem; font-weight: 560; }

.tab-bar {
  position: fixed;
  z-index: 2;
  inset: auto 0 0;
  padding: 6px max(12px, env(safe-area-inset-right, 0px)) calc(6px + var(--tab-inset)) max(12px, env(safe-area-inset-left, 0px));
  background: var(--paper);
  border-top: 1px solid var(--border);
}
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tab {
  min-height: 55px;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: .8125rem;
  font-weight: 620;
}
.tab svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.tab:hover { background: var(--page); }
.tab[aria-selected="true"] { background: var(--mint); color: var(--green-dark); font-weight: 720; }
.tab:focus-visible { outline-offset: -2px; }
.panel { display: grid; gap: 12px; }
.current {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: clamp(18px, 4vw, 26px);
  min-height: 160px;
  border: 1px solid var(--mint-border);
  border-radius: var(--radius);
  background: linear-gradient(125deg, var(--mint), #f0f9f4);
}
.current h2 { font-size: clamp(1.625rem, 5.6vw, 2.125rem); font-weight: 730; line-height: 1.12; letter-spacing: -.047em; overflow-wrap: anywhere; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--paper);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 660;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.status[data-kind="live"] { color: var(--green-dark); }
.status[data-kind="warning"] { background: var(--warning-bg); color: var(--warning); }
.status[data-kind="error"] { background: var(--error-bg); color: var(--error); }
.current-phase, .current-error { font-size: .9375rem; overflow-wrap: anywhere; }
.current-phase { color: var(--muted); }
.current-error { color: var(--error); }
.metrics {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) repeat(2, minmax(0, 1fr));
  padding: 16px 0;
}
.metrics div { min-width: 0; display: grid; gap: 2px; padding-inline: clamp(8px, 3vw, 24px); }
.metrics div + div { border-left: 1px solid var(--border); }
.metrics dt, .technical-grid dt, .run-metrics dt { color: var(--muted); font-size: .8125rem; font-weight: 530; overflow-wrap: anywhere; }
.metrics dd { font-size: clamp(1.125rem, 6.2vw, 1.95rem); line-height: 1.23; font-weight: 720; letter-spacing: -.043em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metrics #elapsed { font-size: clamp(1.0625rem, 5.6vw, 1.85rem); }
.technical { padding: 0 16px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-inline: 4px;
  align-self: center;
  border-right: 1.7px solid;
  border-bottom: 1.7px solid;
  margin-top: -4px;
  transform: rotate(45deg);
  flex: 0 0 auto;
}
details[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.technical summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .9375rem; font-weight: 650; }
.technical-grid, .run-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 0 16px; border-top: 1px solid var(--border); }
.technical-grid dd, .run-metrics dd { font-weight: 660; font-size: .9375rem; overflow-wrap: anywhere; }
.last-seen { color: var(--muted); padding: 0 4px; font-size: .8125rem; }
.last-seen time { color: var(--text); margin-inline-start: 3px; }

.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-heading h2 { font-size: 1.25rem; letter-spacing: -.035em; }
.panel-heading-wrap { flex-wrap: wrap; align-items: baseline; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select {
  min-height: 44px;
  max-width: 100%;
  border: 1px solid #7d978f;
  border-radius: 11px;
  background-color: var(--paper);
  padding: 6px 10px;
  color: var(--text);
  font-size: 1rem;
}
.entries { margin: 0; padding: 0 14px; list-style: none; }
.entries > li + li { border-top: 1px solid var(--border); }
.run summary { min-height: 60px; display: flex; align-items: center; gap: 8px; padding-block: 10px; }
.run-title { margin-inline-end: auto; min-width: 0; }
.run-title time, .run-title span { display: block; }
.run-title time { font-weight: 660; }
.run-state { margin-inline-start: auto; color: var(--muted); font-size: .8125rem; font-weight: 645; text-align: end; }
.run-state[data-kind="live"] { color: var(--green-dark); }
.run-state[data-kind="warning"] { color: var(--warning); }
.run-state[data-kind="error"] { color: var(--error); }
.run-mode { font-size: .8125rem; color: var(--muted); }
.list-message { padding: 16px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); background: var(--paper); }
.list-message[data-error="true"] { color: var(--error); }
.event { display: grid; grid-template-columns: minmax(0, 4.4rem) minmax(0, 1fr); column-gap: 8px; padding: 11px 0; }
.event time { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.event p { margin: 0; font-size: .9375rem; overflow-wrap: anywhere; }
.event[data-level="warning"] p { color: var(--warning); }
.event[data-level="error"] p { color: var(--error); }
.event-day { color: var(--muted); padding: 12px 0 6px; font-size: .8125rem; font-weight: 660; }
.events > .event-day + .event { border-top: 0; }
.updates { justify-self: start; }
.more { justify-self: center; }

@media (max-width: 420px) {
  .filters { width: 100%; }
  .filters select { flex: 1 1 auto; min-width: 0; }
}
@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .main { padding-block: 34px; }
  .header-inner { min-height: 72px; }
  .dashboard { padding-bottom: 0; }
  .heading { margin-bottom: 18px; }
  .tab-bar {
    position: static;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 13px;
  }
  .tabs { display: flex; gap: 4px; flex-wrap: wrap; }
  .tab { flex-direction: row; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 9px; font-size: .875rem; }
  .tab svg { width: 18px; height: 18px; }
  .panel { gap: 16px; }
  .technical, .entries { padding-inline: 20px; }
  .technical-grid, .run-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) { :root { scroll-padding-bottom: calc(var(--tab-height) + var(--tab-inset) + 12px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
