/* ========================================================================
   Blog — article prose, listing, byline, interactive widgets
   Extends tokens.css + components.css. Loads after components.css.
   ======================================================================== */

/* ── Blog index — hero band ───────────────────────────────── */
.blog-hero {
  padding: calc(var(--nav-height) + 80px) 0 56px;
  background:
    radial-gradient(ellipse at 20% 100%, var(--forest-100) 0%, transparent 55%),
    var(--sand-50);
  border-bottom: 1px solid var(--line-soft);
}
.blog-hero__eyebrow { margin-bottom: 16px; }
.blog-hero h1 {
  font-size: clamp(40px, 5.6vw, 72px);
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin-bottom: 18px;
  color: var(--forest-900);
}
.blog-hero h1 em { font-style: italic; color: var(--forest-700); }
.blog-hero__lede { max-width: 60ch; font-size: 18px; color: var(--ink-muted); line-height: 1.6; margin: 0; }

/* ── Article cards (blog index) ──────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  text-decoration: none;
  color: inherit;
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--forest-200);
  box-shadow: var(--shadow);
  color: inherit;
}
.article-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--forest-100);
}
.article-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.article-card:hover .article-card__media img { transform: scale(1.04); }
.article-card__tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.article-card__tag[data-kind="pillar"] {
  background: rgba(45, 74, 62, 0.94);
  color: var(--sand-50);
}
.article-card__tag[data-kind="cluster"] {
  background: rgba(184, 148, 92, 0.94);
  color: #2d1f0a;
}
.article-card__body {
  padding: 26px 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.article-card__meta span + span::before {
  content: "·";
  margin-right: 14px;
  color: var(--line-strong);
}
.article-card h2 {
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.012em;
  color: var(--forest-900);
  line-height: 1.2;
}
.article-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: 18px;
}
.article-card__cta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest-700);
  display: inline-flex; align-items: center; gap: 6px;
}
.article-card__cta::after {
  content: "→"; transition: transform 0.2s var(--ease);
}
.article-card:hover .article-card__cta::after { transform: translateX(4px); }

/* ── Article header (single article page) ─────────────────── */
.article-head {
  padding: calc(var(--nav-height) + 56px) 0 36px;
  background: var(--sand-100);
  border-bottom: 1px solid var(--line-soft);
}
.article-head__crumbs {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-head__crumbs a { color: var(--ink-muted); }
.article-head__crumbs a:hover { color: var(--forest-700); }
.article-head__crumbs span[aria-current] { color: var(--forest-700); }
.article-head__crumbs span[aria-current]::before,
.article-head__crumbs a + a::before {
  content: "›";
  margin-right: 8px;
  color: var(--line-strong);
  font-weight: 400;
}
.article-head__tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 18px;
}
.article-head__tag[data-kind="pillar"] {
  background: var(--forest-700);
  color: var(--sand-50);
}
.article-head__tag[data-kind="cluster"] {
  background: var(--gold-100);
  color: var(--gold-700);
  border: 1px solid var(--gold-500);
}
.article-head h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  max-width: 22ch;
  color: var(--forest-900);
}
.article-head h1 em { font-style: italic; color: var(--forest-700); }
.article-head .lede {
  font-size: clamp(17px, 1.8vw, 20px);
  max-width: 64ch;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

/* Byline */
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 28px;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--ink);
}
.byline__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.byline__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.byline__value { color: var(--ink); font-weight: 500; }
.byline__value b { color: var(--forest-700); }
.byline__value a { color: var(--forest-700); }
.byline__value a:hover { color: var(--gold-700); }

/* Article hero image */
.article-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--forest-100);
  margin: 36px auto 56px;
  max-width: var(--container-narrow);
  box-shadow: var(--shadow);
}
.article-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Article body ─────────────────────────────────────────── */
.article-body {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 28px;
}
.article-body > p,
.article-body > ul,
.article-body > ol,
.article-body > blockquote,
.article-body > figure,
.article-body > table {
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  max-width: 68ch;
}
.article-body > p { margin-bottom: 1.1em; }
.article-body strong { color: var(--ink-strong); font-weight: 600; }
.article-body em { color: var(--forest-700); font-style: italic; }
.article-body h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 1.8em 0 0.4em;
  letter-spacing: -0.015em;
  color: var(--forest-900);
  scroll-margin-top: calc(var(--nav-height) + 16px);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: clamp(20px, 2.2vw, 24px);
  margin: 1.4em 0 0.35em;
  color: var(--forest-800);
  scroll-margin-top: calc(var(--nav-height) + 16px);
}
.article-body h2 + p,
.article-body h3 + p { margin-top: 0; }
.article-body a {
  color: var(--forest-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold-500);
  text-decoration-thickness: 1.5px;
}
.article-body a:hover { color: var(--gold-700); text-decoration-color: var(--gold-700); }
.article-body ul,
.article-body ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}
.article-body li { margin-bottom: 0.5em; }
.article-body ul li::marker { color: var(--gold-600); }
.article-body blockquote {
  margin: 1.8em 0;
  padding: 22px 28px;
  background: var(--surface);
  border-left: 3px solid var(--gold-600);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.45;
  color: var(--forest-900);
}
.article-body blockquote footer {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 12px;
  font-weight: 500;
}
.article-body blockquote footer b { color: var(--forest-700); display: block; margin-bottom: 2px; }
.article-body hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 3em 0;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 14.5px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.article-body th,
.article-body td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.article-body th {
  background: var(--forest-800);
  color: var(--sand-50);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.article-body td { background: var(--surface); }
.article-body tr:nth-child(even) td { background: var(--sand-50); }
.article-body td b { color: var(--forest-700); }

/* Pull-quote callout */
.pull-quote {
  margin: 2em 0;
  padding: 32px 36px;
  background: linear-gradient(135deg, var(--forest-800) 0%, var(--forest-700) 100%);
  color: var(--sand-50);
  border-radius: var(--radius-lg);
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.4;
  font-style: italic;
  letter-spacing: -0.005em;
  position: relative;
}
.pull-quote::before {
  content: "\201C";
  position: absolute;
  top: -6px; left: 14px;
  font-size: 160px;
  line-height: 1;
  color: var(--gold-600);
  opacity: 0.2;
  pointer-events: none;
}
.pull-quote em { color: var(--gold-500); font-style: italic; }
.pull-quote footer {
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-style: normal;
  color: var(--sand-200);
  letter-spacing: 0.02em;
}
.pull-quote footer b { color: var(--gold-500); font-weight: 500; }

/* Key takeaways box (AI-engine answer-box ranking) */
.takeaways {
  margin: 0 auto 40px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--gold-500);
  border-radius: var(--radius-lg);
  max-width: 68ch;
  box-shadow: var(--shadow-sm);
}
.takeaways__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.takeaways__title::before {
  content: ""; width: 18px; height: 1.5px; background: var(--gold-600);
}
.takeaways ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 16px;
  line-height: 1.6;
}
.takeaways li { margin-bottom: 8px; color: var(--ink); }
.takeaways li::marker { color: var(--gold-600); }
.takeaways li b { color: var(--forest-700); }

/* ── ABSD calculator (pillar interactive) ─────────────────── */
.absd-calc {
  margin: 2.4em auto;
  max-width: 78ch;
  background: var(--sand-50);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px 32px 28px;
}
.absd-calc__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 6px;
  font-weight: 500;
}
.absd-calc h3 {
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--forest-900);
}
.absd-calc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.absd-calc__field { display: flex; flex-direction: column; gap: 6px; }
.absd-calc__field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.absd-calc__field input,
.absd-calc__field select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}
.absd-calc__field input:focus,
.absd-calc__field select:focus {
  outline: 2px solid var(--gold-500);
  outline-offset: 1px;
  border-color: var(--forest-700);
}
.absd-calc__field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%232d4a3e' stroke-width='1.5' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.absd-calc__field input[type="range"] {
  padding: 0; height: 6px;
  background: var(--sand-200);
  border-radius: 999px; border: 0;
}
.absd-calc__field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  background: var(--forest-700);
  border-radius: 50%;
  border: 3px solid var(--sand-50);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.absd-calc__field input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  background: var(--forest-700);
  border-radius: 50%;
  border: 3px solid var(--sand-50);
  cursor: pointer;
}
.absd-calc__price-line {
  display: flex; justify-content: space-between; align-items: baseline;
}
.absd-calc__price-value {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--forest-700);
  font-weight: 500;
}
.absd-calc__output {
  background: var(--forest-700);
  color: var(--sand-50);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  align-items: baseline;
}
.absd-calc__output dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--sand-200);
  margin: 0;
}
.absd-calc__output dd {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--sand-50);
  margin: 0;
  text-align: right;
}
.absd-calc__output dt.is-total,
.absd-calc__output dd.is-total {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--gold-500);
  padding-top: 12px;
  border-top: 1px solid var(--forest-600);
  margin-top: 6px;
  font-style: italic;
  letter-spacing: -0.01em;
}
.absd-calc__output dd.is-total {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 600;
}
.absd-calc__note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.55;
}
.absd-calc__note b { color: var(--ink); }
@media (max-width: 640px) {
  .absd-calc { padding: 24px 22px; }
  .absd-calc__grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Eligibility checklist (cluster interactive) ──────────── */
.eligibility {
  margin: 2.4em auto;
  max-width: 78ch;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px 32px 28px;
  box-shadow: var(--shadow-sm);
}
.eligibility__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 6px;
}
.eligibility h3 {
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--forest-900);
}
.eligibility__lede {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin-bottom: 22px;
  max-width: 56ch;
}
.eligibility__step {
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
}
.eligibility__step:first-of-type { border-top: 0; padding-top: 4px; }
.eligibility__q {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--forest-900);
  margin-bottom: 12px;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.eligibility__q-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold-700);
  flex-shrink: 0;
}
.eligibility__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.eligibility__opt {
  padding: 9px 16px;
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.eligibility__opt:hover { background: var(--sand-200); border-color: var(--line-strong); }
.eligibility__opt.is-selected {
  background: var(--forest-700);
  color: var(--sand-50);
  border-color: var(--forest-700);
}
.eligibility__result {
  margin-top: 22px;
  padding: 22px 24px;
  background: var(--forest-700);
  color: var(--sand-50);
  border-radius: var(--radius);
  display: none;
}
.eligibility__result.is-visible { display: block; }
.eligibility__result h4 {
  color: var(--gold-500);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 500;
}
.eligibility__verdict {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 10px;
  line-height: 1.3;
  color: var(--sand-50);
}
.eligibility__verdict em { color: var(--gold-500); font-style: italic; }
.eligibility__result p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--sand-200);
  margin: 0;
}
.eligibility__result a {
  color: var(--gold-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.eligibility__result a:hover { color: var(--sand-50); }

/* ── Inline CTA strip ─────────────────────────────────────── */
.article-cta {
  max-width: var(--container-narrow);
  margin: 56px auto 0;
  padding: 36px 32px;
  background: linear-gradient(135deg, var(--forest-800) 0%, var(--forest-700) 100%);
  color: var(--sand-50);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
.article-cta__zh {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--gold-500);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.article-cta h2 {
  color: var(--sand-50);
  font-size: clamp(22px, 2.6vw, 30px);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}
.article-cta p { color: var(--sand-200); font-size: 15px; margin: 0; line-height: 1.6; }
.article-cta__action {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.article-cta__action .btn { width: 100%; justify-content: center; }
.article-cta__hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--sand-200);
}
@media (max-width: 720px) {
  .article-cta { grid-template-columns: 1fr; padding: 28px 24px; gap: 22px; }
}

/* ── Related (hub-and-spoke) ──────────────────────────────── */
.article-related {
  margin: 56px auto 0;
  max-width: var(--container-narrow);
  padding: 0 28px;
}
.article-related h2 {
  font-size: clamp(24px, 2.6vw, 30px);
  margin-bottom: 22px;
  color: var(--forest-900);
}
.article-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ── Article FAQ (uses .faq classes, but tweaked for inline body) */
.article-faq {
  margin: 2em auto;
  max-width: 68ch;
}
.article-faq h2 { margin-bottom: 18px; }

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 720px) {
  .article-head { padding: calc(var(--nav-height) + 28px) 0 28px; }
  .article-hero { margin: 24px auto 36px; border-radius: var(--radius); }
  .article-body { padding: 0 22px; }
  .article-body > p,
  .article-body > ul,
  .article-body > ol { font-size: 16px; }
  .blog-hero { padding: calc(var(--nav-height) + 40px) 0 36px; }
}
