/* status.teemli.com. Colours are Teemli's design tokens (web/src/lib/tokens.ts); "up" uses the
   spruce agent hue. Light and dark follow the visitor's system setting. */
@font-face {
  font-family: "Hanken Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --page: #f3f3f3;
  --card: #ffffff;
  --border: #e8e8e8;
  --text: #0d0d0d;
  --text2: #5d5d5d;
  --text3: #666666;
  --accent: #0d0d0d;
  --on-accent: #ffffff;
  --up: #1b7d60;
  --up-soft: #dff1ea;
  --slow: #9a5207;
  --slow-soft: #fbebd6;
  --down: #b3261e;
  --down-soft: #fce9e6;
  --info: #2563eb;
  --info-soft: #e7effd;
  --shadow: 0 1px 2px rgba(13, 13, 13, 0.04), 0 4px 16px rgba(13, 13, 13, 0.04);
  --font: "Hanken Grotesk Variable", "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #171717;
    --card: #212121;
    --border: #363636;
    --text: #ececec;
    --text2: #b4b4b4;
    --text3: #999999;
    --accent: #ececec;
    --on-accent: #0d0d0d;
    --up: #5cc39c;
    --up-soft: #17302a;
    --slow: #f2a54a;
    --slow-soft: #33250f;
    --down: #f2766b;
    --down-soft: #3a1816;
    --info: #5b93f5;
    --info-soft: #1c2a42;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 15px/1.55 var(--font);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 680px; margin: 0 auto; padding: 28px 16px 48px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.brand .mark { fill: var(--accent); }
.brand .eye { fill: var(--on-accent); }
.top-label { color: var(--text2); font-weight: 500; font-size: 14px; border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 4px 12px; }

/* Summary */
.summary { display: flex; gap: 16px; align-items: flex-start; padding: 22px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 16px; }
.summary h1 { margin: 1px 0 4px; font-size: 22px; line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; }
.summary p { margin: 0; color: var(--text2); }
.badge { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); }
.badge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.tone-up { --tone: var(--up); --tone-soft: var(--up-soft); }
.tone-slow { --tone: var(--slow); --tone-soft: var(--slow-soft); }
.tone-down { --tone: var(--down); --tone-soft: var(--down-soft); }
.tone-info { --tone: var(--info); --tone-soft: var(--info-soft); }

/* Components */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.comps { list-style: none; margin: 0; padding: 0; }
.comp { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; }
.comp + .comp { border-top: 1px solid var(--border); }
.comp-text { display: flex; flex-direction: column; min-width: 0; }
.comp-name { font-weight: 600; }
.comp-desc { color: var(--text3); font-size: 13.5px; overflow-wrap: anywhere; }
.comp-state { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; text-align: right; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--tone); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px var(--tone-soft); }
.comp-ms { color: var(--text3); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* Incidents */
.active { display: grid; gap: 12px; margin-bottom: 16px; }
.history { margin-top: 40px; }
.history h2 { font-size: 15px; font-weight: 650; margin: 0 0 12px; color: var(--text); }
.history .incident { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 18px 22px; margin-bottom: 10px; }
.empty { margin: 0; padding: 18px 22px; border: 1px dashed var(--border); border-radius: 18px; color: var(--text3); }
.incident h3 { margin: 0 0 2px; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.incident-open { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--tone); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); }
.affected { margin: 0 0 6px; color: var(--text3); font-size: 13.5px; }
.updates { list-style: none; margin: 10px 0 0; padding: 0; }
.updates li { padding: 10px 0 0; }
.updates li + li { border-top: 1px solid var(--border); margin-top: 10px; }
.u-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.u-status { font-weight: 650; }
.incident-open .u-status { color: var(--tone); }
.u-head time { color: var(--text3); }
.updates p { margin: 4px 0 0; color: var(--text2); }

/* Footer */
footer { margin-top: 48px; color: var(--text3); font-size: 13.5px; }
footer p { margin: 0 0 8px; }

@media (max-width: 480px) {
  .wrap { padding-top: 20px; }
  .top { margin-bottom: 24px; }
  .summary { padding: 18px; gap: 14px; }
  .summary h1 { font-size: 20px; }
  .comp { padding: 14px 18px; }
  .history .incident, .incident-open, .empty { padding: 16px 18px; }
}
