/* Same tokens as environmentmarker.io (website/src/styles/site.scss). No web
   fonts on purpose: the page must load even when other things don't. */
:root {
  --primary: #d63a39;
  --ink: #000444;
  --body: #2b2f4a;
  --muted: #5b6078;
  --soft: #f6f7fb;
  --border: #e6e8f0;
  --ok: #1a7f4b;
  --ok-soft: #e7f5ee;
  --warn: #9a5b00;
  --warn-bar: #e0a100;
  --warn-soft: #fff5e0;
  --bad: #b3261e;
  --bad-soft: #fdecea;
  --info: #1f5fbf;
  --info-soft: #e8f0fc;
  --none: #d9dce6;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--body);
  background: var(--soft);
}
a { color: var(--primary); }
a:hover { color: #b92f2e; }
a:focus-visible { outline: 3px solid rgba(214, 58, 57, 0.45); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

.top { background: #fff; border-bottom: 1px solid var(--border); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.brand__status { color: var(--muted); font-weight: 500; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--primary); }

main.wrap { padding-top: 28px; padding-bottom: 48px; }
.banner { border-radius: 12px; padding: 20px 24px; margin-bottom: 24px; color: #fff; }
.banner h1 { color: inherit; font-size: 1.5rem; margin: 0 0 4px; }
.banner p { margin: 0; opacity: 0.95; }
.banner__stale { margin-top: 8px !important; font-weight: 600; }
.banner--ok { background: var(--ok); }
.banner--warn { background: var(--warn); }
.banner--bad { background: var(--bad); }
.banner--info { background: var(--info); }
.banner--muted { background: var(--muted); }

.block { margin-top: 32px; }
.block > h2 { font-size: 1.2rem; margin: 0 0 8px; }
.block > p { margin: 0 0 16px; }

.components { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.component { padding: 18px 20px; }
.component + .component { border-top: 1px solid var(--border); }
.component__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.component__name { font-size: 1rem; margin: 0; }
.component__desc { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.state--operational { color: var(--ok); }
.state--degraded { color: var(--warn); }
.state--outage { color: var(--bad); }
.state--maintenance { color: var(--info); }
.state--unknown { color: var(--muted); }

.bars { display: flex; gap: 2px; height: 32px; margin-top: 14px; }
.bar { flex: 1 1 0; border-radius: 2px; min-width: 2px; }
.bar--ok { background: var(--ok); }
.bar--warn { background: var(--warn-bar); }
.bar--bad { background: var(--bad); }
.bar--none { background: var(--none); }
.bars__legend { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.bars__short { display: none; }

.incident { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; }
.incident--major { border-left-color: var(--bad); }
.incident--minor { border-left-color: var(--warn-bar); }
.incident--maintenance { border-left-color: var(--info); }
.incident--detected { border-left-color: var(--bad); }
.incident--open.incident--major { background: var(--bad-soft); }
.incident--open.incident--minor { background: var(--warn-soft); }
.incident--open.incident--maintenance { background: var(--info-soft); }
.incident__title { font-size: 1.05rem; margin: 0; }
.incident__title a { color: inherit; text-decoration: none; }
.incident__title a:hover { text-decoration: underline; }
.incident__meta, .incident__window { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }
.updates { list-style: none; margin: 12px 0 0; padding: 0; }
.updates li { font-size: 0.92rem; }
.updates li + li { margin-top: 10px; }
.updates p { margin: 2px 0 0; }

.upstream, .providers { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.upstream li, .providers li { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; padding: 12px 20px; }
.upstream li { flex-direction: column; }
.upstream li + li, .providers li + li { border-top: 1px solid var(--border); }
.providers span { color: var(--muted); }

.foot { border-top: 1px solid var(--border); background: #fff; padding: 20px 0; font-size: 0.92rem; }
.foot p { margin: 0 0 6px; }

@media (max-width: 600px) {
  .bar--old { display: none; }
  .bars__long { display: none; }
  .bars__short { display: inline; }
  .component__head { flex-direction: column; gap: 6px; }
  .banner h1 { font-size: 1.3rem; }
  .providers li { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
