/* ============================================================
   Blog article + hub styles. Shared by blog.html (the article index)
   and every website/<slug>.html article page migrated from
   klccinvestor.com's live blog. Reuses styles.css tokens/components
   (--ink, --gray-400, .section, .btn, .faq-item, etc.) - content and
   structure follow the source articles; only typography/color/layout
   are this site's own.
   ============================================================ */

/* -------------------- Hub grid (blog.html) -------------------- */
.blog-hero-heading {
  max-width: 46rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .blog-grid { grid-template-columns: 1fr; }
}

.blog-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.blog-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: clip;
  background: var(--black-elevated);
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-quart);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}

.blog-card__meta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gray-500);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.blog-card__meta span:not(:last-child)::after {
  content: '\00b7';
  margin-inline-start: 0.6rem;
  color: var(--gray-300);
}

.blog-card__title {
  margin: 0.5rem 0 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

.blog-card__excerpt {
  margin-top: 0.5rem;
  color: var(--gray-400);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* -------------------- Article hero -------------------- */
.blog-article-hero {
  padding-block-start: clamp(6rem, 5rem + 3vw, 8rem);
}

.blog-article-hero__eyebrow {
  color: var(--gray-500);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-article-hero h1 {
  margin-top: 1rem;
  max-width: 32ch;
  font-size: clamp(2.25rem, 1.8rem + 2.5vw, 3.75rem);
  line-height: 1.08;
}

.blog-article-hero__dek {
  margin-top: 1.25rem;
  max-width: 46rem;
  color: var(--gray-400);
  font-size: 1.15rem;
  line-height: 1.6;
}

.blog-article-hero__byline {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.blog-article-hero__byline strong {
  color: var(--ink);
  font-weight: 600;
}

.blog-article-hero__byline span:not(:last-child)::after {
  content: '\00b7';
  margin-inline-start: 0.6rem;
  color: var(--gray-300);
}

.blog-article-hero__image {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: clip;
  background: var(--black-elevated);
}

.blog-article-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------------------- Article body layout -------------------- */
.blog-body {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2rem, 1.5rem + 2vw, 4rem);
  align-items: start;
}

@media (max-width: 880px) {
  .blog-body { grid-template-columns: 1fr; }
}

.blog-toc {
  position: sticky;
  top: calc(var(--site-header-h, 92px) + 1.5rem);
}

.blog-toc__label {
  color: var(--gray-500);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-toc__list {
  margin-top: 1rem;
  padding: 0;
  list-style: none;
  border-inline-start: 1px solid var(--gray-300);
}

.blog-toc__list li + li {
  margin-top: 0.65rem;
}

.blog-toc__list a {
  display: block;
  padding-inline-start: 1rem;
  margin-inline-start: -1px;
  border-inline-start: 1px solid transparent;
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out-quart), border-color var(--duration-base) var(--ease-out-quart);
}

.blog-toc__list a:hover,
.blog-toc__list a:focus-visible {
  color: var(--ink);
  border-inline-start-color: var(--ink);
}

@media (max-width: 880px) {
  .blog-toc { position: static; }
}

.blog-content {
  max-width: 42rem;
}

.blog-content h2 {
  margin-top: 3rem;
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  scroll-margin-top: calc(var(--site-header-h, 92px) + 1rem);
}

.blog-content > h2:first-child {
  margin-top: 0;
}

.blog-content p {
  margin-top: 1.1rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.blog-content ul {
  margin-top: 1.1rem;
  padding-inline-start: 1.25rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.blog-content li + li {
  margin-top: 0.5rem;
}

.blog-content figure {
  margin: 1.75rem 0 0;
}

.blog-content figure img {
  width: 100%;
  border-radius: var(--radius-md);
}

.blog-content figcaption {
  margin-top: 0.6rem;
  color: var(--gray-500);
  font-size: 0.85rem;
}

/* -------------------- Inline data chart -------------------- */
/* Plain inline SVG, no chart library - a handful of bars is all any
   article here has needed so far. Two series are told apart by VALUE
   (ink vs. gray-400), not hue, matching the site's grayscale-only
   convention rather than introducing a one-off accent color just for
   this chart. */
.blog-chart {
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--cream-soft);
}

.blog-chart__caption {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.blog-chart__svg {
  width: 100%;
  height: auto;
  display: block;
}

.blog-chart__svg text {
  font-family: var(--font);
}

.blog-chart__axis-line {
  stroke: var(--gray-400);
  stroke-width: 1;
}

.blog-chart__gridline {
  stroke: var(--gray-300);
  stroke-width: 1;
}

.blog-chart__axis-label {
  font-size: 11px;
  fill: var(--gray-500);
}

.blog-chart__group-label {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
}

.blog-chart__value-label {
  font-size: 12px;
  fill: var(--ink);
}

.blog-chart__bar--growth {
  fill: var(--ink);
}

.blog-chart__bar--inflation {
  fill: var(--gray-400);
}

.blog-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
}

.blog-chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-700);
}

.blog-chart__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.blog-chart__swatch--growth {
  background: var(--ink);
}

.blog-chart__swatch--inflation {
  background: var(--gray-400);
}

/* "Key Takeaway" / "Pro Tip" pull-out boxes from the source articles */
.blog-callout {
  margin-top: 1.5rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-sm);
  background: var(--cream-soft);
  border-inline-start: 3px solid var(--ink);
}

.blog-callout p {
  margin-top: 0;
  color: var(--ink);
}

.blog-callout strong {
  font-weight: 600;
}

.blog-content__faq {
  margin-top: 3rem;
}

.blog-content__faq .faq-list {
  max-width: none;
}

/* styles.css's home-page FAQ staircase (nth-child stepped indent, tuned for
   a wide centered list) leaks into this narrower ~42rem article column and
   pushes later questions almost flush against the right edge - reset it
   here so every question in an article FAQ starts flush left instead. */
.blog-content__faq .faq-item {
  margin-inline-start: 0 !important;
}

.blog-conclusion {
  margin-top: 3rem;
}

/* Contextual cross-links to other articles/pages, inline within body copy.
   Same ink + 600-weight + darker-underline treatment as .faq-item__answer a
   in styles.css - a too-light underline made these easy to miss, and since
   the link text was already var(--ink) (the darkest color on the page)
   there was no room to fix it by darkening color alone. */
.blog-content a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gray-500);
  text-underline-offset: 0.15em;
  transition: text-decoration-color var(--duration-base) var(--ease-out-quart);
}

.blog-content a:hover,
.blog-content a:focus-visible {
  text-decoration-color: currentColor;
}

/* -------------------- Related reading -------------------- */
.blog-related {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-300);
}

.blog-related__label {
  color: var(--gray-500);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-related__list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.blog-related__item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--gray-300);
}

.blog-related__item span {
  flex: 1;
  font-size: 1.05rem;
  transition: color var(--duration-base) var(--ease-out-quart);
}

.blog-related__item:hover span {
  color: var(--gray-500);
}

.blog-related__item::after {
  content: '\2192';
  flex-shrink: 0;
}
