:root {
  color-scheme: light;
  --ink: #12372e;
  --soft: #587066;
  --canvas: #f1f6f3;
  --surface: #ffffff;
  --line: #d2dfd8;
  --cyan: #167a5a;
  --cyan-soft: #e0f2ea;
  --green: #23805b;
  --green-soft: #dff3e9;
  --red: #c33f49;
  --red-soft: #fbe6e8;
  --coral: #d65d4b;
  --gold: #a96f17;
  --gold-soft: #fff3d5;
  --blue: #2f91bb;
  --blue-soft: #e3f0fa;
  --unknown: #a8b3bc;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); }
button { font: inherit; letter-spacing: 0; cursor: pointer; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 20; padding: 10px 14px; color: #fff; background: var(--ink); }
.skip-link:focus { top: 12px; }

.status-header {
  min-height: 68px;
  padding: 11px clamp(18px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background: var(--ink);
  border-bottom: 4px solid var(--cyan);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 21px; font-weight: 800; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.status-header nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.status-header nav a { color: #bfd0d9; text-decoration: none; font-size: 14px; font-weight: 700; }
.status-header nav a:hover { color: #fff; }
.status-header .back-link { padding-left: 20px; color: #9de0df; border-left: 1px solid #40515e; }
.language-field select {
  min-height: 34px;
  padding: 5px 8px;
  color: #fff;
  background: #2b3b48;
  border: 1px solid #506370;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
}

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 68px; }
.eyebrow { margin: 0 0 7px; color: var(--cyan); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: 1.2px; }
.status-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); align-items: end; gap: 32px; }
h1 { margin: 0 0 10px; font-size: clamp(34px, 6vw, 58px); line-height: 1.05; letter-spacing: 0; }
.status-intro > div > p:last-child { max-width: 680px; margin: 0; color: var(--soft); font-size: 17px; line-height: 1.55; }
.overall-state {
  min-height: 82px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid #e5ca8b;
  border-radius: 8px;
}
.state-dot { width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 14%, transparent); }
.overall-state strong, .overall-state small { display: block; }
.overall-state strong { margin-bottom: 4px; font-size: 16px; }
.overall-state small { color: var(--soft); line-height: 1.35; }
.overall-state[data-state="operational"] { color: var(--green); background: var(--green-soft); border-color: #add9c2; }
.overall-state[data-state="degraded"] { color: var(--gold); background: var(--gold-soft); }
.overall-state[data-state="partial_outage"] { color: var(--coral); background: #fcebe8; border-color: #efc0ba; }
.overall-state[data-state="major_outage"] { color: var(--red); background: var(--red-soft); border-color: #edb8bd; }

.status-meta {
  margin: 28px 0 58px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  background: #e9eff2;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.status-meta div { min-height: 78px; padding: 15px 18px; border-right: 1px solid var(--line); }
.status-meta span, .status-meta strong { display: block; }
.status-meta span { margin-bottom: 7px; color: var(--soft); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.status-meta strong { overflow-wrap: anywhere; font-size: 14px; }
.status-meta button {
  min-width: 120px;
  padding: 12px 17px;
  color: #fff;
  background: var(--cyan);
  border: 0;
  font-weight: 800;
}
.status-meta button:hover { background: #0f6247; }
.status-meta button:disabled { cursor: wait; opacity: .62; }

.section-heading { margin-bottom: 20px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading h2 { margin: 0; font-size: clamp(24px, 4vw, 34px); letter-spacing: 0; }
.section-heading > p { max-width: 470px; margin: 0; color: var(--soft); line-height: 1.5; text-align: right; }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; color: var(--soft); font-size: 11px; font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--unknown); }
.legend span[data-kind="operational"]::before { background: var(--green); }
.legend span[data-kind="degraded"]::before { background: var(--gold); }
.legend span[data-kind="outage"]::before { background: var(--red); }

.component-list { display: grid; gap: 12px; }
.component-card {
  min-height: 142px;
  padding: 19px 20px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--unknown);
  border-radius: 8px;
  box-shadow: 0 9px 25px rgba(23, 33, 43, .045);
}
.component-card[data-state="operational"] { border-left-color: var(--green); }
.component-card[data-state="degraded"],
.component-card[data-state="setup_required"],
.component-card[data-state="initializing"] { border-left-color: var(--gold); }
.component-card[data-state="partial_outage"] { border-left-color: var(--coral); }
.component-card[data-state="major_outage"] { border-left-color: var(--red); }
.component-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.component-card h3 { margin: 0 0 5px; font-size: 17px; }
.component-card p { margin: 0; color: var(--soft); font-size: 13px; line-height: 1.4; }
.component-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--soft);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}
.component-status::before { content: ""; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--unknown); }
.component-card[data-state="operational"] .component-status::before { background: var(--green); }
.component-card[data-state="degraded"] .component-status::before,
.component-card[data-state="setup_required"] .component-status::before,
.component-card[data-state="initializing"] .component-status::before { background: var(--gold); }
.component-card[data-state="partial_outage"] .component-status::before { background: var(--coral); }
.component-card[data-state="major_outage"] .component-status::before { background: var(--red); }
.uptime-track { width: 100%; height: 28px; margin-top: 18px; display: grid; grid-template-columns: repeat(90, minmax(1px, 1fr)); gap: 2px; }
.uptime-day { min-width: 0; background: var(--unknown); border-radius: 2px; }
.uptime-day[data-state="operational"] { background: var(--green); }
.uptime-day[data-state="degraded"],
.uptime-day[data-state="setup_required"],
.uptime-day[data-state="initializing"] { background: var(--gold); }
.uptime-day[data-state="partial_outage"] { background: var(--coral); }
.uptime-day[data-state="major_outage"] { background: var(--red); }
.uptime-day[data-state="no_data"] { background: #d9e0e4; }
.uptime-day:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.uptime-meta { margin-top: 7px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; color: #73818c; font-size: 10px; }
.uptime-meta strong { color: var(--soft); text-align: center; }
.uptime-meta span:last-child { text-align: right; }
.skeleton { width: 32%; height: 16px; display: block; background: #e4eaed; border-radius: 3px; animation: pulse 1.2s ease-in-out infinite; }
.skeleton.wide { width: 100%; height: 28px; margin-top: 34px; }
@keyframes pulse { 50% { opacity: .45; } }

.incidents-section { margin-top: 64px; }
.incident-list { display: grid; gap: 12px; }
.incident-card, .incident-empty {
  padding: 19px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
}
.incident-card[data-state="resolved"], .incident-empty[data-state="operational"] { border-left-color: var(--green); }
.incident-card[data-state="major_outage"] { border-left-color: var(--red); }
.incident-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.incident-impact { color: var(--coral); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.incident-card h3 { margin: 4px 0 0; font-size: 18px; }
.incident-state { padding: 5px 8px; color: var(--green); background: var(--green-soft); border-radius: 5px; font-size: 11px; font-weight: 850; }
.incident-card:not([data-state="resolved"]) .incident-state { color: var(--red); background: var(--red-soft); }
.incident-card > p { margin: 10px 0 0; color: var(--soft); font-size: 12px; }
.incident-card ol { margin: 14px 0 0; padding: 13px 0 0; list-style: none; border-top: 1px solid var(--line); }
.incident-card li { padding: 4px 0; display: grid; grid-template-columns: 170px 1fr; gap: 12px; color: var(--soft); font-size: 12px; line-height: 1.45; }
.incident-card time { color: #788692; }
.incident-empty { display: flex; flex-direction: column; gap: 5px; color: var(--soft); }
.incident-empty strong { color: var(--ink); }

footer { padding: 24px clamp(18px, 4vw, 54px); display: flex; justify-content: space-between; gap: 20px; color: #c3d1cb; background: #164437; font-size: 13px; }
footer p { margin: 0; }
footer a { color: #8fd0d3; text-decoration: none; }

@media (max-width: 780px) {
  .status-intro { grid-template-columns: 1fr; }
  .status-meta { grid-template-columns: 1fr 1fr; }
  .status-meta div { border-bottom: 1px solid var(--line); }
  .status-meta button { min-height: 58px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > p { text-align: left; }
  .legend { justify-content: flex-start; }
  .uptime-track { gap: 1px; }
}

@media (max-width: 560px) {
  .status-header { min-height: 62px; padding: 9px 14px; }
  .brand img { width: 36px; height: 36px; }
  .brand { font-size: 19px; }
  .status-header nav a:not(.back-link) { display: none; }
  .status-header nav { gap: 8px; }
  .status-header .back-link { padding-left: 0; border-left: 0; font-size: 13px; }
  main { width: calc(100% - 24px); padding-top: 36px; }
  h1 { font-size: 36px; }
  .status-meta { grid-template-columns: 1fr; }
  .status-meta div { min-height: 68px; border-right: 0; }
  .component-card { padding: 16px 14px 15px; }
  .component-heading, .incident-heading { flex-direction: column; gap: 10px; }
  .component-status { white-space: normal; }
  .uptime-meta { grid-template-columns: 1fr 1fr; }
  .uptime-meta strong { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .incident-card li { grid-template-columns: 1fr; gap: 2px; }
  footer { flex-direction: column; }
}
