/* Entivy Status: small hand-written stylesheet. System fonts only, no
   external resources. Dark mode follows prefers-color-scheme. */

:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --text: #1c2321;
  --muted: #5d6763;
  --border: #dde2df;
  --brand: #1f6f5c;
  --ok: #2f8f5b;
  --ok-bg: #e5f4ea;
  --minor: #9bbf3f;
  --warn: #b7791f;
  --warn-bg: #fbf1dc;
  --bad: #c0392b;
  --bad-bg: #fbe4e1;
  --maint: #2f6fb3;
  --maint-bg: #e3edf9;
  --none: #d5dad7;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111614;
    --surface: #182019;
    --text: #e4e9e6;
    --muted: #97a29d;
    --border: #2a332f;
    --brand: #5cc3a4;
    --ok: #4cc07f;
    --ok-bg: #173323;
    --minor: #a9cf55;
    --warn: #e0a84a;
    --warn-bg: #3a2d14;
    --bad: #ef6b5c;
    --bad-bg: #3d1c18;
    --maint: #6aa5e6;
    --maint-bg: #172b42;
    --none: #303a36;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
code, time, .since, .uptime-legend { font-family: var(--mono); font-size: 0.88em; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 0; }

.wrap { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem; z-index: 2; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { color: var(--text); font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.brand-sub { color: var(--muted); font-weight: 500; }
.brand-mark { width: 0.85rem; height: 0.85rem; border-radius: 3px; background: var(--brand); display: inline-block; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.95rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }

main { padding-top: 2rem; padding-bottom: 3rem; }

.overall {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.85rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.overall h1 { margin: 0; font-size: 1.35rem; }
.overall .updated { grid-column: 2; margin: 0; color: var(--muted); font-size: 0.9rem; }
.overall .dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--ok); }
.overall-degraded { background: var(--warn-bg); } .overall-degraded .dot { background: var(--warn); }
.overall-outage { background: var(--bad-bg); } .overall-outage .dot { background: var(--bad); }
.overall-maintenance { background: var(--maint-bg); } .overall-maintenance .dot { background: var(--maint); }
.overall-operational { background: var(--ok-bg); }

.notice { margin: 1rem 0 0; padding: 0.75rem 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.notice p { margin: 0; }
.notice .hint { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.notice-warn { background: var(--warn-bg); }
.notice-auto { border-left: 4px solid var(--bad); }

.block { margin-top: 2rem; }

.components, .incident-list, .timeline { list-style: none; margin: 0; padding: 0; }
.components { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.component { padding: 1rem 1.25rem; }
.component + .component { border-top: 1px solid var(--border); }
.component-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.component-desc { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.9rem; }
.component-state { text-align: right; flex-shrink: 0; }
.since { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.25rem; }

.pill { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; vertical-align: middle; }
.state-operational { color: var(--ok); background: var(--ok-bg); }
.state-degraded { color: var(--warn); background: var(--warn-bg); }
.state-outage { color: var(--bad); background: var(--bad-bg); }
.state-maintenance { color: var(--maint); background: var(--maint-bg); }
.state-unmonitored { color: var(--muted); border-color: var(--border); }
.pill-status { color: var(--muted); border-color: var(--border); }
.pill-example { color: var(--maint); border-color: var(--maint); }
.pill-impact-none { color: var(--muted); background: var(--bg); }
.pill-impact-minor { color: var(--warn); background: var(--warn-bg); }
.pill-impact-major { color: var(--bad); background: var(--bad-bg); }
.pill-impact-maintenance { color: var(--maint); background: var(--maint-bg); }

.uptime { display: flex; gap: 2px; height: 1.75rem; margin-top: 0.85rem; }
.u { flex: 1; border-radius: 2px; background: var(--none); min-width: 1px; }
.u-good { background: var(--ok); }
.u-minor { background: var(--minor); }
.u-degraded { background: var(--warn); }
.u-bad { background: var(--bad); }
.uptime-legend { display: flex; justify-content: space-between; gap: 0.5rem; color: var(--muted); font-size: 0.75rem; margin-top: 0.3rem; }
.uptime-legend [data-role="avg"] { text-align: center; }

.incident-item { padding: 0.85rem 1rem; border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; background: var(--surface); }
.incident-item + .incident-item { margin-top: 0.6rem; }
.impact-major { border-left-color: var(--bad); }
.impact-minor { border-left-color: var(--warn); }
.impact-maintenance { border-left-color: var(--maint); }
.impact-none { border-left-color: var(--border); }
.incident-link { font-weight: 600; }
.incident-meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }
.incident-latest { font-size: 0.95rem; }
.incident-latest p { margin: 0.4rem 0 0; }

article.incident { border: none; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1.25rem; margin: 1.25rem 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.timeline li { position: relative; padding: 0 0 1.25rem 1.25rem; border-left: 2px solid var(--border); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 0.35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.timeline .status-resolved::before, .timeline .status-completed::before { background: var(--ok); }
.timeline .status-investigating::before { background: var(--bad); }
.timeline .status-identified::before, .timeline .status-monitoring::before { background: var(--warn); }
.timeline .status-scheduled::before, .timeline .status-in_progress::before { background: var(--maint); }
.timeline-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; color: var(--muted); }
.timeline-body p { margin: 0.4rem 0 0; }

.prose { max-width: 42rem; }
.todo { padding: 0.5rem 0.75rem; border: 1px dashed var(--warn); border-radius: 6px; background: var(--warn-bg); font-size: 0.9rem; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1.5rem; padding-top: 0.75rem; padding-bottom: 1.25rem; }
.site-footer a { color: var(--muted); }

@media (max-width: 36rem) {
  .component-head { flex-direction: column; gap: 0.5rem; }
  .component-state { text-align: left; }
  .uptime { gap: 1px; height: 1.5rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 0.4rem; }
}
