:root {
  --ajs-blue: #171796;
  --ink: #111827;
  --muted: #667085;
  --line: #e4e7ec;
  --soft: #f2f2f2;
  --white: #ffffff;
  --operational: #2ab57d;
  --degraded: #ffbf53;
  --down: #fd625e;
  --shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
  font-family: "Segoe UI", "Nunito Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--soft); }
a { color: inherit; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 1440px; min-height: 88px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand, .overview-link { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 18px; color: var(--ink); }
.brand-mark { width: 54px; height: 54px; display: inline-flex; }
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-name {
  font-size: 24px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em;
}
.header-actions {
  display: flex; align-items: center; gap: 28px; color: var(--ajs-blue); font-size: 16px;
}
.refresh-state { display: inline-flex; align-items: center; gap: 10px; color: #475467; white-space: nowrap; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--operational); }
.refresh-button {
  display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0;
  background: transparent; color: var(--ajs-blue); font: inherit; cursor: pointer;
}
.refresh-button:hover, .overview-link:hover { color: #0f0f63; }
.refresh-button:focus-visible, .overview-link:focus-visible, .service-cell:focus-visible {
  outline: 3px solid rgba(23, 23, 150, 0.26); outline-offset: 3px; border-radius: 4px;
}
.refresh-button svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.overview-link { padding-left: 28px; border-left: 1px solid var(--line); }

.page-shell { max-width: 1440px; margin: 0 auto; padding: 58px 40px 28px; }
.intro { margin-bottom: 30px; }
h1 {
  margin: 0; font-family: "Sora", "Segoe UI", Arial, sans-serif;
  font-size: clamp(34px, 4vw, 50px); line-height: 1.08; letter-spacing: -0.045em; font-weight: 700;
}
.intro p { margin: 14px 0 0; color: #475467; font-size: 19px; }
.status-frame {
  overflow: hidden; background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.status-region { min-height: 320px; }
.loading-state { padding: 72px 32px; color: var(--muted); font-size: 16px; }
.service-row {
  display: grid; grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); gap: 34px;
  padding: 34px 34px 28px; border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-meta { min-width: 0; padding-top: 2px; }
.service-name {
  margin: 0; overflow-wrap: anywhere; font-size: 17px; line-height: 1.35; font-weight: 700;
}
.service-status {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 15px;
  color: var(--operational); font-size: 15px; font-weight: 600;
}
.service-status::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--operational);
}
.service-status.is-degraded { color: #bd7900; }
.service-status.is-degraded::before { background: var(--degraded); }
.service-status.is-down { color: #c43230; }
.service-status.is-down::before { background: var(--down); }
.service-description { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.timeline-wrap { min-width: 0; padding-top: 6px; }
.timeline, .time-labels {
  display: grid; grid-template-columns: repeat(24, minmax(10px, 1fr)); gap: 3px;
}
.service-cell {
  min-width: 0; height: 38px; padding: 0; border: 0; border-radius: 2px;
  background: var(--operational); cursor: help;
}
.service-cell.is-degraded { background: var(--degraded); }
.service-cell.is-down { background: var(--down); }
.service-cell:hover { filter: brightness(0.94); }
.time-labels { margin-top: 12px; color: var(--muted); font-size: 12px; }
.time-label { grid-column: span 1; white-space: nowrap; }
.time-label:first-child { grid-column: 1 / span 1; }
.time-label:nth-child(2) { grid-column: 7 / span 1; }
.time-label:nth-child(3) { grid-column: 13 / span 1; }
.time-label:nth-child(4) { grid-column: 19 / span 1; }
.time-label:last-child { grid-column: 24 / span 1; text-align: right; }
.legend {
  display: flex; align-items: center; gap: 34px; padding: 26px 34px 30px;
  color: #475467; font-size: 15px;
}
.legend span { display: inline-flex; align-items: center; gap: 10px; }
.legend-swatch { width: 18px; height: 18px; border-radius: 3px; }
.legend-swatch.operational { background: var(--operational); }
.legend-swatch.degraded { background: var(--degraded); }
.legend-swatch.down { background: var(--down); }
.error-region { margin: 18px 0 0; color: #b42318; font-size: 14px; }
.site-footer {
  max-width: 1440px; margin: 0 auto; padding: 26px 40px 40px;
  color: #667085; font-size: 14px; text-align: center;
}
@media (max-width: 820px) {
  .header-inner, .page-shell { padding-left: 22px; padding-right: 22px; }
  .header-inner { min-height: 76px; }
  .brand-name { font-size: 20px; }
  .brand-mark { width: 46px; height: 46px; }
  .header-actions { gap: 16px; font-size: 14px; }
  .refresh-state { display: none; }
  .overview-link { padding-left: 16px; }
  .page-shell { padding-top: 40px; }
  .service-row { grid-template-columns: 1fr; gap: 20px; padding: 26px 22px 24px; }
  .timeline-wrap { overflow-x: auto; padding-bottom: 3px; }
  .timeline, .time-labels { min-width: 620px; }
  .legend { flex-wrap: wrap; gap: 14px 24px; padding: 22px; }
  .site-footer { padding-left: 22px; padding-right: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
