/* Built Logic — insights reading layer (11 Sep 2026).
   Loaded only by the pages under /insights. Adds the reading measure, heading
   rhythm, table scroll affordance, in-page contents list and illustrative
   calculation labels asked for in the UI/UX handoff section 5G. Palette and
   type families are the locked design.md set: no new colours, no new families,
   no gradients, shadows, blur or motion. */

:root {
  --bl-measure: 68ch;
}

/* ---- Reading measure (55–75ch target) ---------------------------------- */
.article-body p,
.article-body li,
.article-body blockquote,
.article-body h2,
.article-body h3 {
  max-width: var(--bl-measure);
}
.article-body ul,
.article-body ol {
  max-width: calc(var(--bl-measure) + 24px);
}
.article-hero__lead {
  max-width: var(--bl-measure);
}

/* ---- Heading rhythm ---------------------------------------------------- */
.article-body h3 {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #232A31;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
  line-height: 1.3;
}
@media (max-width: 640px) {
  .article-body p,
  .article-body li {
    font-size: 17px;
  }
  .article-body h2 {
    font-size: 22px;
    margin-top: 40px;
  }
}

/* Anchored headings land clear of the fixed header */
.article-body h2[id] {
  scroll-margin-top: 112px;
}

/* ---- Wide tables: visible hint for the existing labelled scroll region -- */
.article-table-hint {
  margin: 0 0 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #586069;
}
@media (min-width: 760px) {
  .article-table-hint { display: none; }
}
@media (max-width: 640px) {
  .article-scorecard th,
  .article-scorecard td { padding: 12px 14px; }
}

/* ---- In-page contents (long comparison articles only) ------------------ */
.article-toc {
  margin: 0 0 44px;
  padding: 18px 22px 10px;
  max-width: var(--bl-measure);
  border: 1px solid #E5E5E2;
  border-left: 3px solid #1B3A5B;
  background: #FAFAF8;
}
.article-toc__h {
  margin: 0 0 6px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #586069;
}
.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: none;
}
.article-toc li {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  border-top: 1px solid #E5E5E2;
}
.article-toc li:first-child { border-top: 0; }
.article-toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  color: #1B3A5B;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  text-decoration: none;
  border-bottom: 0;
  transition: color .16s ease;
}
.article-toc a:hover { color: #17314D; text-decoration: underline; }
.article-toc a:focus-visible { outline: 2px solid #1B3A5B; outline-offset: 3px; }

/* ---- Illustrative calculation label and shared note -------------------- */
.bl-illustrative {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 9px;
  border: 1px solid #1B3A5B;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1B3A5B;
}
.bl-illustrative-note {
  max-width: var(--bl-measure);
  margin: 12px 0 26px;
  padding-left: 14px;
  border-left: 1px solid #E5E5E2;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #586069;
}

/* ---- Source notes beneath a legal or statistical passage --------------- */
.article-sources {
  max-width: var(--bl-measure);
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.7;
  color: #586069;
  font-family: 'Source Sans 3', system-ui, sans-serif;
}

/* ---- Blog index -------------------------------------------------------- */
.blog-hero__intro {
  max-width: 620px;
  margin: 26px 0 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #586069;
}
/* The empty-results reset control needs a visible keyboard focus state. */
.insights-empty__link:focus-visible {
  outline: 2px solid #1B3A5B;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Blog index refresh (25 Sep 2026) ---------------------------------- */
/* Rules: 03_Marketing/Website/website-refresh-rules.md. Scoped to the index
   (body.bi-page) so the article pages are untouched. The empty "No" marker
   left over from the numbered cards is gone. Hover lifts only on real
   pointers, so they cannot stick on touch screens. */
.bi-hero::before { content: ''; position: absolute; z-index: 0; right: -8vw; top: 20px; width: min(44vw, 620px); aspect-ratio: 1; border-radius: 50%; background: rgba(175, 196, 221, 0.28); pointer-events: none; }
.bi-hero::after { content: ''; position: absolute; z-index: 0; right: 3vw; top: 150px; width: min(24vw, 340px); height: min(16vw, 220px); border-radius: 28px; background-image: radial-gradient(#1B3A5B 1.3px, transparent 1.6px); background-size: 16px 16px; opacity: .3; pointer-events: none; }
.bi-hero > * { z-index: 1; }
.bi-page .blog-hero__note { display: flex; align-items: center; gap: 14px; max-width: 620px; margin-top: 30px; padding: 14px 18px; border: 0; border-radius: 16px; background: rgba(175, 196, 221, 0.3); color: #232A31; font-size: 15px; line-height: 1.55; }
.bi-note__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: #1B3A5B; color: #FAFAF8; }
.bi-note__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.bi-page .insights-filter-bar { background: transparent; border: 0; }
.bi-page .filter-chip { font-size: 14px; font-weight: 600; padding: 8px 18px; }
.bi-page .filter-chip:hover { background: #FAFAF8; border-color: #232A31; }
.bi-page .filter-chip.is-active:hover { background: #232A31; }

.bi-page .insight-card { border-color: rgba(35, 42, 49, 0.1); border-radius: 18px; transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 250ms ease, border-color 250ms ease; }
.bi-page .insight-card::before { content: ''; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 4px; background: #1B3A5B; transform: scaleX(0); transform-origin: left; transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1); }
.bi-page .insight-card:hover { transform: none; box-shadow: none; border-color: rgba(35, 42, 49, 0.1); }
.bi-page .insight-card__index,
.bi-page .insight-card:hover .insight-card__index { margin: 0; padding: 26px 0 0; background: none; border: 0; font-size: 0; }
.bi-page .insight-card__index::before { content: none; }
.bi-page .insight-card__for { margin-left: 0; padding: 5px 11px; background: rgba(175, 196, 221, 0.45); color: #1B3A5B; }
.bi-page .insight-card__meta { margin-top: 14px; }
.bi-page .insight-card__cta { border-top-color: #E5E5E2; }
.bi-page .insight-card__arrow { background: rgba(175, 196, 221, 0.45); color: #1B3A5B; }
@media (hover: hover) and (pointer: fine) {
  .bi-page .insight-card:hover { transform: translateY(-6px); box-shadow: none; border-color: rgba(27, 58, 91, 0.2); }
  .bi-page .insight-card:hover::before { transform: scaleX(1); }
  .bi-page .insight-card:hover .insight-card__arrow { background: #1B3A5B; color: #FAFAF8; transform: translateX(3px); }
}
@media (hover: none) { .bi-page .insight-card:hover .insight-card__arrow { background: rgba(175, 196, 221, 0.45); color: #1B3A5B; transform: none; } }
.bi-page .insights-filter-bar + section > div { padding-top: 28px; }

.bi-subscribe__sheet { padding: clamp(28px, 4vw, 56px); border-radius: clamp(20px, 3vw, 36px); background: rgba(175, 196, 221, 0.18); }

@media (max-width: 760px) {
  .bi-hero::before { width: 90vw; right: -45vw; top: auto; bottom: -10%; }
  .bi-hero::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bi-page .insight-card, .bi-page .insight-card::before { transition: border-color 200ms ease; }
  .bi-page .insight-card:hover { transform: none; }
}
