/* ==========================================================================
   MDSS 梦迪云网 (mdss.homes) — Article & Subpage Native CSS Stylesheet
   ========================================================================== */

.page-hero {
  padding: 3.2rem 0 2rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumbs a {
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

.breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 2rem;
  align-items: start;
  padding-bottom: 4rem;
}

.article-shell {
  padding: 2.2rem 2.3rem;
  border-radius: var(--radius-xl);
  background: rgba(11, 18, 37, 0.84);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
}

.article-header {
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.article-h1 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.9rem;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* GEO Direct-Answer TL;DR Callout */
.tldr-box {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.32);
  margin-bottom: 1.85rem;
}

.tldr-box__title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}

.tldr-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.72;
}

/* Article Body Typography */
.article-prose h2 {
  font-size: 1.38rem;
  font-weight: 800;
  margin: 2rem 0 0.85rem;
  padding-left: 0.78rem;
  border-left: 4px solid var(--accent-cyan);
  scroll-margin-top: 90px;
}

.article-prose h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 1.4rem 0 0.6rem;
  color: var(--accent-teal);
}

.article-prose p {
  font-size: 1rem;
  line-height: 1.88;
  color: var(--text-secondary);
  margin-bottom: 1.05rem;
}

.article-prose ul,
.article-prose ol {
  margin: 0.9rem 0 1.2rem;
  padding-left: 1.35rem;
  color: var(--text-secondary);
}

.article-prose ul {
  list-style: disc;
}

.article-prose ol {
  list-style: decimal;
}

.article-prose li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.article-prose a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-prose a:hover {
  color: #67e8f9;
}

.article-prose a.btn {
  text-decoration: none;
}

.article-prose a.btn--primary,
.article-prose a.btn--primary:hover {
  color: #ffffff;
}

.article-prose a.btn--secondary,
.article-prose a.btn--secondary:hover {
  color: var(--text-primary);
}

.article-prose strong {
  color: var(--text-primary);
}

.article-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.4rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: rgba(8, 14, 30, 0.85);
}

.article-table th,
.article-table td {
  padding: 0.82rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.article-table th {
  background: rgba(0, 229, 255, 0.1);
  color: var(--text-primary);
  font-weight: 700;
}

.article-table td {
  color: var(--text-secondary);
}

.inline-cta-card {
  margin: 2rem 0;
  padding: 1.45rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(0, 229, 255, 0.36);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.inline-cta-card h3 {
  margin: 0 0 0.28rem !important;
  color: var(--text-primary) !important;
}

.inline-cta-card p {
  margin: 0 !important;
  font-size: 0.9rem !important;
}

/* Prev / Next & Related Articles */
.article-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-subtle);
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 46, 0.72);
  border: 1px solid var(--border-subtle);
  text-decoration: none !important;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pager-link:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.pager-dir {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--accent-teal);
}

.pager-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.related-block {
  margin-top: 2.2rem;
}

.related-block h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border: none;
  padding: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.related-mini {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(13, 21, 42, 0.76);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-decoration: none !important;
  transition: border-color 0.2s ease;
}

.related-mini:hover {
  border-color: var(--accent-cyan);
}

.related-mini strong {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.related-mini span {
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

/* Sticky Sidebar */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.sidebar-box {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.sidebar-box h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.toc-links {
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
}

.toc-links a {
  font-size: 0.87rem;
  color: var(--text-secondary);
  padding: 0.3rem 0.5rem;
  border-radius: 7px;
  transition: background 0.18s ease, color 0.18s ease;
}

.toc-links a:hover {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-cyan);
}

.sidebar-cta {
  background: linear-gradient(160deg, rgba(16, 33, 66, 0.92), rgba(11, 18, 37, 0.95));
  border-color: rgba(0, 229, 255, 0.36);
}

.sidebar-cta p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.65;
}

@media (max-width: 1020px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .article-shell {
    padding: 1.4rem 1.2rem;
  }

  .article-pager,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
