/* ==========================================================================
   status.axynology.com: hoja de estilos (tokens del sitio axynology.com, docs/v2/DESIGN.md del repo del sitio).
   Oscuro por defecto; claro si el dispositivo lo pide. Sin estilos en línea (CSP estricta). Fuentes auto-alojadas.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin-400-700.woff2") format("woff2");
}

:root {
  --bg: #050605;
  --surface-1: #0b0d0c;
  --surface-2: #111412;
  --text: #eef2ef;
  --text-2: #c9d1cc;
  --muted: #a6afa9;
  --green: #10cf61;
  --green-text: #3bd87d;
  --green-a15: rgba(16, 207, 97, 0.15);
  --amber: #f5b84b;
  --amber-a15: rgba(245, 184, 75, 0.15);
  --red: #ff7a7a;
  --red-a15: rgba(255, 122, 122, 0.15);
  --empty: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;

  --r-card: 20px;
  --r-inner: 12px;
  --gutter: 16px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7f5;
    --surface-1: #ffffff;
    --surface-2: #eef2ef;
    --text: #0b0d0c;
    --text-2: #2c332f;
    --muted: #56605a;
    --green: #10cf61;
    --green-text: #087a3a;
    --green-a15: rgba(16, 207, 97, 0.14);
    --amber: #c27c00;
    --amber-a15: rgba(194, 124, 0, 0.12);
    --red: #c4302b;
    --red-a15: rgba(196, 48, 43, 0.1);
    --empty: rgba(0, 0, 0, 0.1);
    --line: rgba(0, 0, 0, 0.08);
    --line-2: rgba(0, 0, 0, 0.14);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-text); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.envoltura { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Cabecera ---------- */
.cab { border-bottom: 1px solid var(--line); }
.cab-in { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.marca { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; }
.marca img { width: 32px; height: 32px; }
.marca-nombre { font: 700 1.125rem/1 var(--font-display); letter-spacing: -0.01em; }
.cab-sep { width: 1px; height: 20px; background: var(--line-2); }
.cab-titulo { color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.idioma {
  margin-left: auto;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--muted); font-size: 0.875rem; font-weight: 500; text-decoration: none;
}
.idioma:hover { color: var(--text); }

main { padding-top: 32px; padding-bottom: 16px; }

/* ---------- Resumen ---------- */
.resumen {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px; margin-bottom: 40px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.resumen-ok { border-color: var(--green-a15); background: linear-gradient(var(--green-a15), var(--green-a15)), var(--surface-1); }
.resumen-caido { border-color: var(--red-a15); background: linear-gradient(var(--red-a15), var(--red-a15)), var(--surface-1); }
.resumen h1 { font-size: clamp(1.375rem, 4.5vw, 1.75rem); overflow-wrap: break-word; }
.resumen-nota { margin-top: 6px; color: var(--text-2); }
.resumen-hora { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; }

.punto { flex: none; width: 14px; height: 14px; margin-top: 8px; border-radius: 50%; background: var(--muted); }
.punto-ok { background: var(--green); box-shadow: 0 0 0 6px var(--green-a15); }
.punto-caido { background: var(--red); box-shadow: 0 0 0 6px var(--red-a15); }
@media (prefers-reduced-motion: no-preference) {
  .punto-ok, .punto-caido { animation: latido 2.4s ease-in-out infinite; }
}
@keyframes latido { 50% { box-shadow: 0 0 0 10px transparent; } }

/* ---------- Servicios ---------- */
.titulo { margin-bottom: 14px; font-size: 1.125rem; }
.servicios { display: grid; gap: 12px; margin-bottom: 40px; }
.servicio {
  padding: 18px 20px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
}
.servicio-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.servicio h3 { font-size: 1.0625rem; }
.servicio-cab p { margin-top: 2px; color: var(--muted); font-size: 0.875rem; }

.pastilla {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; line-height: 1.4;
  white-space: nowrap;
}
.pastilla::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pastilla-ok { color: var(--green-text); background: var(--green-a15); }
.pastilla-caido { color: var(--red); background: var(--red-a15); }
.pastilla-sin-datos { color: var(--muted); background: var(--surface-2); }

.barras { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 28px; margin-top: 16px; }
.barra { border-radius: 3px; background: var(--empty); }
.barra-ok { background: var(--green); }
.barra-parcial { background: var(--amber); }
.barra-caida { background: var(--red); }

.servicio-pie {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  margin-top: 8px;
  color: var(--muted); font-size: 0.8125rem;
}
.servicio-pie b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Incidentes ---------- */
.incidentes { display: grid; gap: 8px; }
.incidente {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px;
  padding: 12px 16px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: 10px;
  font-size: 0.9375rem;
}
.incidente-abierto { border-left-color: var(--red); }
.incidente-que { font-weight: 600; }
.incidente-cuando { color: var(--muted); }
.vacio { color: var(--muted); }

/* ---------- Pie ---------- */
.pie { padding-top: 32px; padding-bottom: 40px; color: var(--muted); font-size: 0.875rem; }
.pie p + p { margin-top: 8px; }
.pie a { color: var(--muted); }
.pie a:hover { color: var(--text); }

.no-encontrado { padding-top: 96px; text-align: center; }
.no-encontrado h1 { margin-bottom: 16px; font-size: 1.5rem; }

@media (min-width: 700px) {
  :root { --gutter: 24px; }
  main { padding-top: 48px; }
  .resumen { padding: 28px 32px; }
  .barras { height: 32px; }
}
