:root {
  --bg: #070c11;
  --panel: #101821;
  --line: #2a3945;
  --text: #f5f7f8;
  --muted: #adbac5;
  --cyan: #70dce6;
  --gold: #e6c16a;
  --heading: Inter, "Segoe UI", Arial, sans-serif;
}

body {
  background: radial-gradient(ellipse at 50% 0, #142531 0, transparent 600px), var(--bg);
  font-family: var(--heading);
}

header { padding-block: 14px; background: #080e14; }
header nav { flex-wrap: wrap; gap: 8px 24px; }
header nav a { display: inline-flex; align-items: center; min-height: 40px; }
main { width: min(1300px, calc(100% - 64px)); }
.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(22px, 4vw, 46px) 0 20px;
}
.hero h1 {
  margin: 0;
  font: 750 clamp(30px, 4.6vw, 60px)/1.06 var(--heading);
  letter-spacing: -.04em;
}
.hero .lead { margin: 10px 0 0; font-size: 16px; }
.hero-links { margin: 0; flex-shrink: 0; }

.button, .button.small, .button.primary, .filters button {
  min-height: 42px;
  border: 1px solid #51606a;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffffff06, transparent), #141e27;
  color: var(--text);
  box-shadow: inset 0 -2px 0 #ffffff14;
  font-weight: 650;
}
.button.primary {
  border-color: #987b42;
  background: linear-gradient(180deg, #d6a93f24, transparent), #1d1c18;
  color: #f1d794;
  box-shadow: inset 0 -2px 0 #d6a93f59;
  clip-path: none;
}
.button:hover, .button.primary:hover, .filters button:hover {
  border-color: var(--gold);
  background: #27313a;
}

.overview {
  --status-accent: var(--green);
  --status-surface: #152722;
  padding: clamp(16px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--status-accent);
  border-radius: 7px;
  background: linear-gradient(110deg, var(--status-surface), var(--panel) 65%);
}
.overview.attention { --status-accent: var(--red); --status-surface: #2c1c24; }
.overview.unknown { --status-accent: var(--gold); --status-surface: #29251b; }
.overview.maintenance { --status-accent: var(--maintenance); --status-surface: #19283a; }
.status-top, .status-heading { display: flex; align-items: center; gap: 16px; }
.status-top { justify-content: space-between; }
.status-heading .state-orb {
  display: grid;
  flex: 0 0 46px;
  place-items: center;
  margin: 0;
  height: 46px;
  border: 1px solid var(--status-accent);
  border-radius: 5px;
  color: var(--status-accent);
  background: #070c1155;
}
.status-heading .state-orb svg { width: 28px; stroke-linecap: round; stroke-linejoin: round; }
.status-heading .state-orb path { stroke-width: 2.25; }
.overview h2 { margin: 0; font: 730 clamp(19px, 2.3vw, 29px)/1.2 var(--heading); }
.overview p { margin: 4px 0 0; font-size: 14px; }
.overview .warning { margin-top: 15px; border-radius: 5px; }
.status-controls { display: grid; justify-items: end; flex-shrink: 0; gap: 4px; }
#refresh-label { color: var(--muted); font-size: 12px; }
.counts { margin-top: 16px; padding: 0; border: 0; }
.counts > div { padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: #070c1170; }
.counts strong { font: 720 22px/1.15 var(--heading); }
.counts span { font-size: 13px; }

.active-alerts { margin-top: 14px; }
.active-alerts ul { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
#toggle-alerts { margin-top: 8px; }
.alert-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #080f17;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.alert-row:hover { border-color: var(--gold); background: #17232e; }
.alert-copy { display: grid; gap: 2px; overflow-wrap: anywhere; }
.alert-copy strong { font-size: 15px; }
.alert-copy > span { color: var(--muted); font-size: 13px; font-weight: 400; }
.alert-action { display: flex; align-items: center; gap: 10px; }
.alert-action > span:last-child { color: var(--cyan); font-size: 21px; line-height: 1; }
.alert-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.alert-row .badge { justify-self: end; white-space: normal; text-align: right; }
.alert-row[data-state=fail] .alert-dot { color: var(--red); }
.alert-row[data-state=maintenance] .alert-dot { color: var(--maintenance); }
.alert-row[data-state=unknown] .alert-dot { color: var(--gold); }

section.dashboard-panel {
  margin-top: 18px;
  padding: clamp(16px, 2.5vw, 30px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(155deg, #16212b, #0c131b 55%);
}
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin: 0; font: 730 clamp(23px, 3vw, 34px)/1.2 var(--heading); letter-spacing: -.025em; }
.section-heading p:not(.eyebrow) { margin-top: 5px; font-size: 15px; }
.project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.project-tile, .service, .component { padding: clamp(14px, 1.6vw, 22px); }
.project-tile strong, .component h3 { font-weight: 700; }
.project-tile strong { font-size: 18px; }
.project-scope, .project-note { min-height: 0; font-size: 13px; }
.project-state { margin-top: auto; padding-top: 4px; font-size: 13px; }
.cards { align-items: stretch; gap: 10px; }
.service { display: flex; flex-direction: column; padding: 12px 14px; }
.service h3 { margin: 7px 0 9px; font-weight: 700; font-size: 17px; }
.service-icon { width: 22px; height: 22px; }
.service-icon svg { width: 20px; height: 20px; }
.service .bars { height: 13px; gap: 2px; margin: auto 0 6px; }
.service-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.service-evidence { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; font-size: 12px; color: var(--muted); }
.service-evidence .response { font-variant-numeric: tabular-nums; }
.button.service-details { gap: 7px; padding: 5px 10px; font-size: 12px; }
.service-details > span { color: var(--cyan); font-size: 17px; line-height: 1; }
.monitoring-baseline { color: var(--muted); font-size: 14px; }
.dialog-heading h2 { font: 720 clamp(20px, 3vw, 27px)/1.2 var(--heading); }
body > footer { margin-top: 20px; }

@media (max-width: 1040px) {
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  main { width: calc(100% - 24px); }
  header { gap: 6px 12px; padding: 8px 12px; }
  header nav { justify-content: flex-start; gap: 0 16px; }
  header nav a { font-size: 13px; }
  .hero, .status-top { align-items: start; flex-direction: column; }
  .hero { padding-top: 20px; gap: 12px; }
  .status-top { gap: 10px; }
  .status-heading { gap: 10px; }
  .status-heading .state-orb { height: 36px; flex-basis: 36px; }
  .status-heading .state-orb svg { width: 24px; }
  .status-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  .counts { gap: 6px; }
  .counts > div { padding: 6px 9px; }
  .counts strong { font-size: 19px; }
  .section-heading .button { margin-top: 12px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .search { min-width: 0; }
}
@media (max-width: 370px) {
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .alert-row { grid-template-columns: 8px minmax(0, 1fr); }
  .alert-action { grid-column: 2; justify-content: space-between; }
}
