
/* ── OneAsset Status — tokens (light default, dark via data-theme or OS) ── */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --hairline: #e1e0d9;
  --border: rgba(11,11,11,0.10);
  /* status marks (bars, icons) — validated status palette */
  --st-good: #0ca30c;
  --st-warning: #fab219;
  --st-serious: #ec835a;
  --st-critical: #d03b3b;
  --st-maint: #2a78d6;
  --st-nodata: #e1e0d9;
  /* status text — darker steps for light-surface contrast */
  --tx-good: #006300;
  --tx-warning: #8a5f00;
  --tx-serious: #b4451c;
  --tx-critical: #b02f2f;
  --tx-maint: #1c5cab;
  --tx-unknown: #52514e;
  --link: #1c5cab;
  --tip-bg: #1a1a19;
  --tip-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --hairline: #2c2c2a;
    --border: rgba(255,255,255,0.10);
    --st-nodata: #2c2c2a;
    --st-maint: #3987e5;
    --tx-good: #0ca30c;
    --tx-warning: #fab219;
    --tx-serious: #ec835a;
    --tx-critical: #e66767;
    --tx-maint: #3987e5;
    --tx-unknown: #c3c2b7;
    --link: #6da7ec;
    --tip-bg: #fcfcfb;
    --tip-ink: #0b0b0b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --hairline: #2c2c2a;
  --border: rgba(255,255,255,0.10);
  --st-nodata: #2c2c2a;
  --st-maint: #3987e5;
  --tx-good: #0ca30c;
  --tx-warning: #fab219;
  --tx-serious: #ec835a;
  --tx-critical: #e66767;
  --tx-maint: #3987e5;
  --tx-unknown: #c3c2b7;
  --link: #6da7ec;
  --tip-bg: #fcfcfb;
  --tip-ink: #0b0b0b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { border-bottom: 1px solid var(--hairline); background: var(--surface); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: baseline; gap: 7px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.brand-suffix { font-size: 13px; color: var(--muted); font-weight: 500; }
.header-nav { display: flex; align-items: center; gap: 14px; }
.nav-link { color: var(--ink-2); font-size: 13.5px; }
.nav-link.active { color: var(--ink); font-weight: 600; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  background: none; border: 1px solid var(--border); color: var(--ink-2);
}
.ic-sun { display: none; }
:root[data-theme="dark"] .ic-sun { display: block; }
:root[data-theme="dark"] .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme])) .ic-sun { display: block; }
  :root:where(:not([data-theme])) .ic-moon { display: none; }
}

/* banner */
.banner {
  display: flex; align-items: center; gap: 12px;
  margin: 28px 0 8px; padding: 16px 18px; border-radius: 12px;
  font-size: 16.5px; font-weight: 600; color: #fff;
}
.banner.st-operational { background: var(--st-good); }
.banner.st-maintenance { background: var(--st-maint); }
.banner.st-degraded { background: color-mix(in srgb, var(--st-warning) 88%, #000 12%); }
.banner.st-partial_outage { background: color-mix(in srgb, var(--st-serious) 90%, #000 10%); }
.banner.st-major_outage { background: var(--st-critical); }
.banner.st-unknown { background: var(--muted); }
.banner-ic { display: inline-flex; }

/* sections & cards */
.section { margin: 30px 0; }
.section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 10px; }
.group-note { font-size: 13px; color: var(--ink-2); margin: -4px 0 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; }
.card-pad { padding: 20px; }
.sep { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* component rows */
.component { padding: 15px 0 13px; }
.component-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.component-name { font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.info { color: var(--muted); display: inline-flex; position: relative; cursor: help; }

/* status pills — colored icon + labelled text, never color alone */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-ic { display: inline-flex; }
.pill.st-operational { color: var(--tx-good); }
.pill.st-degraded { color: var(--tx-warning); }
.pill.st-partial_outage { color: var(--tx-serious); }
.pill.st-major_outage { color: var(--tx-critical); }
.pill.st-maintenance { color: var(--tx-maint); }
.pill.st-unknown { color: var(--tx-unknown); }

/* 90-day uptime strip */
.uptime { display: flex; gap: 2px; }
.cell {
  flex: 1 1 0; height: 32px; border-radius: 2px; min-width: 0;
  position: relative;
}
.cell.c-good { background: var(--st-good); }
.cell.c-warning { background: var(--st-warning); }
.cell.c-serious { background: var(--st-serious); }
.cell.c-critical { background: var(--st-critical); }
.cell.c-maint { background: var(--st-maint); }
.cell.c-nodata { background: var(--st-nodata); }
.cell:hover { filter: brightness(1.12); }

/* tooltips (cells + info icons) */
.cell::after, .info::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: var(--tip-bg); color: var(--tip-ink);
  font: 600 12px/1.4 system-ui, sans-serif; white-space: nowrap;
  padding: 5px 9px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .1s; z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.cell:hover::after, .cell:focus-visible::after,
.info:hover::after, .info:focus-visible::after { opacity: 1; }
.uptime .cell:nth-child(-n+8)::after { left: 0; transform: none; }
.uptime .cell:nth-last-child(-n+8)::after { left: auto; right: 0; transform: none; }
.info::after { white-space: normal; width: max-content; max-width: 260px; }

.uptime-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 7px; font-size: 12px; color: var(--muted);
}
.uptime-pct { font-variant-numeric: tabular-nums; }
.win-45 { display: none; }
@media (max-width: 620px) {
  .uptime .cell:nth-child(-n+45) { display: none; }
  .win-90 { display: none; }
  .win-45 { display: inline; }
}

/* incidents */
.incident {
  background: var(--surface); border: 1px solid var(--border);
  border-left-width: 3px; border-radius: 12px;
  padding: 16px 18px; margin: 0 0 12px;
}
.incident.sev-degraded { border-left-color: var(--st-warning); }
.incident.sev-partial_outage { border-left-color: var(--st-serious); }
.incident.sev-major_outage { border-left-color: var(--st-critical); }
.incident.sev-maintenance { border-left-color: var(--st-maint); }
.incident-title { margin: 0 0 6px; font-size: 15.5px; }
.incident-title a { color: var(--ink); }
.incident-schedule { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tx-maint); margin: 2px 0 6px; font-weight: 500; }
.incident-components { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.update { padding: 9px 0; border-top: 1px solid var(--hairline); }
.update:first-child { border-top: 0; }
.update-head { display: flex; align-items: baseline; gap: 10px; }
.update-status { font-size: 13px; font-weight: 700; }
.update-head time { font-size: 12px; color: var(--muted); }
.update-body { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }
.more { font-size: 13px; }
.incident-meta { color: var(--muted); font-size: 13.5px; margin: -8px 0 18px; }

/* past-incident days / history */
.day { margin: 0 0 18px; }
.day-title { font-size: 14px; margin: 0 0 6px; padding-bottom: 5px; border-bottom: 1px solid var(--hairline); }
.day-empty { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }
.history-link { margin-top: 20px; font-size: 14px; }
.page-title { font-size: 24px; letter-spacing: -0.01em; margin: 30px 0 18px; }
.crumb { margin: 24px 0 -16px; font-size: 13.5px; }
.pager { display: flex; justify-content: space-between; margin: 28px 0; font-size: 14px; }

/* message pages */
.lede { font-size: 14.5px; color: var(--ink-2); margin: 0; }

/* footer */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 44px; padding: 18px 0 26px; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); }
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink-2); }
