/* ──────────────────────────────────────────────
   INSIGHT ARTICLE PAGE
   Path: /insights/:slug
   Reference: prototype `.insight-page`
   ────────────────────────────────────────────── */

.screen--insight { display: none; }
/* The footer-bar sits in normal document flow after #app (Task #718),
   so the article needs no footer clearance — the editorial flow simply
   ends above the in-flow footer. */
.screen--insight.active {
  display: block;
}

/* Single scroll surface: the page scrolls at document level (like the
   legal/brief screens) — no inner fixed-height scroller, so visitors
   never see a scrollbar inside a scrollbar (Task #615/#616). */
.insight-scroll {
  background: var(--ink);
  color: var(--text);
}

/* Canonical broad-page shell (Task #671): the article chrome (back
   link, hero, related, end CTA) aligns to the same 1280px grid and
   gutters as the rest of the site; the body keeps its narrower
   reading measure *inside* the shell. */
.insight-doc {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-20) var(--sp-12) var(--sp-20);
}
@media (max-width: 767px) {
  .insight-doc {
    padding: var(--sp-14) var(--sp-5) var(--sp-14);
  }
}

/* Back-to-index link, top-left of the article. Mirrors the case
   page's `.case-page__back` chrome (DM Sans, 13px, --text-faint,
   hover --text) so the two surfaces feel like one product. */
.insight-back {
  margin: 0 0 var(--sp-10);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-body);
  text-transform: uppercase;
}
.insight-back a {
  color: var(--be-text-muted, rgba(255,255,255,0.6));
  text-decoration: none;
  transition: color .15s var(--ease);
}
.insight-back a:hover { color: var(--be-yellow); }
.insight-back a:focus-visible {
  outline: 2px solid var(--be-yellow);
  outline-offset: 4px;
}

.insight-hero {
  padding: 0 0 var(--sp-16);
}
/* .insight-eyebrow composes with the .eyebrow primitive in main.css.
   Per-page deltas: yellow color, wrapping, and a tighter bottom margin. */
.insight-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  color: var(--be-yellow);
  margin-bottom: var(--sp-6);
}
/* Editorial-page hero headlines use DM Sans weight 300 (the serif
   token), matching /insights index, /about and /ai-ops. Display
   weight 900 is reserved for case-study client names + hero metrics.
   Task #488 Phase 3. */
.insight-title {
  font-family: var(--serif);
  font-weight: var(--fw-light);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-headline);
  margin: 0 0 var(--sp-8);
  color: var(--white);
}
.insight-title em {
  font-style: italic;
  font-weight: var(--fw-light);
  color: var(--be-yellow);
}
.insight-dek {
  font-family: var(--serif);
  font-weight: var(--fw-light);
  font-size: var(--fs-h2);
  line-height: var(--lh-base);
  color: var(--text-mute);
  margin: 0 0 var(--sp-12);
}
/* Article and authored accent links use the shared dark-prose recipe
   in chat.css, alongside message links, insight panels and toggles. */
.insight-body {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-16) 0 var(--sp-20);
}
/* Insight article body — DM Sans 17px / 400 / 1.7 per task #534.
   The previous editorial 22px body (canonical spec at the time
   of Task #527) is intentionally flipped to sans here so the inside
   pages read as DM Sans throughout. Hero title + eyebrows still use
   their existing serif/mono treatments. */
.insight-body p {
  font-family: var(--sans);
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--text);
  margin: 0 0 var(--sp-6);
}
.insight-body p:first-child::first-letter {
  font-family: var(--display);
  font-weight: var(--fw-display);
  float: left;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  padding-right: var(--sp-3);
  padding-top: 6px;
  color: var(--be-yellow);
}
.insight-body h2 {
  font-family: var(--serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h1);
  letter-spacing: var(--ls-headline);
  line-height: var(--lh-snug);
  margin: var(--sp-12) 0 var(--sp-5);
  color: var(--text);
}
.insight-body blockquote {
  margin: var(--sp-12) -48px;
  padding: var(--sp-8) var(--sp-12);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--serif);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: var(--fs-h2);
  line-height: var(--lh-base);
  letter-spacing: var(--ls-body);
  color: var(--be-yellow);
}
.insight-body blockquote cite {
  display: block;
  margin-top: var(--sp-4);
  font-family: var(--mono);
  font-style: normal;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  color: var(--text-faint);
}

.insight-endcta {
  margin: var(--sp-6) 0 0;
  padding: var(--sp-16) 0 var(--sp-20);
  text-align: left;
}
.insight-endcta__eyebrow {
  /* Section-intro tier (Task #541) — Insights end-CTA opener.
     Switched from DM Mono to DM Sans (Task #570) so the shared
     end-CTA eyebrow matches the rest of the band; letter-spacing
     tightened from --ls-caps-section to --ls-nav since the wider
     mono tracking looks too loose on a sans face. */
  font-family: var(--sans);
  font-size: var(--fs-eyebrow-section);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  color: var(--be-yellow);
  margin-bottom: var(--sp-5);
}
.insight-endcta__title {
  font-family: var(--serif);
  font-weight: var(--fw-light);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-headline);
  margin: 0 0 var(--sp-5);
  color: var(--text);
}
.insight-endcta__title em {
  font-style: italic;
  color: var(--be-yellow);
  font-weight: var(--fw-regular);
}
.insight-endcta__lede {
  /* DM Sans for the lede so the body copy in the shared end-CTA
     matches the rest of the site's body type (design feedback,
     May 2026). Serif is reserved for the title above. */
  font-family: var(--sans);
  font-size: var(--fs-h3);
  line-height: var(--lh-base);
  color: var(--text-mute);
  margin: 0 0 var(--sp-8);
}
.insight-endcta__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--be-yellow);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  border: none;
  border-radius: var(--r-full);
  padding: 14px var(--sp-6);
  cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.insight-endcta__btn:hover {
  background: var(--white);
  transform: translateY(-1px);
}

/* Related reading — 2–3 cards rendered above the end-CTA when
   pillar/tag matches exist. Hidden entirely when none. Mirrors the
   featured-row card pattern from /insights so the two surfaces feel
   continuous. */
.insight-related {
  padding: var(--sp-16) 0 0;
  border-top: 1px solid var(--ink-line);
}
.insight-related-label {
  margin-bottom: var(--sp-6);
  color: var(--be-yellow);
}
.insight-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}
.insight-related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--sp-5);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.insight-related-card:hover {
  border-color: var(--paper, var(--text));
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}
.insight-related-card:focus-visible {
  outline: 2px solid var(--be-yellow);
  outline-offset: 3px;
}
.insight-related-card__pillar {
  color: var(--text-faint);
}
.insight-related-card__title {
  font-family: var(--serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-body);
  margin: 0;
  color: var(--text);
}
.insight-related-card__deck {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  line-height: var(--lh-base);
  color: var(--text-mute);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1023px) {
  /* Horizontal gutters now come from the .insight-doc shell. */
  .insight-body blockquote { margin: var(--sp-8) -20px; padding: var(--sp-6); }
  .insight-related-grid { grid-template-columns: 1fr; }
}
