/*
 * status.nexumpilot.com. Colours, type and radii come from tokens.css (copied from
 * brand/tokens.css at build time); brand/README.md has the rules behind them.
 */
@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo.woff2) format("woff2-variations");
}
@font-face {
  font-family: "B612 Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/b612-mono.woff2) format("woff2");
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--np-font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-stretch: var(--np-stretch-display); text-wrap: balance; margin: 0; }
h1 { font-size: 1.7rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.15rem; line-height: 1.3; font-weight: 650; letter-spacing: -0.005em; margin-bottom: 12px; }
h3 { font-size: 1rem; line-height: 1.3; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.label {
  font-size: 0.72rem; font-weight: 650; font-stretch: var(--np-stretch-label);
  text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.2;
}

/* ---- Header bar: ink in both themes ----------------------------------- */
.bar { background: var(--bar); color: var(--bar-text); }
.bar-inner, .content, .footer-inner { max-width: 880px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.logo { height: 22px; width: auto; display: block; }
.bar-label { color: var(--bar-muted); padding-left: 14px; border-left: 1px solid var(--bar-border); }
.bar-link { color: var(--bar-text); white-space: nowrap; }
.bar a:focus-visible { outline-color: var(--bar-accent); }

.content { width: 100%; padding-top: 32px; padding-bottom: 48px; flex: 1; }

/* ---- Square markers: the brand's status light ------------------------- */
.marker { display: inline-block; width: 10px; height: 10px; border-radius: 1px; flex: none; background: var(--border-strong); }
.marker-ok { background: var(--ok); }
.marker-degraded { background: var(--warn); }
.marker-down { background: var(--danger); }
.marker-maintenance { background: var(--info); }
.marker-unknown { background: transparent; border: 1.5px solid var(--border-strong); }

/* ---- Overall status ---------------------------------------------------- */
.overall {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px 22px; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius);
  background: var(--surface);
}
.overall .marker { width: 14px; height: 14px; margin-top: 8px; }
.overall p { margin-top: 6px; }
.overall-ok { border-left-color: var(--ok); }
.overall-degraded { border-left-color: var(--warn); background: var(--warn-soft); }
.overall-down { border-left-color: var(--danger); background: var(--danger-soft); }
.overall-maintenance { border-left-color: var(--info); background: var(--info-soft); }
.overall-unknown { border-left-color: var(--border-strong); }

.notice { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--warn-soft); color: var(--text); border: 1px solid var(--border); }

.section { margin-top: 40px; }
.section-intro { margin: -6px 0 12px; max-width: 68ch; }

/* ---- Components -------------------------------------------------------- */
.components { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.component { padding: 18px 20px; }
.component + .component { border-top: 1px solid var(--border); }
.component-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.component-name p { margin-top: 2px; max-width: 60ch; }
.state { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 600; padding-top: 1px; }
.state-ok { color: var(--ok); }
.state-degraded { color: var(--warn); }
.state-down { color: var(--danger); }
.state-maintenance { color: var(--info); }
.state-unknown { color: var(--muted); font-weight: 400; }
.detail { margin-top: 8px; padding: 8px 12px; background: var(--sunk); border-radius: var(--radius-sm); }
.provider { margin-top: 8px; }

/* 90 daily bars; the last 30 on narrow screens. */
.bars { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 30px; margin-top: 14px; }
.day { border-radius: 1px; background: var(--border); min-width: 0; }
.day:hover { opacity: 0.7; }
.day-ok { background: var(--ok); }
.day-partial { background: var(--warn); }
.day-down { background: var(--danger); }
.bars-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.bars-legend .narrow { display: none; }

@media (max-width: 640px) {
  .bar-inner, .content, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .bars { grid-template-columns: repeat(30, 1fr); gap: 3px; }
  .bars .day:nth-child(-n + 60) { display: none; }
  .bars-legend .wide { display: none; }
  .bars-legend .narrow { display: inline; }
  .component { padding: 16px; }
  .component-head { flex-direction: column; gap: 8px; }
  h1 { font-size: 1.45rem; }
}

/* ---- Incidents --------------------------------------------------------- */
.incident { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.incident + .incident { margin-top: 12px; }
.incident-active { border-left: 4px solid var(--danger); }
.incident-active.incident-impact-minor { border-left-color: var(--warn); }
.incident-in_progress, .incident-upcoming { border-left: 4px solid var(--info); }
.incident h3 a { color: inherit; text-decoration: none; }
.incident h3 a:hover { text-decoration: underline; }
.incident-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.tag {
  display: inline-block; padding: 3px 6px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  font-size: 0.7rem; font-weight: 650; font-stretch: var(--np-stretch-label); text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.2;
}
.tag-ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.tag-degraded { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.tag-down { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.tag-maintenance { color: var(--info); background: var(--info-soft); border-color: transparent; }
.updates { list-style: none; margin: 14px 0 0; padding: 0; }
.update { padding: 10px 0 0 14px; border-left: 1px solid var(--border-strong); }
.update + .update { margin-top: 4px; }
.update-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 4px; }
.update p + p { margin-top: 8px; }
.incident-page { margin-top: 12px; }
.incident-page h1 { margin-bottom: 4px; }
.back { margin-bottom: 4px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 32px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Footer ------------------------------------------------------------ */
.footer { border-top: 1px solid var(--border); }
.footer-inner { padding-top: 20px; padding-bottom: 28px; font-size: 0.85rem; }
.footer p + p { margin-top: 6px; }
