/* Status page on the shared Sarment palette. Dark by default; a soft light
   theme follows the system preference. Colors come from theme.css. The page
   loads nothing from third parties, so the brand faces apply only where they
   are installed and system faces stand in otherwise. */
:root {
  color-scheme: dark;
  --bg: #0C0D10;
  --panel: #14161A;
  --raised: #1B1E23;
  --paper: #ECEEF1;
  --muted: #8A8F98;
  --line: #2A2E35;
  --accent: #E6E8EB;
  --on-accent: #0C0D10;
  --mint: #3FB984;
  --mint-wash: #10241C;
  --amber: #D9A441;
  --amber-wash: #272013;
  --coral: #E0635C;
  --coral-wash: #2A1513;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --radius: 0.75rem;
  --radius-card: 1.25rem;

  font-family: var(--body);
  color: var(--paper);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: color-mix(in srgb, #F4F4F5 65%, #E4E4E7);
    --panel: #F4F4F5;
    --raised: #FFFFFF;
    --paper: #0A0A0A;
    --muted: #6B6B6B;
    --line: #111315;
    --accent: #111315;
    --on-accent: #FFFFFF;
    /* Status hues deepened with the ink color so small text reads on white. */
    --mint: color-mix(in srgb, #1E9E6A 65%, #0A0A0A);
    --mint-wash: #E7F4EE;
    --amber: color-mix(in srgb, #B7791F 65%, #0A0A0A);
    --amber-wash: #F7EFD9;
    --coral: color-mix(in srgb, #D23F38 65%, #0A0A0A);
    --coral-wash: #FBE6E4;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
}

.status-page {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
  font: 700 0.875rem/1 var(--mono);
  letter-spacing: 0.16em;
}

.brand img {
  display: block;
}

.status-label {
  margin-left: auto;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  color: var(--muted);
  background: var(--panel);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
}

/* Filled panels; space separates them, not rules. */
.hero,
.panel {
  border-radius: var(--radius-card);
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--panel);
}

.hero {
  position: relative;
  padding-top: clamp(1.75rem, 5vw, 2.5rem);
}

/* A status dot replaces the colored top rule. */
.hero::before {
  position: absolute;
  top: clamp(1.25rem, 4vw, 2rem);
  right: clamp(1.25rem, 4vw, 2rem);
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px var(--amber-wash);
  content: "";
}

.hero.ok::before {
  background: var(--mint);
  box-shadow: 0 0 0 6px var(--mint-wash);
}

.hero.bad::before {
  background: var(--coral);
  box-shadow: 0 0 0 6px var(--coral-wash);
}

.hero h1 {
  margin: 0.75rem 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-stretch: 72%;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-transform: uppercase;
}

.hero p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow,
.timestamp,
time {
  font-family: var(--mono);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timestamp,
.incident time {
  color: var(--muted);
  font-size: 0.8125rem;
}

.panel {
  margin-top: 0.75rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
}

.component-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.component {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  background: var(--raised);
}

.tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--amber);
  background: var(--amber-wash);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag::before {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.tag.ok {
  color: var(--mint);
  background: var(--mint-wash);
}

.tag.bad {
  color: var(--coral);
  background: var(--coral-wash);
}

.incident {
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--raised);
}

.incident + .incident {
  margin-top: 0.5rem;
}

.incident-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

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

.incident p {
  line-height: 1.6;
}

.muted,
footer {
  color: var(--muted);
}

.receipt-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  color: var(--paper);
  background: var(--raised);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  resize: vertical;
}

.receipt-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.verify-btn {
  margin-top: 0.75rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  color: var(--on-accent);
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.verify-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.verdict {
  margin-top: 0.9rem;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  line-height: 1.6;
}

.verdict.ok {
  background: var(--mint-wash);
}

.verdict.bad {
  background: var(--coral-wash);
}

.verdict p {
  margin: 0.35rem 0 0;
  overflow-wrap: anywhere;
}

.verdict code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  word-break: break-all;
}

footer {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.incident-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}

.incident-link:hover {
  text-decoration-color: var(--paper);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
