/* Page colours come from the shared theme tokens in core/base.css, so the page follows light and dark.
   Only the status colours are the page's own: a light and a dark value for each. */
:root {
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --idle: #64748b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --idle: #94a3b8;
  }
}
html[data-theme="light"] {
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --idle: #64748b;
}
html[data-theme="dark"] {
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --idle: #94a3b8;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
.page { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem 3rem; display: grid; gap: 1rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.back { color: var(--muted); text-decoration: none; font-size: 0.88rem; }
.back:hover { color: var(--accent); }
.back:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
.muted { color: var(--muted); }
.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 1.1rem 1.2rem;
}
.hero { display: flex; align-items: center; gap: 1rem; }
.hero h1 { margin: 0; font-size: 1.35rem; }
.hero p { margin: 0.2rem 0 0; font-size: 0.85rem; }
.hero-text { flex: 1; min-width: 0; }
/* The dot takes its colour from the state, and its soft ring is a faint wash of that same colour. */
.dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  color: var(--idle);
  background: currentColor;
}
.hero .dot { width: 16px; height: 16px; }
[data-state="ok"] > .dot { color: var(--ok); }
[data-state="warn"] > .dot { color: var(--warn); }
[data-state="bad"] > .dot { color: var(--bad); }
[data-state="ok"] > .dot, [data-state="warn"] > .dot, [data-state="bad"] > .dot { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.hero[data-state="ok"] > .dot { animation: pulse 2.4s ease-in-out infinite; }
.refresh {
  flex: none;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  background: var(--inner);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.refresh:hover { border-color: var(--accent); color: var(--accent); }
.refresh:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.refresh:disabled { opacity: 0.5; cursor: progress; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
h2 { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.panel-head .muted { font-size: 0.8rem; }
.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.svc {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 11px;
  background: var(--inner);
}
.svc .name { color: var(--text); font-size: 0.93rem; }
.svc .meta { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.page-theme-switch { margin: 0.5rem auto 0; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, currentColor 6%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .hero .dot { animation: none !important; } }
