/* ============================================================
   blog-v2.css — SAM Insights (blog landing + article layer)
   Additive: loads after blog.min.css and blog-article.css.
   Scope: .Insights (landing, category) and .Article (post page).
   Rollback: remove the <link> and restore the three Blade views.
   ============================================================ */

:root {
  --ix-ink: #16171d;
  --ix-ink-2: #3d3f48;
  --ix-muted: #6b6e78;
  --ix-rule: #e6e6ea;
  --ix-rule-2: #f1f1f3;
  --ix-red: #a40000;
  --ix-red-2: #7d0000;
  --ix-tint: #faf5f5;
  --ix-wrap: 1180px;
  --ix-measure: 740px;
  --ix-rail: 200px;
  --ix-gap: 48px;
  --ix-radius: 10px;
  --ix-font: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.Insights, .Article { font-family: var(--ix-font); color: var(--ix-ink); }
.Insights a, .Article a { text-decoration: none; }
.ix-wrap { max-width: var(--ix-wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- shared atoms ---------- */
.ix-kicker { position: relative; z-index: 2; display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ix-red) !important; }
.ix-kicker:hover { color: var(--ix-red-2) !important; text-decoration: underline; text-underline-offset: 3px; }
.ix-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13.5px; color: var(--ix-muted); }
.ix-meta > * + *::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin-right: 10px; vertical-align: middle; opacity: .7; }
.ix-meta b { font-weight: 600; color: var(--ix-ink-2); }
.ix-meta-when { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ix-meta-when > * + *::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin-right: 10px; vertical-align: middle; opacity: .7; }
.ix-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-right: 8px; vertical-align: middle; }
.ix-label { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 8px; border-bottom: 2px solid var(--ix-ink); }
.ix-label h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; text-transform: none; }
.ix-more { font-size: 14px; font-weight: 600; color: var(--ix-red) !important; white-space: nowrap; }
.ix-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.ix-media { position: relative; display: block; overflow: hidden; border-radius: var(--ix-radius); background: var(--ix-rule-2); }
.ix-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(22, 23, 29, .08); pointer-events: none; }
.ix-media img, .ix-media picture { display: block; width: 100%; height: 100%; object-fit: cover; }
.ix-media img { transition: transform .5s ease; }
.ix-story:hover .ix-media img { transform: scale(1.02); }

/* stretched link: the whole story is clickable, the category link stays on top */
.ix-story { position: relative; }
.ix-story .ix-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ix-title a { color: var(--ix-ink) !important; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s ease; }
.ix-story:hover .ix-title a { background-size: 100% 1px; }
.ix-story a:focus-visible, .Insights a:focus-visible, .Article a:focus-visible, .Article summary:focus-visible { outline: 2px solid var(--ix-red); outline-offset: 3px; border-radius: 4px; }

/* ============================ LANDING ============================ */
.Insights-head { padding-top: 28px; padding-bottom: 8px; }
.ix-crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--ix-muted); margin: 0 0 22px; padding: 0; list-style: none; }
.ix-crumbs li + li::before { content: "/"; margin-right: 8px; color: #b9bbc2; }
.ix-crumbs a { color: var(--ix-muted) !important; }
.Insights-title { margin: 0; font-size: clamp(36px, 4.2vw, 52px); line-height: 1.05; font-weight: 700; letter-spacing: -.025em; text-transform: none; }
.Insights-deck { margin: 12px 0 0; max-width: 640px; font-size: 18px; line-height: 1.55; color: var(--ix-ink-2); }

.TopicNav { position: relative; margin-top: 28px; border-bottom: 1px solid var(--ix-rule); }
.TopicNav ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.TopicNav ul::-webkit-scrollbar { display: none; }
.TopicNav a { display: block; padding: 14px 0 13px; font-size: 15px; font-weight: 500; color: var(--ix-muted) !important; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.TopicNav a:hover { color: var(--ix-ink) !important; }
.TopicNav a[aria-current="page"] { color: var(--ix-ink) !important; font-weight: 600; border-bottom-color: var(--ix-red); }

/* lead story + two supporting */
.Lead { padding-top: 36px; }
.LeadStory { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.LeadStory .ix-media { aspect-ratio: 2 / 1; }
.LeadStory-title { margin: 12px 0 0; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-transform: none; }
.LeadStory-dek { margin: 14px 0 18px; font-size: 16.5px; line-height: 1.6; color: var(--ix-ink-2); }
.Lead-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--ix-rule); }
.SubStory { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.SubStory .ix-media { aspect-ratio: 2 / 1; }
.SubStory-title { margin: 8px 0 8px; font-size: 18px; line-height: 1.35; font-weight: 600; text-transform: none; }

/* latest stream */
.Stream-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding-top: 64px; }
.Stream ol { margin: 0; padding: 0; list-style: none; }
.StreamItem { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--ix-rule); }
.StreamItem:last-child { border-bottom: 0; }
.StreamItem .ix-media { aspect-ratio: 2 / 1; align-self: start; }
.StreamItem-title { margin: 8px 0 6px; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; text-transform: none; }
.StreamItem-dek { margin: 0 0 10px; font-size: 15px; line-height: 1.55; color: var(--ix-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.Stream-aside { align-self: start; position: sticky; top: 24px; padding-top: 4px; }
.Stream-aside h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ix-muted); }
.Stream-aside ul { margin: 0 0 28px; padding: 0; list-style: none; }
.Stream-aside li a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ix-rule-2); font-size: 15px; font-weight: 500; color: var(--ix-ink) !important; }
.Stream-aside li a span { color: var(--ix-muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.Stream-aside li a:hover { color: var(--ix-red) !important; }
.Stream-about { padding: 20px; border-radius: var(--ix-radius); background: var(--ix-tint); font-size: 14.5px; line-height: 1.6; color: var(--ix-ink-2); }
.Stream-about p { margin: 0 0 10px; }
.Stream-about-slot { display: none; }

/* category desks — one language, three arrangements */
.Desk { padding-top: 72px; }
.Desk-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; padding-top: 20px; }
.Desk--flip .Desk-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.Desk--flip .DeskLead { order: 2; }
.DeskLead .ix-media { aspect-ratio: 2 / 1; margin-bottom: 16px; }
.DeskLead-title { margin: 10px 0 8px; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; text-transform: none; }
.DeskLead-dek { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; color: var(--ix-ink-2); }
.DeskList { margin: 0; padding: 0; list-style: none; }
.DeskList li { padding: 18px 0; border-bottom: 1px solid var(--ix-rule); }
.DeskList li:first-child { padding-top: 0; }
.DeskList-title { margin: 6px 0 6px; font-size: 17.5px; line-height: 1.38; font-weight: 600; text-transform: none; }
.Desk--row .Desk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.Desk--row .ix-media { aspect-ratio: 2 / 1; margin-bottom: 14px; }
.Desk--row .DeskList-title { font-size: 18px; }
.Desk-links { display: flex; gap: 20px; }

/* ============================ ARTICLE ============================ */
.Article { padding-bottom: 72px; }
.Article .ix-crumbs { padding-top: 24px; margin-bottom: 0; }
.ArticleHead, .ArticleHero, .ArticleLayout { max-width: var(--ix-measure); margin-left: auto; margin-right: auto; }
.ArticleHead { padding: 36px 24px 0; box-sizing: content-box; }
.ArticleHead h1 { margin: 14px 0 0; max-width: 960px; font-size: clamp(34px, 4.3vw, 54px); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; text-transform: none; text-wrap: balance; }
.ArticleHead-dek { margin: 18px 0 0; max-width: var(--ix-measure); font-size: 19px; line-height: 1.6; color: var(--ix-ink-2); }
.ArticleHead .ix-meta { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ix-rule); font-size: 14px; }
.ArticleHead .ix-avatar { width: 40px; height: 40px; }
.ArticleHead-author { display: inline-flex; align-items: center; }
.ArticleHead-author a { color: var(--ix-ink) !important; font-weight: 600; }
.ArticleHead-role { color: var(--ix-muted); font-weight: 400; margin-left: 6px; }
.ArticleHero { margin-top: 32px; padding: 0 24px; box-sizing: content-box; }
.ArticleHero img, .ArticleHero picture { display: block; width: 100%; height: auto; border-radius: 12px; }

.ArticleLayout { display: grid; grid-template-columns: minmax(0, var(--ix-measure)); justify-content: center; padding: 0 24px; box-sizing: content-box; margin-top: 40px; }
.ArticleToc { display: none; }
.ArticleToc-mobile { margin: 0 0 32px; border: 1px solid var(--ix-rule); border-radius: var(--ix-radius); }
.ArticleToc-mobile summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-size: 15px; font-weight: 600; }
.ArticleToc-mobile summary::-webkit-details-marker { display: none; }
.ArticleToc-mobile summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ix-muted); border-bottom: 2px solid var(--ix-muted); transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
.ArticleToc-mobile[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.ArticleToc-mobile ol { margin: 0; padding: 0 18px 14px 36px; }
.ArticleToc-mobile li { padding: 5px 0; font-size: 15px; line-height: 1.45; }
.ArticleToc-mobile a { color: var(--ix-ink-2) !important; }

/* body: the column itself is the measure, so every section is capped — not just direct children */
.Article .CmsPage { font-size: 18px; line-height: 1.75; color: var(--ix-ink); }
.Article .CmsPage p, .Article .CmsPage ul, .Article .CmsPage ol, .Article .CmsPage h2, .Article .CmsPage h3 { max-width: none; }
.Article .CmsPage > p:first-child { font-size: 20px; line-height: 1.65; color: var(--ix-ink); }
.Article .CmsPage p { margin: 0 0 1.25em; }
.Article .CmsPage li { margin-bottom: .45em; }
.Article .CmsPage h2 { font-size: clamp(26px, 2.4vw, 31px); line-height: 1.22; letter-spacing: -.015em; margin: 2.4em 0 .7em; padding-top: 0; border-top: 0; scroll-margin-top: 96px; }
.Article .CmsPage h3 { font-size: 21px; line-height: 1.35; margin: 1.9em 0 .5em; }
.Article .CmsPage [id^="toc"] { scroll-margin-top: 96px; }
.Article .CmsPage hr { height: 0; border: 0; border-top: 1px solid var(--ix-rule); margin: 3em 0 0; opacity: 1; }
.Article .CmsPage [id^="toc"]:has(> hr:last-child) + [id^="toc"] > h2:first-child { margin-top: 2em; }
/* older posts without <hr> keep a rule above each H2 */
.Article .CmsPage [id^="toc"]:not(:has(> hr)) + [id^="toc"] > h2:first-child { padding-top: 1.6em; border-top: 1px solid var(--ix-rule); }
.Article .CmsPage figure { margin: 2.6em 0; }
.Article .CmsPage figure img { width: 100%; height: auto; border: 1px solid var(--ix-rule); border-radius: 8px; display: block; }
.Article .CmsPage figcaption { margin-top: .8em; font-size: 14px; line-height: 1.5; color: var(--ix-muted); text-align: left; }
.Article .CmsPage blockquote { margin: 2.2em 0; padding: 22px 26px; background: var(--ix-tint); border-left: 3px solid var(--ix-red); border-radius: 0 8px 8px 0; }
.Article .CmsPage blockquote h3 { margin: 0 0 .4em; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ix-red); }
.Article .CmsPage blockquote p:last-child { margin-bottom: 0; }

/* tables: restrained editorial treatment */
.Article .CmsPage table { width: 100%; margin: 2em 0; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.Article .CmsPage thead th { text-align: left; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ix-muted); padding: 0 16px 12px 0; border-bottom: 2px solid var(--ix-ink); }
.Article .CmsPage tbody td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--ix-rule); vertical-align: top; }
.Article .CmsPage tbody td:first-child { font-weight: 600; color: var(--ix-ink); width: 24%; }

/* end matter */
.ArticleEnd { margin-top: 56px; }
.ArticleEnd .ix-label { margin-top: 56px; }
.MiniList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 20px 0 0; list-style: none; }
.MiniList .ix-media { aspect-ratio: 2 / 1; margin-bottom: 12px; }
.MiniList-title { margin: 6px 0 6px; font-size: 17px; line-height: 1.38; font-weight: 600; text-transform: none; }
.MiniList--text .ix-media { display: none; }
.PrevNextV2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--ix-rule); }
.PrevNextV2 a { display: block; color: var(--ix-ink) !important; }
.PrevNextV2 small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ix-muted); margin-bottom: 6px; }
.PrevNextV2 span { font-size: 16.5px; font-weight: 600; line-height: 1.4; }
.PrevNextV2 .is-next { text-align: right; }

/* wide screens: reading rail on the left, figures and author card bleed right */
@media (min-width: 1280px) {
  .ArticleLayout { max-width: calc(var(--ix-rail) * 2 + var(--ix-gap) * 2 + var(--ix-measure)); grid-template-columns: var(--ix-rail) minmax(0, var(--ix-measure)) var(--ix-rail); column-gap: var(--ix-gap); }
  .ArticleHead, .ArticleHero { padding-left: calc(24px + var(--ix-rail) + var(--ix-gap)); padding-right: 24px; max-width: calc(var(--ix-measure) + var(--ix-gap) + var(--ix-rail)); }
  .ArticleToc { display: block; grid-column: 1; align-self: start; position: sticky; top: 96px; }
  .ArticleMain { grid-column: 2; }
  .ArticleToc-mobile { display: none; }
  .ArticleToc p { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ix-muted); }
  .ArticleToc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--ix-rule); }
  .ArticleToc a { display: block; padding: 7px 0 7px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--ix-muted) !important; }
  .ArticleToc a:hover { color: var(--ix-ink) !important; }
  .ArticleToc a[aria-current="true"] { color: var(--ix-ink) !important; font-weight: 600; border-left-color: var(--ix-red); }
  .Article .CmsPage figure, .Article .CmsPage table, .ArticleMain > .AuthorCard { width: calc(100% + var(--ix-gap) + var(--ix-rail)); max-width: none; }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1100px) {
  .Stream-wrap { grid-template-columns: 1fr; gap: 40px; }
  .Stream-aside { position: static; }
  .Stream-aside ul { display: flex; flex-wrap: wrap; gap: 0 24px; }
  .Stream-aside li a { border: 0; padding: 6px 0; gap: 8px; }
  .Stream-about--rail { display: none; }
  .Stream-about-slot { display: block; padding-top: 48px; }
}
@media (max-width: 991px) {
  .LeadStory { grid-template-columns: 1fr; gap: 20px; }
  .Lead-subs { gap: 24px; }
  .SubStory { grid-template-columns: 1fr; gap: 12px; }
  .Desk-grid, .Desk--flip .Desk-grid { grid-template-columns: 1fr; gap: 28px; }
  .Desk--flip .DeskLead { order: 0; }
  .Desk--row .Desk-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ix-wrap { padding: 0 20px; }
  .Insights-deck { font-size: 16.5px; }
  .TopicNav { margin-top: 20px; }
  .TopicNav::after { content: ""; position: absolute; right: 0; top: 0; bottom: 1px; width: 36px; background: linear-gradient(90deg, rgba(255,255,255,0), #fff); pointer-events: none; }
  .TopicNav ul { gap: 22px; padding-right: 24px; }
  .Lead { padding-top: 24px; }
  .Lead-subs { grid-template-columns: 1fr; gap: 24px; margin-top: 28px; padding-top: 24px; }
  .SubStory { grid-template-columns: minmax(0, 1fr) 112px; gap: 14px; }
  .SubStory .ix-media { order: 2; }
  .SubStory-title { font-size: 16.5px; margin-top: 6px; }
  .Stream-wrap { padding-top: 48px; }
  .StreamItem { grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; padding: 20px 0; }
  .StreamItem-title { font-size: 17px; }
  .StreamItem-dek { display: none; }
  .Desk { padding-top: 52px; }
  .Desk--row .Desk-grid { grid-template-columns: 1fr; }
  .DeskLead-title { font-size: 21px; }
  .ix-label { flex-wrap: wrap; gap: 6px 16px; }
  .ix-meta--byline > :first-child { flex-basis: 100%; }
  .ix-meta--byline > .ix-meta-when::before { display: none; }
  .ix-label h2 { font-size: 20px; }
  .Desk-links { gap: 16px; }
  .ArticleHead { padding: 24px 20px 0; }
  .ArticleHead-dek { font-size: 17.5px; }
  .ArticleHero { padding: 0; margin-top: 24px; }
  .ArticleHero img, .ArticleHero picture { border-radius: 0; }
  .ArticleLayout { padding: 0 20px; margin-top: 28px; }
  .Article .CmsPage { font-size: 17.5px; line-height: 1.72; }
  .Article .CmsPage > p:first-child { font-size: 18.5px; }
  .Article .CmsPage h2 { font-size: 24px; }
  .Article .CmsPage h3 { font-size: 19px; }
  /* tables become stacked comparisons (labels added by blog-v2.js); horizontal scroll if JS is off */
  .Article .CmsPage table { display: block; overflow-x: auto; }
  .Article .CmsPage table.is-stacked, .Article .CmsPage table.is-stacked tbody { display: block; width: 100%; overflow: visible; white-space: normal; }
  .Article .CmsPage table.is-stacked thead { display: none; }
  .Article .CmsPage table.is-stacked tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--ix-rule); }
  .Article .CmsPage table.is-stacked td { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 12px; padding: 4px 0; border: 0; width: auto; }
  .Article .CmsPage table.is-stacked td:first-child { display: block; font-size: 16px; padding-bottom: 6px; }
  .Article .CmsPage table.is-stacked td[data-label]::before { content: attr(data-label); font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ix-muted); padding-top: 2px; }
  .MiniList { grid-template-columns: 1fr; gap: 0; }
  .MiniList li { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--ix-rule); }
  .MiniList .ix-media { order: 2; margin: 0; }
  .PrevNextV2 { grid-template-columns: 1fr; }
  .PrevNextV2 .is-next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .Insights *, .Article * { transition: none !important; }
}
