/* ==========================================================
   THE TRADE GROWTH JOURNAL — article + archive styles
   Builds on site.css tokens (colours, fonts, buttons).
   Reading first: one column, generous line height, no clutter.
   ========================================================== */

/* ---------- Journal header (home + category) ---------- */
.j-header h1{ max-width: 18ch; }
.j-header .crumbs{ margin-bottom: 18px; }
.j-header-author, .page-header.j-header .j-header-author{ display: block; margin-top: 32px; max-width: 58ch; font-size: 15px; line-height: 1.65; color: #fff; font-style: normal; }

/* ---------- Category filter ---------- */
.j-cats ul{ display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; margin: 0 0 clamp(36px, 5vw, 56px); padding: 0; }
.j-cats a{
  display: inline-block; padding: 9px 16px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--line-light); transition: border-color .2s ease, background-color .2s ease;
}
.j-cats a:hover{ border-color: var(--gold); }
.j-cats a[aria-current]{ background: var(--ink); color: var(--fg); border-color: var(--ink); }

/* ---------- Article cards ---------- */
.j-list{ padding-top: clamp(40px, 6vw, 72px); }
.j-list-heading{ font-size: clamp(22px, 2.4vw, 28px); color: var(--ink); margin: clamp(48px, 6vw, 72px) 0 28px; }
.j-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px); }
.j-card-link{ display: flex; flex-direction: column; height: 100%; color: var(--ink); }
.j-card-img{ aspect-ratio: 3 / 2; overflow: hidden; background: #e6e1d4; }
.j-card-img img{ width: 100%; height: 100%; object-fit: cover; }
.j-card-body{ padding-top: 18px; }
.j-card .eyebrow{ color: #8a6f43; }
.j-card-title{ margin-top: 10px; font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.j-card-link:hover .j-card-title{ text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.j-card-desc{ margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }
.j-card-meta{ margin-top: 12px; font-size: 13px; color: var(--ink-muted); }

.j-lead .j-card-link{ display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.j-lead .j-card-img{ aspect-ratio: 16 / 10; }
.j-lead .j-card-body{ padding-top: 0; }
.j-lead .j-card-title{ font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.j-lead .j-card-desc{ font-size: 17px; }

.j-empty{ padding: 48px 0 24px; color: var(--ink-muted); }
.j-empty p{ font-size: 18px; margin-bottom: 24px; }

/* ---------- Article header ---------- */
.j-article-header{ padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 5vw, 64px); }
.j-article-header .crumbs{ margin-bottom: 26px; }
.j-cat-label{ display: inline-block; margin-bottom: 16px; }
.j-cat-label:hover{ color: var(--gold-strong); }
.j-article-header h1{ font-size: clamp(32px, 4.4vw, 52px); line-height: 1.12; color: var(--fg); max-width: 24ch; }
.j-article-header .lede{ margin-top: 20px; max-width: 60ch; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.65; color: var(--fg-muted); }
.j-byline{ margin-top: 30px; display: flex; align-items: center; gap: 14px; }
.j-avatar{ width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.j-byline-name{ font-weight: 700; font-size: 15px; color: var(--fg); }
.j-byline-meta{ font-size: 13.5px; color: var(--fg-muted); }

/* Featured image sits across the dark/cream seam */
.j-hero-wrap{ background: linear-gradient(to bottom, var(--bg) 50%, var(--cream) 50%); }
.j-hero-img{ margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-raised); }
.j-hero-img img{ width: 100%; height: 100%; object-fit: cover; }

/* ---------- Article body ---------- */
.j-article-main{ padding-block: clamp(40px, 6vw, 72px) clamp(56px, 7vw, 88px); }
.j-article-main.has-hero{ padding-top: clamp(32px, 5vw, 56px); }
.j-article-main .wrap-narrow{ max-width: 760px; }

.j-prose{ color: #2a2820; font-size: 18px; line-height: 1.75; }
.j-prose > * + *{ margin-top: 1.1em; }
.j-prose h2{ margin-top: 2.2em; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; font-weight: 500; color: var(--ink); scroll-margin-top: 100px; }
.j-prose h3{ margin-top: 1.8em; font-size: 21px; line-height: 1.35; font-weight: 500; color: var(--ink); scroll-margin-top: 100px; }
.j-prose h4{ margin-top: 1.6em; font-family: var(--font-body); font-size: 17px; font-weight: 700; color: var(--ink); }
.j-prose h2 + *, .j-prose h3 + *, .j-prose h4 + *{ margin-top: .6em; }
.j-prose > :first-child{ margin-top: 0; }
.j-prose a{ color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.j-prose a:hover{ color: #8a6f43; }
.j-prose strong{ color: var(--ink); font-weight: 700; }
.j-prose ul, .j-prose ol{ padding-left: 1.3em; }
.j-prose li + li{ margin-top: .45em; }
.j-prose li::marker{ color: #8a6f43; }
.j-prose ol li::marker{ font-weight: 700; }
.j-prose blockquote{ margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); color: var(--ink); font-size: 19px; }
.j-prose hr{ border: 0; border-top: 1px solid var(--line-light); margin-block: 2.4em; }
.j-prose code{ font-size: .9em; background: rgba(21,20,16,.06); padding: 2px 6px; }
.j-figure{ margin: 2em 0; }
.j-figure img{ width: 100%; height: auto; }
.j-figure figcaption{ margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.j-table{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
.j-table table{ width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.j-table th, .j-table td{ text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-light); vertical-align: top; }
.j-table th{ font-weight: 700; color: var(--ink); border-bottom-color: rgba(21,20,16,.3); }

/* ---------- Table of contents ---------- */
.j-toc{ margin-bottom: 44px; padding: 20px 24px; border: 1px solid var(--line-light); background: var(--cream-raised); }
.j-toc summary{ cursor: pointer; list-style: none; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.j-toc summary::-webkit-details-marker{ display: none; }
.j-toc summary::after{ content: "–"; float: right; color: #8a6f43; }
.j-toc:not([open]) summary::after{ content: "+"; }
.j-toc ol{ margin: 14px 0 0; padding-left: 1.3em; font-size: 16px; line-height: 1.5; }
.j-toc li + li{ margin-top: 8px; }
.j-toc li::marker{ color: #8a6f43; }
.j-toc a{ color: var(--ink); }
.j-toc a:hover{ text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ---------- Key takeaway + next step ---------- */
.j-takeaway{ margin-top: 56px; padding: clamp(24px, 3vw, 32px); background: var(--ink); color: var(--fg); }
.j-takeaway h2{ font-size: 12px; font-family: var(--font-body); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); scroll-margin-top: 100px; }
.j-takeaway .j-prose{ margin-top: 14px; color: var(--fg); font-size: 18px; }
.j-takeaway .j-prose strong{ color: var(--fg); }
.j-takeaway .j-prose a{ color: var(--fg); }
.j-takeaway .j-prose li::marker{ color: var(--gold); }

.j-next{ margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line-light); padding-block-end: 0; }
.j-next h2{ font-size: clamp(22px, 2.2vw, 26px); font-weight: 500; color: var(--ink); }
.j-next .j-prose{ margin-top: 12px; }

/* ---------- Author box ---------- */
.j-author{ margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line-light); display: flex; gap: 18px; align-items: flex-start; }
.j-author img{ width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.j-author-label{ font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #8a6f43; }
.j-author-name{ margin-top: 4px; font-family: var(--font-display); font-size: 19px; color: var(--ink); }
.j-author-name a:hover{ color: #8a6f43; }
.j-author-role{ font-size: 14px; color: var(--ink-muted); }
.j-author-bio{ margin-top: 10px; font-size: 15px; line-height: 1.65; color: #3b382d; max-width: 60ch; }

/* ---------- Related ---------- */
.j-related{ padding-top: 0; border-top: 0; }
.j-related .wrap{ border-top: 1px solid var(--line-light); padding-top: clamp(48px, 6vw, 72px); }
section.j-related > .wrap > h2{ font-size: clamp(24px, 2.6vw, 30px); color: var(--ink); margin-bottom: 32px; }

/* ---------- CTA panel (reuses .closing-cta) ---------- */
.j-cta-secondary{ margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-muted); }
.j-cta-secondary:hover{ color: var(--gold); }

/* ---------- Preview banner ---------- */
.j-preview-banner{ position: sticky; top: 0; z-index: 30; padding: 10px 20px; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .04em; background: var(--gold); color: var(--ink); }
.j-preview-banner a{ text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 920px){
  .j-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .j-lead .j-card-link{ grid-template-columns: 1fr; gap: 0; }
  .j-lead .j-card-body{ padding-top: 20px; }
}
@media (max-width: 640px){
  .j-grid{ grid-template-columns: 1fr; }
  .j-prose{ font-size: 17px; }
  .j-hero-wrap .wrap{ padding-left: 0; padding-right: 0; }
  .j-author{ flex-direction: column; }
}
