/* ATLAS Phase 2A — Collapsible Cert Links
   Keeps every study/cert link available while reducing right-side panel noise.
   No color redesign, no layout rebuild, no backend changes.
*/

.atlas-cert-links-card {
  transition: border-color .18s ease, background .18s ease;
}

.atlas-cert-links-note {
  margin: 8px 0 10px;
  color: var(--muted2);
  font-size: 11.5px;
  line-height: 1.45;
}

.atlas-cert-links-drawer {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, .18);
  overflow: hidden;
}

body.light-mode .atlas-cert-links-drawer {
  background: rgba(255,255,255,.52);
}

.atlas-cert-links-drawer > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}

.atlas-cert-links-drawer > summary::-webkit-details-marker {
  display: none;
}

.atlas-cert-links-summary-main {
  min-width: 0;
}

.atlas-cert-links-summary-title {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.atlas-cert-links-summary-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.atlas-cert-links-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.atlas-cert-link-count {
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(148,163,184,.08);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 7px;
  font-family: var(--mono);
  font-size: 10px;
}

.atlas-cert-links-chevron {
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 13px;
  transition: transform .18s ease;
}

.atlas-cert-links-drawer[open] .atlas-cert-links-chevron {
  transform: rotate(180deg);
}

.atlas-cert-links-drawer .source-list {
  padding: 0 10px 10px;
  max-height: 440px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.atlas-cert-links-drawer .source-list a {
  margin-bottom: 8px;
}

.atlas-cert-links-drawer .source-list a:last-child {
  margin-bottom: 0;
}

@media (max-width: 1120px) {
  .atlas-cert-links-drawer .source-list {
    max-height: none;
  }

  .atlas-cert-links-drawer > summary {
    min-height: 52px;
  }
}
