/* ═══════════════════════════════════════════════════════════
   PAGE: Type Guide (single-tac_guide.php)
═══════════════════════════════════════════════════════════ */
.guide-page { max-width: 1200px; margin: 0 auto; padding: 0 24px 80px; }

/* Progress bar */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 2.5px; z-index: 200;
  background: var(--gold); width: 0; transition: width .1s;
}

/* ── ARTICLE HEADER ────────────────────────────────────── */
.article-header { max-width: 680px; margin: 0 auto; padding: 52px 0 36px; border-bottom: .5px solid var(--br); }
.art-eyebrow {
  font-size: 10.5px; font-weight: 500; letter-spacing: .10em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.art-eyebrow::before { content: ''; width: 20px; height: .5px; background: var(--t3); }
.art-h1 {
  font-family: var(--font-d); font-size: clamp(28px, 4vw, 44px);
  font-weight: 400; color: var(--t1); line-height: 1.1;
  letter-spacing: -.02em; margin-bottom: 14px;
}
.art-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.art-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--t2); line-height: 1.35;
}
.art-meta-item svg { width: 13px; height: 13px; stroke: var(--t3); fill: none; stroke-width: 1.5; flex-shrink: 0; }

/* Key facts */
.key-facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: .5px solid var(--br); border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: 24px;
}
.kf-cell { padding: 12px 14px; border-right: .5px solid var(--br); }
.kf-cell:last-child { border-right: none; }
.kf-label { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--t3); margin-bottom: 2px; }
.kf-value { font-size: 13px; font-weight: 500; color: var(--t1); }
.kf-value-gold { color: var(--gold-dim); }

.art-lead {
  font-family: var(--font-i); font-size: 16px; color: var(--t2);
  line-height: 1.82; font-style: italic;
}

/* ── TOC + ARTICLE LAYOUT ──────────────────────────────── */
.article-layout { display: grid; grid-template-columns: 220px 1fr; }
/* Defensive placement: if post_content has an unbalanced <div> that escapes
 * .article-body, the leaked grid item would auto-flow into column 1 on top
 * of the TOC. Pin everything except .toc to column 2 so it stays where it
 * belongs no matter how messy the post HTML is. */
.article-layout > .toc { grid-column: 1; grid-row: 1; }
.article-layout > *:not(.toc) { grid-column: 2; }

/* TOC sidebar — align-self:start so the grid item doesn't stretch and break sticky */
.toc {
  position: sticky;
  top: 78px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 32px 28px 32px 0;
  border-right: .5px solid var(--br);
}
.toc-label {
  font-size: 10.5px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 14px;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 0; }
.toc-item a {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--t2); padding: 7px 12px;
  border-left: 2px solid transparent; border-radius: 0 6px 6px 0;
  transition: all .15s; text-decoration: none;
}
.toc-item a:hover { background: var(--bg2); color: var(--t1); }
.toc-item.active a { border-left-color: var(--gold); color: var(--t1); font-weight: 500; background: var(--gold-l); }
.toc-num { font-size: 10.5px; flex-shrink: 0; min-width: 16px; opacity: .5; }

/* Article body */
.article-body { padding: 32px 0 32px 52px; max-width: calc(680px + 52px); }

/* Chapters */
.chapter { margin-bottom: 52px; padding-bottom: 52px; border-bottom: .5px solid var(--br); }
.chapter:last-child { border-bottom: none; padding-bottom: 0; }
.ch-num {
  font-size: 10.5px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.ch-num::before { content: ''; width: 14px; height: .5px; background: var(--t3); }
.ch-h2 {
  font-family: var(--font-d); font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 400; color: var(--t1); line-height: 1.2;
  letter-spacing: -.01em; margin-bottom: 16px;
}

/* Prose */
.guide-prose p { font-size: 15px; line-height: 1.85; color: var(--t2); margin-bottom: 16px; }
.guide-prose p:last-child { margin-bottom: 0; }
.guide-prose strong { color: var(--t1); font-weight: 500; }
.guide-prose a { color: var(--gold-dim); border-bottom: 1px solid var(--gold-b); }
.guide-prose a:hover { color: var(--gold); }
.guide-prose h3 {
  font-family: var(--font-d); font-size: 17px; font-weight: 400;
  color: var(--t1); margin: 24px 0 10px;
}

/* Pull quote */
.pull-quote {
  border-left: 3px solid var(--gold); padding: 16px 20px;
  background: var(--gold-l); border-radius: 0 var(--r) var(--r) 0;
  margin: 20px 0;
}
.pull-quote p { font-family: var(--font-i); font-style: italic; font-size: 15px; color: var(--t1); margin: 0; }

/* Variant cards */
.variants-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.variant-card {
  background: var(--bg0); border: .5px solid var(--br);
  border-radius: var(--r); padding: 14px;
}
.vc-name { font-size: 13.5px; font-weight: 500; color: var(--t1); margin-bottom: 4px; }
.vc-desc { font-size: 12.5px; color: var(--t2); line-height: 1.55; margin-bottom: 6px; }
.vc-tag {
  display: inline-block; font-size: 10.5px; font-weight: 500;
  background: var(--gold-l); color: var(--gold-dim);
  border: .5px solid var(--gold-b); border-radius: 4px; padding: 2px 7px;
}

/* Info box */
.info-box {
  background: var(--bg0); border: .5px solid var(--br);
  border-radius: var(--r-lg); padding: 18px 20px; margin: 20px 0;
}
.ib-label {
  font-size: 10.5px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 12px;
}
.ib-list { display: flex; flex-direction: column; gap: 8px; }
.ib-row { display: flex; gap: 12px; align-items: flex-start; }
.ib-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex-shrink: 0; }
.ib-text { font-size: 13.5px; color: var(--t2); line-height: 1.55; }
.ib-text strong { color: var(--t1); font-weight: 500; }

/* Notable monks */
.monks-row { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.monk-ref {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: .5px solid var(--br);
  border-radius: var(--r-lg); cursor: pointer;
  transition: box-shadow .2s, background .15s; text-decoration: none;
}
.monk-ref:hover { box-shadow: var(--shadow-sm); background: var(--bg1); }
.mr-portrait {
  width: 40px; height: 48px; border-radius: 8px;
  background: var(--bg2); border: .5px solid var(--br);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.mr-portrait img { width: 100%; height: 100%; object-fit: cover; }
.mr-portrait svg { width: 16px; height: 16px; stroke: var(--t3); fill: none; stroke-width: 1.5; }
.mr-name { font-size: 13.5px; font-weight: 500; color: var(--t1); }
.mr-sub { font-size: 12px; color: var(--t3); }
.mr-arrow { margin-left: auto; font-size: 14px; color: var(--t3); }

/* Chapter link */
.chapter-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--gold-dim); background: var(--gold-l);
  border: .5px solid var(--gold-b); border-radius: 6px;
  padding: 9px 14px; margin-top: 12px; transition: background .15s;
  text-decoration: none;
}
.chapter-link:hover { background: #f0e8c0; }
.chapter-link svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* Article footer */
.article-footer {
  background: var(--t1); border-radius: var(--r-xl);
  padding: 32px; margin-top: 40px;
}
.af-title { font-family: var(--font-d); font-size: 22px; color: #fff; font-weight: 400; margin-bottom: 6px; }
.af-sub { font-size: 13.5px; color: rgba(255,255,255,.55); line-height: 1.6; margin-bottom: 20px; }
.af-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.af-link {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.06); border: .5px solid rgba(255,255,255,.10);
  border-radius: var(--r-lg); padding: 12px 14px;
  transition: background .15s; text-decoration: none;
}
.af-link:hover { background: rgba(255,255,255,.10); }
.af-link-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.af-link-icon svg { width: 14px; height: 14px; stroke: rgba(255,255,255,.5); fill: none; stroke-width: 1.5; }
.af-link-title { font-size: 13px; font-weight: 500; color: #fff; }
.af-link-sub { font-size: 11px; color: rgba(255,255,255,.4); }
.btn-wa-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--wa); color: #fff;
  font-size: 14px; font-weight: 500; padding: 13px;
  border-radius: var(--r-lg); border: none; cursor: pointer;
  font-family: var(--font-b); transition: background .15s;
  text-decoration: none;
}
.btn-wa-footer:hover { background: var(--wa-dark); }
.btn-wa-footer svg { width: 16px; height: 16px; fill: #fff; }

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .article-body { padding: 32px 0; max-width: 100%; }
  .article-header { max-width: 100%; }
  .key-facts { grid-template-columns: repeat(2, 1fr); }
  .variants-grid { grid-template-columns: 1fr; }
  .amulet-grid { grid-template-columns: repeat(2, 1fr); }
  .af-links { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .amulet-grid { grid-template-columns: 1fr; }
}
