/*
 * Shared Study Legacy Bridge
 * --------------------------
 * Phase-2 compatibility layer for substantial legacy study articles that keep
 * their subject-specific content UI while adopting the canonical shared shell.
 * This file may style only main-content bridge elements; shared topbar/footer
 * chrome remains owned by shared-study-topbar.css / shared controller.
 */
.legacy-shell-skip {
  position: fixed;
  left: 12px;
  top: 8px;
  z-index: 1300;
  transform: translateY(-160%);
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--surface, var(--card, #fff));
  color: var(--text-primary, var(--text, #111827));
  font: 700 13px/1.2 system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: transform .18s ease;
}
.legacy-shell-skip:focus { transform: translateY(0); }

.legacy-article-hero {
  max-width: 1080px;
  margin: 0 auto 1.35rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border-light, var(--border, rgba(15,23,42,.14)));
  border-radius: 14px;
  background: var(--bg-card, var(--surface, rgba(255,255,255,.04)));
}
.legacy-article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .42rem;
  margin: 0 0 .55rem;
  color: var(--text-muted, var(--muted, #64748b));
  font-size: .78rem;
  font-weight: 650;
}
.legacy-article-breadcrumb a { color: inherit; text-decoration: none; }
.legacy-article-breadcrumb a:hover,
.legacy-article-breadcrumb a:focus-visible { text-decoration: underline; }
.legacy-article-hero h1 {
  margin: 0;
  color: var(--text-primary, var(--text, inherit));
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.24;
}
.legacy-article-hero p { margin: .55rem 0 0; }
.legacy-article-byline {
  color: var(--text-muted, var(--muted, #64748b));
  font-size: .82rem;
  line-height: 1.55;
}
.legacy-article-byline a { color: inherit; font-weight: 750; }

/* Older sidebars sometimes used the only page H1 as their logo. After the
   true article H1 moves into main content, this preserves the old visual size. */
.sidebar-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}

@media (max-width: 700px) {
  .legacy-article-hero { margin-bottom: 1rem; padding: .95rem 1rem; border-radius: 10px; }
  .legacy-article-breadcrumb { font-size: .72rem; }
}

@media print {
  .legacy-shell-skip,
  .legacy-article-breadcrumb { display: none; }
  .legacy-article-hero { border: 0; padding: 0; box-shadow: none; }
}

.legacy-anchor-target {
  display: block;
  width: 0;
  height: 0;
  scroll-margin-top: calc(var(--shared-topbar-height, 64px) + 12px);
}
.legacy-series-status {
  max-width: 1080px;
  margin: 18px auto 28px;
  padding: 10px 16px;
  color: var(--text-muted, var(--text-2, #64748b));
  font-size: .82rem;
  line-height: 1.55;
  text-align: center;
}
