/* 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 ---------------------------------------------------- */
/* 27 Sep 2026: article H2s were Source Sans 3 24px while every other page
   sets Fraunces. styles.css owns `.article-body h2`, so these body-prefixed
   selectors win on specificity without editing the shared sheet. H3 sits
   clearly between the Fraunces H2 and the body text. */
body .article-body h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 29px;
  font-weight: 500;
  color: #232A31;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
body .article-body h3 {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #232A31;
  letter-spacing: -0.005em;
  margin: 36px 0 12px;
  line-height: 1.35;
}
@media (max-width: 640px) {
  .article-body p,
  .article-body li {
    font-size: 17px;
  }
  .article-body h2 {
    margin-top: 40px;
  }
  body .article-body h2 { font-size: 24px; }
  body .article-body h3 { font-size: 19px; }
}

/* 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: 'Source Sans 3', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  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: 'Source Sans 3', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  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: 'Source Sans 3', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  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; }
}

/* ---- Problem picker hero (Kristian, 26 Sep 2026) -------------------------
   Static: no load animation, no Replay. Hover and press only. The homepage
   owns the pain descriptions and the "where every pound goes" visual. */
.bi-hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .bi-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; } }
.bi-page .bi-hero::after { display: none; }
.bi-pick { padding: 26px 16px 16px; border-radius: 20px; background: #232A31; color: #FAFAF8; }
.bi-pick__head { margin: 0 12px 12px; font: 600 14px/1.3 'Source Sans 3', system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #AFC4DD; }
.bi-pick__list { display: grid; gap: 2px; }
.bi-pick .bi-pick__row { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; width: 100%; min-height: 50px; margin: 0; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #FAFAF8; font: 600 16px/1.25 'Source Sans 3', system-ui, sans-serif; text-align: left; cursor: pointer; position: relative; transition: background-color .2s cubic-bezier(.2,.8,.2,1); }
.bi-pick .bi-pick__row::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: #AFC4DD; transform: scaleY(0); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.bi-pick .bi-pick__row--all { margin-top: 8px; border-top: 1px solid rgba(250, 250, 248, 0.14); border-radius: 0 0 10px 10px; font-weight: 400; color: #AFC4DD; }
.bi-pick .bi-pick__row.is-active, .bi-pick .bi-pick__row[aria-pressed="true"] { background: rgba(175, 196, 221, 0.16); }
.bi-pick .bi-pick__row.is-active::before { transform: scaleY(1); }
.bi-pick__count { font: 500 11px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .06em; color: #AFC4DD; opacity: .8; }
.bi-pick__arrow svg { display: block; width: 14px; height: 14px; fill: none; stroke: #AFC4DD; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) and (pointer: fine) {
  .bi-pick .bi-pick__row:hover { background: rgba(250, 250, 248, 0.07); color: #FAFAF8; }
  .bi-pick .bi-pick__row.is-active:hover { background: rgba(175, 196, 221, 0.2); }
  .bi-pick .bi-pick__row--all:hover { color: #AFC4DD; }
  .bi-pick .bi-pick__row:hover .bi-pick__arrow svg { transform: translateY(2px); }
}
.bi-pick .bi-pick__row:focus-visible { outline: 2px solid #AFC4DD; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .bi-pick .bi-pick__row, .bi-pick .bi-pick__row::before, .bi-pick__arrow svg { transition: none; } }
@media (max-width: 640px) { .bi-pick { padding: 20px 8px 10px; } .bi-pick .bi-pick__row { font-size: 15px; min-height: 46px; } }

/* Toolbox Talk promo replaces the weekly newsletter box (Kristian, 27 Sep 2026). */
@media (min-width: 1024px) { .bi-subscribe__cta { display: flex; justify-content: flex-end; } }

/* ---- Labels and the read-next heading (27 Sep 2026) ----------------------
   Kristian: tracked capitals "look very flat" and read as an AI tell. Every
   field, meta and caption label on these pages drops to Source Sans 3
   semibold, sentence case, no tracking. IBM Plex Mono stays for figures
   only (the problem-picker counts). styles.css owns these classes, so the
   overrides are body-prefixed to win on specificity. "Relevant next step"
   was an H2 rendered at 11px tracked mono: it becomes a real heading. */
body .article-hero__back,
body .article-hero__meta,
body .article-scorecard caption,
body .insight-card__for,
body .insight-card__meta {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
body .article-hero__back { font-size: 14px; }
body .article-hero__meta { font-size: 14px; font-weight: 400; }
body .article-scorecard caption { font-size: 14px; }
body .insight-card__for { font-size: 13px; }
body .insight-card__meta { font-size: 13px; font-weight: 400; }
body .insight-card__cat { font-weight: 600; }

body .art-next__h {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-transform: none;
  color: #232A31;
}

/* ---- Press and focus states, hover movement behind the pointer guard ----
   styles.css moves .insights-load-more on plain :hover, which sticks on a
   touch screen. Neutralise it there and re-apply for real pointers only. */
.bi-page .insights-load-more:hover,
.bi-page .insights-load-more:hover .insights-load-more__arrow { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .bi-page .insights-load-more:hover { transform: translateY(-1px); }
  .bi-page .insights-load-more:hover .insights-load-more__arrow { transform: translateY(2px); }
}
.bi-page .insights-load-more:active { transform: translateY(1px); }
.bi-page .insights-load-more:disabled { opacity: .45; cursor: not-allowed; }
.bi-page .insights-load-more:disabled:hover { background: transparent; color: #232A31; transform: none; }
.bi-page .filter-chip:active { transform: translateY(1px); }
.bi-page .filter-chip:disabled { opacity: .45; cursor: not-allowed; }
.bi-pick .bi-pick__row:active { transform: translateY(1px); }
.bi-pick .bi-pick__row:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  .bi-page .insights-load-more,
  .bi-page .insights-load-more__arrow,
  .bi-page .filter-chip { transition: none; }
  .bi-page .insights-load-more:active,
  .bi-page .insights-load-more:hover,
  .bi-page .filter-chip:active,
  .bi-pick .bi-pick__row:active { transform: none; }
}

/* These three labels are <p> elements inside .article-body, so they need to
   out-specify `.article-body p` to keep label size rather than body size. */
.article-body .article-table-hint,
.article-body .article-toc__h,
.article-body .bl-illustrative { font-size: 14px; line-height: 1.4; }
.article-body .bl-illustrative { font-size: 13px; }
body .insight-card__for { line-height: 1.2; }
