/* Insights /insights/, its articles, author pages and the editorial policy. 26 Nov 2026.
   Builder: docs/insights-build/build_insights.py. Loaded after base, blocks, service (crumbs) and lms (section heads, closing CTA).
   Rhythm as on the legal and reviews pages: the title block starts ~195px from the top on desktop (~144px on phones),
   blocks are 98px apart (72px on phones). Palette: greys and one red; cards are filled grey, covers are dark with one red cube. */

:root { --in-gap: clamp(72px, 6.8vw, 98px); --in-text: 720px; }
main > section, main > article { padding-block: 0; }
main > :is(section, article) + :is(section, article) { margin-top: var(--in-gap); }
main > section.lms-cta { padding-block: 0; margin-block: var(--in-gap); } /* lms.css gives it section padding; the gap is the margin */

/* Small shared bits */
.in-cat { display: flex; align-items: center; gap: 12px; font-size: var(--t-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--red-text); }
.in-draft { display: inline-flex; align-items: center; min-height: 22px; padding: 0 10px; border-radius: var(--r-pill); background: var(--ink); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.in-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--t-small); color: var(--muted); }
.in-card-meta > span:first-child { font-weight: 500; color: var(--ink-2); }
.in-card-meta > span + span:not(.in-draft)::before { content: ''; display: inline-block; width: 3px; height: 3px; margin-right: 10px; vertical-align: middle; border-radius: 50%; background: var(--faint); }
.in-empty { font-size: var(--t-lead); color: var(--muted); }

/* ---------- List page: title block ---------- */
.in-top { display: grid; gap: 28px; padding-top: clamp(32px, 4.6vw, 70px); }
.in-top h1 { font-size: var(--t-title); }
.in-top h1 span { display: block; }
.in-top h1 span + span { color: var(--muted); }
.in-top-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.in-top .hero-copy { max-width: 36em; font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); }
.in-rss { display: inline-flex; align-items: center; gap: 10px; min-height: var(--control); padding: 0 18px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-small); font-weight: 500; text-decoration: none; transition: background-color .2s var(--ease); }
.in-rss svg { color: var(--red); }
.in-rss:hover { background: var(--surface-2); }

/* Topic filter: pills with a count, the active one in ink. */
.in-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 3.4vw, 48px); }
.in-chip { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control); padding: 0 18px; border: 0; border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-small); color: var(--ink-2); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.in-chip span { font-size: var(--t-label); color: var(--muted); }
.in-chip:hover { background: var(--surface-2); }
.in-chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.in-chip[aria-pressed="true"] span { color: var(--on-dark-2); }

/* Card grid: three across, as the case studies on the homepage. Cover, topic and date, title, two lines. */
.in-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(48px, 4.4vw, 64px) clamp(20px, 2vw, 32px); }
.in-card[hidden], .in-grid.is-folded .in-card[data-fold] { display: none; }
.in-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.in-card-img { display: block; overflow: hidden; border-radius: 20px; background: var(--dark); }
.in-card-img img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 1.2s var(--ease); }
.in-card a:hover .in-card-img img { transform: scale(1.03); }
.in-card .in-card-meta { margin-top: 22px; }
.in-card-title { margin-top: 10px; font-size: clamp(22px, .5vw + 17px, 26px); font-weight: 500; line-height: 1.18; letter-spacing: -.025em; text-wrap: balance; transition: color .2s var(--ease); }
.in-card a:hover .in-card-title { color: var(--red); }
.in-card-text { margin-top: 10px; font-size: var(--t-body); line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.in-more { display: flex; justify-content: center; margin-top: clamp(48px, 4.4vw, 64px); }

/* ---------- Article: one centred column for the title and the text, a rail on the left for contents ---------- */
/* The rail never gets narrower than 220px: on smaller desktops the text column gives way first, and the right side last. */
.in-article { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, var(--in-text)) minmax(0, 1fr); gap: 0 clamp(32px, 4vw, 64px); padding-top: clamp(32px, 4.6vw, 70px); }
.in-hero { grid-column: 2; grid-row: 1; display: grid; justify-items: start; gap: 24px; min-width: 0; }
/* Row 2: the cover and the text in the middle, the rail beside them. Both start at the top of the cover. */
.in-main { grid-column: 2; grid-row: 2; min-width: 0; margin-top: clamp(40px, 3.6vw, 56px); }
.in-hero .crumbs { margin-bottom: 4px; }
.in-hero h1 { font-size: clamp(36px, 2.4vw + 18px, 60px); line-height: 1.04; letter-spacing: -.04em; }
.in-lead { font-size: var(--t-lead); line-height: 1.6; color: var(--ink-2); }
.in-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; width: 100%; }
.in-hero .in-byline { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--hair); }
.in-author { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.in-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.in-author > span { display: grid; gap: 1px; font-size: var(--t-small); line-height: 1.35; color: var(--muted); }
.in-author b { font-size: var(--t-body); font-weight: 600; color: var(--ink); transition: color .2s var(--ease); }
.in-author:hover b { color: var(--red); }
.in-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--t-small); color: var(--muted); }
.in-dates > span + span:not(.in-draft)::before { content: ''; display: inline-block; width: 3px; height: 3px; margin-right: 10px; vertical-align: middle; border-radius: 50%; background: var(--faint); }

.in-cover { width: 100%; overflow: hidden; border-radius: 20px; background: var(--dark); }
.in-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* Body: the text column sits in the middle of the page; contents and a question card ride in the left rail. */
/* Rail: level with the top of the cover, held in view while the text scrolls (Eugene, 27 Nov).
   The contents list sits on a thin track; its ink part is how far you have read (js/insights.js). */
.in-rail { grid-column: 1; grid-row: 2; position: sticky; top: 108px; align-self: start; justify-self: start; display: grid; gap: 32px; width: min(100%, 252px); margin-top: clamp(40px, 3.6vw, 56px); }
.in-text { margin-top: var(--in-gap); }
.in-toc-label { margin-bottom: 18px; font-size: var(--t-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.in-toc-list { position: relative; padding-left: 20px; max-height: calc(100vh - 108px - 260px); overflow-y: auto; scrollbar-width: none; }
.in-toc-list::-webkit-scrollbar { display: none; }   /* the track on the left shows the position instead of a scrollbar */
.in-toc-track { position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--hair); }
.in-toc-track i { position: absolute; left: 0; top: 0; width: 100%; height: var(--read, 0%); border-radius: 2px; background: var(--ink); transition: height .15s linear; }
.in-toc ol { display: grid; gap: 6px; counter-reset: toc; }
.in-toc a { display: grid; grid-template-columns: 26px 1fr; gap: 4px; padding: 6px 0; font-size: var(--t-small); line-height: 1.45; color: var(--muted); text-decoration: none; transition: color .2s var(--ease); }
.in-toc a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11px; line-height: 20px; color: var(--faint); }
.in-toc a:hover, .in-toc a[aria-current] { color: var(--ink); }
.in-toc a[aria-current]::before { color: var(--red); }
/* "Have a question?": a small grey card with Linda's face and one button. */
.in-ask { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px 14px; padding: 18px; border-radius: var(--r-l); background: var(--surface); }
.in-ask img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.in-ask p { display: grid; gap: 2px; font-size: var(--t-small); line-height: 1.35; color: var(--muted); }
.in-ask b { font-weight: 600; color: var(--ink); }
.in-ask .button { grid-column: 1 / -1; width: 100%; }
/* Short screens: the list stays whole; only the question card steps aside. */
@media (max-height: 860px) { .in-ask { display: none; } .in-toc-list { max-height: calc(100vh - 108px - 80px); } }

.in-text { min-width: 0; font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.in-text > * + * { margin-top: 20px; }
.in-text > h2 { margin-top: 64px; font-size: clamp(26px, .9vw + 19px, 34px); line-height: 1.15; letter-spacing: -.025em; color: var(--ink); scroll-margin-top: 100px; }
.in-text > h3 { margin-top: 40px; font-size: var(--t-h3); color: var(--ink); }
.in-text > h2 + *, .in-text > h3 + * { margin-top: 16px; }
.in-text strong { font-weight: 600; color: var(--ink); }
.in-text a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.in-text a:hover { color: var(--red); }
.in-text code { padding: 1px 6px; border-radius: 6px; background: var(--surface); font-family: var(--mono); font-size: .86em; color: var(--ink); }
.in-text pre { overflow-x: auto; padding: 20px 24px; border-radius: var(--r-m); background: var(--dark); color: var(--on-dark); font-size: 14px; line-height: 1.6; }
.in-text pre code { padding: 0; background: none; color: inherit; }
.in-text > ul, .in-text > ol { display: grid; gap: 10px; }
.in-text > ul li { position: relative; padding-left: 26px; }
.in-text > ul li::before { content: ''; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; background: var(--graphic); }
.in-text > ol { counter-reset: li; }
.in-text > ol li { position: relative; padding-left: 36px; counter-increment: li; }
.in-text > ol li::before { content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: .2em; font-family: var(--mono); font-size: 13px; color: var(--red-text); }

/* "In short": a filled grey card, red squares as bullets. */
.in-short { padding: var(--card-pad); border-radius: var(--r-l); background: var(--surface); }
.in-short-title { margin-bottom: 16px; font-size: var(--t-label) !important; font-weight: 500; letter-spacing: .12em !important; text-transform: uppercase; color: var(--muted); }
.in-short ul { display: grid; gap: 12px; }
.in-short li { position: relative; padding-left: 24px; font-size: var(--t-body); line-height: 1.55; color: var(--ink); }
.in-short li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 1.5px; background: var(--red); }

.in-quote { margin-block: 40px !important; padding-left: 28px; border-left: 2px solid var(--red); }
.in-quote p { font-size: var(--t-h3); line-height: 1.35; letter-spacing: -.02em; color: var(--ink); }
.in-quote figcaption { margin-top: 12px; font-size: var(--t-small); color: var(--muted); }
.in-fig img { width: 100%; height: auto; border-radius: var(--r-m); background: var(--surface); }
.in-fig figcaption { margin-top: 10px; font-size: var(--t-small); color: var(--muted); }
.in-table { overflow-x: auto; }
.in-table table { width: 100%; border-collapse: collapse; font-size: var(--t-small); line-height: 1.55; }
.in-table th { padding: 0 16px 12px 0; font-size: var(--t-label); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-align: left; color: var(--muted); border-bottom: 1px solid var(--ink); }
.in-table td { padding: 14px 16px 14px 0; vertical-align: top; border-bottom: 1px solid var(--hair); }
.in-table td:first-child { font-weight: 500; color: var(--ink); }

/* Where we can help: the services the article leads to, as grey tiles with an arrow. */
.in-next { margin-top: 64px !important; }
.in-next-title, .in-faq h2, .in-sources h2 { font-size: clamp(26px, .9vw + 19px, 34px); line-height: 1.15; letter-spacing: -.025em; color: var(--ink); }
.in-next ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 24px; }
.in-next a { position: relative; display: grid; align-content: start; gap: 8px; height: 100%; padding: var(--card-pad) calc(var(--card-pad) + 40px) var(--card-pad) var(--card-pad); border-radius: var(--r-l); background: var(--surface); text-decoration: none; transition: background-color .2s var(--ease); }
.in-next a:hover { background: var(--surface-2); color: inherit; }
.in-next b { font-size: var(--t-h3); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
.in-next span { font-size: var(--t-small); line-height: 1.5; color: var(--muted); }
.in-next .in-next-kind { font-size: var(--t-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.in-next .is-case { grid-column: 1 / -1; }
.in-next .is-case a { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-items: start; column-gap: var(--card-pad); padding: 8px calc(var(--card-pad) + 40px) 8px 8px; }
.in-next .is-case .in-next-img { grid-row: 1 / -1; margin: 0; }
.in-next .is-case a > :not(.in-next-img) { grid-column: 2; }
.in-next .is-case .in-next-kind { margin-top: calc(var(--card-pad) - 8px); }
.in-next .is-case + li:last-child { grid-column: 1 / -1; }   /* one service under a case: full width, no empty cell */
.in-next-img { display: block; overflow: hidden; border-radius: calc(var(--r-l) - 6px); background: var(--surface-2); }
.in-next-img img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1.2s var(--ease); }
.in-next .is-case a:hover .in-next-img img { transform: scale(1.03); }
.in-next .is-case i { top: 20px; right: 20px; }
.in-next i { position: absolute; top: var(--card-pad); right: var(--card-pad); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--white); font-style: normal; font-size: 15px; color: var(--ink); transition: transform .3s var(--ease), background-color .2s var(--ease), color .2s var(--ease); }
.in-next a:hover i { transform: translateX(3px); background: var(--red); color: #fff; }

/* Questions: the site's FAQ rows, inside the text column. */
.in-faq { margin-top: 64px !important; border-bottom: 1px solid var(--hair); }
.in-faq h2 { margin-bottom: 20px; }
.in-faq details { border-top: 1px solid var(--hair); }
.in-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; padding-block: 18px; font-size: var(--t-lead); line-height: 1.35; color: var(--ink); cursor: pointer; list-style: none; transition: color .2s var(--ease); }
.in-faq summary::-webkit-details-marker { display: none; }
.in-faq summary:hover { color: var(--red); }
.in-faq summary::after {
  content: ''; flex: none; width: 36px; height: 36px; border: 1px solid var(--hair); border-radius: 50%; color: var(--ink);
  background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  transition: transform .3s var(--ease);
}
.in-faq details[open] summary::after { transform: rotate(45deg); border-color: var(--ink); background: linear-gradient(#fff, #fff) center / 12px 1.5px no-repeat, linear-gradient(#fff, #fff) center / 1.5px 12px no-repeat, var(--ink); }
.in-faq details p { padding-bottom: 22px; font-size: var(--t-body); }

.in-sources { margin-top: 56px !important; }
.in-sources h2 { margin-bottom: 16px; }
.in-sources :is(ul, ol) { display: grid; gap: 8px; font-size: var(--t-small); }

/* Author box at the end of the article. */
.in-authorbox { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; margin-top: 64px !important; padding: var(--card-pad); border-radius: var(--r-l); background: var(--surface); }
.in-authorbox img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.in-authorbox p { font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }
.in-authorbox-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.in-authorbox-name a { font-size: var(--t-body); font-weight: 600; text-decoration: none; }
.in-authorbox-name span { color: var(--muted); }

/* Share: round grey buttons under the byline. */
.in-hero .in-byline { row-gap: 20px; }
.in-share { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.in-share a, .in-share button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: var(--control); height: var(--control); padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-small); font-weight: 500; color: var(--ink); text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.in-share a { padding: 0; }
.in-share a:hover, .in-share button:hover { background: var(--surface-2); color: var(--red); }
.in-share button.is-done { background: var(--ink); color: #fff; }

/* Contents on phones and tablets: folded, after "In short". On desktop the sticky list on the left does the job. */
.in-toc-m { display: none; }
.in-toc-m summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 var(--card-pad); font-size: var(--t-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; }
.in-toc-m summary::-webkit-details-marker { display: none; }
.in-toc-m summary::after { content: '+'; font-size: 20px; font-weight: 400; letter-spacing: 0; color: var(--ink); }
.in-toc-m[open] summary::after { content: '–'; }
.in-toc-m ol { display: grid; gap: 2px; padding: 0 var(--card-pad) 16px; counter-reset: tocm; }
.in-toc-m a { display: grid; grid-template-columns: 28px 1fr; gap: 4px; padding: 7px 0; font-size: var(--t-small); line-height: 1.4; color: var(--ink-2); text-decoration: none; }
.in-toc-m a::before { counter-increment: tocm; content: counter(tocm, decimal-leading-zero); font-family: var(--mono); font-size: 11px; line-height: 20px; color: var(--faint); }

/* ---------- Author page ---------- */
.in-person { display: grid; gap: 28px; padding-top: clamp(32px, 4.6vw, 70px); }
.in-person-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 40px clamp(40px, 6vw, 96px); }
.in-person-photo { overflow: hidden; border-radius: var(--r-l); background: var(--surface); }
.in-person-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.in-person-text { display: grid; justify-items: start; gap: 20px; }
.in-person h1 { font-size: var(--t-title); }
.in-person-role { margin-top: -8px; font-size: var(--t-lead); color: var(--muted); }
.in-person-bio { display: grid; gap: 14px; max-width: 36em; font-size: var(--t-lead); line-height: 1.6; color: var(--ink-2); }
.in-person .actions { margin-top: 8px; }

/* Author: a short "About" and "Expertise" (filled grey pills), then the buttons. */
.in-person-bio h2, .in-person-exp h2 { margin-bottom: 10px; font-size: var(--t-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.in-person-bio { gap: 0; }
.in-person-exp ul { display: flex; flex-wrap: wrap; gap: 8px; }
.in-person-exp li { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-small); font-weight: 500; color: var(--ink-2); }
.in-li svg { margin-right: 8px; }

/* Editorial policy uses the legal page layout; only its rhythm is set here. */
.legal-hero { padding-block: clamp(32px, 4.6vw, 70px) 0; }
.legal-body { margin-top: var(--in-gap); padding-block: clamp(56px, 6.8vw, 98px) 0; }

@media (max-width: 1080px) {
  .in-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .in-article { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .in-hero, .in-main { grid-column: 1; width: min(100%, var(--in-text)); }
  .in-rail { display: none; }
  .in-toc-m { display: block; border-radius: var(--r-l); background: var(--surface); }
}
@media (max-width: 760px) {
  .in-top h1, .in-person h1 { font-size: clamp(44px, 12vw, 60px); }
  .in-hero h1 { font-size: clamp(34px, 9vw, 44px); }
  .in-share { margin-left: 0; width: 100%; }
  .in-next ul { grid-template-columns: minmax(0, 1fr); }
  .in-next .is-case a { grid-template-columns: minmax(0, 1fr); padding: 8px 8px var(--card-pad); }
  .in-next .is-case .in-next-img { grid-row: auto; margin-bottom: 12px; }
  .in-next .is-case a > :not(.in-next-img) { grid-column: 1; margin-inline: calc(var(--card-pad) - 8px); }
  .in-grid { grid-template-columns: minmax(0, 1fr); }
  .in-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .in-chips::-webkit-scrollbar { display: none; }
  .in-chip { flex: none; }
  .in-cover { border-radius: var(--r-m); }
  .in-cover img { aspect-ratio: 16 / 10; }
  .in-text { font-size: 17px; }
  .in-text > h2 { margin-top: 48px; }
  .in-person-row { grid-template-columns: minmax(0, 1fr); }
  .in-person-photo { max-width: 360px; }
  .in-authorbox { grid-template-columns: 56px minmax(0, 1fr); gap: 16px; }
  .in-authorbox img { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .in-card-img img, .in-next-img img, .in-next i { transition: none; }
}

/* Fewer than three related articles: two cards inside the text column, so no cell stays empty. */
.in-related.is-narrow { width: min(100% - var(--gutter) * 2, var(--in-text)); }
.in-related.is-narrow .in-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.in-related.is-narrow .lms-head h2 { font-size: clamp(26px, .9vw + 19px, 34px); }
/* Author page: its list is the last block, so it keeps the gap above the footer itself. */
.in-person + .in-list { margin-bottom: var(--in-gap); }
@media (max-width: 760px) { .in-related.is-narrow .in-grid { grid-template-columns: minmax(0, 1fr); } }
