/* ============================================
   TechTalkByte — article.css
   Article pages. Ink on paper, ruled, no cards.
   Every selector the nine articles reference is kept; the
   chrome (purple washes, gradients, glows, caps labels) is gone.
   ============================================ */

/* ---- BREADCRUMB ---- */
.breadcrumb-bar {
  background: var(--bg);
  border-bottom: var(--bd-thin) solid var(--border);
  padding: 12px 0;
  margin-top: 0;
  font-family: var(--font-ui);
}
.breadcrumb-bar a {
  color: var(--text-muted); text-decoration: none; font-size: 15px;
  transition: color 0.2s;
}
.breadcrumb-bar a:hover { color: var(--text); text-decoration: underline; }
.bc-sep { color: var(--text-muted); margin: 0 8px; font-size: 15px; }
.breadcrumb-bar span:last-child { color: var(--text); font-size: 15px; }

/* ---- ARTICLE HEADER ---- */
.article-header {
  padding: 48px 0 40px;
  background: var(--bg);
  border-bottom: var(--bd-thin) solid var(--border);
  position: relative;
}
.article-header .container { position: relative; z-index: 1; }

.article-meta-top {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px;
  font-family: var(--font-ui);
}
/* Was a pill. Now plain small sentence-case text — no border, no wash. */
.article-tag {
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 400;
  text-transform: none; letter-spacing: 0;
  color: var(--text-muted);
  background: none; border: none;
  padding: 0;
}
.article-tag--ai,
.article-tag--career,
.article-tag--data,
.article-tag--data-science { color: var(--text-muted); }
.article-read-time { font-family: var(--font-ui); font-size: 15px; color: var(--text-muted); }

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(35px, 4.5vw, 55px);
  font-weight: 400; letter-spacing: -0.01em; line-height: 1.2;
  margin-bottom: 16px;
}
.article-subtitle {
  font-size: 22.5px; color: var(--text-muted); max-width: var(--measure);
  line-height: 1.6; margin-bottom: 24px;
}
.article-ig-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ig-cta-block { margin-top: 24px; }
.ig-label { font-family: var(--font-ui); font-size: 16px; color: var(--text-muted); }

/* ---- LAYOUT ---- */
.article-main { min-height: 100vh; }

.article-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 56px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 72px;
}

/* ---- TOC ---- */
.toc { position: sticky; top: 84px; }
.toc-inner {
  border-left: var(--bd-thin) solid var(--border);
  padding: 0 0 0 16px;
}
.toc-title {
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 500; text-transform: none;
  letter-spacing: 0; color: var(--text-muted);
  margin-bottom: 12px;
}
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc a, .toc-link {
  display: block; font-family: var(--font-ui); font-size: 15px; color: var(--text-muted);
  text-decoration: none; padding: 4px 0;
  transition: color 0.2s;
  line-height: 1.4;
}
.toc a:hover, .toc-link:hover { color: var(--text); text-decoration: underline; }

/* ---- ARTICLE BODY ---- */
.article-body { min-width: 0; max-width: var(--measure); }

.article-body section { padding: 0; margin-bottom: 48px; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 400; letter-spacing: -0.01em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: var(--bd-thin) solid var(--border);
  color: var(--text);
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 22.5px; font-weight: 500; color: var(--text);
  margin-top: 28px; margin-bottom: 10px;
}
.article-body p {
  font-size: 18px; color: var(--text);
  line-height: 1.7; margin-bottom: 16px;
}
.article-body p:last-child { margin-bottom: 0; }
.article-body strong { color: var(--text); font-weight: 500; }
.article-body ul, .article-body ol { margin: 0 0 16px; }
.article-body li { font-size: 18px; line-height: 1.7; margin-bottom: 8px; }
.article-body code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--surface-2); color: var(--text);
  padding: 1px 5px;
  border: var(--bd-thin) solid var(--border);
}

/* ---- SPLIT HEADER (title left, embed right) ---- */
.article-header--split { padding: 40px 0; }

.article-header-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.article-header-left { display: flex; flex-direction: column; }

.article-key-points {
  display: flex; flex-direction: column;
  margin-top: 24px;
  border-top: var(--bd-thin) solid var(--border);
}
.kp-item {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-ui);
  font-size: 16px; color: var(--text-muted);
  border-bottom: var(--bd-thin) solid var(--border);
  padding: 10px 0;
}
.kp-icon { flex-shrink: 0; }

/* Right column — embed / button */
.article-header-right { display: flex; justify-content: flex-start; align-items: flex-start; }

/* ── Instagram Embed Component ── */
.ig-embed-component {
  width: 100%; max-width: 340px;
  display: flex; flex-direction: column; gap: 16px;
}

/* "Watch on Instagram" button — plain outline, no brand gradient */
.ig-view-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: transparent;
  color: var(--text);
  border: var(--bd-thin) solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--font-ui); font-size: 16px; font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.ig-view-btn:hover { border-color: var(--text); background: var(--surface-2); color: var(--text); }

/* Mobile embed wrapper */
.ig-embed-label {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 400; text-transform: none;
  letter-spacing: 0; color: var(--text-muted);
  margin-bottom: 10px;
}
.ig-embed-wrap .instagram-media {
  border: var(--bd-thin) solid var(--border) !important;
}

/* ── Legacy reel embed (kept for backward compat) ── */
.reel-embed-direct { width: 100%; max-width: 340px; }
.reel-embed-label {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 400; text-transform: none;
  letter-spacing: 0; color: var(--text-muted);
  margin-bottom: 10px;
}
.reel-embed-direct .instagram-media {
  border: var(--bd-thin) solid var(--border) !important;
}

@media (max-width: 860px) {
  .article-header-grid { grid-template-columns: 1fr; }
  .article-header-right { justify-content: flex-start; }
}

/* ---- REEL PREVIEW + MODAL (legacy) ---- */
.article-reel-wrapper { margin-top: 24px; }
.reel-label {
  font-family: var(--font-ui);
  font-size: 15px; color: var(--text-muted);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 7px;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}

.reel-preview-card {
  position: relative;
  width: 320px;
  aspect-ratio: 9 / 16;
  max-height: 420px;
  overflow: hidden;
  border: var(--bd-thin) solid var(--border);
  cursor: pointer;
  background: var(--surface-2);
  display: block;
  padding: 0;
  transition: border-color 0.2s;
}
.reel-preview-card:hover { border-color: var(--border-strong); }

.reel-preview-bg {
  position: absolute; inset: 0;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.reel-preview-lines {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px; width: 100%; z-index: 1;
}
.reel-preview-lines span {
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 400; color: var(--text-muted);
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--surface);
  border: var(--bd-thin) solid var(--border);
  text-align: left;
}
.reel-preview-overlay { position: absolute; inset: 0; }

.reel-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-fg);
  transition: background 0.2s;
  z-index: 2;
}
.reel-play-btn svg { width: 24px; height: 24px; margin-left: 3px; }
.reel-preview-card:hover .reel-play-btn { background: var(--accent-hover); }

.reel-preview-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface);
  border-top: var(--bd-thin) solid var(--border);
  z-index: 2;
}
.reel-preview-bar-left {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-ui);
  color: var(--text-muted); font-size: 14px; font-weight: 400;
}
.reel-preview-bar-right {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 400; color: var(--text-muted);
  letter-spacing: 0;
}

/* ---- MODAL LIGHTBOX ---- */
.reel-modal {
  position: fixed; inset: 0; z-index: 999;
  display: none; align-items: center; justify-content: center;
}
.reel-modal.is-open { display: flex; }

.reel-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(11, 29, 58, 0.82);
}

.reel-modal-box {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
}

.reel-modal-close {
  position: absolute; top: -44px; right: 0;
  background: var(--surface);
  border: var(--bd-thin) solid var(--border-strong);
  border-radius: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); cursor: pointer;
  transition: background 0.2s;
}
.reel-modal-close:hover { background: var(--surface-2); }
.reel-modal-close svg { width: 16px; height: 16px; }

.reel-modal-embed {
  width: min(400px, 90vw);
  overflow: hidden;
  border: var(--bd-thin) solid var(--border);
  background: #fff;
}

/* ---- FLOW STEPS — a numbered list, ruled, not a card stack ---- */
.flow-steps { display: flex; flex-direction: column; margin: 24px 0; border-top: var(--bd-thin) solid var(--border); }
.flow-step {
  display: flex; gap: 16px; position: relative;
  border-bottom: var(--bd-thin) solid var(--border);
  padding: 16px 0;
}
.flow-step-num {
  width: 28px; flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 16px; font-weight: 500; color: var(--text-muted);
}
.flow-step-body { flex: 1; }
.flow-step-title { font-family: var(--font-ui); font-size: 17px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.flow-step-desc { font-size: 17px; color: var(--text-muted); line-height: 1.6; }

/* Pipeline steps (same shape, different markup) */
.pipeline-steps { display: flex; flex-direction: column; margin: 24px 0; border-top: var(--bd-thin) solid var(--border); }
.pipeline-step { display: flex; gap: 16px; border-bottom: var(--bd-thin) solid var(--border); padding: 16px 0; }
.ps-num { width: 28px; flex-shrink: 0; font-family: var(--font-ui); font-size: 16px; font-weight: 500; color: var(--text-muted); }
.ps-body { flex: 1; }
.ps-title { font-family: var(--font-ui); font-size: 17px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.ps-desc { font-size: 17px; color: var(--text-muted); line-height: 1.6; }

/* ---- DIAGRAM ---- */
.diagram-block {
  border: var(--bd-thin) solid var(--border);
  overflow: hidden;
  margin: 24px 0;
}
/* Was a mono ALL-CAPS label. Now a caption in Plex Sans, sentence case. */
.diagram-label {
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 500; text-transform: none;
  letter-spacing: 0; color: var(--text-muted);
  background: var(--surface-2); border-bottom: var(--bd-thin) solid var(--border);
  padding: 8px 14px;
}
.diagram {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text); line-height: 1.7;
  padding: 18px; margin: 0;
  overflow-x: auto; white-space: pre;
}

/* ---- CODE BLOCK ---- */
.code-block {
  background: var(--surface-2);
  border: var(--bd-thin) solid var(--border);
  padding: 18px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text); line-height: 1.7;
  overflow-x: auto;
  margin: 20px 0;
}
.code-block code { background: none; color: inherit; padding: 0; border: none; font-size: inherit; }
/* Code label (sits above a block in some articles) */
.code-label {
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 500; text-transform: none; letter-spacing: 0;
  color: var(--text-muted);
  margin-bottom: 6px;
}
/* Syntax highlighting — ink and muted only; no rainbow */
.hl-comment { color: var(--text-muted); font-style: italic; }
.hl-keyword { color: var(--text); font-weight: 500; }
.hl-string  { color: var(--text-muted); }
.hl-number  { color: var(--text); }

/* ---- CALLOUT — ink-ruled; only "warning" carries the highlighter ---- */
.callout {
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 17px; line-height: 1.6;
  border: var(--bd-thin) solid var(--border);
  border-left: 3px solid var(--text);
  background: var(--surface);
}
.callout strong { display: block; margin-bottom: 4px; font-weight: 500; color: var(--text); }

.callout-info, .callout--info {
  background: var(--surface);
  border-left-color: var(--text);
  color: var(--text);
}
.callout-info strong, .callout--info strong { color: var(--text); }

/* The unsettled: highlighter wash, ink text.
   `--flag` marks "verify before relying on this" — same treatment, named
   for the job so governance articles read clearly in source. */
.callout-warning, .callout--warning, .callout--flag {
  background: var(--highlight);
  border: var(--bd-thin) solid var(--highlight);
  border-left: 3px solid var(--highlight-fg);
  color: var(--highlight-fg);
}
.callout-warning strong, .callout--warning strong, .callout--flag strong { color: var(--highlight-fg); }

/* Best practice goes neutral, not green */
.callout-success, .callout--success {
  background: var(--surface-2);
  border-left-color: var(--text);
  color: var(--text);
}
.callout-success strong, .callout--success strong { color: var(--text); }

/* ---- COMPARISON TABLE ---- */
.comparison-table {
  border-top: var(--bd-thin) solid var(--border-strong);
  margin: 24px 0;
  font-family: var(--font-ui); font-size: 16px;
}
.ct-header, .ct-row { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; }
.ct-header { font-weight: 500; color: var(--text); border-bottom: var(--bd-thin) solid var(--border-strong); }
.ct-header span, .ct-row span { padding: 10px 12px; }
.ct-row { border-bottom: var(--bd-thin) solid var(--border); }
.ct-row:nth-child(even) { background: var(--surface-2); }
.ct-row span:first-child { color: var(--text-muted); }
.ct-row span:not(:first-child) { color: var(--text); }

/* ---- TOOLS GRID — ruled rows, not cards ---- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; margin: 24px 0; border-top: var(--bd-thin) solid var(--border); }
.tool-card {
  border-bottom: var(--bd-thin) solid var(--border);
  padding: 14px 0;
}
.tool-name { font-family: var(--font-ui); font-weight: 500; font-size: 17px; color: var(--text); margin-bottom: 4px; }
.tool-desc { font-family: var(--font-ui); font-size: 15px; color: var(--text-muted); line-height: 1.5; }

/* ---- TAKEAWAYS — a ruled block, no tinted gradient box ---- */
.takeaways-box {
  border-top: var(--bd-thin) solid var(--border-strong);
  border-bottom: var(--bd-thin) solid var(--border);
  padding: 24px 0;
  margin-top: 8px;
  background: none;
}
/* Was mono ALL-CAPS. Now sentence-case Plex Sans. */
.takeaways-title {
  font-family: var(--font-ui);
  font-size: 16px; font-weight: 500; text-transform: none;
  letter-spacing: 0; color: var(--text-muted);
  margin-bottom: 14px;
}
.takeaways-box ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.takeaways-box li {
  font-size: 18px; color: var(--text); line-height: 1.6;
  padding-left: 18px; position: relative;
}
/* A bullet, not an arrow */
.takeaways-box li::before {
  content: '•';
  position: absolute; left: 0;
  color: var(--text-muted);
}
.takeaways-box code { font-size: 0.88em; }

/* ---- RELATED — list rows with a rule each ---- */
.related-section { margin-top: 48px; padding-top: 28px; border-top: var(--bd-thin) solid var(--border); }
.related-section h3 { font-family: var(--font-ui); font-size: 16px; font-weight: 500; color: var(--text-muted); margin-bottom: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; }
.related-card {
  display: flex; flex-direction: column; gap: 4px;
  border-top: var(--bd-thin) solid var(--border);
  padding: 14px 0;
  text-decoration: none;
  color: inherit;
}
.related-card:hover .related-title { text-decoration: underline; }
.related-tag { font-family: var(--font-ui); font-size: 15px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-muted); }
.related-title { font-family: var(--font-display); font-size: 18px; font-weight: 400; color: var(--text); line-height: 1.4; }

/* ---- SAGA TIMELINE ---- */
.saga-timeline { display: flex; flex-direction: column; margin: 24px 0; border-top: var(--bd-thin) solid var(--border); }
.saga-step {
  display: grid; grid-template-columns: 110px 1fr;
  border-bottom: var(--bd-thin) solid var(--border);
  padding: 14px 0;
}
.saga-left {
  display: flex; flex-direction: column; align-items: flex-start;
  padding-top: 2px;
}
.saga-dot {
  width: 30px; height: 30px; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 15px; font-weight: 500;
  border: var(--bd-thin) solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
}
/* Numbered saga steps are filled chips: the fill is the same hue in both
   themes, so the numeral on it is always black. */
.saga-dot.debit,
.saga-dot.credit,
.saga-dot.settle   { background: var(--accent);    color: #000; border-color: #000; }
.saga-dot.rollback { background: var(--tier-high); color: #000; border-color: #000; }
.saga-label {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 400; text-transform: none;
  letter-spacing: 0; color: var(--text-muted);
  margin-top: 6px; text-align: left;
}
.saga-body { padding-top: 2px; }
.saga-title { font-family: var(--font-ui); font-size: 17px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.saga-desc { font-size: 17px; color: var(--text-muted); line-height: 1.6; }

/* ---- STAT PILLS — figures in a row, not pills ---- */
.stat-pills { display: flex; flex-wrap: wrap; gap: 0 40px; margin: 24px 0; padding: 16px 0; border-top: var(--bd-thin) solid var(--border); border-bottom: var(--bd-thin) solid var(--border); }
.stat-pill { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.pill-num { font-family: var(--font-display); font-size: 28px; font-weight: 400; color: var(--text); letter-spacing: -0.01em; }
.pill-label { font-family: var(--font-ui); font-size: 15px; color: var(--text-muted); }

/* ---- LANGUAGE TABS ---- */
.lang-tabs {
  display: flex; flex-wrap: wrap; gap: 4px 20px;
  margin-bottom: 0;
  border-bottom: var(--bd-thin) solid var(--border);
}
.lang-tab {
  padding: 8px 0;
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-ui);
  color: var(--text-muted); font-size: 16px; font-weight: 400;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.lang-tab:hover { color: var(--text); }
.lang-tab.active { color: var(--text); font-weight: 500; border-bottom-color: var(--text); }

.lang-panel { margin-top: 0; }

.code-explain {
  background: var(--surface-2);
  border: var(--bd-thin) solid var(--border);
  border-bottom: none;
  padding: 12px 14px;
  font-size: 17px; color: var(--text-muted); line-height: 1.6;
}
.code-explain strong { color: var(--text); font-weight: 500; }

.lang-panel > .code-block { margin-top: 0; border-top: none; }

/* ---- CIRCUIT BREAKER STATES — ruled rows, no glows, no colour coding ---- */
.cb-states { display: flex; flex-direction: column; margin: 24px 0; }

.cb-state {
  border: var(--bd-thin) solid var(--border);
  margin-bottom: 0;
}
.cb-state-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: var(--bd-thin) solid var(--border);
  background: var(--surface-2);
}
.cb-state-dot {
  width: 10px; height: 10px; border-radius: 0; flex-shrink: 0;
  background: var(--text);
}
.cb-state--closed .cb-state-dot   { background: var(--text); }
.cb-state--open .cb-state-dot     { background: var(--danger); }
.cb-state--halfopen .cb-state-dot { background: var(--highlight); }

.cb-state--closed,
.cb-state--open,
.cb-state--halfopen { border-color: var(--border); background: var(--surface); }

.cb-state-name {
  font-family: var(--font-ui);
  font-size: 17px; font-weight: 700; letter-spacing: 0;
  color: var(--text);
}
.cb-state--closed .cb-state-name   { color: var(--text); }
.cb-state--open .cb-state-name     { color: var(--red); }   /* --red is the ink-toned text red, not the bright fill */
.cb-state--halfopen .cb-state-name { color: var(--text); }

.cb-state-sub { font-family: var(--font-ui); font-size: 15px; color: var(--text-muted); margin-left: auto; }

.cb-state-body { padding: 14px 16px; }
.cb-state-body p { font-size: 17px; color: var(--text); line-height: 1.6; margin-bottom: 8px; }
.cb-state-body p:last-child { margin-bottom: 0; }
.cb-state-body strong { color: var(--text); font-weight: 500; }

.cb-state-arrow {
  text-align: center; color: var(--text-muted);
  font-family: var(--font-ui); font-size: 15px; font-weight: 400;
  padding: 8px 0;
}

/* ---- RESPONSIVE — TABLET ---- */
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; padding-top: 32px; }
  .toc { position: static; }
  .article-header-grid { grid-template-columns: 1fr; gap: 32px; }
  .article-header-right { justify-content: flex-start; }
}

/* ---- RESPONSIVE — MOBILE ---- */
@media (max-width: 640px) {
  .article-header { padding: 28px 0 24px; }
  .article-header--split { padding: 28px 0; }
  .article-header h1,
  .article-header-left h1 { font-size: 30px; line-height: 1.2; }
  .article-subtitle { font-size: 19px; }

  .toc { display: none; }

  .article-body section { margin-bottom: 36px; }
  .article-body h2 { font-size: 24px; }
  .article-body h3 { font-size: 20px; }
  .article-body p, .article-body li { font-size: 17px; }

  .code-block { font-size: 13px; padding: 14px; }
  .diagram { font-size: 12px; padding: 14px; }

  /* Comparison table — hide first column */
  .ct-header span:first-child,
  .ct-row span:first-child { display: none; }
  .ct-header, .ct-row { grid-template-columns: 1fr 1fr; }

  .reel-embed-direct { max-width: 100%; }
  .reel-preview-card { width: 100%; }

  .kp-item { font-size: 15px; }

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

  .saga-step { grid-template-columns: 78px 1fr; }

  .tools-grid { grid-template-columns: 1fr; }

  .stat-pills { gap: 0 24px; }
  .pill-num { font-size: 24px; }

  .cb-state-sub { display: none; }

  .takeaways-box { padding: 20px 0; }
}

/* ---- NARROW-SCREEN CONTAINMENT ----
   Wide tables and grids scroll inside their own box instead of widening
   the page. Added with the neobrutalist pass: 3px borders cost real width. */
@media (max-width: 640px) {
  .article-body table,
  .comparison-table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
  .ct-header, .ct-row { min-width: 420px; }
  .article-body { overflow-wrap: break-word; }
}
