/* The status page carries the spec's dark tokens itself, because it must render while the website
   origin is down. Values are copied from docs/spec/ui.md §3.1; no other colour is introduced. */
:root {
  --background: #0A0A0A;
  --surface-1: #141414;
  --surface-2: #1C1C1C;
  --foreground: #FAFAFA;
  --foreground-muted: #A3A3A3;
  --foreground-subtle: #737373;
  --border: #262626;
  --success: #10B981;
  --warn: #F59E0B;
  --destructive: #EF4444;
  --font-sans: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

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

.page-header h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.summary {
  margin: 0;
  color: var(--foreground-muted);
}

.panel {
  margin-top: 32px;
  padding: 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
}

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

.component {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  grid-template-areas:
    "dot name state"
    ". checked checked"
    ". note note";
  gap: 4px 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.component:first-child {
  border-top: 0;
}

.dot {
  grid-area: dot;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--foreground-muted);
}

.dot[data-state="operational"] {
  background: var(--success);
}

.dot[data-state="degraded"] {
  background: var(--warn);
}

.dot[data-state="outage"] {
  background: var(--destructive);
}

.name {
  grid-area: name;
  font-weight: 500;
}

.state {
  grid-area: state;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.state[data-state="operational"] {
  color: var(--success);
}

.state[data-state="degraded"] {
  color: var(--warn);
}

.state[data-state="outage"] {
  color: var(--destructive);
}

.checked {
  grid-area: checked;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--foreground-subtle);
}

.note {
  grid-area: note;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.note[hidden] {
  display: none;
}

.limit {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.history-row {
  margin-top: 16px;
}

.history-row:first-child {
  margin-top: 0;
}

.history-row h3 {
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground-muted);
}

.days {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.day {
  width: 8px;
  height: 16px;
  border-radius: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.day[data-state="operational"] {
  background: var(--success);
  border-color: var(--success);
}

.day[data-state="degraded"] {
  background: var(--warn);
  border-color: var(--warn);
}

.day[data-state="outage"] {
  background: var(--destructive);
  border-color: var(--destructive);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  margin: 0;
  color: var(--foreground-muted);
}

.incident {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.incident:first-child {
  border-top: 0;
}

.incident h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.incident .meta,
.incident .update {
  margin: 0;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.incident .update {
  margin-top: 6px;
  color: var(--foreground);
}

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