/*
  Feature-article components for individual blog posts.
  Everything is scoped under .zw-feature, so a post that does not use that
  wrapper is unaffected. Uses the site palette and the fonts each post page
  already loads (Aboreto, Arapey, Lato). No JavaScript.
*/

.zw-feature {
  --zw-cream: #f9f5f1;
  --zw-paper: #f3ede5;
  --zw-ink: #03110d;
  --zw-ink-soft: #3a4a43;
  --zw-muted: #6f6a60;
  --zw-forest: #0a291a;
  --zw-brand: #1a3d2b;
  --zw-bronze: #594536;
  --zw-sand: #c9af8e;
  --zw-line: #e2d8ca;
  font-size: var(--text-body, clamp(1.125rem, 1.5vw, 1.25rem));
  line-height: 1.75;
  color: var(--zw-ink);
  font-family: "Lato", sans-serif;
}

.zw-feature *,
.zw-feature *::before,
.zw-feature *::after { box-sizing: border-box; }

/* Hero image */
.zw-feature .zw-hero {
  margin: 0 0 32px;
}
.zw-feature .zw-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0;
}
.zw-feature .zw-hero figcaption {
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--zw-muted);
}

/* Dek */
.zw-feature .zw-dek {
  font-family: "Arapey", Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.45;
  color: var(--zw-bronze);
  margin: 0 0 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--zw-line);
  white-space: normal;
}

/* At-a-glance tiles */
.zw-feature .zw-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--zw-line);
  border: 1px solid var(--zw-line);
  margin: 0 0 40px;
}
.zw-feature .zw-glance-tile {
  background: var(--zw-paper);
  padding: 22px 16px 20px;
  text-align: center;
}
.zw-feature .zw-glance-num {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.1;
  color: var(--zw-forest);
  letter-spacing: 0.01em;
}
.zw-feature .zw-glance-label {
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--zw-ink-soft);
}

/* Body copy */
.zw-feature p { white-space: normal; font-size: inherit; line-height: 1.75; }
.zw-feature h3 { font-family: "Aboreto", serif; font-weight: 400; font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.4; letter-spacing: 0.04em; }
.zw-feature .zw-lede { font-size: 1.08em; }

/* Pull quote */
.zw-feature blockquote.zw-pull {
  margin: 40px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--zw-sand);
  font-family: "Arapey", Georgia, serif;
  font-style: italic;
  font-size: clamp(21px, 2.6vw, 26px);
  line-height: 1.4;
  color: var(--zw-forest);
  max-width: 52ch;
}

/* Chart panels */
.zw-feature .zw-panel {
  background: var(--zw-paper);
  border: 1px solid var(--zw-line);
  padding: 28px 26px 22px;
  margin: 36px 0 32px;
}
.zw-feature .zw-panel-title {
  font-family: "Aboreto", serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--zw-forest);
  margin: 0 0 4px;
}
.zw-feature .zw-panel-sub {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zw-muted);
  margin: 0 0 20px;
}
.zw-feature .zw-panel-caption {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--zw-muted);
  margin: 16px 0 0;
}
.zw-feature .zw-fig {
  display: block;
  width: 100%;
  height: auto;
}
.zw-feature .zw-fig text {
  letter-spacing: 0;
  font-family: "Lato", sans-serif;
  font-variant-numeric: tabular-nums;
}

/* Two scenario cards */
.zw-feature .zw-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 36px;
}
.zw-feature .zw-path {
  background: var(--zw-paper);
  border: 1px solid var(--zw-line);
  padding: 22px 22px 18px;
}
.zw-feature .zw-path--up { border-top: 3px solid var(--zw-bronze); }
.zw-feature .zw-path--down { border-top: 3px solid var(--zw-brand); }
.zw-feature .zw-path-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--zw-muted);
  margin: 0;
}
.zw-feature .zw-path-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  line-height: 1.15;
  margin: 8px 0 8px;
}
.zw-feature .zw-path--up .zw-path-value { color: var(--zw-bronze); }
.zw-feature .zw-path--down .zw-path-value { color: var(--zw-brand); }
.zw-feature .zw-path-desc {
  font-size: var(--text-body, clamp(1.125rem, 1.5vw, 1.25rem));
  line-height: 1.55;
  color: var(--zw-ink-soft);
  margin: 0;
}

/* Closing call to action */
.zw-feature .zw-cta {
  margin: 52px 0 0;
  background: var(--zw-forest);
  color: var(--zw-cream);
  padding: 36px 32px;
}
.zw-feature .zw-cta-title {
  font-family: "Aboreto", serif;
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--zw-cream);
  margin: 0 0 12px;
}
.zw-feature .zw-cta p {
  color: var(--zw-cream);
  opacity: 0.92;
  margin: 0 0 20px;
  max-width: 48ch;
}
.zw-feature .zw-cta a {
  color: var(--zw-sand);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.zw-feature .zw-cta .zw-sign {
  font-family: "Arapey", Georgia, serif;
  font-style: italic;
  margin: 22px 0 0;
  opacity: 0.85;
}

/* Sources */
.zw-feature .zw-sources {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--zw-line);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--zw-muted);
}

@media (max-width: 640px) {
  .zw-feature .zw-glance { grid-template-columns: 1fr; }
  .zw-feature .zw-paths { grid-template-columns: 1fr; }
  .zw-feature .zw-panel { padding: 22px 16px 18px; }
  .zw-feature .zw-cta { padding: 28px 22px; }
}

/* Editable chart labels remain readable; charts may scroll on small screens. */
.zw-chart-scroll { overflow-x: auto; margin: 1rem 0; }
.zw-chart-scroll .zw-fig { min-width: 960px; }
