/* ═══════════════════════════════════════════════════════════════════════
   ISO 19650 multi-part guide — editorial shell (shared across all 6 pages)
   /iso-19650/  +  /iso-19650/part-1..5/

   Extracted verbatim from the APPROVED page-local shell in
   iso-19650/part-1/index.html (locked design, _HANDOVER-SHELL-DESIGN.md §2)
   and extended with the treatments the full poured content needs:
   tables, deep-dives, recap/light-slide moments, h3 + lists, rich next-block.

   Brand-token discipline: colours come from page.css :root. The only
   hardcoded hexes are the agreed rail greys #F3F3F3 / #EEEEEE / #E3E3E5
   (the single sanctioned exception, per the handover).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Cross-document view transitions (progressive enhancement) ─────────── */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .34s;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}

/* full-bleed white canvas so the whole guide reads on white, not paper-warm */
.isog-canvas { background: var(--paper); width: 100vw; margin-inline-start: calc(50% - 50vw); }
.isog { --rail-w: 264px; --rail-w-collapsed: 64px; --rail-top: 28px; --toc-w: 248px;
  display: grid; grid-template-columns: var(--rail-w) 1fr;
  max-width: 1280px; margin: 0 auto;   /* centred so wide screens don't dump dead white space to the right */
  transition: grid-template-columns .24s ease; }
.isog.collapsed { grid-template-columns: var(--rail-w-collapsed) 1fr; }

/* ── Index rail: full-height white, nav sticky inside ─────────────────── */
.isog-rail { background: var(--paper); border-inline-end: 1px solid var(--paper-rule);
  view-transition-name: isog-rail; }   /* holds still while content cross-fades on nav */
.isog-rail-in { position: sticky; top: var(--rail-top);
  max-height: calc(100vh - var(--rail-top)); overflow-y: auto;
  padding: 24px 20px 32px 28px; }
.isog-railhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding: 0 6px; }
.isog-railhead .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink); font-weight: 700; white-space: nowrap; }
.isog-toggle { flex: none; width: 28px; height: 26px; border: 1px solid var(--paper-rule-2);
  background: var(--paper); cursor: pointer; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; }
.isog-toggle:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.isog-toggle svg { width: 13px; height: 13px; }
.isog-toggle .ic-expand { display: none; }
.isog.collapsed .isog-toggle .ic-collapse { display: none; }
.isog.collapsed .isog-toggle .ic-expand { display: block; }

/* progress */
.isog-prog { padding: 2px 8px 16px; }
.isog-prog .pt { font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.isog-bar { display: flex; gap: 4px; }
.isog-seg { flex: 1; height: 4px; background: var(--paper-rule); }
.isog-seg.on { background: var(--ink); }

/* exec (00) entry */
.isog-ex { display: flex; align-items: center; gap: 11px; padding: 11px 12px; text-decoration: none;
  border-bottom: 1px solid var(--paper-rule); margin-bottom: 4px; }
.isog-ex:hover { background: var(--hover-paper); }
.isog-ex .num { font-weight: 700; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; width: 18px; }
.isog-ex .t { font-size: var(--fs-body); font-weight: 500; color: var(--ink-soft); }
.isog-ex.active { background: #F3F3F3; box-shadow: inset 3px 0 0 var(--red); }
.isog-ex.active .num { color: var(--red); }
.isog-ex.active .t { color: var(--ink); font-weight: 700; }

/* part rows */
.isog-prow { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0;
  cursor: pointer; text-align: start; padding: 11px 12px; font-family: var(--sans); text-decoration: none; }
.isog-prow:hover { background: var(--hover-paper); }
.isog-prow .num { font-weight: 700; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; width: 18px; }
.isog-prow .t { font-size: var(--fs-body); font-weight: 500; color: var(--ink-soft); flex: 1; min-width: 0; overflow-wrap: break-word; line-height: 1.25; }
.isog-prow .chev { flex: none; color: var(--paper-rule-2); display: flex; transition: transform .22s ease; }
.isog-prow .chev svg { width: 13px; height: 13px; }
.isog-part.open .isog-prow .chev { transform: rotate(90deg); color: var(--ink); }
.isog-part.active { background: #F3F3F3; }
.isog-part.active .isog-prow { box-shadow: inset 3px 0 0 var(--red); }
.isog-part.active .num { color: var(--red); }
.isog-part.active .t { color: var(--ink); font-weight: 700; }
.isog-subs { display: none; flex-direction: column; gap: 9px; padding: 2px 14px 14px 41px; }
.isog-part.open .isog-subs { display: flex; }
.isog-subs a { font-size: var(--fs-body-sm); font-weight: 500; color: var(--muted); text-decoration: none; line-height: 1.3; }
.isog-subs a:hover { color: var(--red); }
.isog-subs a.on { color: var(--red); font-weight: 700; }

/* collapsed → square number tiles */
.isog.collapsed .isog-railhead .lbl,
.isog.collapsed .isog-prog,
.isog.collapsed .isog-prow .t,
.isog.collapsed .isog-prow .chev,
.isog.collapsed .isog-ex .t,
.isog.collapsed .isog-subs { display: none; }
.isog.collapsed .isog-rail-in { padding: 24px 0 32px; }
.isog.collapsed .isog-railhead { justify-content: center; padding: 0; }
.isog.collapsed .isog-ex { width: auto; justify-content: center; height: 36px; padding: 0; margin: 0 12px 11px;
  background: #F3F3F3; border: 1px solid #E3E3E5; }
.isog.collapsed .isog-prow { width: auto; justify-content: center; height: 36px; padding: 0; margin: 0 12px 7px;
  background: #F3F3F3; border: 1px solid #E3E3E5; }
.isog.collapsed .isog-ex .num,
.isog.collapsed .isog-prow .num { width: auto; }
.isog.collapsed .isog-part.active .isog-prow { box-shadow: inset 3px 0 0 var(--red); }

/* ── Reading column ─────────────────────────────────────────────────── */
.isog-main { min-width: 0; }
.isog-read { max-width: 720px; margin: 0; padding: 48px 40px 24px 72px; }
/* wide screens: nudge the reading column toward the optical centre of the
   wider main area so the text isn't pinned against the rail */
@media (min-width: 1200px) {
  .isog-read { padding-inline-start: clamp(72px, 9vw, 132px); padding-inline-end: 56px; }
}

/* ── "On this page" rail (right) ──────────────────────────────────────────
   Pilot on the exec-summary hub. Only renders when the page opts in with
   .isog.has-toc AND there's genuine width (≥1400px). Below that it stays
   display:none, so laptop + mobile are unchanged. */
.isog-toc { display: none; }
.isog-toc-in { position: sticky; top: var(--rail-top);
  max-height: calc(100vh - var(--rail-top)); overflow-y: auto;
  padding: 26px 24px 32px 24px; border-inline-start: 1px solid var(--paper-rule); }
.isog-toc-h { font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.isog-toc nav { display: flex; flex-direction: column; gap: 11px; }
.isog-toc a { font-size: var(--fs-body-sm); line-height: 1.32; color: var(--muted);
  text-decoration: none; padding-inline-start: 12px; border-inline-start: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease; }
.isog-toc a:hover { color: var(--red); }
.isog-toc a.on { color: var(--ink); font-weight: 700; border-inline-start-color: var(--red); }

@media (min-width: 1400px) {
  .isog.has-toc { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--toc-w);
    max-width: 1520px; }
  .isog.has-toc.collapsed { grid-template-columns: var(--rail-w-collapsed) minmax(0, 1fr) var(--toc-w); }
  .isog.has-toc .isog-toc { display: block; }
  /* rail now uses the right-hand space, so the reading column sits normally */
  .isog.has-toc .isog-read { padding-inline-start: 56px; padding-inline-end: 48px; }
  /* Part pages have no right-hand TOC. Pin them to the hub's container width and
     reading padding so the rail + reading column never shift when navigating
     between the executive summary (has-toc) and a part (no toc). */
  .isog:not(.has-toc) { max-width: 1520px; }
  .isog:not(.has-toc) .isog-read { padding-inline-start: 56px; padding-inline-end: 48px; }
}
.isog-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--red); font-weight: 700; margin-bottom: 16px; }
.isog-read h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 60px);
  line-height: 1.04; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.isog-read h1 em { font-style: italic; color: var(--red); }
.isog-hrule { display: none; }
.isog-read .lead { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.6; color: var(--ink-soft); margin: 0 0 18px; }
.isog-read p { font-size: 17px; line-height: 1.62; color: var(--ink-soft); margin: 0 0 16px; }
.isog-read p b.t, .isog-read p strong.t { color: var(--red); font-weight: 800; }
.isog-read h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 34px);
  color: var(--ink); margin: 44px 0 16px; scroll-margin-top: 96px; line-height: 1.12; }
.isog-read h3 { font-family: var(--sans); font-weight: 700; font-size: 18px; color: var(--ink);
  margin: 28px 0 10px; scroll-margin-top: 96px; }
.isog-read a { color: var(--red); text-decoration: underline; text-underline-offset: 2px;
  text-decoration-thickness: 1px; }
.isog-read a:hover { color: var(--red-deep); }
.isog-read strong { color: var(--ink); font-weight: 700; }
.isog-read em { font-style: italic; }
.isog-read code { font-family: var(--mono); font-size: .9em; background: #F3F3F3;
  border: 1px solid var(--paper-rule); padding: 1px 5px; color: var(--ink); white-space: normal; overflow-wrap: anywhere; }

/* lists */
.isog-read ul { margin: 12px 0 18px; padding: 0; list-style: none; }
.isog-read ul li { position: relative; padding-inline-start: 20px; margin: 0 0 10px;
  font-size: 16px; line-height: 1.56; color: var(--ink-soft); }
.isog-read ul li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 10px;
  width: 6px; height: 6px; background: var(--red); }
.isog-read ol { margin: 12px 0 18px; padding-inline-start: 22px; }
.isog-read ol li { margin: 0 0 10px; font-size: 16px; line-height: 1.56; color: var(--ink-soft); }
.isog-read ol li::marker { color: var(--red); font-weight: 700; }

/* inline note (a raw blockquote inside the prose — a small aside, not a slide) */
.isog-note { border-inline-start: 3px solid var(--paper-rule-2); background: var(--paper-warm);
  padding: 14px 18px; margin: 18px 0; }
.isog-note p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
.isog-note p + p { margin-top: 8px; }

/* ── Tables (deep-dive reference data) ──────────────────────────────── */
.isog-read table { width: 100%; border-collapse: collapse; margin: 18px 0 24px;
  font-size: 13.5px; line-height: 1.45; }
.isog-read thead th { text-align: start; font-family: var(--sans); font-weight: 700;
  color: var(--ink); border-bottom: 2px solid var(--ink); padding: 9px 12px;
  font-size: 12px; vertical-align: bottom; }
.isog-read tbody td { border-bottom: 1px solid var(--paper-rule); padding: 9px 12px;
  color: var(--ink-soft); vertical-align: top; }
.isog-read tbody tr:last-child td { border-bottom: none; }
.isog-read table code { white-space: normal; }
.isog-read .isog-table-wrap { overflow-x: auto; margin: 18px 0 24px; }
.isog-read .isog-table-wrap table { margin: 0; }
/* headerless reference grid (e.g. discipline codes) */
.isog-read table.grid tbody td { border-bottom: 1px solid var(--paper-rule); }
.isog-read table.grid strong { color: var(--ink); }

/* ── Figure (the brand SVG, self-contained title inside) ─────────────── */
.isog-fig { margin: 30px 0 28px; }
.isog-fig svg { width: 100%; height: auto; display: block; }

/* ── Deep dive (collapsed inline expandable) ─────────────────────────── */
.isog-deep { margin: 26px 0; border-top: 1px solid var(--paper-rule); }
.isog-deep > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline;
  gap: 12px; padding: 16px 0 4px; }
.isog-deep > summary::-webkit-details-marker { display: none; }
.isog-deep > summary .dchev { flex: none; color: var(--red); display: inline-flex;
  align-self: center; transition: transform .2s ease; }
.isog-deep > summary .dchev svg { width: 13px; height: 13px; }
.isog-deep[open] > summary .dchev { transform: rotate(90deg); }
.isog-deep > summary .dl { font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--red); font-weight: 700; flex: none; }
.isog-deep > summary .dt { font-size: 15px; color: var(--ink-soft); font-weight: 500; line-height: 1.35; }
.isog-deep > summary:hover .dt { color: var(--ink); }
.isog-deep-in { padding: 6px 0 6px; }
.isog-deep-in h3:first-child { margin-top: 14px; }

/* ── Slide moment (full-bleed dark) ─────────────────────────────────── */
.isog-slide { background: var(--ink); padding: clamp(40px, 5vw, 64px) 48px; margin: 40px 0; max-width: 720px; }
.isog-slide .in { max-width: 680px; margin: 0 auto; font-family: var(--serif); font-style: italic;
  font-size: clamp(24px, 3.2vw, 34px); line-height: 1.34; color: #fff; text-align: center; }
.isog-slide .in p { margin: 0; }
.isog-slide .in p.sub { font-family: var(--sans); font-style: normal; font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.55; color: #C9C6BF; margin-top: 18px; }

/* ── Light pull-quote (a :slide without dark — stays in the column) ──── */
.isog-pull { max-width: 760px; margin: 34px 0; padding: 4px 0 4px 24px; border-inline-start: 3px solid var(--red); }
.isog-pull p { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.36; color: var(--ink); margin: 0; }
.isog-pull p.sub { font-family: var(--sans); font-style: normal; font-size: 16px;
  line-height: 1.55; color: var(--ink-soft); margin-top: 12px; }

/* ── Recap (full-bleed dark summary) ────────────────────────────────── */
.isog-recap { background: var(--ink); padding: clamp(40px, 5vw, 64px) 48px; margin: 44px 0; max-width: 720px; }
.isog-recap .in { max-width: 700px; margin: 0 auto; }
.isog-recap h2 { font-family: var(--serif); font-weight: 400; color: #fff;
  font-size: clamp(26px, 3vw, 34px); line-height: 1.14; margin: 0 0 26px; }
.isog-recap p { color: #D9D6D0; font-size: 16px; line-height: 1.6; margin: 0 0 16px;
  padding-inline-start: 18px; border-inline-start: 2px solid var(--red); }
.isog-recap p:last-child { margin-bottom: 0; }
.isog-recap strong { color: #fff; font-weight: 700; }

/* ── Next / hand-off block ──────────────────────────────────────────── */
.isog-nextblock { margin: 48px 0 12px; padding-top: 26px; border-top: 2px solid var(--ink); }
.isog-nextblock .nl { font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--red); font-weight: 700; display: block; margin-bottom: 12px; }
.isog-nextblock h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 32px);
  color: var(--ink); margin: 0 0 14px; line-height: 1.14; scroll-margin-top: 96px; }
.isog-nextblock p { font-size: 16px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 18px; }
.isog-nextblock .go { display: inline-flex; align-items: center; gap: 9px; font-size: 16px;
  font-weight: 700; color: var(--red); text-decoration: none; }
.isog-nextblock .go:hover { color: var(--red-deep); }
.isog-nextblock ul { margin: 16px 0 6px; }
.isog-nextblock ul li { font-size: 16px; }
.isog-nextblock ul li strong { color: var(--ink); }

/* ── Responsive: rail becomes a top bar on small screens ────────────── */
@media (max-width: 880px) {
  .isog, .isog.collapsed { grid-template-columns: 1fr; }
  .isog-rail { border-inline-end: none; border-bottom: 1px solid var(--paper-rule); view-transition-name: none; }
  .isog-rail-in { position: static; max-height: none; padding: 14px 16px; }
  .isog-prog, .isog-toggle, .isog-prow .chev { display: none; }
  /* hide sub-anchors on mobile (author intent) — needs to out-specify
     `.isog-part.open .isog-subs { display:flex }` from the base sheet */
  .isog-subs, .isog-part.open .isog-subs { display: none; }
  .isog-railhead { margin-bottom: 10px; }
  .isog-rail nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .isog-ex { border-bottom: none; margin-bottom: 0; }
  .isog-ex, .isog-prow { padding: 8px 10px; width: auto; }
  .isog-read { padding: 32px 22px 16px; }
}
@media (max-width: 540px) {
  .isog-read { padding: 26px 18px 14px; }
  .isog-read p, .isog-read ul li, .isog-read ol li { font-size: 16px; }
  .isog-slide { padding: 40px 22px; }
  .isog-recap { padding: 36px 22px; }
}

/* ── 2026-06-19 headline wrap polish — balance the slide quote + next-block
   heading so short tails ("by-product", a dangling "&") don't strand. ──── */
.isog-slide .in p, .isog-nextblock h2 { text-wrap: balance; }

/* ── 2026-06-19 WIDTH EXPERIMENT ──────────────────────────────────────────
   On wide screens the 720px reading column left a big dead gap before the TOC
   and squeezed the diagrams. Widen text a touch and let figures/tables/slides
   break out rightward into that space. Gated ≥1280px so laptop/tablet/mobile
   are untouched. */
@media (min-width: 1280px) {
  .isog-read { max-width: 800px; }
  .isog-fig,
  .isog-read > .isog-table-wrap,
  .isog-slide { width: calc(100% + 150px); max-width: 940px; }
}
