:root {
  color-scheme: light;
  --canvas: #f6f8fa;
  --surface: #ffffff;
  --text: #18212b;
  --muted: #5e6b78;
  --border: #d9e0e6;
  --blue: #176d9c;
  --green: #18794e;
  --green-bg: #e6f5ed;
  --yellow: #9b6200;
  --yellow-bg: #fff4d6;
  --red: #b33737;
  --red-bg: #fbe9e9;
  --gray: #65727e;
  --gray-bg: #eef1f4;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

/* The status surface intentionally presents standard API-status terminology in English. */
.console-language-switcher { display: none !important; }

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

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.brand img { width: 28px; height: 28px; object-fit: contain; }

nav { display: flex; gap: 20px; }
nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
nav a:hover, nav a.active { color: var(--text); font-weight: 700; }

main { width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; padding: 52px 0 42px; }

.status-intro { padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.headline-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 36px; line-height: 1.15; letter-spacing: 0; }
h2 { margin-bottom: 4px; font-size: 20px; line-height: 1.3; letter-spacing: 0; }
.summary { margin-bottom: 0; color: var(--muted); font-size: 17px; }
.last-updated { flex: none; margin: 0 0 3px; color: var(--muted); font-size: 13px; text-align: right; }

.section { padding: 32px 0; border-bottom: 1px solid var(--border); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.components { display: grid; gap: 8px; }
.component-row { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.component-name { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.status-dot, .legend { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--gray); }
.status-dot.operational, .legend.operational { background: var(--green); }
.status-dot.degraded, .legend.degraded { background: var(--yellow); }
.status-dot.outage, .legend.outage { background: var(--red); }
.status-dot.unknown, .legend.unknown { background: var(--gray); }
.component-detail { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.status-label { min-width: 88px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center; }
.status-label.operational { color: var(--green); background: var(--green-bg); }
.status-label.degraded { color: var(--yellow); background: var(--yellow-bg); }
.status-label.outage { color: var(--red); background: var(--red-bg); }
.status-label.unknown { color: var(--gray); background: var(--gray-bg); }

.history-heading { align-items: start; }
.period-control { display: flex; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; }
.period-control button { min-width: 82px; padding: 8px 10px; border: 0; border-right: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.period-control button:last-child { border-right: 0; }
.period-control button:hover { color: var(--text); background: #edf5f8; }
.period-control button[aria-pressed="true"] { background: var(--blue); color: #fff; font-weight: 700; }

.availability-readout { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.availability-readout p { margin: 0; }
#availability-value { font-size: 30px; font-weight: 700; line-height: 1; }
#availability-caption { color: var(--muted); font-size: 14px; }
.uptime-bars { display: flex; gap: 1px; min-height: 32px; overflow: hidden; }
.uptime-bar { display: block; flex: 1 1 0; min-width: 1px; height: 32px; background: var(--gray); }
.uptime-bar.operational { background: var(--green); }
.uptime-bar.degraded { background: var(--yellow); }
.uptime-bar.outage { background: var(--red); }
.uptime-bar.unknown { background: var(--gray); }
.uptime-legend { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.uptime-legend span { display: inline-flex; align-items: center; gap: 6px; }

.incidents { display: grid; gap: 8px; }
.incident, .empty-state { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.incident { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.incident-title { margin: 0; font-weight: 700; }
.incident-time { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.empty-state { color: var(--muted); font-size: 14px; }

footer { display: flex; justify-content: space-between; width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; padding: 22px 0 30px; color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  .status-header { min-height: 56px; padding: 0 20px; }
  nav { gap: 14px; }
  main { width: min(calc(100% - 32px), var(--max-width)); padding-top: 34px; }
  h1 { font-size: 30px; }
  .headline-row, .section-heading { align-items: start; flex-direction: column; }
  .last-updated { text-align: left; }
  .component-row { align-items: start; flex-direction: column; gap: 10px; }
  .component-detail { width: 100%; justify-content: space-between; }
  .period-control { width: 100%; }
  .period-control button { flex: 1; min-width: 0; }
  .incident { align-items: start; flex-direction: column; gap: 4px; }
  footer { width: min(calc(100% - 32px), var(--max-width)); }
}
