:root {
  color-scheme: light;
  --page: #f4f6f3;
  --surface: #ffffff;
  --ink: #17211d;
  --muted: #63706a;
  --line: #dce2de;
  --green: #177a50;
  --green-soft: #e7f4ed;
  --amber: #a76405;
  --amber-soft: #fff2d8;
  --red: #b4232f;
  --red-soft: #fdebed;
  --teal: #176b73;
  --shadow: 0 8px 28px rgba(23, 33, 29, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

.shell {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  flex: 0 0 34px;
}

.brand span {
  display: grid;
  line-height: 1.15;
}

.brand strong {
  font-size: 16px;
  font-weight: 760;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

.refresh-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-band {
  padding: 58px 0 54px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.summary-inner {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.summary-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: #e7f2f2;
  border: 1px solid #c9dede;
  border-radius: 8px;
}

.summary-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-icon.is-operational {
  color: var(--green);
  background: var(--green-soft);
  border-color: #c7e4d5;
}

.summary-icon.is-degraded {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #efd89f;
}

.summary-icon.is-outage {
  color: var(--red);
  background: var(--red-soft);
  border-color: #efc7cc;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.16;
  font-weight: 760;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 740;
}

.summary-copy > p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.status-badge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--page);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #91a099;
}

.status-badge.is-operational {
  color: var(--green);
  background: var(--green-soft);
  border-color: #c7e4d5;
}

.status-badge.is-operational .status-dot,
.service-status.is-operational .status-dot {
  background: var(--green);
}

.status-badge.is-degraded {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #efd89f;
}

.status-badge.is-degraded .status-dot,
.service-status.is-degraded .status-dot {
  background: var(--amber);
}

.status-badge.is-outage {
  color: var(--red);
  background: var(--red-soft);
  border-color: #efc7cc;
}

.status-badge.is-outage .status-dot,
.service-status.is-outage .status-dot {
  background: var(--red);
}

.systems-band,
.history-band {
  padding: 46px 0 52px;
}

.systems-band {
  background: var(--page);
}

.history-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading > p {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
}

.service-list,
.history-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.service-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 150px;
  align-items: center;
  gap: 22px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.service-row:last-child,
.history-row:last-child {
  border-bottom: 0;
}

.service-name {
  min-width: 0;
}

.service-name strong {
  display: block;
  font-size: 15px;
  font-weight: 740;
}

.service-name span {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}

.service-latency {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.service-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.service-status.is-operational {
  color: var(--green);
}

.service-status.is-degraded {
  color: var(--amber);
}

.service-status.is-outage {
  color: var(--red);
}

.service-placeholder {
  position: relative;
  overflow: hidden;
}

.service-placeholder::after {
  content: "";
  width: 42%;
  height: 11px;
  border-radius: 4px;
  background: #e8ece9;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #c9d0cc;
}

.legend-swatch.operational,
.history-segment.operational {
  background: var(--green);
}

.legend-swatch.degraded,
.history-segment.degraded {
  background: var(--amber);
}

.legend-swatch.outage,
.history-segment.outage {
  background: var(--red);
}

.legend-swatch.unknown,
.history-segment.unknown {
  background: #d8ddda;
}

.history-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.history-label {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-track {
  height: 24px;
  display: grid;
  grid-template-columns: repeat(48, minmax(2px, 1fr));
  gap: 3px;
}

.history-segment {
  min-width: 2px;
  height: 24px;
  border-radius: 2px;
  background: #d8ddda;
}

.empty-state {
  margin: 0;
  padding: 30px 20px;
  color: var(--muted);
  font-size: 14px;
}

footer {
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1040px);
  }

  .header-inner {
    min-height: 68px;
  }

  .refresh-state .icon {
    display: none;
  }

  .summary-band {
    padding: 38px 0 40px;
  }

  .summary-inner {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
  }

  .summary-icon {
    width: 52px;
    height: 52px;
  }

  .summary-icon svg {
    width: 27px;
    height: 27px;
  }

  h1 {
    font-size: 26px;
  }

  .status-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .systems-band,
  .history-band {
    padding: 36px 0 40px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .legend {
    justify-content: flex-start;
  }

  .service-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 18px;
    padding: 16px;
  }

  .service-latency {
    grid-column: 1;
    text-align: left;
  }

  .service-status {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .history-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }

  .history-track {
    gap: 2px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 430px) {
  .refresh-state {
    max-width: 132px;
    text-align: right;
  }

  .service-row {
    grid-template-columns: 1fr;
  }

  .service-status,
  .service-latency {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
