:root {
  --navy: #153a69;
  --navy-dark: #0d2749;
  --ink: #172033;
  --muted: #667085;
  --subtle: #8a94a6;
  --line: #e3e7ed;
  --surface: #ffffff;
  --background: #f8f9fb;
  --green: #18875f;
  --green-bg: #edf8f3;
  --amber: #a8600a;
  --amber-bg: #fff7e8;
  --red: #bf3038;
  --red-bg: #fff1f2;
  --blue-bg: #eef4fb;
}

* { box-sizing: border-box; }

html { background: var(--background); color-scheme: light; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--navy); }

.site-header {
  height: 76px;
  padding: 0 max(24px, calc((100vw - 780px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.identity {
  display: inline-flex;
  align-items: center;
  height: 54px;
}

.identity img {
  display: block;
  width: 105px;
  height: auto;
}

.product-name {
  padding-left: 17px;
  border-left: 1px solid #d7dce4;
  color: #4f5c70;
  font-size: 14px;
  font-weight: 650;
}

main {
  width: min(720px, calc(100% - 40px));
  margin: 56px auto 76px;
}

.page-heading { margin-bottom: 28px; }

.page-heading h1 {
  margin: 0;
  color: var(--navy-dark);
  font-size: clamp(30px, 5vw, 38px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.page-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.overall {
  min-height: 88px;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border: 1px solid #b9ddce;
  border-radius: 12px;
  background: var(--green-bg);
}

.overall-indicator {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  margin-top: 7px;
  border: 3px solid #b5c0cf;
  border-radius: 50%;
  background: transparent;
}

.overall h2 {
  margin: 0;
  color: #116c4b;
  font-size: 18px;
  line-height: 1.4;
}

.overall p {
  margin: 3px 0 0;
  color: #467062;
  font-size: 14px;
  line-height: 1.45;
}

.overall.operational .overall-indicator { border: 0; background: var(--green); }
.overall.degraded { border-color: #efd09d; background: var(--amber-bg); }
.overall.degraded h2 { color: #8a500d; }
.overall.degraded p { color: #786244; }
.overall.degraded .overall-indicator { border: 0; background: var(--amber); }
.overall.outage { border-color: #efb8bc; background: var(--red-bg); }
.overall.outage h2 { color: #a5222b; }
.overall.outage p { color: #7c5559; }
.overall.outage .overall-indicator { border: 0; background: var(--red); }
.overall.maintenance { border-color: #c6d7ea; background: var(--blue-bg); }
.overall.maintenance h2 { color: var(--navy); }
.overall.maintenance .overall-indicator { border: 0; background: var(--navy); }

.last-check {
  margin: 10px 2px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--subtle);
  font-size: 12px;
}

.network-note {
  margin-top: 20px;
  padding: 15px 17px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #d9e3ef;
  border-radius: 10px;
  background: #f5f8fc;
}

.network-mark {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 5px;
  border: 2px solid var(--navy);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #e4edf8;
}

.network-note.operational .network-mark {
  border-color: var(--green);
  box-shadow: 0 0 0 4px #dcefe7;
}

.network-note.degraded .network-mark {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px #faead0;
}

.network-note.outage .network-mark {
  border-color: var(--red);
  box-shadow: 0 0 0 4px #f6dfe1;
}

.network-note strong {
  display: block;
  color: var(--navy-dark);
  font-size: 13px;
  line-height: 1.4;
}

.network-note p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.infrastructure-metrics {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #dce4ee;
}

.infrastructure-metrics > div {
  min-width: 0;
  padding: 10px 11px;
  background: #fff;
}

.infrastructure-metrics dt {
  overflow: hidden;
  color: var(--navy-dark);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.infrastructure-metrics dd {
  margin: 3px 0 0;
  color: var(--subtle);
  font-size: 10px;
  line-height: 1.3;
}

.content-section { margin-top: 46px; }

.content-section > h2,
.section-title h2 {
  margin: 0 0 14px;
  color: var(--navy-dark);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.section-title > span {
  color: var(--subtle);
  font-size: 12px;
  white-space: nowrap;
}

.service-list,
.event-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.service-group + .service-group { border-top: 1px solid var(--line); }

.group-title {
  margin: 0;
  padding: 13px 18px;
  background: #fafbfc;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.component {
  padding: 15px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 20px;
  border-top: 1px solid #edf0f3;
}

.component-name strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.component-name small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status.degraded { color: var(--amber); }
.status.outage { color: var(--red); }
.status.maintenance { color: var(--navy); }

.availability {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.bars {
  height: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.bar {
  min-width: 2px;
  height: 8px;
  flex: 1;
  border-radius: 1px;
  background: #dfe4ea;
}

.bar.operational { background: #54ae89; }
.bar.degraded { background: #d8943f; }
.bar.outage { background: #d75a62; }

.uptime {
  color: var(--subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.history-note {
  margin: 10px 2px 0;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.45;
}

.event { padding: 18px; }
.event + .event { border-top: 1px solid var(--line); }

.event-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.event strong { font-size: 14px; line-height: 1.4; }
.event time { color: var(--subtle); font-size: 12px; white-space: nowrap; }
.event p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.empty {
  margin: 0;
  padding: 20px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hidden { display: none !important; }

footer {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 25px 0 42px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 12px;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .site-header {
    height: 68px;
    padding: 0 20px;
  }

  .identity { height: 48px; }
  .identity img { width: 92px; }
  .product-name { font-size: 13px; }

  main {
    width: min(100% - 28px, 720px);
    margin-top: 34px;
    margin-bottom: 58px;
  }

  .page-heading { margin-bottom: 22px; }
  .page-heading p { font-size: 15px; }
  .overall { padding: 18px; }
  .content-section { margin-top: 38px; }
  .component { padding: 14px 15px; gap: 7px 12px; }
  .component-name small { max-width: 235px; }
  .infrastructure-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-head { display: block; }
  .event time { display: block; margin-top: 3px; }

  footer {
    width: min(100% - 28px, 720px);
    padding-bottom: max(30px, env(safe-area-inset-bottom));
  }
}

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