/* ============================================================
   article.css — shared styles for all academy article pages
   ============================================================ */

.article-progress {
  position:   fixed;
  top:        64px;
  left:       0;
  width:      0%;
  height:     2px;
  background: var(--teal);
  z-index:    200;
  transition: width .1s linear;
}

/* ── Layout ─────────────────────────────────────────────── */
.article-layout {
  display:               grid;
  grid-template-columns: minmax(0, 680px) 220px;
  gap:                   4rem;
  max-width:             1060px;
  margin:                0 auto;
  padding:               3rem 3rem 5rem;
  align-items:           start;
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  max-width:  1060px;
  margin:     0 auto;
  padding:    1rem 3rem 0;
  display:    flex;
  gap:        .5rem;
  font-size:  .78rem;
  color:      var(--text-3);
  flex-wrap:  wrap;
}
.breadcrumb a         { color: var(--text-3); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover   { color: var(--teal); }
.bc-sep               { opacity: .5; }
.bc-current           { color: var(--text-2); }

/* ── Article header ─────────────────────────────────────── */
.article-back {
  display:         inline-flex;
  align-items:     center;
  gap:             .4rem;
  font-size:       .82rem;
  font-weight:     500;
  color:           var(--teal);
  margin-bottom:   1.25rem;
  transition:      opacity .15s;
  text-decoration: none;
  display:         block;
}
.article-back:hover { opacity: .7; }

/* Language switcher pill */
.article-lang-switch {
  display:       flex;
  align-items:   center;
  gap:           .6rem;
  margin-bottom: 1.5rem;
  padding:       .6rem .9rem;
  background:    var(--surface2);
  border:        1px solid var(--border);
  border-radius: 8px;
  width:         fit-content;
}
.article-lang-label {
  font-size:  .78rem;
  color:      var(--text-2);
}
.article-lang-btn {
  font-size:       .75rem;
  font-weight:     700;
  font-family:     'DM Mono', monospace;
  color:           white;
  background:      var(--teal);
  border:          none;
  border-radius:   5px;
  padding:         .2rem .55rem;
  text-decoration: none;
  letter-spacing:  .04em;
  transition:      opacity .15s, transform .15s;
}
.article-lang-btn:hover { opacity: .85; transform: translateY(-1px); }

.article-eyebrow {
  font-size:      .72rem;
  font-weight:    600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color:          var(--teal);
  margin-bottom:  .8rem;
}
.article-title {
  font-family:    'Instrument Serif', serif;
  font-size:      clamp(1.7rem, 3vw, 2.4rem);
  font-weight:    400;
  line-height:    1.25;
  color:          var(--text);
  margin-bottom:  .5rem;
  letter-spacing: -.02em;
}
.article-subtitle {
  font-size:      1.05rem;
  line-height:    1.5;
  color:          var(--text-2);
  margin-bottom:  1rem;
}
.article-meta {
  display:        flex;
  align-items:    center;
  gap:            .75rem;
  margin-bottom:  2.5rem;
  padding-bottom: 1.5rem;
  border-bottom:  1px solid var(--border);
  flex-wrap:      wrap;
}
.article-tag {
  font-size:      .68rem;
  font-weight:    600;
  padding:        .22rem .6rem;
  border-radius:  5px;
  letter-spacing: .03em;
}
.tag-beginner {
  background: var(--teal-pale);
  color:      var(--teal);
  border:     1px solid var(--teal-border);
}
.tag-intermediate {
  background: var(--amber-pale);
  color:      var(--amber);
  border:     1px solid rgba(232,131,42,.25);
}
.article-readtime { font-size: .72rem; color: var(--text-3); }

/* ── Body typography ────────────────────────────────────── */
.article-body { font-size: 1rem; line-height: 1.8; color: var(--text); }
.article-body h2 {
  font-family:    'Instrument Serif', serif;
  font-size:      1.45rem;
  font-weight:    400;
  color:          var(--text);
  margin:         2.5rem 0 .8rem;
  letter-spacing: -.01em;
}
.article-body h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 2rem 0 .5rem; }
.article-body p  { margin-bottom: 1.2rem; }
.article-body ul,
.article-body ol { margin: .5rem 0 1.2rem 1.5rem; }
.article-body li { margin-bottom: .4rem; line-height: 1.7; }

/* ── Callout ────────────────────────────────────────────── */
.article-callout {
  background:    var(--teal-pale);
  border:        1px solid var(--teal-border);
  border-left:   3px solid var(--teal);
  border-radius: 10px;
  padding:       1.25rem 1.5rem;
  margin:        1.5rem 0;
}
.article-callout p           { margin-bottom: .5rem; }
.article-callout p:last-child { margin-bottom: 0; }
.article-callout strong      { color: var(--teal); }

/* ── Key term ───────────────────────────────────────────── */
.key-term {
  display:       inline-block;
  background:    var(--teal-pale);
  color:         var(--teal);
  border:        1px solid var(--teal-border);
  border-radius: 5px;
  font-family:   'DM Mono', monospace;
  font-size:     .78rem;
  font-weight:   500;
  padding:       .1rem .45rem;
  margin:        0 .1rem;
}

/* ── Table ──────────────────────────────────────────────── */
.article-table-wrap {
  overflow-x:    auto;
  margin:        1.5rem 0;
  border-radius: 10px;
  border:        1px solid var(--border);
}
.article-table             { width: 100%; border-collapse: collapse; font-size: .88rem; }
.article-table thead th {
  background:     var(--surface2);
  color:          var(--text-2);
  font-size:      .72rem;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding:        .75rem 1rem;
  text-align:     left;
  border-bottom:  1px solid var(--border);
  white-space:    nowrap;
}
.article-table tbody td {
  padding:       .8rem 1rem;
  color:         var(--text);
  border-bottom: 1px solid var(--border-2);
  vertical-align: top;
}
.article-table tbody tr:last-child td { border-bottom: none; }
.article-table tbody tr:hover          { background: var(--surface2); }
.article-table .yield-col {
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  color:       var(--teal);
}

/* ── TOC ────────────────────────────────────────────────── */
.article-toc {
  position:      sticky;
  top:           88px;
  padding:       1.25rem;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: 12px;
  box-shadow:    var(--card-shadow);
}
.article-toc-title {
  font-size:      .7rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color:          var(--text-3);
  margin-bottom:  .75rem;
}
.article-toc ul           { list-style: none; padding: 0; margin: 0; }
.article-toc li           { margin-bottom: .3rem; }
.article-toc a {
  font-size:       .8rem;
  color:           var(--text-2);
  line-height:     1.4;
  display:         block;
  padding:         .2rem .6rem;
  border-left:     2px solid transparent;
  transition:      color .15s, border-color .15s;
  text-decoration: none;
}
.article-toc a:hover,
.article-toc a.toc-active { color: var(--teal); border-left-color: var(--teal); }

/* ── Prev / Next navigation ─────────────────────────────── */
.article-nav {
  display:       flex;
  margin-top:    3rem;
  padding-top:   2rem;
  border-top:    1px solid var(--border);
}
.article-nav-next { margin-left: auto; text-align: right; }
.article-nav-next,
.article-nav-prev {
  display:         flex;
  flex-direction:  column;
  gap:             .3rem;
  text-decoration: none;
  color:           var(--text);
  transition:      color .15s;
  max-width:       320px;
}
.article-nav-next:hover,
.article-nav-prev:hover { color: var(--teal); }
.article-nav-label { font-size: .72rem; color: var(--text-3); }
.article-nav-title { font-size: .95rem; font-weight: 600; line-height: 1.35; }
.article-nav-desc  { font-size: .82rem; color: var(--text-2); line-height: 1.5; margin-top: .1rem; }
.article-nav-coming-soon {
  display:        flex;
  flex-direction: column;
  gap:            .3rem;
  max-width:      320px;
  margin-left:    auto;
  text-align:     right;
  opacity:        .65;
  cursor:         default;
}
.coming-soon-inline {
  display:        inline-block;
  font-size:      .65rem;
  font-weight:    600;
  letter-spacing: .04em;
  padding:        .15rem .5rem;
  border-radius:  4px;
  background:     var(--surface2);
  color:          var(--text-3);
  border:         1px solid var(--border);
  vertical-align: middle;
  margin-left:    .35rem;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; padding: 1.5rem 1.5rem 4rem; }
  .article-toc    { display: none; }
  .breadcrumb     { padding: 1rem 1.5rem 0; }
}
