/*
  status.apsio.io (plan step 5.6). The brand tokens are the site's (apps/site/src/styles/
  site.css, docs/brand.md): copy changes there here too. Dark mode is its own palette; the theme
  follows the system unless data-theme is set.
*/
@font-face {
  font-family: "Schibsted Grotesk";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/public-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/public-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  --ink: #171320;
  --ink-2: #4f4859;
  --ink-3: #7a7386;
  --plate: #f4f2f5;
  --surface: #ffffff;
  --surface-2: #faf8fb;
  --rule: #dad5de;
  --rule-strong: #b9b2bf;
  --peri: #c21a86;
  --halo: #fbe3f1;
  --ok: #157a52;
  --warn: #a86400;
  --crash: #d0362f;
  --ok-bg: #ddf1e7;
  --warn-bg: #fbecd3;
  --crash-bg: #fbe0dd;
  /* State words on their tints: the brand hues reach only 3.95:1 and 4.02:1 there, so
     small text on a tint uses these darker steps to pass WCAG AA (4.5:1). */
  --crash-on-tint: #b42a24;
  --warn-on-tint: #945800;
  --code-bg: #1a1622;
  --code-fg: #e6e1ea;
  --code-dim: #9a92a6;
  --code-key: #f28acb;
  --code-str: #9fd9bf;
  --night: #16121d;
  --night-panel: #221c2b;
  --night-fg: #f1edf4;
  --night-dim: #b3abbd;
  --night-rule: rgba(255, 255, 255, 0.13);
  --night-rule-strong: rgba(255, 255, 255, 0.24);
  --on-ink: #f4f2f5;
  --on-ink-dim: #b4acbc;
  --on-ink-rule: rgba(255, 255, 255, 0.18);
  --on-ink-rule-strong: rgba(255, 255, 255, 0.5);
  --header-bg: rgba(244, 242, 245, 0.92);
  --shadow: 0 30px 60px -36px rgba(23, 19, 32, 0.35);
  --shadow-strong: 0 30px 60px -36px rgba(23, 19, 32, 0.55);

  --f-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --band: clamp(72px, 8vw, 112px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eeeaf1;
    --ink-2: #b4acbc;
    --ink-3: #8f879a;
    --plate: #0f0d12;
    --surface: #17141c;
    --surface-2: #1d1922;
    --rule: #2c2733;
    --rule-strong: #4a4352;
    --peri: #ff6fd0;
    --halo: #3a1530;
    --ok: #4ed39b;
    --warn: #f0b24a;
    --crash: #ff6b63;
    --ok-bg: #11301f;
    --warn-bg: #352610;
    --crash-bg: #3b1613;
    --crash-on-tint: #ff6b63;
    --warn-on-tint: #f0b24a;
    --code-bg: #0a090d;
    --code-dim: #8f879a;
    --code-key: #ff8fd6;
    --night: #09080b;
    --night-panel: #17141c;
    --night-fg: #eeeaf1;
    --night-dim: #ada5b8;
    --night-rule: rgba(255, 255, 255, 0.11);
    --on-ink: #0f0d12;
    --on-ink-dim: #4f4859;
    --on-ink-rule: rgba(0, 0, 0, 0.16);
    --on-ink-rule-strong: rgba(0, 0, 0, 0.45);
    --header-bg: rgba(15, 13, 18, 0.9);
    --shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.85);
    --shadow-strong: 0 30px 60px -36px rgba(0, 0, 0, 0.85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eeeaf1;
  --ink-2: #b4acbc;
  --ink-3: #8f879a;
  --plate: #0f0d12;
  --surface: #17141c;
  --surface-2: #1d1922;
  --rule: #2c2733;
  --rule-strong: #4a4352;
  --peri: #ff6fd0;
  --halo: #3a1530;
  --ok: #4ed39b;
  --warn: #f0b24a;
  --crash: #ff6b63;
  --ok-bg: #11301f;
  --warn-bg: #352610;
  --crash-bg: #3b1613;
  --crash-on-tint: #ff6b63;
  --warn-on-tint: #f0b24a;
  --code-bg: #0a090d;
  --code-dim: #8f879a;
  --code-key: #ff8fd6;
  --night: #09080b;
  --night-panel: #17141c;
  --night-fg: #eeeaf1;
  --night-dim: #ada5b8;
  --night-rule: rgba(255, 255, 255, 0.11);
  --on-ink: #0f0d12;
  --on-ink-dim: #4f4859;
  --on-ink-rule: rgba(0, 0, 0, 0.16);
  --on-ink-rule-strong: rgba(0, 0, 0, 0.45);
  --header-bg: rgba(15, 13, 18, 0.9);
  --shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.85);
  --shadow-strong: 0 30px 60px -36px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--plate);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink-2);
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--peri);
  outline-offset: 3px;
  border-radius: 4px;
}
h1,
h2 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- header and footer ---------- */
.top {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 20px;
}
.brand svg {
  width: 26px;
  height: 26px;
}
.mark-peri {
  fill: var(--peri);
}
.top-title {
  color: var(--ink-2);
  font-weight: 600;
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}
.langs {
  margin-left: auto;
}
.langs ul {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.langs [aria-current] {
  font-weight: 600;
}
.foot {
  border-top: 1px solid var(--rule);
  margin-top: 48px;
  padding: 24px 0 40px;
  font-size: 14px;
  color: var(--ink-2);
}
.foot-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- states ---------- */
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.badge-up {
  background: var(--ok-bg);
  border-color: transparent;
}
.badge-up .dot,
.overall-up .dot {
  background: var(--ok);
}
.badge-down {
  background: var(--crash-bg);
  border-color: transparent;
  color: var(--crash-on-tint);
}
.badge-down .dot,
.overall-down .dot {
  background: var(--crash);
}

/* ---------- overall ---------- */
.overall {
  margin: 32px 0 24px;
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
}
.overall h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  font-size: clamp(22px, 4vw, 28px);
}
.overall .dot {
  width: 14px;
  height: 14px;
}
.overall p {
  margin: 0;
  color: var(--ink-2);
}
.overall-up {
  border-color: var(--ok);
}
.overall-down {
  border-color: var(--crash);
  background: var(--crash-bg);
}
.overall-down p {
  color: var(--ink);
}

/* ---------- services ---------- */
.service {
  margin: 0 0 20px;
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
}
.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.service h2 {
  margin: 0;
  font-size: 20px;
}
.about {
  margin: 4px 0 10px;
  color: var(--ink-2);
  font-size: 15px;
}
.month {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}
.target,
.excluded {
  color: var(--ink-2);
  font-weight: 400;
}
.bars {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 36px;
}
.bar {
  flex: 1 1 0;
  min-width: 1px;
  border-radius: 2px;
  background: var(--rule-strong);
}
.bar-ok {
  background: var(--ok);
}
.bar-warn {
  background: var(--warn);
}
.bar-bad {
  background: var(--crash);
}
.bar-maint {
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 3px,
    rgba(255, 255, 255, 0.45) 3px 5px
  );
}
.bars-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-2);
}
.checks {
  margin-top: 12px;
  font-size: 15px;
}
.checks summary {
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 600;
}
.checks ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.checks > ul > li {
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}
.check-name {
  font-weight: 600;
  margin-right: 8px;
}
.checks .regions {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-family: var(--f-mono);
  font-size: 13px;
}
.legend {
  margin: 4px 0 32px;
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- maintenance, incidents, method ---------- */
.block {
  margin: 0 0 28px;
}
.block h2 {
  font-size: 20px;
  margin: 0 0 10px;
}
.block p {
  margin: 0;
  color: var(--ink-2);
}
.items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.item {
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.item:last-child {
  border-bottom: 1px solid var(--rule);
}
.block .item-title {
  color: var(--ink);
  font-weight: 600;
}
.item-meta {
  font-size: 14px;
}
.phase {
  display: inline-block;
  margin-right: 6px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--warn-bg);
  color: var(--warn-on-tint);
}
.maint-past .phase {
  background: var(--surface-2);
  color: var(--ink-2);
}

@media (max-width: 520px) {
  .top-title {
    border-left: 0;
    padding-left: 0;
  }
  .bars {
    gap: 1px;
    height: 30px;
  }
  .service,
  .overall {
    padding: 16px;
  }
}
