/* Brand colours come from brand.css; status colours are shared by every brand. */
:root {
  --ok: #15803d;
  --warn: #b45309;
  --bad: #c62828;
  --maint: #2b59c3;
  --none: #d5dbe6;
  --mark-mono: #000000; --mark-mixcloud: #5000ff;
  --radius: 12px;
  --line: 0.5px solid var(--border);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ok: #3fcf7f;
    --warn: #f2b24c;
    --bad: #ff6b6b;
    --maint: #7ea6ff;
    --none: #2c3a58;
    --mark-mono: #ffffff; --mark-mixcloud: #a98bff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
  font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Flat surfaces: hairline borders, 12px radius, no shadows or gradients. */
.site-header { border-bottom: var(--line); background: var(--surface); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand picture { display: inline-flex; }
.brand__mark { width: 32px; height: 32px; border-radius: 8px; }
.updates {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; background: var(--surface);
}
.updates:hover { border-color: var(--accent); color: var(--accent); }
.feed-icon { width: 16px; height: 16px; color: var(--accent); }

main.wrap { flex: 1; padding-top: 24px; padding-bottom: 40px; }
.section-title { font-size: 16px; font-weight: 700; margin: 36px 0 12px; }

.banner { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); color: #fff; margin-bottom: 24px; }
.banner__title { margin: 0; font-size: 20px; line-height: 1.3; }
.banner__detail { margin: 2px 0 0; opacity: .92; }
.banner__icon { flex: none; width: 32px; height: 32px; border-radius: 50%; background: rgb(255 255 255 / .2) center / 20px no-repeat; }
.banner--operational { background: #15803d; }
.banner--degraded { background: #b45309; }
.banner--outage { background: #b91c1c; }
.banner--maintenance { background: #2b59c3; }
.banner--unknown { background: var(--surface); color: var(--text); border: var(--line); }
.banner--unknown .banner__icon { background-color: var(--none); }
.banner--operational .banner__icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2Z'/%3E%3C/svg%3E"); }
.banner--degraded .banner__icon, .banner--outage .banner__icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M11 5h2v9h-2zM11 16h2v2h-2z'/%3E%3C/svg%3E"); }
.banner--maintenance .banner__icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 2a6 6 0 1 1 0 12 6 6 0 0 1 0-12Zm-1 2v5l4 2.4.8-1.3-3.3-2V8H11Z'/%3E%3C/svg%3E"); }

/* Rows and the scale share one grid: label, 90-day bar, uptime. */
.group, .scale { --cols: 210px minmax(0, 1fr) 96px; }
.group { background: var(--surface); border: var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.group__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; }
.group__head::-webkit-details-marker { display: none; }
.group__name { flex: 1; min-width: 0; }
.group__state { font-size: 13px; font-weight: 600; }
.group__state--up { color: var(--ok); }
.group__state--down, .group__state--pending { color: var(--warn); }
.group__state--maintenance { color: var(--maint); }
.group__state--unknown { color: var(--muted); }
.chevron { width: 20px; height: 20px; color: var(--muted); transition: transform .15s ease; }
.group[open] .chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .chevron { transition: none; } }

.rows { list-style: none; margin: 0; padding: 0; border-top: var(--line); }
.row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 16px; padding: 10px 18px; }
.row + .row { border-top: var(--line); }
.row__label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row__name { min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { flex: none; display: inline-flex; width: 20px; height: 20px; }
.logo picture { display: inline-flex; }
.logo .mark { width: 20px; height: 20px; border-radius: 4px; }
.fill-mono { fill: var(--mark-mono); }
.fill-mixcloud { fill: var(--mark-mixcloud); }
.fill-shield { fill: var(--accent); }
.pill { flex: none; font-size: 12px; font-weight: 700; }
.pill--down { color: var(--bad); }
.pill--pending { color: var(--warn); }
.pill--maintenance { color: var(--maint); }
.pill--unknown { color: var(--muted); font-weight: 600; }

.bar { display: flex; gap: 1.5px; height: 28px; }
.day { flex: 1; min-width: 0; border-radius: 1.5px; background: var(--none); }
.day--up { background: var(--ok); }
.day--partial { background: var(--warn); }
.day--down { background: var(--bad); }
.day--maintenance { background: var(--maint); }
.row__uptime { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row__none { color: var(--muted); font-weight: 400; font-size: 12px; }

.scale { display: grid; grid-template-columns: var(--cols); gap: 16px; padding: 0 19px; font-size: 12px; color: var(--muted); }
.scale__days { display: flex; justify-content: space-between; }
.scale__uptime { grid-column: -2; text-align: right; }

.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notice { min-width: 0; background: var(--surface); border: var(--line); border-radius: var(--radius); padding: 14px 18px; }
.notice__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.notice__title { margin: 0; font-size: 15px; }
.notice--outage .notice__title { color: var(--bad); }
.notice--degraded .notice__title { color: var(--warn); }
.notice__time { flex: none; font-size: 13px; color: var(--muted); }
.notice__note { margin: 4px 0 0; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { margin: 0; padding: 14px 18px; background: var(--surface); border: var(--line); border-radius: var(--radius); color: var(--muted); }

.site-footer { border-top: var(--line); background: var(--surface); }
.site-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; text-align: center; }
.support { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.support a { font-weight: 600; text-decoration: none; }
.support a:hover { text-decoration: underline; }
.powered { margin: 0; color: var(--muted); }

/* Below 520px the bars hide; each row keeps its name, state and uptime. */
@media (max-width: 520px) {
  .site-header__inner { min-height: 56px; }
  .brand { font-size: 16px; }
  .brand__mark { width: 28px; height: 28px; }
  .updates { padding: 7px 12px; font-size: 13px; }
  .banner { padding: 16px; }
  .banner__title { font-size: 18px; }
  .group, .scale { --cols: minmax(0, 1fr) 96px; }
  .group__head, .row { padding-left: 14px; padding-right: 14px; }
  .bar, .scale__days, .scale > span:first-child { display: none; }
  .scale { padding: 0 15px; }
  .row__name { white-space: normal; }
}
