:root {
  --bg: #F7F5FB; --card: #FFFFFF; --ink: #14082B; --muted: #5C5670; --line: #E7E0F2;
  --brand-a: #C115EC; --brand-b: #000DFF; --link: #000DFF;
  --ok: #16A34A; --warn: #D97706; --maint-day: #EAB308; --slow: #FDBA74; --partial: #EA580C; --bad: #DC2626; --maint: #2563EB; --nodata: #D9D4E4;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0B0322; --card: #150C33; --ink: #F1EEFA; --muted: #B4ACD0; --line: #2A2156; --link: #9DA3FF; --nodata: #34295E; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--link); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--brand-a), var(--brand-b)); flex: 0 0 auto; }
.brand-logo { height: 30px; width: auto; }
.head-links { display: flex; gap: 18px; font-size: 14px; }
.head-links a { color: var(--muted); text-decoration: none; }
.head-links a:hover { color: var(--ink); }

main.wrap { padding-top: 28px; padding-bottom: 40px; }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 18px; margin: 0 0 12px; }

.banner { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--radius); color: #fff; margin-bottom: 28px; }
.banner h1 { margin: 0; font-size: 22px; }
.banner p { margin: 4px 0 0; opacity: .9; font-size: 14px; }
.banner-icon { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25); flex: 0 0 auto; position: relative; }
.banner-icon::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.banner.s-operational { background: var(--ok); }
.banner.s-degraded { background: var(--warn); }
.banner.s-partial_outage { background: var(--partial); }
.banner.s-major_outage { background: var(--bad); }
.banner.s-maintenance { background: var(--maint); }

.block { margin-bottom: 32px; }
.group { margin-bottom: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.comp { padding: 16px 20px; border-top: 1px solid var(--line); }
.comp:first-child { border-top: 0; }
.comp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.comp-name { font-weight: 600; }
.comp-name a { color: inherit; text-decoration: none; }
.comp-name a:hover { text-decoration: underline; }
.comp-desc { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.comp-status { font-size: 14px; display: flex; align-items: center; gap: 7px; }
.comp-status.s-operational { color: var(--ok); }
.comp-status.s-degraded { color: var(--warn); }
.comp-status.s-partial_outage { color: var(--partial); }
.comp-status.s-major_outage { color: var(--bad); }
.comp-status.s-maintenance { color: var(--maint); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; display: inline-block; }

.bars { display: flex; gap: 2px; margin-top: 12px; height: 32px; }
.bar { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--nodata); }
.bar:hover { opacity: .75; }
.bar.l-up { background: var(--ok); }
.bar.l-degraded { background: var(--slow); }
.bar.l-minor { background: var(--warn); }
.bar.l-major { background: var(--bad); }
.bar.l-maintenance { background: var(--maint-day); }   /* yellow: a scheduled maintenance window touched this day */
.bars-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend-short { display: none; }
@media (max-width: 640px) {
  .bar.older { display: none; }
  .legend-long { display: none; }
  .legend-short { display: inline; }
  .banner { padding: 18px; }
  .banner h1 { font-size: 19px; }
  .comp { padding: 14px 16px; }
}

.incident, .maint { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.incident.imp-critical { border-left-color: var(--bad); }
.incident.imp-major { border-left-color: var(--partial); }
.incident.imp-none { border-left-color: var(--line); }
.incident.st-resolved { border-left-color: var(--ok); }
.maint { border-left-color: var(--maint); }
.incident h3, .maint h3 { margin: 0 0 6px; font-size: 17px; }
.incident h3 a, .maint h3 a { color: var(--ink); text-decoration: none; }
.incident h3 a:hover, .maint h3 a:hover { text-decoration: underline; }
.update { margin-top: 10px; font-size: 15px; }
.update p { display: inline; margin: 0; }
.update p + p { display: block; margin-top: 8px; }
.update time, .when, .affects { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.tag { font-size: 12px; font-weight: 600; background: var(--maint); color: #fff; border-radius: 20px; padding: 2px 9px; vertical-align: middle; }
.tag.ph-scheduled { background: transparent; color: var(--maint); box-shadow: inset 0 0 0 1px var(--maint); }
.tag.ph-active { background: var(--maint-day); color: #2B2100; }
.tag.ph-completed { background: var(--ok); }
.maint.ph-active { border-left-color: var(--maint-day); }
.maint.ph-completed { opacity: .92; }
.hist-maint .tag { font-size: 11px; padding: 1px 7px; }
.more { font-size: 14px; display: inline-block; margin-top: 8px; }

.day { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.day-h { font-size: 15px; margin: 0 0 8px; }
.quiet, .empty { color: var(--muted); font-size: 14px; }
.back { font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.page-h { font-size: 26px; }
.hist { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; }

.site-foot { border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); padding: 20px 0 40px; }
.site-foot a { color: var(--muted); }
.powered { float: right; }
@media (max-width: 640px) { .powered { float: none; display: block; margin-top: 8px; } }

.login { max-width: 380px; margin: 40px auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; }
.login h1 { margin: 0; font-size: 22px; }
.login label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.login input { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.login button { font: inherit; font-weight: 700; padding: 12px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); cursor: pointer; }
.login-err { margin: 0; color: var(--bad); font-size: 14px; }
.empty-page { text-align: center; padding: 60px 0; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--brand-a); outline-offset: 2px; }
