:root {
  --green: #54b847;
  --green-dark: #3d9a32;
  --ink: #212529;
  --muted: #5c5c5c;
  --line: #e6e6e6;
  --bg: #ffffff;
  --soft: #f7f7f7;
  --ok: #54b847;
  --ok-bg: #eef8ec;
  --warn: #b86e00;
  --warn-bg: #fff6e8;
  --bad: #c0392b;
  --bad-bg: #fdecea;
  --idle: #6c757d;
  --idle-bg: #f4f4f4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Open Sans", "Segoe UI", sans-serif;
}

a { color: var(--green-dark); }

a:hover { color: var(--green); }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand img {
  display: block;
  height: 58px;
  width: auto;
}

.top-contact {
  display: flex;
  gap: 18px;
  font-weight: 600;
}

.top-contact a {
  color: var(--ink);
  text-decoration: none;
}

.top-contact a:hover { color: var(--green-dark); }

.band {
  background: var(--green);
  color: #fff;
}

.band h1 {
  margin: 0;
  padding: 14px 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.tagline {
  margin: 22px 0 0;
  color: var(--muted);
}

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--state-bg);
}

.summary-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.summary h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.meta, .detail, .history-label, footer p {
  margin: 0;
  color: var(--muted);
}

.meta { margin-top: 4px; }

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--state);
  flex: 0 0 auto;
}

.operational,
.up { --state: var(--ok); --state-bg: var(--ok-bg); }
.degraded { --state: var(--warn); --state-bg: var(--warn-bg); }
.partial,
.outage,
.down { --state: var(--bad); --state-bg: var(--bad-bg); }
.unknown,
.pending { --state: var(--idle); --state-bg: var(--idle-bg); }

button {
  border: 0;
  border-radius: 4px;
  padding: 8px 16px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:hover { background: var(--green-dark); }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: 0.7; }

.services {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.service {
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--state);
  border-radius: 4px;
  background: #fff;
}

.service-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.service-copy { min-width: 0; flex: 1; }

.service h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.service .description,
.service a {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.service a:hover { color: var(--green-dark); }

.service-state { text-align: right; flex: 0 0 auto; }

.service-state strong {
  display: block;
  color: var(--state);
}

.service-state .detail { font-size: 0.92rem; }

.error {
  margin: 10px 0 0 24px;
  color: var(--state);
}

.history-label {
  margin: 14px 0 6px;
  font-size: 0.82rem;
}

.history {
  display: flex;
  height: 12px;
  max-width: 100%;
  border-radius: 2px;
  overflow: hidden;
  background: var(--soft);
}

.bar {
  flex: 1 1 4px;
  width: 4px;
  max-width: 8px;
  min-width: 1px;
}

.bar.up { background: var(--ok); }
.bar.degraded { background: var(--warn); }
.bar.down { background: var(--bad); }

footer {
  margin-top: 36px;
  padding: 22px 0 32px;
  background: var(--soft);
  border-top: 1px solid var(--line);
}

footer p + p { margin-top: 6px; }

@media (max-width: 640px) {
  .top-inner { align-items: flex-start; flex-direction: column; }
  .brand img { height: 46px; }
  .summary { display: block; }
  .summary button { margin-top: 14px; }
  .service-main { flex-wrap: wrap; }
  .service-copy { flex: 1 1 calc(100% - 32px); }
  .service-state {
    flex: 1 0 100%;
    text-align: left;
    margin: 8px 0 0 24px;
  }
}
