/* status.css — the page's styling, taken verbatim from the accepted design archetype
   `flowtly-design/reference/status-page.html` (flowtly-design#137). Only the
   additions at the bottom are new, and they exist because the archetype was drawn
   with every figure hardcoded and so never needed a way to draw "we do not know".

   NO BRAND VALUE IS WRITTEN HERE. Every colour resolves through the alias layer in
   aliases.css, which maps to the generated --flowtly-* tokens shipped by the pinned
   @flowtly-psa/design-tokens package. To change one, change core/tokens.json in
   flowtly-design and rebuild there.

   ONE DELIBERATE DEVIATION FROM THE ARCHETYPE. The mock writes its card shadow as a
   literal `rgba(16, 15, 40, 0.04)` in two places. The design system already carries
   `--flowtly-shadow-card`, so this page uses the token instead — a raw rgb literal is
   exactly what BP-01 forbids, and a page that copies one from an accepted mock has
   still copied it. Reported back against the archetype rather than fixed only here. */

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 20px 80px;
}
a {
  color: inherit;
}

/* ---- top ---- */
.top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}
.mark {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--wordmarkInk);
}
.mark span {
  color: var(--wordmarkPeriod);
}
.status-word {
  font:
    600 11px/1 Inter,
    sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink2);
  border-left: 1px solid var(--hairline);
  padding-left: 14px;
}
.spacer {
  flex: 1;
}
.lang {
  display: flex;
  gap: 2px;
  font:
    600 12px/1 Inter,
    sans-serif;
  color: var(--muted);
}
.lang b {
  color: var(--ink);
}
.btn {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--canvas);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 15px;
  font:
    600 13px/1 Inter,
    sans-serif;
  cursor: pointer;
}
.btn:hover {
  background: var(--section);
}

/* ---- the answer ---- */
.hero {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 30px 30px 28px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: var(--flowtly-shadow-card);
}
.hero.ok {
  border-color: var(--success);
  background: var(--successBg);
}
.hero.deg {
  border-color: var(--warning);
  background: var(--warningBg);
}
.hero.down {
  border-color: var(--error);
  background: var(--errorBg);
}
.badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--success);
  color: var(--on-primary);
}
.badge.deg {
  background: var(--warning);
}
.badge.down {
  background: var(--error);
}
.badge svg {
  width: 24px;
  height: 24px;
}
.hero h1 {
  margin: 0 0 6px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink2);
  line-height: 1.5;
}
.stamp {
  margin-top: 12px;
  font:
    500 12.5px/1 "IBM Plex Mono",
    monospace;
  color: var(--muted);
}

/* ---- components ---- */
.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: var(--flowtly-shadow-card);
  overflow: hidden;
  margin-bottom: 16px;
}
.card > header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--hairline);
}
.card h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
}
.card .sub {
  font-size: 12.5px;
  color: var(--muted);
}
.comp {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--hairline);
}
.comp:last-child {
  border-bottom: 0;
}
.comp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.comp-name {
  font-size: 14px;
  font-weight: 600;
}
.comp-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}
.pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font:
    600 12px/1 Inter,
    sans-serif;
  border-radius: 999px;
  padding: 6px 11px 6px 8px;
}
.pill svg {
  width: 13px;
  height: 13px;
}
.pill.ok {
  background: var(--successBg);
  color: var(--success);
}
.pill.deg {
  background: var(--warningBg);
  color: var(--warning-text);
}
.pill.down {
  background: var(--errorBg);
  color: var(--error);
}

/* 90-day strip. Height, not just colour, so state survives greyscale. */
.strip {
  display: flex;
  gap: 2px;
  margin-top: 12px;
  align-items: flex-end;
  height: 30px;
}
.day {
  flex: 1;
  border-radius: 2px;
  background: var(--success);
  height: 100%;
}
.day.deg {
  background: var(--warning);
  height: 62%;
}
.day.down {
  background: var(--error);
  height: 34%;
}
.day.none {
  background: var(--field-border);
  height: 100%;
}
.scale {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font:
    500 11.5px/1 Inter,
    sans-serif;
  color: var(--muted);
}

/* ---- incidents ---- */
.inc {
  padding: 18px 20px;
  border-bottom: 1px solid var(--hairline);
}
.inc:last-child {
  border-bottom: 0;
}
.inc h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 600;
}
.inc .meta {
  font-size: 12.5px;
  color: var(--muted);
}
.tl {
  margin: 14px 0 0;
  padding: 0 0 0 18px;
  list-style: none;
  border-left: 2px solid var(--hairline);
}
.tl li {
  position: relative;
  padding: 0 0 14px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink2);
}
.tl li:last-child {
  padding-bottom: 0;
}
.tl li::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--field-border);
  border: 2px solid var(--canvas);
}
.tl li.res::before {
  background: var(--success);
}
.tl b {
  color: var(--ink);
  font-weight: 600;
}
.tl time {
  font:
    500 12px/1 "IBM Plex Mono",
    monospace;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}
.none-msg {
  padding: 22px 20px;
  font-size: 13.5px;
  color: var(--ink2);
}

/* ---- subscribe ---- */
.sub-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  flex-wrap: wrap;
}
.sub-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink2);
  flex: 1;
  min-width: 240px;
  line-height: 1.5;
}
.foot {
  margin-top: 26px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 560px) {
  .hero {
    padding: 22px;
  }
  .hero h1 {
    font-size: 22px;
  }
  .pill {
    margin-left: 0;
  }
  .comp-row {
    flex-wrap: wrap;
  }
}

/* ---- ADDITIONS: the states the archetype had no reason to draw ----
   The mock shows operational, degraded and outage. A page fed by a real prober has
   two more, and both must be visually distinct from green rather than a lighter
   shade of it:

     .unknown      — checked, and the check could not establish health
     .unmonitored  — nothing watches this component at all

   Design rule 3 holds here too: state is never colour alone. These carry their own
   word ("Unknown", "Not monitored") and, in the strip, their own height. */
.hero.unknown {
  border-color: var(--field-border);
  background: var(--section);
}
.badge.unknown {
  background: var(--muted);
}
.pill.unknown,
.pill.unmonitored {
  background: var(--section);
  color: var(--ink2);
}
/* An unmonitored row is deliberately quieter than a monitored one: it is a gap in
   our coverage, not a claim about the product. */
.comp.unmonitored .comp-name {
  color: var(--ink2);
}
.comp-detail {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink2);
}
.coverage {
  /* Sits inside the components card, after the last row, so it needs the row's own
     horizontal padding — without it the line runs into the card border. */
  padding: 14px 20px 16px;
  font-size: 12.5px;
  color: var(--muted);
}
/* The last component row has the coverage line under it, so its rule would double
   up with the card edge. */
.comp:last-of-type {
  border-bottom: none;
}
.support-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink2);
}
/* The strip's "no data" bar already exists as .day.none in the archetype; this is
   the same state under the name the data uses. */
.day.unknown {
  background: var(--field-border);
  height: 100%;
}
.day.degraded {
  background: var(--warning);
  height: 62%;
}
.day.outage {
  background: var(--error);
  height: 34%;
}
.day.operational {
  background: var(--success);
  height: 100%;
}
