/*
 * status.emailit.com. Tokens, type and components mirror the marketing site
 * (apps/marketing/src/styles/global.css) so the two read as one product.
 * Status colors follow the dash: a see-through neon tint with a thin neon ring.
 */

/* ------------------------------------------------------------------ */
/* Fonts (same files and fallbacks as emailit.com)                     */
/* ------------------------------------------------------------------ */

@font-face {
  font-family: 'PP Frama';
  src: url('/fonts/pp-frama/PPFrama-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PP Frama Text';
  src: url('/fonts/pp-frama/PPFramaText-Variable.woff2') format('woff2');
  font-weight: 290 690;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched Arial until PP Frama loads, so the swap doesn't move text. */
@font-face {
  font-family: 'PP Frama Text Fallback';
  src: local('Arial'), local('ArialMT'), local('Helvetica');
  font-weight: 100 520;
  size-adjust: 117.66%;
  ascent-override: 86.69%;
  descent-override: 20.40%;
  line-gap-override: 18.70%;
}
@font-face {
  font-family: 'PP Frama Text Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Bold');
  font-weight: 521 900;
  size-adjust: 112.93%;
  ascent-override: 90.32%;
  descent-override: 21.25%;
  line-gap-override: 19.48%;
}
@font-face {
  font-family: 'PP Frama Fallback';
  src: local('Arial'), local('ArialMT'), local('Helvetica');
  font-weight: 100 420;
  size-adjust: 103.15%;
  ascent-override: 98.89%;
  descent-override: 23.27%;
  line-gap-override: 21.33%;
}
@font-face {
  font-family: 'PP Frama Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Bold');
  font-weight: 421 900;
  size-adjust: 97.59%;
  ascent-override: 104.52%;
  descent-override: 24.59%;
  line-gap-override: 22.54%;
}

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
  color-scheme: light;

  --font-sans: 'PP Frama Text', 'PP Frama Text Fallback', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'PP Frama', 'PP Frama Fallback', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* PP Frama's own instances (Light 290, Regular 370, Medium 470, Semibold 580). */
  --w-light: 290;
  --w-normal: 370;
  --w-medium: 470;
  --w-semibold: 580;

  --emailit-50: #cafcdc;
  --emailit-300: #28f699;
  --emailit-400: #15c182;
  --emailit-500: #03a071;
  --emailit-600: #007b5e;
  --emailit-950: #012d22;

  --canvas: #fcfcfc;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --surface-3: #ececeb;
  --fg: #0b0c0c;
  --fg-muted: #4b4f4e;
  --fg-subtle: #666b69;
  --fg-faint: #a3a8a6;
  --line: rgb(11 12 12 / 0.1);
  --line-strong: rgb(11 12 12 / 0.18);
  --accent: var(--emailit-600);
  --rail: rgb(11 12 12 / 0.12);
  --dots: rgb(11 12 12 / 0.09);

  /* Status tones: text, neon tint, neon ring, bar fill. */
  --ok: var(--emailit-500);
  --ok-tint: rgb(40 246 153 / 0.18);
  --ok-ring: rgb(40 246 153 / 0.45);
  --ok-bar: var(--emailit-400);
  --warn: #a67c00;
  --warn-tint: rgb(255 225 74 / 0.22);
  --warn-ring: rgb(255 210 30 / 0.55);
  --warn-bar: #f2c200;
  --bad: #e8244a;
  --bad-tint: rgb(255 90 120 / 0.18);
  --bad-ring: rgb(255 90 120 / 0.45);
  --bad-bar: #e8244a;
  --info: #0a9fd0;
  --info-tint: rgb(66 212 255 / 0.18);
  --info-ring: rgb(66 212 255 / 0.45);
  --none: var(--fg-subtle);
  --none-tint: var(--surface-2);
  --none-ring: var(--line);
  --none-bar: var(--surface-3);

  --radius-card: 1rem;
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-mode='dark'] {
  color-scheme: dark;

  --canvas: #0a0b0b;
  --surface: #111312;
  --surface-2: #161918;
  --surface-3: #1f2321;
  --fg: #f4f6f5;
  --fg-muted: #b9bfbc;
  --fg-subtle: #8c9390;
  --fg-faint: #5a605d;
  --line: rgb(255 255 255 / 0.1);
  --line-strong: rgb(255 255 255 / 0.17);
  --accent: var(--emailit-300);
  --rail: rgb(255 255 255 / 0.1);
  --dots: rgb(255 255 255 / 0.07);

  --ok: #28f699;
  --ok-bar: #28f699;
  --warn: #ffe14a;
  --warn-ring: rgb(255 225 74 / 0.45);
  --warn-bar: #ffe14a;
  --bad: #ff5a78;
  --bad-bar: #ff5a78;
  --info: #42d4ff;
  --none-bar: var(--surface-3);
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-size: 15px;
  line-height: 1.5;
  font-weight: var(--w-normal);
  font-synthesis-weight: none;
  font-feature-settings: 'ss01' on;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  text-wrap: balance;
}

strong {
  font-weight: var(--w-semibold);
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgb(40 246 153 / 0.35);
}

:focus-visible {
  outline: 2px solid var(--emailit-500);
  outline-offset: 2px;
}

button,
select,
summary,
label:has(input[type='checkbox']) {
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.skip-link:focus {
  top: 1rem;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.icon-sm {
  width: 14px;
  height: 14px;
}

/* ------------------------------------------------------------------ */
/* Layout: rails, dot field, containers                                */
/* ------------------------------------------------------------------ */

.shell {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.rails {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: -1;
}
.page-rails {
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: min(100%, 1240px);
  transform: translateX(-50%);
  border-inline: 1px dashed var(--rail);
}
.dot-field {
  position: absolute;
  inset-block: 0;
  width: calc(50% - 620px);
  background-image: radial-gradient(circle at 1px 1px, var(--dots) 1px, transparent 0);
  background-size: 12px 12px;
}
.dot-field-left {
  left: 0;
}
.dot-field-right {
  right: 0;
}
@media (max-width: 1240px) {
  .dot-field {
    display: none;
  }
}

.container-site {
  margin-inline: auto;
  width: 100%;
  max-width: 1240px;
  padding-inline: 1.25rem;
}
.container-page {
  flex: 1;
  margin-inline: auto;
  width: 100%;
  max-width: 1000px;
  padding: 0 1.25rem 2rem;
}
@media (min-width: 40rem) {
  .container-site,
  .container-page {
    padding-inline: 2rem;
  }
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-bar {
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s,
    border-color 0.3s;
}
[data-scrolled] .header-bar {
  background-color: color-mix(in oklch, var(--canvas), transparent 12%);
  border-color: var(--line);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg);
  border-radius: 0.375rem;
}
.brand-logo {
  height: 18px;
  width: auto;
  display: block;
}
.brand-sep {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}
.brand-label {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  font-size: 15px;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--fg-muted);
  transition:
    color 0.15s,
    background-color 0.15s;
}
.icon-btn:hover {
  color: var(--fg);
  background: var(--surface-2);
}
.icon-moon,
[data-mode='dark'] .icon-sun {
  display: none;
}
[data-mode='dark'] .icon-moon {
  display: block;
}
@media (max-width: 47.99rem) {
  .hide-below-md {
    display: none !important;
  }
}
@media (max-width: 39.99rem) {
  .hide-below-sm {
    display: none !important;
  }
}
@media (max-width: 23.74rem) {
  .hide-below-xs {
    display: none !important;
  }
}

/* ------------------------------------------------------------------ */
/* Buttons, links, pills, tags                                         */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding-inline: 1.25rem;
  border: 0;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: var(--w-medium);
  line-height: 1;
  white-space: nowrap;
  color: inherit;
  background: transparent;
  transition:
    background-color 0.2s var(--ease-out-expo),
    color 0.2s var(--ease-out-expo),
    transform 0.2s var(--ease-out-expo);
}
.btn:active {
  transform: translateY(1px);
}
.btn .btn-arrow {
  transition: transform 0.25s var(--ease-out-expo);
}
.btn:hover .btn-arrow {
  transform: translateX(3px);
}
.btn-sm {
  height: 2.25rem;
  padding-inline: 0.95rem;
  font-size: 0.875rem;
}
/* The site's brand button (same as emailit.com). */
.btn-primary {
  color: #fff;
  background-image: linear-gradient(to bottom, color-mix(in oklch, var(--emailit-500), white 15%), var(--emailit-500));
  box-shadow:
    0 0 0 1px color-mix(in oklch, var(--emailit-500), black 10%),
    inset 0 1px 0 color-mix(in oklch, var(--emailit-500), white 30%),
    0 1px 2px rgb(1 45 34 / 0.25);
}
.btn-primary:hover {
  background-image: linear-gradient(
    to bottom,
    color-mix(in oklch, var(--emailit-500), white 22%),
    color-mix(in oklch, var(--emailit-500), white 4%)
  );
}
.btn-secondary {
  color: var(--fg);
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgb(0 0 0 / 0.05);
}
.btn-secondary:hover {
  background: var(--surface-2);
}
.btn-ghost {
  color: var(--fg-muted);
}
.btn-ghost:hover {
  color: var(--fg);
  background: var(--surface-2);
}
.btn-danger {
  color: var(--bad);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--bad-ring);
}
.btn-danger:hover {
  background: var(--bad-tint);
}

.link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--accent), transparent 60%);
  text-underline-offset: 3px;
}
.link:hover {
  text-decoration-color: currentColor;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
  height: 1.625rem;
  padding: 0 0.625rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: var(--w-medium);
  white-space: nowrap;
  color: var(--tone);
  background: var(--tone-tint);
  box-shadow: inset 0 0 0 1px var(--tone-ring);
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: currentColor;
}
.pill.tone-ok .pill-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--tone);
  background: var(--tone-tint);
  box-shadow: inset 0 0 0 1px var(--tone-ring);
}

.tone-ok {
  --tone: var(--ok);
  --tone-tint: var(--ok-tint);
  --tone-ring: var(--ok-ring);
  --tone-bar: var(--ok-bar);
}
.tone-warn {
  --tone: var(--warn);
  --tone-tint: var(--warn-tint);
  --tone-ring: var(--warn-ring);
  --tone-bar: var(--warn-bar);
}
.tone-bad {
  --tone: var(--bad);
  --tone-tint: var(--bad-tint);
  --tone-ring: var(--bad-ring);
  --tone-bar: var(--bad-bar);
}
.tone-info {
  --tone: var(--info);
  --tone-tint: var(--info-tint);
  --tone-ring: var(--info-ring);
  --tone-bar: var(--info);
}
.tone-none {
  --tone: var(--none);
  --tone-tint: var(--none-tint);
  --tone-ring: var(--none-ring);
  --tone-bar: var(--none-bar);
}

/* ------------------------------------------------------------------ */
/* Type: eyebrow, hero, section heads                                  */
/* ------------------------------------------------------------------ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--emailit-500);
}

.title-muted {
  font-weight: var(--w-light);
  letter-spacing: -0.03em;
  color: var(--fg-subtle);
}

.hero {
  padding: 3.5rem 0 1rem;
}
.hero-compact {
  padding-top: 1.75rem;
}
.hero-title {
  margin-top: 1.25rem;
  max-width: 52rem;
  font-size: clamp(2.125rem, 5.4vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--fg);
}
.hero-compact .hero-title {
  font-size: clamp(2rem, 4.4vw, 3rem);
}
.hero-title-sm,
.hero-compact .hero-title-sm {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
}
.hero-meta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  color: var(--fg-subtle);
  font-size: 0.9375rem;
}
.hero-tags {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.hero-tags + .hero-title {
  margin-top: 1rem;
}
.hero-actions {
  margin-top: 2rem;
}
.target {
  font-size: 0.8125rem;
  color: var(--fg-subtle);
  word-break: break-all;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding-top: 1.75rem;
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}
.crumbs a:hover {
  color: var(--fg);
}
.crumbs [aria-current] {
  color: var(--fg-muted);
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumbs-sep {
  width: 11px;
  height: 11px;
  margin-left: 0.375rem;
  color: var(--fg-faint);
}

.section {
  margin-top: 4rem;
}
.section-tight {
  margin-top: 2rem;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-title {
  margin-top: 0.875rem;
  font-size: clamp(1.625rem, 3.2vw, 2.125rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.section-desc {
  margin-top: 0.75rem;
  max-width: 40rem;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}
.fine {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}
.muted {
  color: var(--fg-subtle);
  font-size: 0.8125rem;
}

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */

.card {
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--surface);
}
.empty {
  padding: 1.25rem 1.5rem;
  color: var(--fg-subtle);
}

/* Active incidents */
.incident-cards {
  display: grid;
  gap: 0.75rem;
}
.incident-card {
  display: block;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--tone-ring);
  transition: background-color 0.15s;
}
.incident-card:hover {
  background: var(--surface-2);
}
.incident-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}
.incident-card-title {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.incident-card-body {
  margin-top: 0.5rem;
  color: var(--fg-muted);
}
.incident-card-meta {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}

/* Services with 30-day bars */
.service-list {
  overflow: hidden;
}
.service {
  display: block;
  padding: 1.125rem 1.5rem 1rem;
  transition: background-color 0.15s;
}
.service + .service {
  border-top: 1px solid var(--line);
}
.service:hover {
  background: var(--surface-2);
}
.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.service-name {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.service-caret {
  width: 12px;
  height: 12px;
  color: var(--fg-faint);
  transition: transform 0.2s var(--ease-out-expo);
}
.service:hover .service-caret {
  transform: translateX(2px);
  color: var(--fg-subtle);
}

/* Uptime bars */
.bars {
  display: flex;
  gap: 3px;
  height: 2.25rem;
}
.bar {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 3px;
  background: var(--tone-bar);
  transition: opacity 0.1s;
}
.bar:hover {
  opacity: 0.7;
}
.bars-dense {
  gap: 2px;
}
.bars-dense .bar {
  border-radius: 2px;
}
.bars-legend {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--fg-subtle);
}
.bars-legend-pct {
  color: var(--fg-muted);
}
@media (max-width: 39.99rem) {
  .bars {
    gap: 2px;
  }
}

/* Live matrix */
.table-wrap {
  overflow-x: auto;
}
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.matrix th,
.matrix td {
  padding: 0.75rem 1.25rem;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.matrix th:first-child {
  text-align: left;
}
@media (max-width: 39.99rem) {
  .matrix th,
  .matrix td {
    padding: 0.625rem 0.875rem;
  }
}
.matrix thead th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  background: var(--surface-2);
}
.matrix tbody tr:last-child > * {
  border-bottom: 0;
}
.matrix tbody th {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
}
.matrix tbody th a:hover {
  color: var(--accent);
}
.cell {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--fg-muted);
}
.cell-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  border-radius: 9999px;
  vertical-align: 0.1em;
}
.cell-ok .cell-dot {
  background: var(--ok-bar);
}
.cell-bad {
  color: var(--bad);
  cursor: help;
}
.cell-bad .cell-dot {
  background: var(--bad);
}
.cell-none {
  color: var(--fg-faint);
}

/* Incident lists */
.incident-list {
  overflow: hidden;
}
.incident-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  transition: background-color 0.15s;
}
.incident-row + .incident-row {
  border-top: 1px solid var(--line);
}
.incident-row:hover {
  background: var(--surface-2);
}
.incident-row-main {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}
.incident-row-title {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  letter-spacing: -0.01em;
}
.incident-row-meta {
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}

/* "Show older incidents" */
.older {
  margin-top: 1rem;
}
.older > summary {
  list-style: none;
}
.older > summary::-webkit-details-marker {
  display: none;
}
.older .when-open,
.older[open] .when-closed {
  display: none;
}
.older[open] .when-open {
  display: inline;
}
.older-caret {
  transition: transform 0.2s var(--ease-out-expo);
}
.older[open] .older-caret {
  transform: rotate(180deg);
}
.older > .card {
  margin-top: 1rem;
}

/* History */
.history-month + .history-month {
  margin-top: 2.5rem;
}
.history-month-title {
  margin-bottom: 0.875rem;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}
.pager {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

/* Service detail metrics */
.metrics {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
@media (max-width: 47.99rem) {
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}
.metric {
  padding: 1.25rem 1.5rem;
}
.metric-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.metric-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.metric-figure {
  font-family: var(--font-display);
  font-weight: var(--w-light);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}
.metric-caption {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}
.metric-stats {
  display: flex;
  gap: 0.5rem;
}
.metric-stat {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  min-width: 5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.metric-stat-value {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  font-size: 1rem;
  line-height: 1;
}
.metric-stat-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.issue-counts {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}
.issue-counts li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.issue-count {
  min-width: 2rem;
  font-family: var(--font-display);
  font-weight: var(--w-light);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Incident page */
.facts {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
}
.facts dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.facts dd {
  margin-top: 0.25rem;
  color: var(--fg-muted);
}
.timeline-card {
  padding: 0.5rem 1.5rem;
}
.timeline {
  list-style: none;
  padding: 0;
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.125rem 0;
}
.timeline-item + .timeline-item {
  border-top: 1px solid var(--line);
}
.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.4rem;
  border-radius: 9999px;
  background: var(--tone-tint);
  box-shadow: inset 0 0 0 2px var(--tone);
}
.timeline-status {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
}
.timeline-body {
  margin-top: 0.25rem;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}
.timeline-time {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}
.empty-inline {
  padding: 1rem 0;
  color: var(--fg-subtle);
}

/* Hover tooltip for bars */
.tooltip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  max-width: 280px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  background: var(--surface);
  color: var(--fg);
  box-shadow:
    0 0 0 1px var(--line),
    0 12px 32px -8px rgb(0 0 0 / 0.25);
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: pre-line;
}
.tooltip[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--line);
  padding: 4rem 0 2.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}
.footer-brand {
  grid-column: 1 / -1;
  max-width: 20rem;
}
@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }
  .footer-brand {
    grid-column: auto;
  }
}
.footer-logo-link {
  display: inline-flex;
  color: var(--fg);
}
.footer-logo {
  height: 20px;
  width: auto;
}
.footer-tagline {
  margin-top: 1.25rem;
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.5rem;
}
.footer-socials {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.25rem;
}
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  color: var(--fg-subtle);
  transition:
    color 0.15s,
    background-color 0.15s;
}
.social:hover {
  color: var(--fg);
  background: var(--surface-2);
}
.footer-title {
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  font-size: 0.8125rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: grid;
  gap: 0.625rem;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--fg-subtle);
  transition: color 0.15s;
}
.footer-links a:hover {
  color: var(--fg);
}
.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 64rem) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}
.footer-legal ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.footer-legal a:hover {
  color: var(--fg);
}
.footer-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.select-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  border-radius: 9999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg-subtle);
}
.select-pill > .icon:first-child {
  position: absolute;
  left: 0.75rem;
  pointer-events: none;
}
.select-pill select {
  appearance: none;
  height: 100%;
  max-width: 15rem;
  padding: 0 2rem 0 2.125rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.8125rem;
}
.select-caret {
  position: absolute;
  right: 0.75rem;
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.theme-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--fg-subtle);
  transition:
    background-color 0.15s,
    color 0.15s;
}
.theme-option:hover {
  color: var(--fg);
}
.theme-option[aria-checked='true'] {
  color: var(--fg);
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgb(0 0 0 / 0.06);
}
.footer-made {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--fg-subtle);
}

/* ------------------------------------------------------------------ */
/* Admin forms                                                         */
/* ------------------------------------------------------------------ */

.admin-narrow {
  max-width: 28rem;
}
.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.admin-actions {
  display: flex;
  gap: 0.5rem;
}
.form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}
.form-title {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}
.section > .form-title {
  margin-bottom: 1rem;
}
.field {
  display: grid;
  gap: 0.375rem;
}
.field > span {
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
input:not([type='checkbox']),
textarea,
.form select,
.inline-form select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 0;
  border-radius: 0.625rem;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg);
  font: inherit;
  font-size: 0.9375rem;
}
input:not([type='checkbox']):focus,
textarea:focus,
.form select:focus {
  outline: 2px solid var(--emailit-500);
  outline-offset: 0;
}
input[type='checkbox'] {
  accent-color: var(--emailit-500);
}
.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
}
.form-error {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: var(--bad);
  background: var(--bad-tint);
  box-shadow: inset 0 0 0 1px var(--bad-ring);
}
.admin-incidents {
  display: grid;
  gap: 0.875rem;
}
.admin-incident {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
}
.admin-updates {
  display: grid;
  gap: 0.375rem;
  padding-left: 1.125rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
}
.inline-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
}
.admin-incident-actions {
  display: flex;
  gap: 0.5rem;
}
@media (max-width: 39.99rem) {
  .inline-form,
  .form-row,
  .checks {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
