:root {
  color-scheme: dark;
  --bg: #0b1019;
  --panel: #121a27;
  --panel-strong: #172132;
  --line: #28364b;
  --text: #edf3ff;
  --muted: #a1b0c4;
  --accent: #8bb9ff;
  --good: #55c58b;
  --warn: #e9b963;
  --bad: #ed8686;
  --unknown: #9cabc1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root.light {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #fff;
  --panel-strong: #edf2fa;
  --line: #d7e0eb;
  --text: #172236;
  --muted: #4e6079;
  --accent: #205caf;
  --good: #196e4d;
  --warn: #855a17;
  --bad: #aa3030;
  --unknown: #65758d;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); line-height: 1.55; }
main { flex: 1; padding-block: 46px 58px; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.container { width: min(1100px, calc(100% - 44px)); margin-inline: auto; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 5; padding: 8px 14px; background: var(--panel); color: var(--text); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-inner { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-size: 14px; font-weight: 850; white-space: nowrap; letter-spacing: .055em; }
.brand b { font-weight: 550; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); font-size: 23px; }
.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 550; white-space: nowrap; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text); background: var(--panel-strong); }
.theme-btn { justify-self: end; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; cursor: pointer; font-size: 13px; }
.theme-btn span { margin-right: 4px; }

.page-heading { margin-bottom: 27px; }
h1 { font-size: clamp(33px, 5.5vw, 57px); line-height: 1.1; letter-spacing: -.058em; margin: 0 0 10px; overflow-wrap: anywhere; }
h2 { font-size: clamp(19px, 2.4vw, 23px); font-weight: 720; line-height: 1.25; letter-spacing: -.035em; margin: 0; }
p { margin: 0; }
.page-heading p { max-width: 650px; color: var(--muted); font-size: 16px; }
.hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 22px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.hero.operational { border-color: color-mix(in srgb, var(--good) 38%, var(--line)); }
.hero.degraded { border-color: color-mix(in srgb, var(--warn) 43%, var(--line)); }
.hero.outage { border-color: color-mix(in srgb, var(--bad) 46%, var(--line)); }
.hero-icon { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 50%; background: var(--panel-strong); color: var(--unknown); font-size: 26px; }
.hero.operational .hero-icon { color: var(--good); }
.hero.degraded .hero-icon { color: var(--warn); }
.hero.outage .hero-icon { color: var(--bad); }
.hero h2 { margin-bottom: 4px; }
.hero p, .last { color: var(--muted); font-size: 13px; }
.last { padding-left: 12px; text-align: right; }

.overview-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
.section { margin-top: 31px; }
.section-head { min-height: 29px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.panel { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.text-link, .breadcrumb { color: var(--accent); font-size: 13px; font-weight: 620; }
.text-link:hover, .breadcrumb:hover, .item-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb { display: inline-block; margin-bottom: 18px; }
.empty { color: var(--muted); padding: 20px; font-size: 14px; }
.muted { color: var(--muted); }

.compact-row { display: flex; align-items: center; gap: 13px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.compact-row:last-child { border-bottom: 0; }
a.compact-row:hover { background: var(--panel-strong); color: var(--text); }
.compact-row > :first-child { flex: 1; min-width: 0; }
.compact-row strong, .item-link { font-weight: 700; }
.compact-row small, .service-detail-summary small, .history-header small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-arrow { color: var(--muted); }
.status-text { display: inline-flex; align-items: baseline; gap: 6px; color: var(--unknown); font-size: 13px; font-weight: 670; white-space: nowrap; }
.status-text.operational { color: var(--good); }
.status-text.degraded { color: var(--warn); }
.status-text.outage { color: var(--bad); }
.status-dot { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 17px; }
.controls label { font-size: 13px; color: var(--muted); }
.controls input, .controls select { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 8px 11px; color: var(--text); min-width: 115px; max-width: 100%; }
.directory { display: grid; gap: 23px; }
.directory h2 { margin-bottom: 10px; }
.service-detail-summary { display: flex; justify-content: space-between; gap: 18px; padding: 20px; }
.service-detail-summary .status-text { font-size: 16px; }
.service-detail-summary p { margin-top: 10px; font-size: 14px; }
.detail-category { color: var(--muted); font-size: 13px; }
.history-detail { padding: 20px; }
.history-header { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-bottom: 13px; }
.history-header strong { display: block; color: var(--text); font-size: 27px; line-height: 1.16; letter-spacing: -.045em; }
.history-header > span { font-size: 12px; color: var(--muted); }
.bars { display: flex; gap: 3px; height: 26px; }
.bar { background: color-mix(in srgb, var(--unknown) 57%, transparent); flex: 1; min-width: 0; border-radius: 3px; }
.bar.good { background: var(--good); }
.bar.warning { background: var(--warn); }
.bar.bad { background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; background: var(--unknown); }
.dot.green { background: var(--good); }
.dot.yellow { background: var(--warn); }
.dot.red { background: var(--bad); }
.day-details { margin-top: 12px; font-size: 13px; }
.day-details summary { cursor: pointer; color: var(--accent); }
.day-results { margin-top: 8px; max-height: 235px; overflow: auto; color: var(--muted); }
.day-results > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }

.incident-filters { margin-bottom: 15px; }
.archive-scope { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; color: var(--muted); }
.archive-scope strong { color: var(--text); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a { display: inline-block; border: 1px solid var(--line); padding: 7px 11px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.pills a[aria-current="page"] { color: var(--text); background: var(--panel-strong); border-color: var(--accent); }
.report-row { padding: 14px 17px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); }
.report-row:last-child, .timeline-update:last-child { border-bottom: 0; }
.report-row .muted { font-size: 12px; margin-top: 3px; }
.subscription-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; resize: vertical; }
.subscription-form textarea:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.report-excerpt { font-size: 14px; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-state { color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.report-state.active { color: var(--warn); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.pagination a { color: var(--accent); }
.incident-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 14px; margin: 0; padding: 18px; }
.incident-summary dt { color: var(--muted); font-size: 12px; }
.incident-summary dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.timeline-update { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.timeline-update > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; font-size: 14px; }
.timeline-update time { color: var(--muted); font-size: 12px; }
.timeline-update p { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }

.table-panel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); }
thead th { background: var(--panel-strong); color: var(--muted); font-size: 12px; font-weight: 650; }
tbody tr:last-child > * { border-bottom: 0; }
td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot-inner { display: flex; justify-content: space-between; gap: 12px; padding-block: 17px; }
.foot-inner > div { display: flex; flex-wrap: wrap; gap: 7px 18px; }
@media (max-width: 780px) {
  .top-inner { grid-template-columns: 1fr auto; padding-block: 11px; gap: 8px 15px; }
  .primary-nav { grid-row: 2; grid-column: 1 / -1; }
  .primary-nav a { padding-inline: 9px; }
  .overview-grid { grid-template-columns: 1fr; gap: 0; }
  .hero { grid-template-columns: auto 1fr; padding: 17px; }
  .last { grid-column: 2; padding: 0; text-align: left; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 30px); }
  main { padding-block: 29px 39px; }
  .compact-row { padding-inline: 12px; gap: 8px; }
  .service-detail-summary, .history-detail { padding: 14px; }
  .status-text { font-size: 12px; white-space: normal; }
  .bars { gap: 2px; height: 21px; }
  .foot-inner { flex-direction: column; gap: 4px; }
}

.status-tools { display: flex; justify-content: end; margin-bottom: 12px; }
.status-tools:has(> button[hidden]) { display: none; }
.status-notice { background: var(--panel-strong); color: var(--warn); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; margin-bottom: 16px; }
.status-footer-links { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 15px; }
.portfolio { margin-block: 15px; }
.portfolio summary { background: var(--panel-strong); padding: 12px 15px; font-weight: 680; cursor: pointer; }
.controls .theme-btn { cursor: pointer; }
.subscription-form { display: grid; max-width: 650px; gap: 8px; }
.subscription-form input, .subscription-form select { width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--text); background: var(--bg); }
.subscription-form button { justify-self: start; margin-top: 8px; }
.primary-nav { flex-wrap: wrap; }

.overview-group + .overview-group { border-top: 1px solid var(--line); }
.overview-group h3 { margin: 0; padding: 11px 17px 4px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.overview-service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(55px, 110px) auto 12px; align-items: center; gap: 12px; padding: 12px 17px; color: var(--text); text-decoration: none; cursor: pointer; }
.overview-service:hover { background: var(--panel-strong); }
.overview-service::-webkit-details-marker { display: none; }
.overview-service::marker { content: ''; }
.overview-service-name { min-width: 0; display: grid; }
.overview-service-name small, .sparkline-empty { font-size: .76rem; color: var(--muted); }
.overview-service-name .dependency-impact { color: var(--warn); }
.overview-product .overview-chevron::after { content: '+'; }
.overview-product[open] .overview-chevron::after { content: '−'; }
.sparkline { height: 13px; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 1px; }
.sparkline .bar { height: 100%; min-width: 0; border-radius: 1px; }
.overview-components { padding: 0 17px 12px; border-left: 2px solid var(--line); margin-left: 17px; }
.overview-component { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.overview-components .text-link { display: inline-block; margin-top: 8px; }
.incident-callouts { margin: 8px 0; }
.incident-callouts div + div { margin-top: 7px; }
.incident-callouts dt, .latest-incident-update small { font-size: .8rem; color: var(--muted); font-weight: 650; }
.incident-callouts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.latest-incident-update { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.latest-incident-update .report-excerpt { margin-top: 4px; }
@media (max-width: 540px) {
  .overview-service { grid-template-columns: minmax(0, 1fr) auto 10px; gap: 4px 10px; }
  .overview-service > .sparkline, .overview-service > .sparkline-empty { grid-column: 1; grid-row: 2; width: min(100%, 116px); }
  .overview-service > .status-text { grid-column: 2; grid-row: 1; }
  .overview-service > .overview-chevron { grid-column: 3; grid-row: 1; }
}
