:root {
  --estal-bg: #f5f7fb;
  --estal-card-bg: #ffffff;
  --estal-border: #e1e5f0;
  --estal-primary: #7b6cae;
  --estal-primary-soft: #9b8fd1;
  --estal-text-main: #333a4d;
  --estal-text-muted: #4c5670;
}

/* Fondo general (opcional) */
body.estalmat-fondo-suave {
  background: var(--estal-bg);
}

/* Tarjeta base */
.estalmat-card {
  background: var(--estal-card-bg);
  max-width: 700px;
  width: 95%;
  margin: 24px auto;
  padding: 24px 26px 28px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--estal-border);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.estalmat-title {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--estal-primary);
  margin-bottom: 4px;
  font-weight: 600;
}

.estalmat-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: #445065;
  margin-bottom: 14px;
}

.statement {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--estal-text-main);
  background: #f7f8ff;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px dashed #dadff4;
}

.statement .pregunta {
  color: #7b3fb8;
  font-weight: 700;
}

/* Entradas y botones */

.input-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.input-row label {
  font-size: 0.95rem;
  color: var(--estal-text-muted);
}

.input-row input[type="number"],
.input-row input[type="text"] {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cfd5eb;
  font-size: 1rem;
  min-width: 120px;
  outline: none;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.input-row input[type="number"]:focus,
.input-row input[type="text"]:focus {
  border-color: var(--estal-primary);
  box-shadow: 0 0 0 2px rgba(123, 108, 174, 0.18);
}

.btn-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button.estal-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.2s ease;
  font-family: inherit;
}

.estal-btn-primary {
  background: linear-gradient(135deg, var(--estal-primary), var(--estal-primary-soft));
  color: white;
  box-shadow: 0 4px 10px rgba(123, 108, 174, 0.35);
}


.estal-btn-secondary {
  background: #edf0ff;
  color: #4c4f70;
  border: 1px solid #d6dbf2;
}

.estal-btn-ghost {
  background: #ffffff;
  color: var(--estal-primary);
  border: 1px solid #e1dff7;
}

button.estal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

button.estal-btn:active {
  transform: translateY(0);
  box-shadow: none;
}



a.estal-btn1,
button.estal-btn1 {
  background: var(--estal-primary);
  color: white;
  border: 2px solid var(--estal-primary-soft);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.85rem;
  cursor: pointer;

  text-decoration: none;     /* para los enlaces */
  display: inline-block;     /* para que el <a> se comporte como botón */

  /* Sombra y transiciones */
  box-shadow: 0 4px 10px rgba(123, 108, 174, 0.35);
  transition: transform 0.15s ease,
              box-shadow 0.15s ease,
              background 0.15s ease;
  font-family: inherit;
}

a.estal-btn1:hover,
button.estal-btn1:hover {
  background: var(--estal-primary-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(123, 108, 174, 0.45);
}

a.estal-btn1:active,
button.estal-btn1:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(123, 108, 174, 0.3);
}

/* Feedback y cajas extra */

.feedback {
  margin-top: 14px;
  min-height: 1.2em;
  font-size: 0.95rem;
}

.feedback.ok {
  color: #1c8652;
}

.feedback.error {
  color: #c0392b;
}

.extra-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  display: none;
}

.hint-box {
  background: #fdf7ea;
  border: 1px solid #f2dfb3;
  color: #71552b;
}

.solution-box {
  background: #f5f4ff;
  border: 1px solid #d1cdf6;
  color: #403a6e;
}

.solution-box ol {
  padding-left: 20px;
  margin: 6px 0 0;
}

/* Responsive */

@media (max-width: 600px) {
  .estalmat-card {
    padding: 18px 16px 22px;
  }

  .input-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  button.estal-btn {
    width: 100%;
    text-align: center;
  }
}
