/* CloudJod's status page: the Junction palette (rack steel, cable slate, fibre
   aqua, one signal yellow for the joint), self-contained so the outside watcher
   serves it with nothing else. The state colours are the page's information;
   nothing else is coloured. */
:root {
  --bg: #edf0f2; --panel: #fbfcfc; --line: #dce2e6; --line-strong: #c3ccd3;
  --text: #18242e; --muted: #566571; --accent: #0b6f75; --signal: #f2c230; --signal-edge: #c99a0e;
  /* Every state colour that text is written in, or on, reads at 4.5:1 or better on
     the page and the panels (seo2: Lighthouse found white on the green banner at
     4.31, the green words at 3.77, and the orange and yellow words lower still).
     The yellow is a background and a line only; its words are --degraded-text. */
  --ok: #167353; --degraded: #c08a00; --degraded-text: #7a5800; --partial: #a84c0a; --major: #b0273d; --maint: #2f6db5; --nodata: #d3d9de;
  --sans: "IBM Plex Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Arial, sans-serif;
  --display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418; --panel: #151c21; --line: #26323a; --line-strong: #344450; --text: #e6ecef; --muted: #98a7b1;
    --accent: #5cc9cf; --ok: #4fc697; --degraded: #e3b54a; --degraded-text: #e3b54a; --partial: #f08a46; --major: #ff8596; --maint: #7fb0ec; --nodata: #2c3a43;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font: 700 28px/1.2 var(--display); letter-spacing: -.01em; margin: 6px 0 10px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quiet, .note { color: var(--muted); font-size: 13.5px; }

/* The masthead: the junction mark, and where else to go. */
.masthead { border-bottom: 1px solid var(--line); background: var(--panel); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 19px/1 var(--display); }
.mark svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mark .joint { fill: var(--signal); stroke: var(--signal-edge); stroke-width: 1; }
.mark em { font-style: normal; font-weight: 500; color: var(--muted); }
.masthead-links { display: flex; gap: 18px; font-size: 14px; }
.masthead-links a { color: var(--muted); text-decoration: none; }
.masthead-links a:hover { color: var(--text); }

main.wrap { padding-top: 28px; padding-bottom: 40px; }

/* The answer, first: one band whose colour is the state. */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 28px; padding: 18px 20px; border-radius: 8px; color: #fff; background: var(--ok); }
.banner p { margin: 0; }
/* The page's one heading is the answer itself: drawn as the banner, not as a title. */
.banner h1 { margin: 0; letter-spacing: normal; }
.banner-text { display: inline-flex; align-items: center; gap: 12px; font: 600 19px/1.3 var(--display); }
.banner .light { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / 28%); flex: none; }
.banner .checked { font-size: 13px; opacity: .9; }
.banner.minor { background: var(--degraded); color: #1b1300; }
.banner.minor .light { background: #1b1300; box-shadow: 0 0 0 4px rgb(27 19 0 / 18%); }
.banner.major { background: var(--partial); }
.banner.critical { background: var(--major); }
.banner.maintenance { background: var(--maint); }
@media (prefers-color-scheme: dark) { .banner, .banner.major, .banner.critical, .banner.maintenance { color: #0f1418; } .banner .light { background: #0f1418; } }

.stale { margin: -16px 0 24px; padding: 10px 14px; border: 1px solid var(--degraded); border-radius: 6px; background: var(--panel); font-size: 14px; }
.outside { margin: 0 0 20px; padding: 16px 20px; border: 2px solid var(--major); border-radius: 8px; background: var(--panel); }
.outside h2 { color: var(--major); }

.block { margin: 0 0 30px; }
.incident { padding: 14px 16px; margin: 0 0 10px; border: 1px solid var(--line); border-left: 4px solid var(--partial); border-radius: 6px; background: var(--panel); }
.incident.impact-critical { border-left-color: var(--major); }
.incident.impact-minor, .incident.impact-none { border-left-color: var(--degraded); }
.incident.maintenance { border-left-color: var(--maint); }
.incident h3 a { color: var(--text); }
.incident .latest { margin: 6px 0; white-space: pre-line; }
.incident .latest time, .affects, .window, .history-meta, .update-time, .incident-meta { color: var(--muted); font-size: 13.5px; }

/* Parts: a name, a word for its state, and ninety days of bars. */
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 6px; margin-bottom: 2px; }
.group-head h2 { margin: 0; }
.group-head .note { margin: 0; max-width: 60ch; }
.range { display: flex; gap: 12px; }
.range-30 { display: none; }
.parts { list-style: none; margin: 0; padding: 0; }
.part { padding: 12px 0; border-bottom: 1px solid var(--line); }
.part-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 16px; align-items: baseline; }
.part-name { font-weight: 600; }
.part-about { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 13px; }
.part-state { font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.part-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.part-pct { font: 13px var(--mono); color: var(--muted); white-space: nowrap; }
.ok { color: var(--ok); } .degraded { color: var(--degraded-text); } .partial { color: var(--partial); }
.major { color: var(--major); } .maint { color: var(--maint); }
.inline-state { font-size: 13px; }
.bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; list-style: none; margin: 10px 0 0; padding: 0; height: 28px; }
.bar { border-radius: 2px; background: var(--ok); }
.bar.nodata { background: var(--nodata); }
/* Days before a part was first recorded: one quiet stretch, not a row of grey days. */
.bar.before { align-self: end; height: 3px; border-radius: 0; background: var(--nodata); opacity: .7; }
.bar.degraded { background: var(--degraded); } .bar.partial { background: var(--partial); }
.bar.major { background: var(--major); } .bar.maint { background: var(--maint); }

.history { list-style: none; padding: 0; margin: 0 0 12px; }
.history li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.history li p { margin: 4px 0 0; }
.history-meta { margin-left: 8px; }

.subscribe-form { display: flex; gap: 8px; max-width: 520px; margin: 12px 0; }
input[type="email"] { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 5px;
  background: var(--panel); color: var(--text); font: inherit; }
button { min-height: 40px; padding: 8px 16px; border: 1px solid var(--text); border-radius: 5px; background: var(--text); color: var(--bg);
  font: 600 14px var(--sans); cursor: pointer; }
button:hover { opacity: .9; }

.crumb { font-size: 14px; margin-bottom: 4px; }
.incident-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.updates { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line-strong); }
.update { position: relative; padding: 0 0 18px 20px; }
.update::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line-strong); }
.update:first-child::before { background: var(--accent); border-color: var(--accent); }
.update-state { font-weight: 600; margin-bottom: 2px; }
.update-body { white-space: pre-line; margin-bottom: 2px; }
.report { margin: 18px 0 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.report-body { white-space: pre-line; }
.message { max-width: 560px; padding: 30px 0; }

.foot { padding-bottom: 40px; color: var(--muted); font-size: 13px; }
.foot p { border-top: 1px solid var(--line); padding-top: 16px; max-width: 76ch; }

@media (max-width: 640px) {
  .bars { grid-template-columns: repeat(30, minmax(0, 1fr)); }
  .bars .bar:nth-child(-n+60) { display: none; }
  .range-90 { display: none; }
  .range-30 { display: inline; }
  .part-head { grid-template-columns: minmax(0, 1fr) auto; }
  .part-pct { grid-column: 2; grid-row: 2; }
  .banner-text { font-size: 17px; }
  .subscribe-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
