/* Editorial and tool surfaces. The live v3 shell remains the design authority. */
.v3.insight-page { min-height: 100vh; }
.v3.insight-page .nav__links [aria-current="page"] { color: var(--tx-1); }
.v3.insight-page .nav__links [aria-current="page"]::after { width: 100%; }

.v3 .insight-shell { width: min(var(--container), 92%); margin-inline: auto; }
.v3 .insight-kicker { margin: 0; color: var(--tx-3); font-size: var(--fs-label); font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.v3 .insight-hero { max-width: 880px; padding: clamp(5rem, 11vh, 8rem) 0 clamp(3.6rem, 8vh, 5.5rem); }
.v3 .insight-hero h1,
.v3 .insights-index h1,
.v3 .error-main h1 { margin: var(--s4) 0 var(--s5); color: var(--tx-1); font-family: var(--serif); font-size: var(--fs-display); font-weight: 300; line-height: 1.05; letter-spacing: -.017em; text-wrap: balance; }
.v3 .insight-hero h1 em,
.v3 .insights-index h1 em,
.v3 .error-main h1 em { color: var(--ochre); font-style: normal; font-weight: 560; }
.v3 .insight-deck,
.v3 .insights-index__intro { max-width: 68ch; margin: 0; color: var(--tx-3); font-size: var(--fs-lede); line-height: 1.65; }
.v3 .insight-meta { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s6); color: var(--tx-3); font-size: var(--fs-small); }
.v3 .insight-meta img { width: 44px; height: 44px; border: 1px solid var(--e2-edge); border-radius: 50%; object-fit: cover; box-shadow: inset 0 1px 0 var(--e2-hi); }
.v3 .insight-meta strong { display: block; color: var(--tx-1); font-weight: 600; }

.v3 .insight-layout { display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; padding-bottom: var(--rhythm); }
.v3 .insight-article { color: var(--tx-2); font-size: 1rem; line-height: 1.72; }
.v3 .insight-article h2 { margin: clamp(3.4rem, 8vh, 5.2rem) 0 var(--s4); color: var(--tx-1); font-family: var(--serif); font-size: var(--fs-h2); font-weight: 300; line-height: 1.12; letter-spacing: -.012em; text-wrap: balance; }
.v3 .insight-article h3 { margin: var(--s7) 0 var(--s3); color: var(--tx-1); font-size: var(--fs-h3); line-height: 1.25; }
.v3 .insight-article p,
.v3 .insight-article li { color: var(--tx-2); }
.v3 .insight-article a:not(.nav__cta):not(.insight-button) { color: var(--ochre-hi); text-decoration: underline; text-decoration-color: rgba(230,190,130,.35); text-underline-offset: .2em; }
.v3 .insight-article ul,
.v3 .insight-article ol { padding-left: 1.3rem; }
.v3 .insight-article li + li { margin-top: var(--s3); }
.v3 .insight-answer { margin: 0 0 var(--s7); padding: var(--s5) var(--s6); border: 1px solid var(--e2-edge); border-left: 3px solid var(--ochre); border-radius: var(--r-md); background: var(--e2-bg); box-shadow: var(--e2-shadow), inset 0 1px 0 var(--e2-hi); }

.v3 .role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin: var(--s6) 0; }
.v3 .role-card,
.v3 .operator-note,
.v3 .insight-aside { padding: var(--s6); border: 1px solid var(--e2-edge); border-radius: var(--r-md); background: var(--e2-bg); box-shadow: var(--e2-shadow), inset 0 1px 0 var(--e2-hi); }
.v3 .role-card h3 { margin-top: 0; }
.v3 .role-card__label { color: var(--ochre); font-size: var(--fs-label); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.v3 .role-card__metric { padding-top: var(--s4); border-top: 1px solid var(--hair); color: var(--tx-3); font-size: var(--fs-small); }
.v3 .operator-note { margin: var(--s7) 0 0; }
.v3 .operator-note p:last-child { margin-bottom: 0; }

.v3 .comparison-wrap { margin: var(--s6) 0 var(--s8); overflow-x: auto; }
.v3 .comparison { width: 100%; min-width: 620px; border-collapse: collapse; }
.v3 .comparison th,
.v3 .comparison td { padding: var(--s4); border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.v3 .comparison th { color: var(--ochre-hi); font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; }
.v3 .comparison td:first-child { width: 25%; color: var(--tx-3); }

.v3 .insight-aside { position: sticky; top: 92px; }
.v3 .insight-aside p:not(.insight-kicker) { color: var(--tx-3); font-size: var(--fs-small); }
.v3 .insight-aside .nav__cta { display: flex; width: 100%; justify-content: center; gap: .42em; margin-top: var(--s3); white-space: nowrap; }
.v3 .insight-cta { margin-top: var(--s8); padding: clamp(1.6rem, 4vw, 2.5rem); border: 1px solid rgba(183,127,60,.42); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(183,127,60,.13), rgba(242,239,230,.04)); box-shadow: var(--e2-shadow), inset 0 1px 0 rgba(255,255,255,.16); }
.v3 .insight-cta h2 { margin-top: var(--s3); }
.v3 .insight-cta .nav__cta { display: inline-flex; margin-top: var(--s3); }
.v3 .insight-button { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s3); padding: .78rem 1.1rem; border: 1px solid rgba(230,190,130,.4); border-radius: 999px; background: var(--ochre); color: #17130e; font-size: var(--fs-small); font-weight: 700; text-decoration: none; transition: transform .25s var(--ease), background .25s var(--ease); }
.v3 .insight-button:hover { transform: translateY(-2px); background: var(--ochre-hi); }

.v3 .insights-index { min-height: 62vh; padding: clamp(5rem, 11vh, 8rem) 0 var(--rhythm); }
.v3 .insights-index h1 { max-width: 820px; }
.v3 .insights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); margin-top: var(--s8); }
.v3 .insight-card { position: relative; display: flex; min-height: 300px; flex-direction: column; padding: clamp(1.5rem, 3vw, 2rem); border: 1px solid var(--e2-edge); border-radius: var(--r-lg); background: var(--e2-bg); box-shadow: var(--e2-shadow), inset 0 1px 0 var(--e2-hi); transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease); }
.v3 .insight-card:hover { transform: translateY(-4px); border-color: rgba(183,127,60,.5); background: linear-gradient(180deg,rgba(242,239,230,.13),rgba(242,239,230,.055)); }
.v3 .insight-card h2 { margin: var(--s4) 0 var(--s3); color: var(--tx-1); font-family: var(--serif); font-size: var(--fs-h3); font-weight: 300; line-height: 1.15; text-wrap: balance; }
.v3 .insight-card h2 em { color: var(--ochre); font-style: normal; font-weight: 560; }
.v3 .insight-card p { color: var(--tx-3); }
.v3 .insight-card__meta { margin-top: auto; padding-top: var(--s5); color: var(--tx-3); font-size: var(--fs-xs); }
.v3 .insight-card__read { display: block; margin-top: var(--s4); color: var(--ochre-hi); font-size: var(--fs-small); font-weight: 700; }

.v3 .error-main { display: grid; min-height: calc(100vh - 72px); place-content: center; width: min(760px, 92%); margin-inline: auto; padding: var(--rhythm) 0; }
.v3 .error-main p:not(.insight-kicker) { max-width: 52ch; color: var(--tx-3); }
.v3 .error-main .nav__cta { display: inline-flex; justify-self: start; margin-top: var(--s4); }

@media (max-width: 900px) {
  .v3 .insight-layout { grid-template-columns: 1fr; }
  .v3 .insight-aside { position: static; order: -1; }
  .v3 .role-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .v3 .insights-grid { grid-template-columns: 1fr; }
  .v3 .insight-card { min-height: 0; }
}

@media (max-width: 600px) {
  .v3 .insight-hero,
  .v3 .insights-index { padding-top: var(--s8); }
  .v3 .insight-meta { align-items: flex-start; }
  .v3 .insight-meta strong { margin-bottom: 2px; line-height: 1.35; }
  .v3 .comparison-wrap { overflow: visible; }
  .v3 .comparison { min-width: 0; }
  .v3 .comparison thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .v3 .comparison tr { display: block; margin-bottom: var(--s4); padding: var(--s4); border: 1px solid var(--e2-edge); border-radius: var(--r-md); background: var(--e2-bg); }
  .v3 .comparison td { display: block; width: 100% !important; padding: var(--s2) 0; border: 0; }
  .v3 .comparison td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--ochre-hi); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .v3 .insight-answer,
  .v3 .role-card,
  .v3 .operator-note,
  .v3 .insight-aside { padding: var(--s5); }
}

@media (prefers-reduced-motion: reduce) {
  .v3 .insight-card { transition: none; }
}

/* ---- insights index: grouped, lean cards ---------------------------------
   Four sections in reading order (built in build-seo.mjs), each card a short
   title, one line and "author · read time"; the headline and description
   live on the article. The whole card is the link. Columns follow each
   section's count (4 or 3) so no card sits alone. */
.v3 .insight-jumps { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s6); }
.v3 .insight-jumps a { display: inline-flex; min-height: 38px; align-items: center; padding: .45rem .95rem; border: 1px solid var(--hair); border-radius: var(--r-pill);
  background: rgba(9,20,14,.35); color: var(--tx-2); font-size: var(--fs-xs); font-weight: 650; transition: border-color .2s, color .2s, background .2s; }
.v3 .insight-jumps a:hover, .v3 .insight-jumps a:focus-visible { border-color: var(--ochre); background: rgba(183,127,60,.1); color: var(--ochre-hi); }
.v3 .insight-group { margin-top: var(--s8); scroll-margin-top: 100px; }
.v3 .insight-group + .insight-group { padding-top: var(--s7); border-top: 1px solid var(--hair); }
.v3 .insight-group__head { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: var(--s6); align-items: end; }
.v3 .insight-group__head h2 { margin: var(--s3) 0 0; color: var(--tx-1); font-family: var(--serif); font-size: var(--fs-h2); font-weight: 350; line-height: 1.1; }
.v3 .insight-group__head p { max-width: 58ch; margin: 0; color: var(--tx-3); line-height: 1.65; }
.v3 .insights-grid--lean { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s6); }
.v3 .insights-grid--lean:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v3 .insights-grid--lean:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v3 .insights-grid--lean .insight-card { min-height: 0; gap: var(--s2); padding: clamp(1.15rem, 2vw, 1.45rem); padding-right: 2.8rem; }
.v3 .insights-grid--lean .insight-card h3 { margin: 0; color: var(--tx-1); font-family: var(--serif); font-size: 1.22rem; font-weight: 400; line-height: 1.2; }
.v3 .insights-grid--lean .insight-card p { margin: 0; color: var(--tx-3); font-size: var(--fs-small); line-height: 1.5; }
.v3 .insights-grid--lean .insight-card__meta { margin-top: auto; padding-top: var(--s3); color: var(--tx-4); font-size: var(--fs-xs); }
.v3 .insight-card__go { position: absolute; top: clamp(1.15rem, 2vw, 1.45rem); right: 1.1rem; color: var(--ochre-hi); font-weight: 700; transition: transform .3s var(--ease); }
.v3 .insight-card:hover .insight-card__go,
.v3 .insight-card:focus-visible .insight-card__go { transform: translateX(4px); }
@media (max-width: 1080px) {
  .v3 .insights-grid--lean,
  .v3 .insights-grid--lean:has(> :nth-child(3):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3 .insights-grid--lean > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .v3 .insight-group__head { grid-template-columns: 1fr; gap: var(--s3); }
  .v3 .insight-jumps { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--s2); scrollbar-width: none; }
  .v3 .insight-jumps a { flex: none; }
  .v3 .insights-grid--lean,
  .v3 .insights-grid--lean:has(> :nth-child(3):last-child) { grid-template-columns: 1fr; gap: var(--s3); }
}

/* ---- guides (build-seo.mjs, templates/guide.html) --------------------------- */
.v3 .insight-crumbs { margin: 0 0 var(--s3); color: var(--tx-3); font-size: var(--fs-label); font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.v3 .insight-crumbs a { color: var(--ochre-hi); }
.v3 .guide-source { display: inline-flex; align-items: center; gap: .4rem; margin-top: var(--s4); padding: .45rem .9rem; border: 1px solid var(--hair); border-radius: var(--r-pill);
  background: rgba(9,20,14,.35); color: var(--tx-2); font-size: var(--fs-xs); font-weight: 650; transition: border-color .2s, color .2s; }
.v3 .guide-source:hover, .v3 .guide-source:focus-visible { border-color: var(--ochre); color: var(--ochre-hi); }
.v3 .guide-need { margin: var(--s5) 0; padding: var(--s4) var(--s5); border: 1px solid var(--hair); border-radius: var(--r-md); background: rgba(9,20,14,.3); }
.v3 .guide-need > p:first-child { margin: 0 0 var(--s2); color: var(--tx-3); font-size: var(--fs-label); font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.v3 .guide-need ul { margin: 0; }
.v3 .guide-steps { counter-reset: guide-step; margin: var(--s5) 0; padding: 0; list-style: none; }
.v3 .guide-step { position: relative; counter-increment: guide-step; margin: 0 0 var(--s5); padding-left: 3rem; }
.v3 .guide-step::before { content: counter(guide-step); position: absolute; left: 0; top: .05rem; display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid rgba(233,196,138,.45);
  border-radius: 50%; background: rgba(183,127,60,.14); color: var(--ochre-hi); font-size: var(--fs-small); font-weight: 700; }
.v3 .guide-step > strong:first-child { display: block; margin-bottom: .25rem; color: var(--tx-1); }
.v3 .insight-article pre { margin: var(--s3) 0 var(--s4); padding: var(--s4); overflow-x: auto; border: 1px solid var(--hair); border-radius: var(--r-md); background: rgba(5,12,9,.6);
  color: var(--tx-1); font-size: .86rem; line-height: 1.6; }
.v3 .insight-article code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
.v3 .insight-article :not(pre) > code { padding: .1em .35em; border-radius: 5px; background: rgba(242,239,230,.08); color: var(--tx-1); }
.v3 .guide-tip { margin: var(--s5) 0; padding: var(--s4) var(--s5); border-left: 3px solid var(--ochre); border-radius: 0 var(--r-md) var(--r-md) 0; background: rgba(183,127,60,.08); }
.v3 .guide-tip p { margin: 0; }
