/* ============================================
   METATRADERGUIDE.COM — DEVELOPER/TERMINAL THEME
   Dark + Sky Blue (#0ea5e9) accent
   Space Mono headings, Inter body
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
  --bg: #060a10;
  --surface: #0c1018;
  --card: #111827;
  --card-hover: #161e2e;
  --border: #1e293b;
  --border-accent: #0ea5e920;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-glow: rgba(14, 165, 233, 0.12);
  --primary-glow-strong: rgba(14, 165, 233, 0.25);
  --secondary: #38bdf8;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --white: #f8fafc;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 6px;
  --radius-lg: 10px;
  --transition: 0.25s ease;
  --font-heading: 'Space Mono', monospace;
  --font-body: 'Inter', sans-serif;
  --font-code: 'Space Mono', monospace;
  --max-width: 1200px;
  --article-width: 820px;
}

/* --- RESET --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--secondary);
}

ul, ol {
  padding-left: 1.5rem;
}

/* --- TERMINAL GRID BACKGROUND --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
}

/* --- HEADER --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 10, 16, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.header__logo:hover {
  color: var(--white);
}

.header__logo span {
  color: var(--primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

/* --- NAVIGATION --- */
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--white);
  background: var(--primary-glow);
}

.nav__link--active {
  color: var(--primary);
  background: var(--primary-glow);
}

.nav__cta {
  font-family: var(--font-code);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bg) !important;
  background: var(--primary);
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  margin-left: 0.5rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav__cta:hover {
  background: var(--secondary);
  color: var(--bg) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--primary-glow-strong);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
  border-radius: 2px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: 0.5rem;
    transition: right 0.3s ease;
    z-index: 1000;
  }
  .nav.active {
    right: 0;
  }
  .nav__link {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    width: 100%;
  }
  .nav__cta {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
    width: 100%;
    padding: 0.75rem 1rem;
  }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow-strong) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--primary);
  background: var(--primary-glow);
  border: 1px solid var(--border-accent);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero__badge::before {
  content: '>';
  color: var(--primary);
  font-weight: 700;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto 1.25rem;
  font-size: 2.75rem;
  line-height: 1.15;
}

.hero h1 .accent {
  color: var(--primary);
}

.hero__sub {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero__actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-code);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn--primary {
  background: var(--primary);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--secondary);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow-strong);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn--outline:hover {
  background: var(--primary-glow);
  color: var(--secondary);
  transform: translateY(-2px);
}

/* Hero terminal snippet */
.hero__terminal {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 2.5rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
}

.hero__terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.hero__terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero__terminal-dot--red { background: #ef4444; }
.hero__terminal-dot--yellow { background: #f59e0b; }
.hero__terminal-dot--green { background: #22c55e; }

.hero__terminal-title {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: auto;
}

.hero__terminal-body {
  padding: 1rem 1.25rem;
  font-family: var(--font-code);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.hero__terminal-body .prompt {
  color: var(--primary);
}

.hero__terminal-body .cmd {
  color: var(--white);
}

.hero__terminal-body .output {
  color: var(--success);
}

.hero__terminal-body .comment {
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 1.25rem 2.5rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero__sub {
    font-size: 1rem;
  }
}

/* --- STATS BAR --- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.stat__label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-code);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- SECTION --- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 1;
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__header h2 {
  margin-bottom: 0.75rem;
}

.section__header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.section__tag {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.75rem;
}

/* --- ARTICLE CARDS GRID --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.article-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--primary-glow);
}

.article-card:hover::before {
  opacity: 1;
}

.article-card__tag {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-card__tag::before {
  content: '#';
  color: var(--text-dim);
}

.article-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.article-card h3 a {
  color: var(--white);
  text-decoration: none;
}

.article-card h3 a:hover {
  color: var(--primary);
}

.article-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

.article-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--text-dim);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-card__read {
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition);
}

.article-card__read:hover {
  color: var(--secondary);
  gap: 0.5rem;
}

/* --- FEATURES GRID --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--border-accent);
  background: var(--card-hover);
}

.feature-card__icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.feature-card h4 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- CTA SECTION --- */
.cta-section {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0 1.5rem;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.cta-section p {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 1.75rem;
}

.cta-section .btn {
  position: relative;
  z-index: 1;
}

/* --- INLINE CTA (articles) --- */
.inline-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.inline-cta h4 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.inline-cta p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.inline-cta .btn {
  font-size: 0.8rem;
  padding: 0.6rem 1.25rem;
}

/* --- ARTICLE CTA BOX --- */
.article-cta-box {
  background: linear-gradient(135deg, var(--card) 0%, var(--surface) 100%);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.article-cta-box h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.article-cta-box p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}

/* --- RISK DISCLAIMER --- */
.risk-disclaimer {
  background: var(--surface);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 3rem auto;
  max-width: var(--max-width);
  position: relative;
  z-index: 1;
}

.risk-disclaimer__title {
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.risk-disclaimer p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* --- FOOTER --- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer__brand {
  max-width: 300px;
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer__brand-name span {
  color: var(--primary);
}

.footer__brand p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.footer__col h4 {
  font-family: var(--font-code);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer__col ul {
  list-style: none;
  padding: 0;
}

.footer__col li {
  margin-bottom: 0.5rem;
}

.footer__col a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.footer__col a:hover {
  color: var(--primary);
}

.footer__bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-code);
}

.footer__legal {
  display: flex;
  gap: 1.5rem;
}

.footer__legal a {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-code);
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }
}

/* --- BACK TO TOP --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--primary-glow-strong);
}

/* --- FAQ SECTION --- */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover {
  border-color: var(--border-accent);
}

.faq-item.active {
  border-color: var(--primary);
}

.faq-question {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--white);
  padding: 1.15rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-family: var(--font-code);
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.active .faq-question::after {
  content: '-';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer__inner {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* --- ARTICLE PAGE STYLES --- */
.article-hero {
  padding: 3rem 1.5rem 2rem;
  max-width: var(--article-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.article-hero__breadcrumb {
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-hero__breadcrumb a {
  color: var(--text-dim);
}

.article-hero__breadcrumb a:hover {
  color: var(--primary);
}

.article-hero__breadcrumb .sep {
  color: var(--text-dim);
  opacity: 0.5;
}

.article-hero__tag {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.article-hero__tag::before {
  content: '//';
  color: var(--text-dim);
}

.article-hero h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-hero__meta {
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.article-hero__meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --- ARTICLE CONTENT --- */
.article-content {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  position: relative;
  z-index: 1;
}

.article-content h2 {
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.article-content h3 {
  margin: 2rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--text);
  line-height: 1.75;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.25rem;
}

.article-content li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.article-content strong {
  color: var(--white);
}

/* Code blocks in articles */
.article-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-family: var(--font-code);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.article-content code {
  font-family: var(--font-code);
  font-size: 0.85em;
  background: var(--card);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--primary);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--text-muted);
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.article-content th {
  background: var(--card);
  font-family: var(--font-code);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--primary);
}

.article-content td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.article-content tr:hover td {
  background: var(--primary-glow);
}

/* Blockquote */
.article-content blockquote {
  border-left: 3px solid var(--primary);
  background: var(--primary-glow);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content blockquote p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-style: italic;
}

/* --- TABLE OF CONTENTS --- */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.toc__title {
  font-family: var(--font-code);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc__title::before {
  content: '>';
  color: var(--primary);
}

.toc ol {
  list-style: none;
  padding: 0;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 0.35rem;
}

.toc li::before {
  content: counter(toc, decimal-leading-zero) '.';
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--primary);
  margin-right: 0.5rem;
}

.toc a {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.toc a:hover {
  color: var(--primary);
}

/* --- RELATED ARTICLES --- */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  font-family: var(--font-code);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.related-articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all var(--transition);
}

.related-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.related-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.related-card h4 a {
  color: var(--white);
}

.related-card h4 a:hover {
  color: var(--primary);
}

.related-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* --- UTILITY --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* --- CROSSLINK FOOTER --- */
.crosslink-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.crosslink-footer h4 {
  font-family: var(--font-code);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.crosslink-footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.crosslink-footer a {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.crosslink-footer a:hover {
  color: var(--primary);
}

/* --- PRINT --- */
@media print {
  .header, .nav-toggle, .back-to-top, .cta-section, .inline-cta, .article-cta-box, .footer {
    display: none !important;
  }
  body {
    background: #fff;
    color: #111;
  }
  body::before {
    display: none;
  }
}
