/* status.tamperlens.com
 *
 * A deliberately separate stylesheet from src/web/styles.css, not an import of
 * it. This page is served from a different origin, by different infrastructure,
 * precisely so that it survives the main site being unreachable — pulling in
 * the product's stylesheet would hand that independence back, and a status page
 * that renders unstyled during an outage is a status page that looks broken at
 * the exact moment it needs to look calm.
 *
 * The design tokens below are therefore COPIED from src/web/styles.css :root
 * rather than shared. They drift only if someone rebrands, and the cost of that
 * drift is a slightly off-brand status page, which is the cheaper failure.
 */

:root {
  color-scheme: light;

  --bg: #faf9f6;
  --bg-raised: #ffffff;
  --bg-inset: #f5f3ee;

  --border: #e5e2db;
  --border-strong: #d3cfc4;

  --text: #1c2321;
  --text-muted: #5a625e;
  --text-article: #333b37;

  --accent: #0f766e;

  --up: #15803d;
  --up-bg: #edf6f0;
  --partial: #b45309;
  --partial-bg: #fbf3ea;
  --down: #b91c1c;
  --down-bg: #fbeeeb;
  --none: #cfcdc5;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "Roboto Mono", Consolas, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #151a18;
    --bg-raised: #1c2320;
    --bg-inset: #121816;

    --border: #2a332f;
    --border-strong: #3a443f;

    --text: #e8eae8;
    --text-muted: #9aa5a0;
    --text-article: #d3d8d5;

    --accent: #2dd4bf;

    --up: #4ade80;
    --up-bg: rgba(74, 222, 128, 0.1);
    --partial: #fbbf24;
    --partial-bg: rgba(251, 191, 36, 0.1);
    --down: #f87171;
    --down-bg: rgba(248, 113, 113, 0.1);
    --none: #39423e;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

a {
  color: var(--accent);
}

/* masthead ---------------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.masthead-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
}

/* the one-line answer ----------------------------------------------------- */

.headline {
  margin: 28px 0 36px;
  padding: 22px 24px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-raised);
  /* The left rule is the whole signal: colour first, words second. */
  border-left-width: 6px;
}

.headline h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.headline p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-family: var(--mono);
}

.headline-up {
  border-left-color: var(--up);
  background: var(--up-bg);
}
.headline-partial {
  border-left-color: var(--partial);
  background: var(--partial-bg);
}
.headline-down {
  border-left-color: var(--down);
  background: var(--down-bg);
}
.headline-none {
  border-left-color: var(--none);
}

/* one component ----------------------------------------------------------- */

.component {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.component-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.component-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.state {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.state-up {
  color: var(--up);
}
.state-partial {
  color: var(--partial);
}
.state-down {
  color: var(--down);
}
.state-none {
  color: var(--text-muted);
}

.component-desc {
  margin: 2px 0 12px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* Ninety bars, one per day, oldest on the left. They shrink rather than wrap:
 * a wrapped strip stops reading as a timeline. Below ~560px the earliest days
 * fall off the left edge by design — the recent past is what a visitor came
 * for, and horizontal scroll on a status page is worse than a shorter window. */
.bars {
  display: flex;
  gap: 2px;
  height: 32px;
  overflow: hidden;
}

.bar {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 2px;
  background: var(--none);
}

.bar-up {
  background: var(--up);
}
.bar-partial {
  background: var(--partial);
}
.bar-down {
  background: var(--down);
}

.component-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--mono);
}

/* prose blocks ------------------------------------------------------------ */

.block {
  margin-top: 40px;
}

.block h2 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.block p {
  margin: 0 0 12px;
  color: var(--text-article);
  font-size: 15px;
}

.plain {
  margin: 0;
  padding-left: 20px;
  color: var(--text-article);
  font-size: 15px;
}

.plain li {
  margin-bottom: 8px;
}

.none {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-inset);
  color: var(--text-muted);
  font-size: 14.5px;
}

.raw {
  margin-top: 18px;
  font-size: 13.5px;
  font-family: var(--mono);
}

/* incidents --------------------------------------------------------------- */

.incidents {
  margin: 0;
  padding: 0;
  list-style: none;
}

.incident {
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--bg-raised);
}

.incident-open {
  border-left-color: var(--down);
  background: var(--down-bg);
}

.incident-closed {
  border-left-color: var(--border-strong);
}

.incident-head {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
}

.incident-when {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--mono);
}

.incident-detail {
  margin: 8px 0 0;
  color: var(--text-article);
  font-size: 14px;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

/* foot -------------------------------------------------------------------- */

.foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.foot p {
  margin: 0;
}

@media (max-width: 520px) {
  .component-head {
    flex-direction: column;
    gap: 2px;
  }
  .bars {
    height: 26px;
  }
}
