/* Topic Page — Fira, Black & White (v51) */
.topic-header{padding-top:48px;padding-bottom:32px;margin-bottom:32px;border-bottom:1px solid var(--ink-hairline)}
.breadcrumb{font-size:var(--fs-nano);color:var(--ink-medium);margin-bottom:24px;display:flex;align-items:center;gap:8px;font-weight:var(--fw-regular)}
.breadcrumb a{color:var(--ink-medium)}
.breadcrumb a:hover{color:var(--ink)}
.breadcrumb .sep{font-size:var(--fs-nano);color:var(--ink-faint)}
.breadcrumb-disc{font-weight:var(--fw-regular)}
.breadcrumb-ux{color:var(--teal)}
.breadcrumb-pm{color:var(--rust)}
.breadcrumb-mk{color:var(--navy)}
.topic-meta{display:flex;align-items:center;gap:16px;margin-bottom:24px}
.topic-header h1{font-size:var(--fs-h1);font-weight:var(--fw-bold);letter-spacing:var(--ls-tight);line-height:var(--lh-tight);margin-bottom:16px}
.topic-header h1 strong{font-weight:var(--fw-bold)}
.topic-subtitle{font-size:var(--fs-h4);color:var(--ink-medium);max-width:620px;line-height:var(--lh-body);font-weight:var(--fw-regular)}
.content-splits{display:flex;gap:8px;margin-top:24px}

/* NO ugly sticky bar — removed */
.topic-sticky-bar{display:none}

/* Reading progress bar — thin line under nav */
.reading-progress{
  position:fixed;
  top:var(--nav-height);
  left:0;
  height:3px;
  width:0;
  background:var(--ink);
  z-index:var(--z-progress);
  transition:width 0.1s linear;
}

/* Back to top button */
.back-to-top{
  position:fixed;
  bottom:32px;
  right:32px;
  width:44px;
  height:44px;
  background:var(--ink);
  color:var(--paper);
  border:none;
  border-radius:var(--radius-xs);
  cursor:pointer;
  font-size:var(--fs-h4);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:opacity var(--ease),background var(--ease),transform var(--ease);
  z-index:var(--z-back-to-top);
  box-shadow:var(--shadow-md);
}
.back-to-top.visible{
  opacity:1;
  pointer-events:auto;
}
.back-to-top:hover{
  background:var(--ink-medium);
  transform:translateY(-2px);
  box-shadow:var(--shadow-lg);
}

.topic-layout{display:grid;grid-template-columns:var(--sidebar-width) 1fr;gap:64px;align-items:start}
.topic-sidebar{position:sticky;top:calc(var(--nav-height) + 32px);align-self:start}
.topic-main{min-width:0;max-width:740px}

/* At a Glance — hairline-bordered block with ink left-strip */
.at-a-glance{
  margin-top:24px;
  border:none;
  background:var(--paper-warm);
  padding:24px 28px;
  position:relative;
  border-radius:var(--radius-xs);
}
.at-a-glance::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  width:2px;
  height:2.4rem;
  background:var(--ink);
  opacity:.55;
}
.at-a-glance-title{
  font-family:var(--font-display);
  font-size:var(--fs-body);
  font-weight:var(--fw-semibold);
  margin-bottom:12px;
  display:flex;
  align-items:center;
  gap:10px;
  letter-spacing:var(--ls-snug);
}
.at-a-glance-title span{
  font-family:var(--font-body);
  font-size:var(--fs-micro);
  font-weight:var(--fw-semibold);
  text-transform:uppercase;
  font-weight:var(--fw-regular);
  letter-spacing:var(--ls-widest);
  padding:3px 8px;
  background:var(--ink);
  color:var(--paper-white);
  border-radius:var(--radius-xs);
}
.at-a-glance ul{
  list-style:none;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px 24px;
}
.at-a-glance li{
  font-size:var(--fs-micro);
  color:var(--ink-soft);
  line-height:1.5;
  padding-left:16px;
  position:relative;
}
.at-a-glance li::before{
  content:'';
  position:absolute;
  left:0;
  top:8px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--ink-faint);
}
.at-a-glance li[data-type="theory"]::before{background:var(--theory-color)}
.at-a-glance li[data-type="practical"]::before{background:var(--practical-color)}
.at-a-glance li[data-type="examples"]::before{background:var(--examples-color)}

/* Floating mobile TOC button — replaced by burger menu */
.mobile-toc-btn{display:none}
.mobile-toc-overlay{display:none}

/* Tablet: hide sidebar, full-width content */
@media(max-width:960px){
.topic-layout{grid-template-columns:1fr}
.topic-sidebar{display:none}
.back-to-top{bottom:20px;right:20px}
.at-a-glance ul{grid-template-columns:1fr}
}

/* Mobile */
@media(max-width:768px){
.topic-header h1{font-size:var(--fs-h2)}
.topic-subtitle{font-size:var(--fs-body);line-height:1.5}
.topic-header{padding-top:24px;padding-bottom:20px;margin-bottom:20px}
.content-splits{gap:4px}
/* Breadcrumb — hide tier segment to prevent overflow */
.breadcrumb{font-size:var(--fs-micro);flex-wrap:wrap}
.breadcrumb>:nth-child(4),.breadcrumb>:nth-child(5){display:none}
/* At-a-glance — tighter on mobile */
.at-a-glance{padding:16px 18px}
.at-a-glance ul{grid-template-columns:1fr;gap:4px}
.at-a-glance li{font-size:var(--fs-micro)}
}

/* ────────────────────────────────────────────────────────────────
   READING COMFORT PASS
   Breathing room between sections, method cards, and paragraphs.
   Additive only — override-safe, deletable in one block to revert.
   ──────────────────────────────────────────────────────────────── */
.topic-main > section{margin-top:56px;padding-top:8px}
.topic-main > section:first-of-type{margin-top:32px}
.topic-main h2{margin-bottom:20px;padding-bottom:10px;border-bottom:1px solid var(--ink-hairline)}
.topic-main > section > p{margin-bottom:18px;line-height:1.8}

/* Method cards — more air around and inside */
.method-card{margin:32px 0;padding:32px}
.method-card h4{margin-bottom:8px}
.method-card .method-when{margin-bottom:18px}
.method-card p{line-height:1.75}
.method-card p + p{margin-top:14px}

/* Callouts */
.callout{padding:22px 26px;margin:28px 0}
.callout p{line-height:1.75}
.callout p + p{margin-top:10px}

/* Case studies */
.case-study{margin:32px 0;padding:32px}
.case-study p{line-height:1.8}
.case-study p + p{margin-top:14px}

/* Pitfalls — a bit more vertical room between items */
.pitfall{padding:28px 0}
.pitfall p{line-height:1.75}

/* Expandable deep-dives */
.expandable{margin:32px 0}
.expandable .expand-content{padding:32px}
.expandable .expand-content h4{margin-top:24px;margin-bottom:10px}
.expandable .expand-content h4:first-child{margin-top:0}
.expandable .expand-content p{line-height:1.75;margin-bottom:14px}

/* Cross-ref grid a bit more generous */
.cross-ref-grid{gap:20px;margin-top:24px}

/* Mobile scale-down for the comfort pass */
@media(max-width:768px){
.topic-main > section{margin-top:40px}
.method-card{margin:24px 0;padding:22px}
.case-study{margin:24px 0;padding:22px}
.callout{padding:18px 20px;margin:20px 0}
.expandable .expand-content{padding:22px}
.pitfall{padding:22px 0}
}
