/* Páginas públicas de Kipu (kipu.mdsys.lat/…). Colores de la app
   (app/lib/core/theme/kipu_colors.dart), claro y oscuro. Sin fuentes externas,
   sin cookies, sin analítica. */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --divider: #d6d3d1;
  --outline: #78716c;
  --primary: #0f766e;
  --on-primary: #ffffff;
  --primary-container: #ccede9;
  --on-primary-container: #042f2e;
  --accent: #b45309;
  --danger: #b91c1c;
  --on-danger: #ffffff;
  --danger-container: #fce4e4;
  --on-danger-container: #7f1d1d;
  --mark: #fef3c7;
  --on-mark: #78350f;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1416;
    --surface: #172024;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --divider: #33403f;
    --outline: #7c8784;
    --primary: #2dd4bf;
    --on-primary: #042f2e;
    --primary-container: #134e4a;
    --on-primary-container: #ccfbf1;
    --accent: #fbbf24;
    --danger: #f87171;
    --on-danger: #1c1917;
    --danger-container: #4a1f22;
    --on-danger-container: #fecaca;
    --mark: #4a3a12;
    --on-mark: #fde68a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
}

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

.saltar {
  position: absolute;
  left: -9999px;
  top: 0;
}

.saltar:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem;
}

.marca {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.marca::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.35em;
  border-radius: 50%;
  border: 0.18em solid var(--primary);
  vertical-align: -0.02em;
}

.barra nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.barra nav a {
  display: inline-block;
  min-height: 48px;
  line-height: 48px;
  padding: 0 0.25rem;
}

.barra nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.contenido {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
  margin: 1rem 0 0.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

.borrador {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--mark);
  color: var(--on-mark);
}

mark.pendiente {
  background: var(--mark);
  color: var(--on-mark);
  padding: 0 0.2em;
  border-radius: 4px;
}

.tabla {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  background: var(--surface);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--divider);
}

.tarjeta {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 0 0 1rem;
}

.tarjeta h2 {
  margin-top: 0;
}

.aviso {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--danger-container);
  color: var(--on-danger-container);
}

.enlaces {
  list-style: none;
  padding: 0;
}

.enlaces a {
  display: block;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--divider);
  text-decoration: none;
  font-weight: 600;
}

.enlaces a span {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

form {
  display: grid;
  gap: 1rem;
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.ayuda {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.95rem;
}

input[type="email"],
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--outline);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  min-height: 48px;
}

.casilla {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-weight: 400;
}

.casilla input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.15rem 0 0;
  flex: none;
  accent-color: var(--danger);
}

.boton {
  display: inline-block;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: var(--danger);
  color: var(--on-danger);
}

.error {
  color: var(--danger);
  font-weight: 600;
}

.pie {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  border-top: 1px solid var(--divider);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
