/* Estilos custom que extienden Tailwind via CDN */

.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kpi-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: #032D60;
}

.kpi-label {
  color: #6b7280;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }

.wizard-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.wizard-step-indicator .step-circle {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #e5e7eb;
  color: #6b7280;
}

.wizard-step-indicator.active .step-circle {
  background: #0176D3;
  color: white;
}

.wizard-step-indicator.completed .step-circle {
  background: #2E844A;
  color: white;
}

/* --- Step 1: subject picker --- */
.segmented {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}
.segmented-btn {
  padding: 6px 18px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.segmented-btn:hover { color: #374151; }
.segmented-btn.active {
  background: #ffffff;
  color: #0176D3;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 0 0 1px rgba(1,118,211,0.08);
}

.state-chip {
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
.state-chip:hover { border-color: #0176D3; color: #0176D3; }
.state-chip:active { transform: scale(0.98); }
.state-chip.selected {
  border-color: #0176D3;
  background: #eff6ff;
  color: #0176D3;
  box-shadow: inset 0 0 0 1px #0176D3;
}

.advanced-section {
  border-top: 1px dashed #e5e7eb;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}
.advanced-toggle {
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.advanced-toggle::-webkit-details-marker { display: none; }
.advanced-toggle::before {
  content: '▸';
  display: inline-block;
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}
.advanced-section[open] .advanced-toggle::before { transform: rotate(90deg); }
.advanced-toggle:hover { color: #374151; }

.reading-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e5e7eb;
  border-left: 3px solid #0176D3;
  border-radius: 12px;
  padding: 1.25rem 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgba(3, 45, 96, 0.04), 0 6px 18px rgba(3, 45, 96, 0.05);
}

.reading-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed #e5e7eb;
}

.reading-card-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.reading-card-body {
  font-size: 1.35rem;
  line-height: 1.65;
  color: #111827;
  letter-spacing: 0.005em;
  min-height: 96px;
  font-weight: 600;
  animation: reading-fade 0.45s ease-out;
  text-wrap: balance;
}

@keyframes reading-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.focus-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 260px;
  margin: 0 auto;
}

.focus-halo {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(1, 118, 211, 0.18) 0%, rgba(1, 118, 211, 0) 70%);
  animation: halo-pulse 6s ease-in-out infinite;
  pointer-events: none;
}

.breathing-circle {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 9999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle, #3b82f6 0%, #0176D3 55%, #032D60 100%);
  box-shadow:
    inset 0 0 40px rgba(255, 255, 255, 0.15),
    0 18px 45px rgba(3, 45, 96, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0.92;
  transform: scale(1);
  transition: transform 4s ease-in-out, opacity 4s ease-in-out, box-shadow 4s ease-in-out;
  animation: idle-breathe 7s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breathing-circle.expand {
  opacity: 1;
  transform: scale(1.35);
  animation: none;
  box-shadow:
    inset 0 0 50px rgba(255, 255, 255, 0.25),
    0 22px 60px rgba(3, 45, 96, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}
.breathing-circle.hold {
  opacity: 0.95;
  transform: scale(1.35);
  animation: none;
}
.breathing-circle.contract {
  opacity: 0.7;
  transform: scale(0.85);
  animation: none;
}

.focus-label {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.breathing-circle.expand .focus-label,
.breathing-circle.hold .focus-label,
.breathing-circle.contract .focus-label { opacity: 1; }

@keyframes idle-breathe {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50%      { transform: scale(1.06); opacity: 1; }
}

@keyframes halo-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.12); opacity: 1; }
}
