/* Decisiones — mobile-first, sin dependencias externas */

:root {
  --fondo: #f6f7f9;
  --tarjeta: #ffffff;
  --tinta: #1f2933;
  --tinta-suave: #616e7c;
  --borde: #e4e7eb;
  --acento: #3b6ea5;
  --verde: #1f7a4d;
  --verde-fondo: #e8f5ee;
  --rojo: #b3382e;
  --rojo-fondo: #fbeae8;
  --ambar-fondo: #fff6e5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.tope {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: var(--tarjeta);
  border-bottom: 1px solid var(--borde);
  position: sticky;
  top: 0;
  z-index: 5;
}

.tope a { text-decoration: none; color: var(--tinta); font-weight: 600; }
.tope .salir { color: var(--tinta-suave); font-weight: 400; font-size: 0.9rem; }

main { max-width: 46rem; margin: 0 auto; padding: 1rem; }

h1 { font-size: 1.4rem; margin: 1rem 0 0.75rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
h3 { font-size: 1rem; margin: 0 0 0.4rem; }

.aviso {
  background: var(--verde-fondo);
  border: 1px solid var(--verde);
  color: var(--verde);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 0.8rem 0;
}

.error {
  background: var(--rojo-fondo);
  border: 1px solid var(--rojo);
  color: var(--rojo);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 0.8rem 0;
}

.tarjeta {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: 14px;
  padding: 1rem;
  margin: 0.8rem 0;
}

.lista { display: flex; flex-direction: column; gap: 0.6rem; }

.tarjeta.decision { display: block; text-decoration: none; color: inherit; }
.tarjeta.decision:active { transform: scale(0.995); }
.tarjeta.decision.abierta { border-left: 5px solid var(--acento); }
.tarjeta.decision.decidida { opacity: 0.75; }

.estado { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.estado.pendiente { color: var(--acento); }
.estado.listo { color: var(--verde); }

.meta { color: var(--tinta-suave); font-size: 0.85rem; margin: 0.25rem 0; }
.resumen { margin: 0.3rem 0 0; color: var(--tinta-suave); font-size: 0.92rem; }
.vacio { color: var(--tinta-suave); }
.seccion-decididas { margin-top: 2rem; }

.volver { display: inline-block; margin-top: 0.6rem; color: var(--acento); text-decoration: none; font-size: 0.9rem; }

.datos { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.8rem; margin: 0.6rem 0 0; font-size: 0.88rem; }
.datos dt { color: var(--tinta-suave); }
.datos dd { margin: 0; overflow-wrap: anywhere; }

.problema { background: var(--ambar-fondo); }
.estado-abierta { color: var(--acento); font-weight: 600; }

.ya-decidida { background: var(--verde-fondo); border-color: var(--verde); }
.ya-decidida blockquote { margin: 0.4rem 0; padding-left: 0.8rem; border-left: 3px solid var(--verde); }

.titulo-opciones { margin-top: 1.4rem; }

.opcion { display: flex; gap: 0.7rem; cursor: pointer; }
.opcion input[type="radio"] { margin-top: 0.35rem; transform: scale(1.3); accent-color: var(--acento); }
.opcion .cuerpo-opcion { flex: 1; }
.opcion.recomendada { border-color: var(--verde); }
.opcion.no-recomendada { border-color: var(--rojo); }
.opcion.elegida { outline: 3px solid var(--acento); outline-offset: -1px; }
.opcion textarea,
.opcion.propia textarea {
  width: 100%;
  margin-top: 0.5rem;
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 0.5rem;
  font: inherit;
  font-size: 0.92rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}
.badge.verde { background: var(--verde-fondo); color: var(--verde); }
.badge.rojo { background: var(--rojo-fondo); color: var(--rojo); }

.consecuencias { font-size: 0.92rem; }
.justificacion { border-radius: 8px; padding: 0.5rem 0.7rem; font-size: 0.92rem; }
.justificacion.verde-suave { background: var(--verde-fondo); }
.justificacion.rojo-suave { background: var(--rojo-fondo); }

.guardar {
  display: block;
  width: 100%;
  margin: 1rem 0 1.5rem;
  padding: 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--acento);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.guardar:active { filter: brightness(0.92); }

.termino-glosario {
  text-decoration: underline dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: help;
}

.glosario-caja dl { margin: 0; }
.glosario-caja dt { font-weight: 700; margin-top: 0.5rem; }
.glosario-caja dd { margin: 0 0 0.3rem; color: var(--tinta-suave); }

.pie-enlaces { text-align: center; margin: 1.5rem 0; }
.pie-enlaces a { color: var(--acento); }

.payload {
  background: #22272e;
  color: #d5dce3;
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
}

.login { margin-top: 3rem; text-align: center; }
.login input {
  width: 100%;
  padding: 0.8rem;
  font-size: 1.05rem;
  border: 1px solid var(--borde);
  border-radius: 10px;
  margin-bottom: 0.7rem;
  text-align: center;
}
.login button {
  width: 100%;
  padding: 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--acento);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

@media (min-width: 700px) {
  h1 { font-size: 1.6rem; }
  main { padding: 1.5rem; }
}
