/* ================================================================
   IndianTyping.com — article.css
   Loaded on $page_type = 'article' (/blog/<slug>/).

   .page-wrap is RE-DECLARED here because this page type does not load
   tool.css — the defect class tools/css-contract-test.js gates.

   Design tokens only. Never restate a literal a token already holds.
================================================================ */

.page-wrap {
  max-width: var(--tool-max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) 24px 80px;
}

/* A reading column, not a product container. Long-form prose is unreadable at
   1100px, so the article itself is capped near 68 characters — the width
   typography has agreed on for a century. */
.ba-wrap { max-width: 820px; }

.ba-article { display: block; }

.ba-crumb { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.ba-crumb a { color: var(--text-2); text-decoration: underline; }

.ba-head { margin-bottom: 26px; }
.ba-cat {
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 8px;
}
.ba-head h1 {
  font-size: clamp(26px, 5vw, 38px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.18;
  color: var(--text-1); margin-bottom: 12px;
}
.ba-excerpt {
  font-size: 17px; line-height: 1.65; color: var(--text-2);
  max-width: 62ch; margin-bottom: 12px;
}
.ba-meta {
  font-size: 13px; color: var(--text-3);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}

/* ── table of contents ──────────────────────────────────────────── */
.ba-toc {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 32px;
}
.ba-toc-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.ba-toc ol { margin: 0 0 0 18px; }
.ba-toc li { font-size: 14px; line-height: 1.9; color: var(--text-2); }
.ba-toc a { color: var(--text-2); text-decoration: none; }
.ba-toc a:hover { color: var(--brand); text-decoration: underline; }

/* ── article body ───────────────────────────────────────────────── */
.ba-body h2 {
  font-size: 23px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-1); margin: 40px 0 12px;
  /* scroll-margin so a TOC jump does not hide the heading under the fixed
     nav — the classic anchor-link defect. */
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.ba-body h3 {
  font-size: 17px; font-weight: 700; color: var(--text-1);
  margin: 26px 0 6px;
}
.ba-body p {
  font-size: 17px; line-height: 1.78; color: var(--text-2);
  margin-bottom: 18px; max-width: 68ch;
}
.ba-body ul { margin: 0 0 20px 22px; max-width: 68ch; }
.ba-body li {
  font-size: 17px; line-height: 1.75; color: var(--text-2); margin-bottom: 10px;
}
.ba-body strong { color: var(--text-1); font-weight: 700; }
.ba-body a { color: var(--brand); text-decoration: underline; }
.ba-body a:hover { text-decoration-thickness: 2px; }

/* ── author box ─────────────────────────────────────────────────── */
.ba-author {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 22px; margin-top: 44px;
}
.ba-author-mark {
  flex: 0 0 auto; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  border-radius: var(--r-md); font-weight: 800; font-size: 15px;
}
.ba-author-name { font-size: 15px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.ba-author-bio  { font-size: 14px; line-height: 1.65; color: var(--text-2); }

/* Reserved: after the article and author box, never inside the reading
   column. Fixed height so a late unit cannot shift text mid-paragraph. */
.ba-adslot { min-height: 90px; margin: 32px 0; }

/* ── related + CTA ──────────────────────────────────────────────── */
.ba-related h2, .ba-cta h2 {
  font-size: 21px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-1); margin-bottom: 14px;
}
.ba-rel-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; margin-bottom: 40px;
}
.ba-rel-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px;
  transition: border-color 0.15s var(--ease);
}
.ba-rel-card:hover { border-color: var(--brand); }
.ba-rel-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand);
}
.ba-rel-title { font-size: 15px; font-weight: 700; color: var(--text-1); line-height: 1.4; }
.ba-rel-excerpt { font-size: 13px; line-height: 1.6; color: var(--text-2); }

.ba-cta {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 24px 26px;
}
.ba-cta p  { font-size: 15px; line-height: 1.7; color: var(--text-2); margin-bottom: 10px; }
.ba-cta ul { margin: 0 0 14px 20px; }
.ba-cta li { font-size: 15px; line-height: 1.75; color: var(--text-2); margin-bottom: 8px; }
.ba-cta a  { color: var(--brand); text-decoration: underline; }
.ba-next   { font-size: 14px; color: var(--text-3); margin: 0; }

@media (max-width: 640px) {
  .page-wrap { padding-left: 16px; padding-right: 16px; }
  .ba-body p, .ba-body li, .ba-excerpt { font-size: 16px; }
  .ba-body h2 { font-size: 21px; margin-top: 32px; }
  .ba-author { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .ba-rel-card { transition: none; }
}
