/* Documentos legales de Coral Systems S.A.C.
   Sin dependencias externas: tipografía del sistema, modo claro y oscuro. */

:root {
  color-scheme: light dark;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #1c1c1e;
  --secondary: #6c6c70;
  --separator: #d1d1d6;
  --accent: #0a66d8;
  --success: #248a3d;
  --warning: #b25000;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f2f2f7;
    --secondary: #a1a1a6;
    --separator: #38383a;
    --accent: #4da3ff;
    --success: #32d74b;
    --warning: #ff9f0a;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 32px;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 36px 0 8px;
}

p,
ul {
  margin: 0 0 14px;
}

.lead {
  color: var(--secondary);
}

footer {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 20px 32px;
  border-top: 1px solid var(--separator);
  color: var(--secondary);
  font-size: 14px;
}

/* Páginas de estado (confirmación, 404): un mensaje centrado. */

.status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  max-width: 440px;
}

.status h1 {
  margin-top: 20px;
}

.status p {
  color: var(--secondary);
}

.status-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
}

.status-icon.success {
  color: var(--success);
}

.status-icon.warning {
  color: var(--warning);
}

.status-icon.accent {
  color: var(--accent);
}

/* Botón principal. Mismo azul en claro y oscuro para que el texto blanco
   mantenga contraste suficiente. */

.button {
  display: block;
  margin: 24px 0 20px;
  padding: 14px 20px;
  border-radius: 12px;
  background: #0a66d8;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.button:active {
  opacity: 0.8;
}

/* Las páginas de estado muestran un solo bloque según el enlace.
   Sin JavaScript se ve el primer bloque. El botón que abre la app solo
   aparece cuando el script le puso su dirección. */

.state-error,
[data-state="error"] .state-ok,
.open-app {
  display: none;
}

[data-state="error"] .state-error,
[data-state="ready"] .open-app {
  display: block;
}
