/* Progressive Disclosure — Expandable Deep Dives */

/* ============================
   EXPAND/COLLAPSE TRIGGERS
   ============================ */
.depth-expand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  margin-top: 1rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  text-align: left;
}

.depth-expand:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card);
}

.depth-expand.open {
  border-color: var(--accent-dim);
  background: var(--bg-card);
  border-radius: 4px 4px 0 0;
  border-bottom-color: transparent;
}

.depth-expand-icon {
  font-size: 0.7rem;
  color: var(--accent);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.depth-expand.open .depth-expand-icon {
  transform: rotate(90deg);
}

.depth-expand-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.depth-expand-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--accent-dim);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.4rem;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================
   EXPANDABLE CONTENT
   ============================ */
.depth-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  border: 1px solid var(--accent-dim);
  border-top: none;
  border-radius: 0 0 4px 4px;
  background: var(--bg-card);
}

.depth-content-inner {
  padding: 1.2rem;
}

.depth-content-inner p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.depth-content-inner p:last-child {
  margin-bottom: 0;
}

.depth-content-inner strong {
  color: var(--text-primary);
  font-weight: 500;
}

.depth-content-inner em {
  color: var(--accent-light);
}

.depth-content-inner .equation-block {
  margin: 1rem 0;
}

/* ============================
   DERIVATION STEPS
   ============================ */
.derivation-step {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  align-items: start;
}

.derivation-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-dim);
  text-align: center;
  padding-top: 0.15rem;
}

.derivation-step p {
  margin-bottom: 0;
}

.derivation-step .equation-block {
  margin: 0.4rem 0;
}

/* ============================
   STQA BADGES
   ============================ */
.stqa-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
  margin-left: 0.3rem;
}

.stqa-badge.c10 {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.stqa-badge.c7 {
  border-color: var(--blue-dim);
  color: var(--blue);
}

.stqa-badge.c5 {
  border-color: var(--border-light);
  color: var(--text-secondary);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 600px) {
  .depth-expand-tag {
    display: none;
  }
}
