:root {
  --brand: #516daf;
  --brand-deep: #354a82;
  --brand-soft: #eef2fb;
  --coral: #dd5454;
  --coral-deep: #b83d43;
  --coral-soft: #fff1f0;
  --green: #20946b;
  --green-soft: #eaf8f2;
  --amber: #c37a18;
  --amber-soft: #fff6e5;
  --ink: #172033;
  --muted: #697386;
  --line: #e5e8ef;
  --surface: #ffffff;
  --canvas: #f6f7fb;
  --shadow: 0 18px 45px rgba(48, 58, 87, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(229,232,239,.92); backdrop-filter: blur(16px); }
.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 15px; color: var(--ink); text-decoration: none; }
.brand img { width: 196px; height: auto; }
.brand-divider { width: 1px; height: 27px; background: var(--line); }
.brand-context { color: var(--muted); font-size: .9rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.header-actions, .live-label { display: flex; align-items: center; }
.header-actions { gap: 18px; }
.live-label { gap: 8px; color: var(--muted); font-size: .85rem; font-weight: 650; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.refresh-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--brand-deep); font-weight: 700; cursor: pointer; }
.refresh-button:hover { background: var(--brand-soft); border-color: #c9d3eb; }
.refresh-button:focus-visible { outline: 3px solid rgba(81,109,175,.26); outline-offset: 2px; }
.refresh-button[disabled] span:first-child { animation: spin .8s linear infinite; }

.status-hero { position: relative; overflow: hidden; padding: 64px 0 70px; color: #fff; background: linear-gradient(120deg, #33487e 0%, #516daf 55%, #647fc0 100%); }
.status-hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -220px; border: 90px solid rgba(255,255,255,.07); border-radius: 50%; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.eyebrow { margin: 0 0 12px; color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.status-hero .eyebrow { color: #dce5fb; }
.hero-heading-row { display: flex; gap: 22px; align-items: flex-start; }
.hero-status-icon { flex: 0 0 auto; display: grid; place-items: center; width: 54px; height: 54px; margin-top: 4px; border-radius: 17px; color: #fff; background: var(--coral); box-shadow: 0 12px 28px rgba(31,45,82,.28); font-size: 1.55rem; font-weight: 800; }
.status-hero[data-status="operational"] .hero-status-icon { background: var(--green); }
.status-hero[data-status="degraded"] .hero-status-icon { background: var(--amber); }
.status-hero[data-status="unknown"] .hero-status-icon { background: #8190ae; }
h1 { max-width: 760px; margin: 0; font-size: clamp(2rem, 4.6vw, 3.55rem); letter-spacing: -.045em; line-height: 1.03; }
.hero-copy p:last-child { max-width: 680px; margin: 14px 0 0; color: #e7ebf6; font-size: 1.04rem; line-height: 1.65; }
.updated-card { min-width: 220px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(25,38,74,.2); }
.updated-card span, .updated-card small { display: block; color: #dce5fb; font-size: .75rem; }
.updated-card strong { display: block; margin: 6px 0 8px; font-size: 1.05rem; }

.content-shell { padding: 54px 0 72px; }
section + section { margin-top: 62px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.05rem); letter-spacing: -.035em; }
.eyebrow-alert { color: var(--coral-deep); }
.count-chip { padding: 7px 11px; border-radius: 999px; color: var(--coral-deep); background: var(--coral-soft); font-size: .78rem; font-weight: 750; }

.incident-list { display: grid; gap: 14px; }
.incident-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 24px; border: 1px solid #f1c8c7; border-left: 4px solid var(--coral); border-radius: 16px; background: linear-gradient(100deg, #fff8f7 0%, #fff 70%); box-shadow: var(--shadow); }
.incident-marker { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #fff; background: var(--coral); font-weight: 850; }
.incident-topline { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.incident-card h3 { margin: 0; font-size: 1.1rem; }
.incident-impact { max-width: 760px; margin: 8px 0 20px; color: var(--muted); line-height: 1.58; }
.incident-card dl { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; }
.incident-card dl div { display: grid; gap: 3px; }
.incident-card dt { color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.incident-card dd { margin: 0; font-size: .83rem; font-weight: 700; }

.legend { display: flex; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: .76rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.operational { background: var(--green); }.legend-dot.degraded { background: var(--amber); }.legend-dot.outage { background: var(--coral); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 9px 30px rgba(48,58,87,.05); }
.service-card[data-status="outage"] { border-color: #efc8c6; }
.service-card[data-status="degraded"] { border-color: #efd7aa; }
.service-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.service-icon { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px var(--green-soft); }
.service-card[data-status="outage"] .service-icon { background: var(--coral); box-shadow: 0 0 0 6px var(--coral-soft); }
.service-card[data-status="degraded"] .service-icon { background: var(--amber); box-shadow: 0 0 0 6px var(--amber-soft); }
.service-card[data-status="unknown"] .service-icon { background: #8a94a7; box-shadow: 0 0 0 6px #eef0f4; }
.status-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: .69rem; font-weight: 800; }
[data-status="outage"] .status-pill, .status-pill.outage { color: var(--coral-deep); background: var(--coral-soft); }
[data-status="degraded"] .status-pill, .status-pill.degraded { color: #9c600f; background: var(--amber-soft); }
[data-status="unknown"] .status-pill, .status-pill.unknown { color: #687184; background: #eef0f4; }
.service-card h3 { margin: 22px 0 7px; font-size: 1.04rem; }
.service-description { min-height: 42px; margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.service-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 24px 0 18px; padding-top: 19px; border-top: 1px solid var(--line); }
.service-metrics div { min-width: 0; }
.service-metrics span { display: block; margin-bottom: 6px; color: var(--muted); font-size: .66rem; line-height: 1.25; }
.service-metrics strong { display: block; overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.sparkline { height: 34px; display: flex; align-items: end; gap: 3px; }
.sparkline i { flex: 1; min-width: 3px; height: var(--height, 15%); max-height: 100%; border-radius: 3px 3px 1px 1px; background: var(--green); opacity: .82; }
.sparkline i.outage { background: var(--coral); }
.sparkline i.degraded { background: var(--amber); }
.sparkline i.operational { background: var(--green); }
.sparkline i.empty { height: 10%; background: #d9dde5; }
.sparkline-label { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: #939bad; font-size: .61rem; }
.sparkline-label i { flex: 1; height: 1px; background: var(--line); }
.skeleton-card { height: 320px; border-radius: 17px; background: linear-gradient(90deg,#edf0f5 25%,#f8f9fb 50%,#edf0f5 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }

.external-apis-heading { align-items: flex-end; }
.external-apis-note { max-width: 440px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; text-align: right; }
.external-api-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.external-api-card { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 9px 30px rgba(48,58,87,.05); }
.external-api-card[data-status="outage"] { border-color: #efc8c6; }
.external-api-card[data-status="degraded"] { border-color: #efd7aa; }
.external-api-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.external-api-topline .status-pill { justify-content: center; max-width: calc(100% - 34px); padding-block: 5px; line-height: 1.25; text-align: center; white-space: normal; }
.external-api-icon { display: block; flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px var(--green-soft); }
.external-api-card[data-status="degraded"] .external-api-icon { background: var(--amber); box-shadow: 0 0 0 6px var(--amber-soft); }
.external-api-card[data-status="outage"] .external-api-icon { background: var(--coral); box-shadow: 0 0 0 6px var(--coral-soft); }
.external-api-card[data-status="unknown"] .external-api-icon { background: #8a94a7; box-shadow: 0 0 0 6px #eef0f4; }
.external-api-card h3 { margin: 22px 0 7px; font-size: 1.04rem; }
.external-api-description { min-height: 42px; margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.external-api-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 24px 0 20px; padding-top: 19px; border-top: 1px solid var(--line); }
.external-api-metric { min-width: 0; }
.external-api-last-activity { grid-column: 1 / -1; }
.external-api-metric > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: .66rem; line-height: 1.25; }
.external-api-metric strong { display: block; overflow: hidden; font-size: .82rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.external-api-p95 { display: block; margin-top: 4px; color: var(--muted); font-size: .64rem; line-height: 1.25; }
.external-api-p95[hidden] { display: none; }
.external-api-trend { min-width: 0; }
.external-api-chart-title { display: block; margin-bottom: 9px; color: var(--muted); font-size: .66rem; }
.external-api-sparkline { display: flex; align-items: end; gap: 3px; height: 52px; padding-top: 4px; border-bottom: 1px solid var(--line); }
.external-api-sparkline i { flex: 1; min-width: 3px; height: var(--height, 14%); max-height: 100%; border-radius: 3px 3px 0 0; background: var(--green); opacity: .84; }
.external-api-sparkline i.operational { background: var(--green); }
.external-api-sparkline i.degraded { background: var(--amber); }
.external-api-sparkline i.outage { background: var(--coral); }
.external-api-sparkline i.unknown,
.external-api-sparkline i.empty { height: 8%; background: #d9dde5; }
.external-api-trend-label { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: #939bad; font-size: .58rem; }
.external-api-trend-label i { flex: 1; height: 1px; background: var(--line); }
.external-api-skeleton { height: 365px; border-radius: 17px; background: linear-gradient(90deg,#edf0f5 25%,#f8f9fb 50%,#edf0f5 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.external-api-empty { margin: 0; padding: 28px 22px; border: 1px solid var(--line); border-radius: 17px; color: var(--muted); background: var(--surface); font-size: .8rem; text-align: center; }

.history-section { padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.history-note { margin: 0; color: var(--muted); font-size: .79rem; }
.uptime-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.uptime-grid article { padding: 18px 0 4px; }
.uptime-grid span { display: block; color: var(--muted); font-size: .76rem; }
.uptime-grid strong { display: block; margin: 7px 0 12px; font-size: 1.65rem; letter-spacing: -.03em; }
.uptime-track { height: 6px; overflow: hidden; border-radius: 999px; background: #edf0f4; }
.uptime-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width .5s ease; }

footer { padding: 28px 0; border-top: 1px solid var(--line); background: #fff; }
.footer-wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--muted); font-size: .76rem; }
.footer-wrap p { margin: 0; }
.footer-wrap strong { color: var(--brand-deep); }
.footer-wrap span { margin-left: 9px; }

@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1020px) {
  .service-grid, .external-api-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .updated-card { width: fit-content; }
}
@media (max-width: 650px) {
  .shell { width: min(100% - 28px, 1160px); }
  .nav-wrap { min-height: 68px; }
  .brand img { width: 155px; }
  .brand-divider, .brand-context, .live-label, .refresh-button span:last-child { display: none; }
  .refresh-button { width: 40px; justify-content: center; padding: 0; }
  .status-hero { padding: 44px 0 52px; }
  .hero-heading-row { gap: 14px; }
  .hero-status-icon { width: 45px; height: 45px; border-radius: 14px; }
  .content-shell { padding-top: 40px; }
  section + section { margin-top: 48px; }
  .section-heading, .services-heading, .external-apis-heading { align-items: flex-start; flex-direction: column; }
  .external-apis-note { max-width: none; text-align: left; }
  .service-grid, .uptime-grid, .external-api-grid { grid-template-columns: 1fr; }
  .incident-card { padding: 19px; grid-template-columns: 1fr; }
  .incident-marker { display: none; }
  .incident-topline { align-items: flex-start; }
  .history-section { padding: 22px; }
  .footer-wrap { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
