/* status.themonkeytech.com - same rules as themonkeytech.com: flat colours, one solid accent, IBM Plex Sans
   with Plex Mono for labels and facts, rounded panels a shade lighter than the page, no lines.
   Amber and red appear only when something is actually wrong. */
:root {
  --bg:#111111; --panel:#1B1B1B; --rule:#2A2A2A; --ink:#EDEDED; --sub:#9A9A9A;
  --accent:#6CD9A8; --on-accent:#111111; --warn:#E3B55B; --bad:#E86A6A; --none:#2C2C2C;
}
@media (prefers-color-scheme: light) {
  :root { --bg:#F1EFEA; --panel:#FBFAF7; --rule:#D6D3CB; --ink:#141414; --sub:#5C5A55;
    --accent:#0A7A55; --on-accent:#F7F6F3; --warn:#A86B00; --bad:#B42318; --none:#E2DFD8; }
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.6 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; }
a { color:inherit; }
.mono { font-family:"IBM Plex Mono", Consolas, monospace; }
.wrap { max-width:1040px; margin:0 auto; padding-left:24px; padding-right:24px; }
.word b { color:var(--accent); font-weight:inherit; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* header */
header .wrap { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:64px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:600; font-size:16px; text-decoration:none; }
.logo { width:22px; height:22px; background:var(--ink); -webkit-mask:url(/img/logo.png) center/contain no-repeat; mask:url(/img/logo.png) center/contain no-repeat; }
nav ul { display:flex; gap:20px; list-style:none; margin:0; padding:0; font-size:14px; }
nav a { color:var(--sub); text-decoration:none; }
nav a:hover { color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
nav a[aria-current="page"] { color:var(--ink); text-decoration:underline; text-decoration-color:var(--accent); text-underline-offset:6px; text-decoration-thickness:2px; }

/* summary */
.top { padding-top:40px; padding-bottom:8px; }
.label { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--sub); margin:0 0 14px; }
.tag { font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; border:1px solid var(--warn); color:var(--warn); padding:1px 6px; margin-left:8px; }
.summary { --lvl:var(--sub); display:flex; align-items:center; gap:22px; background:var(--panel); border-radius:12px; padding:26px 28px; }
.top > * { max-width:880px; margin-left:auto; margin-right:auto; }   /* same width as the panels below */
.sum-text { flex:1; min-width:0; }
.count { margin:0; text-align:right; font-size:13px; color:var(--sub); }
.count b { display:block; font-size:22px; font-weight:500; color:var(--lvl); }
/* the status light: mint when all is well, amber or red when not */
.light { flex:none; width:18px; height:18px; margin:0 4px; border-radius:50%; background:var(--lvl);
  box-shadow:0 0 0 7px color-mix(in srgb, var(--lvl) 18%, transparent); }
.summary[data-level="loading"] .light { animation:pulse 1.6s ease-in-out infinite; }
/* status colour for the summary; the section icons below are always brand mint */
.summary[data-level="ok"] { --lvl:var(--accent); }
.summary[data-level="partial"] { --lvl:var(--warn); }
.summary[data-level="down"] { --lvl:var(--bad); }
.ico { flex:none; display:grid; place-items:center; width:56px; height:56px; border-radius:14px;
  color:var(--lvl); background:color-mix(in srgb, var(--lvl) 14%, transparent); border:1px solid color-mix(in srgb, var(--lvl) 30%, transparent); }
.ico svg { width:28px; height:28px; }
h1 { font-size:30px; line-height:1.15; font-weight:600; letter-spacing:-0.015em; margin:0 0 4px; }
.lead { margin:0; color:var(--sub); font-size:13px; }

/* sections: one panel each, the header card (icon, title, subtitle) as its first row */
section { max-width:880px; margin:0 auto; padding-top:28px; padding-bottom:8px; }
.panel { background:var(--panel); border-radius:12px; padding:6px 28px 20px; }
/* section headers: the "All systems working" card, a size down */
.sec-head { width:auto; margin:0; padding:16px 0 18px; gap:16px; background:none; border-radius:0; border-bottom:1px solid var(--rule); }
.summary.sec-head { --lvl:var(--accent); padding-left:0; padding-right:0; }   /* section icons are the brand mark colour, not a status light */
.sec-head .ico { width:42px; height:42px; border-radius:11px; }
.sec-head .ico svg { width:21px; height:21px; }
h2 { font-size:22px; line-height:1.2; font-weight:600; letter-spacing:-0.01em; margin:0 0 2px; }
.sec-head .lead { font-size:12.5px; }

/* services */
.services { list-style:none; margin:0; padding:0; }
.services li { padding:16px 0 4px; }
.services li + li { border-top:1px solid var(--rule); margin-top:10px; padding-top:20px; }
.svc-head { display:flex; justify-content:space-between; align-items:baseline; gap:16px; flex-wrap:wrap; }
.svc-name { font-weight:600; }
.state { font-family:"IBM Plex Mono", Consolas, monospace; font-size:13px; display:inline-flex; align-items:center; gap:8px; }
.state::before { content:""; width:8px; height:8px; border-radius:50%; background:currentColor; }
.state.up { color:var(--accent); } .state.slow { color:var(--warn); } .state.down { color:var(--bad); } .state.unknown { color:var(--sub); }
.bars { display:flex; gap:2px; height:30px; margin:12px 0 6px; }
.bars i { flex:1 1 0; min-width:2px; border-radius:2px; background:var(--none); }
.b.ok, .bars i.ok { background:var(--accent); }
.b.partial, .bars i.partial { background:var(--warn); }
.b.down, .bars i.down { background:var(--bad); }
.b.none { background:var(--none); }
.bars i:hover { opacity:.7; }
.svc-foot { display:flex; justify-content:space-between; color:var(--sub); font-size:12px; font-family:"IBM Plex Mono", Consolas, monospace; }
.legend { display:flex; flex-wrap:wrap; gap:6px 18px; margin:18px 0 0; padding-top:14px; border-top:1px solid var(--rule); font-size:12px; color:var(--sub); }
.legend span { display:inline-flex; align-items:center; gap:7px; }
.legend .b { display:inline-block; width:10px; height:10px; border-radius:2px; }

/* incidents */
.incidents { list-style:none; margin:0; padding:0; }
.incidents li { display:grid; grid-template-columns:110px minmax(0, 1fr); gap:16px; padding:14px 0; }
.incidents li + li { border-top:1px solid var(--rule); }
.inc-date { font-family:"IBM Plex Mono", Consolas, monospace; font-size:12.5px; color:var(--sub); padding-top:2px; }
.inc-title { margin:0; font-weight:500; }
.inc-title .state { margin-left:10px; font-weight:400; }
.inc-body { margin:2px 0 0; color:var(--sub); font-size:14px; }
.incidents .empty { display:block; color:var(--sub); font-size:14px; }

footer .wrap { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 16px; padding-top:28px; padding-bottom:32px; font-size:12px; color:var(--sub); }
footer a { text-decoration:none; }
footer a:hover { color:var(--ink); text-decoration:underline; text-underline-offset:3px; }

.range-short { display:none; }
@keyframes pulse { 0%, 100% { opacity:1; } 50% { opacity:.3; } }
@media (prefers-reduced-motion: reduce) { .summary .light { animation:none !important; } }
@media (max-width:820px) {
  section { padding-top:22px; }
  .panel { padding:4px 18px 16px; }
  .sec-head { padding:14px 0 16px; }
  .bars i:nth-child(-n+60) { display:none; }   /* phones: last 30 days */
  .range-long { display:none; } .range-short { display:inline; }
}
@media (max-width:520px) {
  .wrap { padding-left:16px; padding-right:16px; }
  header .wrap { flex-wrap:wrap; padding-top:10px; padding-bottom:10px; }
  #summary { padding:20px 18px; gap:16px; } .light { width:14px; height:14px; } h1 { font-size:22px; } .count b { font-size:18px; }
  .incidents li { grid-template-columns:1fr; gap:2px; }
}

/* footer: one line */
.f-row { margin:0; display:flex; flex-wrap:wrap; align-items:baseline; row-gap:4px; }
.f-row > * { white-space:nowrap; }
.f-row > * + *::before { content:"\00B7"; margin:0 10px; color:var(--sub); }
@media (max-width:640px) { footer .wrap { align-items:baseline; } .f-row { align-items:flex-start; } }
