/* Iuris Tantum · Inicio: materias, progreso, evolución, respaldo, repaso y compartir */

/* SELECTOR DE MATERIA */
.subject-intro {
  text-align: center;
  margin-bottom: 1.6rem;
}

.subject-intro h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-high);
  margin-bottom: 0.35rem;
}

.subject-intro p {
  font-size: 0.85rem;
  color: var(--text-mid);
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.subject-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: left;
  padding: 1.4rem 1.25rem;
  background: var(--bg-inset);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-high);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subject-card:not(:disabled):hover,
.subject-card:not(:disabled):focus-visible {
  border-color: var(--gold-primary);
  background: rgba(251, 191, 36, 0.09);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.16);
  outline: none;
}

.subject-card:not(:disabled):active {
  transform: scale(0.98);
}

.subject-card:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.subject-card-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.subject-card-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.subject-card:disabled .subject-card-title {
  color: var(--text-mid);
}

.subject-card-desc {
  font-size: 0.78rem;
  color: var(--text-mid);
  line-height: 1.45;
}

.subject-card-meta {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-low);
}

.soon-pill {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  color: var(--text-mid);
}

.evolution {
  margin-top: 1rem;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem 0.7rem;
}

.evolution-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.evolution-head h4 {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-high);
}

.evolution-legend {
  display: flex;
  gap: 0.9rem;
  font-size: 0.72rem;
  color: var(--text-mid);
}

.evolution-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.evolution-legend i { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }

.evolution-chart { position: relative; }
.evolution-chart svg { display: block; width: 100%; }
.evolution-empty { font-size: 0.78rem; color: var(--text-mid); padding: 0.6rem 0; line-height: 1.45; }

.evolution-tip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.72rem;
  color: var(--text-high);
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -100%);
  display: none;
  z-index: 2;
}

.evolution-tip .row { display: flex; align-items: center; gap: 0.35rem; color: var(--text-mid); }
.evolution-tip .row strong { color: var(--text-high); }
.evolution-tip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.evolution-table { margin-top: 0.4rem; font-size: 0.74rem; color: var(--text-mid); }
.evolution-table summary { cursor: pointer; font-weight: 700; }
.evolution-table table { width: 100%; border-collapse: collapse; margin-top: 0.4rem; }
.evolution-table th, .evolution-table td { text-align: left; padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--border-subtle); }
.evolution-table th { color: var(--text-high); font-weight: 700; }

.share-body { display: flex; flex-direction: column; gap: 0.85rem; }
.share-preview {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  align-self: center;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
}
.share-text { font-size: 0.82rem; color: #d1d5db; line-height: 1.45; text-align: center; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  background: var(--bg-inset);
  color: var(--text-high);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.share-btn:hover, .share-btn:focus-visible { border-color: var(--gold-primary); background: rgba(251, 191, 36, 0.08); outline: none; }
.share-btn-wa { border-color: rgba(37, 211, 102, 0.55); color: #86efac; }
.share-btn-wa:hover, .share-btn-wa:focus-visible { border-color: #25d366; background: rgba(37, 211, 102, 0.1); }
.share-more { align-self: center; }
.share-hint { font-size: 0.72rem; color: var(--text-low); text-align: center; line-height: 1.4; }

.backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-sm);
}

.backup-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-mid);
  line-height: 1.4;
}

.backup-text strong { color: var(--text-high); font-size: 0.82rem; }
.backup-text .warn { color: #fcd34d; }

.backup-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.review-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #e0e7ff;
  line-height: 1.45;
}

.review-banner .link-btn {
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.5);
}

.home-progress {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-subtle);
}

.home-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.home-progress-head h3 {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-primary);
}

.home-progress-streak {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-mid);
  font-family: 'JetBrains Mono', monospace;
}

.home-progress-tip {
  background: rgba(251, 191, 36, 0.08);
  border-left: 3px solid var(--gold-primary);
  padding: 0.6rem 0.85rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  color: #e5e7eb;
  line-height: 1.45;
  margin-bottom: 0.9rem;
}

.home-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.progress-card {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.progress-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.progress-card-name {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--text-high);
}

.progress-status {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  color: var(--text-mid);
  white-space: nowrap;
}
.progress-status.good { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.1); }
.progress-status.warn { color: #fcd34d; border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.1); }
.progress-status.bad { color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.1); }

.progress-figures {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.74rem;
  color: var(--text-mid);
  font-family: 'JetBrains Mono', monospace;
}

.progress-figures strong {
  font-size: 1.5rem;
  color: var(--text-high);
  font-family: inherit;
}

.progress-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.progress-topic {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-mid);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.15rem 0.55rem 0.15rem 0.45rem;
}

.progress-topic .semaphore-light { width: 7px; height: 7px; box-shadow: none; }

.progress-note {
  font-size: 0.78rem;
  color: #d1d5db;
  line-height: 1.45;
}

.progress-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.progress-card .link-btn.review-link {
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.5);
}

.progress-review-later {
  font-size: 0.72rem;
  color: var(--text-low);
}

.progress-card .link-btn {
  align-self: flex-start;
  color: var(--gold-primary);
  border-color: rgba(251, 191, 36, 0.45);
}

.subject-crumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.subject-crumb-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--gold-primary);
}

.link-btn {
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  color: var(--text-mid);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.link-btn:hover {
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

.topics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.topics-header .config-section-title {
  margin-bottom: 0;
}

.topics-hint {
  font-size: 0.72rem;
  color: var(--text-low);
  margin: -0.35rem 0 0.75rem;
}
