/* Kiyuki Insights — /insights and /insights/<slug> (26 Nov 2026, Will Gray).
 *
 * Loaded after site.css by public/insights.html (the index) and by
 * templates/insight.html (every article). Everything is scoped under
 * body.ins so no other page changes. Colours are site.css variables only
 * (--on-field, --muted, --line, --signal-on), so both themes work. Signal
 * Blue marks a selection or a link here, never decoration (BRAND.md §1).
 *
 * The page width, gutter, Urbanist and the footer are the apex's
 * (apex.html, body.ap); the FAQ is the site FAQ's markup and look from the
 * faq-draft branch (apex.html "Questions"). Keep them in step by hand. */

body.ins {
  --font: Urbanist, Inter, ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --page: 1440px;
  --gutter: clamp(28px, 4.5vw, 72px);
  /* Two widths (Will Gray, 26 Nov 2026). The prose column is 780px; the
     "wide" blocks — H1 and standfirst, key takeaways, tables, the CTA, the
     FAQ (two columns) and Related reading (cards in a row) — run to 1080px,
     sharing the prose's left edge. Phones: one column, the usual gutters. */
  --ins-measure: 780px;
  --ins-wide: 1080px;
  font-family: var(--font);
}

/* ── Header: the apex's (apex.html, under .ap), same classes ──
   Lockup left; Our approach, Our vision and Join the waitlist ↗ right; the
   theme toggle. The two section links hide at 460px and below, as on the
   apex. No active-link state: the sections they name are on the homepage. */
.ins .ap-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); margin-left: auto; }
.ins .ap-links a { font-size: .9375rem; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .15s; }
.ins .ap-links a:hover { color: var(--on-field); }
.ins .ap-links .ap-cta { color: var(--on-field); text-decoration: underline; text-decoration-color: var(--signal-on); text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
.ins .nav-in { gap: 16px; }

/* ── Footer: the apex's, copied from apex.html under .ap ── */
.ins .ap-foot { border-top: 1px solid var(--line); padding: 40px 0 48px; }
.ins .ap-foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px; }
.ins .ap-foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.ins .ap-foot-brand p { font-size: .9375rem; color: var(--muted); }
.ins .ap-foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.ins .ap-foot-links a { font-size: .9375rem; color: var(--on-field); text-decoration: none; }
.ins .ap-foot-links a:hover { color: var(--signal-on); }
.ins .ap-foot-links .consent-reopen { color: var(--on-field); }
.ins .ap-foot-links .consent-reopen:hover { color: var(--signal-on); }

/* ── Shared ── */
.ins .ins-col { max-width: calc(var(--ins-wide) + 2 * var(--gutter)); }
/* Prose-width pieces inside the wide column. */
.ins .ins-byline, .ins .ins-body > *, .ins .ins-sources { max-width: var(--ins-measure); }
.ins .ins-body > .ins-table { max-width: none; }
.ins .ins-h2 { font-size: clamp(1.5rem, 2.2vw, 1.875rem); line-height: 1.15; letter-spacing: -.015em; font-weight: 500; text-wrap: balance; }
.ins a:focus-visible { outline: 1.5px solid var(--signal-on); outline-offset: 3px; border-radius: 3px; }

/* Work-in-progress markers ([TEXT NEEDED …]). Only ever in a draft: the
   build refuses a published article that carries one. */
.ins .ins-todo { background: none; color: var(--on-field); border: 1px dashed var(--muted); border-radius: 4px; padding: 0 .3em; font-family: var(--mono); font-size: .8em; font-weight: 400; letter-spacing: 0; }


/* ── Article head ── */
.ins .ins-article { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 112px); }
.ins .ins-head { padding-top: clamp(24px, 4vw, 48px); }
.ins .ins-eyebrow { margin-bottom: 20px; }
.ins .ins-eyebrow a { text-decoration: none; }
.ins .ins-eyebrow a:hover { text-decoration: underline; }
.ins .ins-h1 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); line-height: 1.06; letter-spacing: -.028em; font-weight: 500; text-wrap: balance; }
.ins .ins-standfirst { max-width: 62ch; margin-top: 24px; font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.ins .ins-standfirst:empty { display: none; }
.ins .ins-byline { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.ins .ins-author { font-size: 1rem; }
.ins .ins-author-name { font-weight: 600; color: var(--on-field); }
.ins .ins-author a { margin-left: .5em; font-size: .9375rem; color: var(--muted); text-decoration: none; }
.ins .ins-author a:hover { color: var(--signal-on); }
.ins .ins-bio { margin-top: 4px; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.ins .ins-dates { margin-top: 10px; font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Key takeaways: the quiet panel of the apex's waitlist form. */
.ins .ins-takeaways { margin-top: 36px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--on-field) 4%, transparent); backdrop-filter: blur(6px); }
.ins .ins-kt-h { font-size: .6875rem; text-transform: uppercase; letter-spacing: var(--tracking-wide, .12em); font-weight: 600; color: var(--muted); }
.ins .ins-takeaways ul { margin: 14px 0 0; padding-left: 1.2em; display: grid; gap: 10px; }
.ins .ins-takeaways li { font-size: 1.0625rem; line-height: 1.5; color: var(--on-field); }

/* ── Body ── */
.ins .ins-body { margin-top: clamp(36px, 5vw, 56px); font-size: clamp(1.125rem, 1.3vw, 1.1875rem); line-height: 1.7; color: var(--on-field); }
.ins .ins-body > * + * { margin-top: 1.1em; }
.ins .ins-body h2 { margin-top: 2.2em; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; letter-spacing: -.018em; font-weight: 500; text-wrap: balance; }
.ins .ins-body h3 { margin-top: 1.8em; font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
.ins .ins-body p, .ins .ins-body li { text-wrap: pretty; }
.ins .ins-body ul, .ins .ins-body ol { padding-left: 1.3em; display: grid; gap: .45em; }
.ins .ins-body a, .ins .ins-sources a, .ins .ins-partner a, .ins .ins-faq-a a {
  color: var(--on-field); text-decoration: underline; text-decoration-color: var(--signal-on);
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.ins .ins-body a:hover, .ins .ins-sources a:hover, .ins .ins-partner a:hover { color: var(--signal-on); }
.ins .ins-body blockquote { border-left: 2px solid var(--line); padding-left: 1.1em; color: var(--muted); }
.ins .ins-body hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.ins .ins-body code { font-family: var(--mono); font-size: .85em; }
.ins .ins-body strong { font-weight: 600; }
.ins .ins-figure img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.ins .ins-figure figcaption, .ins .ins-table figcaption { margin-top: 10px; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.ins .ins-table { overflow-x: auto; }
.ins .ins-table table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
.ins .ins-table th, .ins .ins-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.ins .ins-table th { font-weight: 600; color: var(--on-field); border-bottom-color: var(--muted); }
.ins .ins-table td { color: var(--muted); }

/* ── CTA: one waitlist button and the design-partner line ── */
.ins .ins-cta { margin-top: clamp(48px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--line); }
.ins .ins-cta-h { font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 500; text-wrap: balance; }
.ins .ins-cta .btn { margin-top: 20px; font-size: 1rem; padding: 12px 20px; }
.ins .ins-partner { max-width: var(--ins-measure); margin-top: 20px; font-size: 1rem; line-height: 1.55; color: var(--muted); }

/* ── FAQ: the site FAQ (faq-draft branch), under .ins ── */
.ins .ins-faq-wrap { margin-top: clamp(48px, 6vw, 72px); }
.ins .ins-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: clamp(20px, 3vw, 28px); }
.ins .ins-faq-col { border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .ins .ins-faq { grid-template-columns: 1fr; } .ins .ins-faq-col:first-child { border-bottom: 0; } }
.ins .ins-faq-item { border-top: 1px solid var(--line); }
.ins .ins-faq-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; cursor: pointer; list-style: none; }
.ins .ins-faq-item > summary::-webkit-details-marker { display: none; }
.ins .ins-faq-item > summary:focus-visible { outline: 1.5px solid var(--signal-on); outline-offset: 4px; border-radius: 4px; }
.ins .ins-faq-q { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.3; font-weight: 500; margin: 0; color: var(--on-field); text-wrap: balance; }
.ins .ins-faq-item > summary:hover .ins-faq-q { color: var(--signal-on); }
.ins .ins-faq-chev { flex: none; width: 22px; height: 22px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s, color .2s; }
.ins .ins-faq-item[open] .ins-faq-chev { transform: rotate(180deg); color: var(--signal-on); }
.ins .ins-faq-a { font-size: 1.0625rem; line-height: 1.6; color: var(--muted); max-width: 64ch; padding-bottom: 24px; text-wrap: pretty; }
@media (prefers-reduced-motion: reduce) { .ins .ins-faq-chev { transition: none; } }

/* ── Related reading and sources ── */
.ins .ins-related, .ins .ins-sources { margin-top: clamp(40px, 5vw, 56px); }
.ins .ins-sources ol { margin-top: 16px; padding-left: 1.2em; display: grid; gap: 8px; font-size: 1rem; line-height: 1.5; color: var(--muted); }
/* Related reading: cards in a row, in the index cards' look (site.css .post). */
.ins .ins-related ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.ins .ins-related li { display: flex; }
.ins .ins-related li a { flex: 1; display: block; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px;
  background: color-mix(in srgb, var(--field-2) 55%, transparent); text-decoration: none; color: var(--on-field);
  font-size: 1.0625rem; line-height: 1.35; font-weight: 500; transition: border-color .16s, background .16s, transform .16s; }
.ins .ins-related li a:hover { color: var(--on-field); border-color: color-mix(in srgb, var(--on-field) 22%, transparent); background: color-mix(in srgb, var(--field-2) 88%, transparent); transform: translateY(-2px); }
.ins .ins-related li a::after { content: ' →'; color: var(--signal-on); }
@media (prefers-reduced-motion: reduce) { .ins .ins-related li a:hover { transform: none; } }
.ins .ins-sources ol { font-size: .9375rem; }

/* ── The index (/insights) ──
   The cards are the pre-blog page's, styled by site.css's "Insights" block
   (.posts, .post, .post--lead, .post-meta, .post-kind, .post-t, .post-d,
   .post-go, .pager) and NOT restyled here. Three additions only:
     - the list is held to the old page's width (site.css --page 1180px, 28px
       gutter), so the grid lays out in the same three columns, not four;
     - each column's minimum is capped at the container, so a phone narrower
       than 366px gets one full-width column instead of overflowing;
     - h2/p card text reset to the old spans' rhythm. */
.ins .ins-index { padding-block: clamp(64px, 9vw, 120px) clamp(56px, 8vw, 112px); }
.ins .ins-index-h1 { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: 1.03; letter-spacing: -.03em; font-weight: 500; text-wrap: balance; }
.ins .ins-index-lead { margin-top: 24px; font-size: clamp(1.125rem, 1.8vw, 1.375rem); line-height: 1.45; color: var(--muted); max-width: 52ch; text-wrap: pretty; }
.ins .ins-list { margin-top: clamp(40px, 6vw, 72px); max-width: calc(1180px - 2 * 28px); }
.ins .posts { grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); }
.ins .post-t, .ins .post-d { margin-top: 0; }
.ins .post-t { text-wrap: balance; }
/* The lead card in two columns when the article has key takeaways (Will
   Gray, 26 Nov 2026): meta across the top, then the text left and the
   takeaways right, starting level with the title. Muted text, --line rules.
   One column, takeaways hidden, at 600px and below. */
.ins .post--split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 64px); align-items: start; }
.ins .post--split .post-meta { grid-column: 1 / -1; }
.ins .post-kt { padding-left: clamp(24px, 3vw, 40px); border-left: 1px solid var(--line); }
.ins .post-kt-h { display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.ins .post-kt ul { list-style: none; margin: 0; padding: 0; }
.ins .post-kt li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.ins .post-kt li:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 600px) {
  .ins .post--split { display: block; }
  .ins .post-kt { display: none; }
}
.ins .ins-empty { padding: 32px 0; border-top: 1px solid var(--line); }
.ins .ins-empty-p { font-size: 1.125rem; line-height: 1.55; color: var(--muted); max-width: 48ch; }
.ins .ins-empty .btn { margin-top: 20px; font-size: 1rem; padding: 12px 20px; }

@media (max-width: 460px) {
  .ins .ap-links .ap-opt { display: none; }
}
