/* ============================================================
   EJ Jung — Portfolio
   case.css — the five-step case-study template (build_case.py).
   Loaded after style.css and system.css on case-study pages only.
   ============================================================ */

.cs2 { --cs-w: calc(var(--max-wide) + 48px); color: var(--base-text); }
.cs2 section[id] { scroll-margin-top: calc(var(--nav-h) + 72px); }
.cs2 h1, .cs2 h2, .cs2 h3, .cs2 h4 { margin: 0; }
.cs2-label { font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 400; color: var(--muted); letter-spacing: 0; text-transform: none; }

/* ── Hero ── */
.cs2-hero {
  max-width: var(--cs-w); margin: 0 auto; padding: 72px 24px 0; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; align-items: end;
}
.cs2-hero-text { display: flex; flex-direction: column; gap: 24px; }
.cs2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cs2-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: var(--radius-pill); font-size: var(--fs-label); font-weight: 600; line-height: 1.2; }
.cs2-chip.is-a { background: var(--accent-soft); color: var(--accent-ink); }
.cs2-chip.is-n { background: var(--panel); color: var(--body-text); }
.cs2-chip.is-b { background: var(--track-b-pale); color: var(--track-b); }
.cs2-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.cs2-hero h1 { font-family: var(--font-head); font-weight: 600; font-size: 60px; line-height: 1.15; letter-spacing: -0.015em; max-width: 880px; }
.cs2-hero-lead { margin: 0; font-size: var(--fs-lead); line-height: 1.7; color: var(--body-text); max-width: 760px; }
.cs2-hero-lead strong { font-family: var(--font-head); font-weight: 600; color: var(--base-text); }
.cs2-facts { margin: 0; background: var(--panel); border-radius: var(--radius-card); padding: 24px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px 16px; font-size: var(--fs-sm); }
.cs2-facts dt { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--muted); padding-top: 2px; }
.cs2-facts dd { margin: 0; font-weight: 600; }
.cs2-hero-shot { max-width: var(--cs-w); margin: 48px auto 0; padding: 0 24px; box-sizing: border-box; }
.cs2-hero-frame { background: var(--ink-panel); border-radius: 28px; padding: 40px 40px 0; height: 440px; overflow: hidden; box-sizing: border-box; }
.cs2-hero-frame img { display: block; width: 100%; height: 600px; object-fit: cover; object-position: top left; border-radius: 14px 14px 0 0; background: var(--white); }

/* ── What I covered ── */
.cs2-covered { max-width: var(--cs-w); margin: 64px auto 0; padding: 0 24px; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
.cs2-covered-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cs2-covered-head h2 { font-family: var(--font-head); font-weight: 600; font-size: 22px; }
.cs2-covered-head .steps-overall { margin: 0; }
.cs2-cov-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cs2-cov > a, .cs2-cov { color: var(--base-text); text-decoration: none; }
.cs2-cov > a, .cs2-cov.is-out { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; border-radius: var(--radius-3); }
.cs2-cov.is-in > a { background: var(--panel); border-top: 4px solid var(--accent); }
.cs2-cov.is-in > a:hover { background: var(--panel-strong); }
.cs2-cov.is-out { border: 1.5px dashed var(--rule); }
.cs2-cov.is-out .step-num { background: transparent; color: var(--muted); border: 1.5px solid #C9CDD3; }
.cs2-cov.is-out .cs2-cov-label { color: var(--muted); }
.cs2-cov-head { display: flex; align-items: center; gap: 10px; }
.cs2-cov .step-num { margin: 0; flex: none; }
.cs2-cov-label { font-size: var(--fs-sm); font-weight: 700; }
.cs2-cov-jobs { display: flex; flex-wrap: wrap; gap: 6px; }
.cs2-cov.is-in .job { background: var(--white); font-size: 13px; }

/* ── Sticky step bar ── */
.cs2-stepbar {
  position: sticky; top: var(--nav-h); z-index: 50; margin-top: 72px;
  background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--rule-light); border-bottom: 1px solid var(--rule-light);
  padding: 10px max(24px, calc((100% - var(--max-wide)) / 2)); display: flex; align-items: center; gap: 20px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cs2-stepbar-name { font-family: var(--font-head); font-weight: 600; font-size: 16px; white-space: nowrap; padding-right: 20px; border-right: 1px solid var(--rule); }
.cs2-stepbar-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cs2-stepbar-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; color: var(--body-text); text-decoration: none; white-space: nowrap; }
.cs2-stepbar-links a span { font-family: var(--font-mono); font-weight: 400; }
.cs2-stepbar-links a:hover { background: var(--panel); }
.cs2-stepbar-links a[aria-current="true"] { background: var(--base-text); color: var(--white); font-weight: 700; }

/* ── Chapter ── */
.cs2-chapter { max-width: var(--cs-w); margin: 0 auto; padding: 96px 24px 0; box-sizing: border-box; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
.cs2-chapter-rail { display: flex; flex-direction: column; gap: 10px; align-self: start; }
.cs2-step-badge { width: 44px; height: 44px; border-radius: 50%; background: var(--base-text); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 16px; }
.cs2-step-name { font-size: 16px; font-weight: 700; }
.cs2-step-jobs { display: flex; flex-wrap: wrap; gap: 6px; }
.cs2-step-jobs .job { font-size: 13px; }
.cs2-chapter-body { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.cs2-chapter-body > h2 { font-family: var(--font-head); font-weight: 600; font-size: 40px; line-height: 1.25; letter-spacing: -0.01em; max-width: 900px; }
.cs2-lead { margin: 0; font-size: 18px; line-height: 1.75; color: var(--body-text); max-width: 820px; }
.cs2-lead a, .cs2-flow p a { color: var(--accent); font-weight: 600; }

/* View more */
.cs2-more { display: flex; flex-direction: column; gap: 24px; padding-top: 8px; }
.cs2-more[hidden] { display: none; }
.cs2-more-btn { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid #C9CDD3; border-radius: var(--radius-pill); background: var(--white); color: var(--base-text); font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.cs2-more-btn[hidden] { display: none; }
.cs2-more-btn:hover { border-color: var(--base-text); }
.cs2-more-btn .cs2-label { margin: 0 6px; }
.cs2-more-btn[aria-expanded="true"] .cs2-more-open, .cs2-more-btn[aria-expanded="false"] .cs2-more-close { display: none; }

/* ── Blocks ── */
.cs2-row { display: grid; grid-template-columns: var(--cols); gap: 24px; align-items: start; }
.cs2-fig { margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cs2-fig img { display: block; width: 100%; height: auto; }
.cs2-fig figcaption { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }
.cs2-fig--panel .cs2-fig-frame { background: var(--panel); border-radius: var(--radius-card); overflow: hidden; }
.cs2-fig--line .cs2-fig-frame { background: var(--white); border: 1px solid var(--rule-light); border-radius: var(--radius-card); padding: 20px; }
.cs2-fig--crop .cs2-fig-frame { background: var(--panel); border-radius: var(--radius-card); padding: 24px 24px 0; height: 640px; overflow: hidden; box-sizing: border-box; }
.cs2-fig--crop img { border-radius: 10px 10px 0 0; box-shadow: 0 1px 3px rgba(25, 28, 34, 0.12); }

.cs2-story { background: var(--panel); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.cs2-story p, .cs2-p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--body-text); max-width: 820px; }

.cs2-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cs2-numcard { background: var(--panel); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.cs2-numcard p { margin: 0; font-size: var(--fs-xs); line-height: 1.55; color: var(--body-text); }
.cs2-nums { display: flex; gap: 20px; flex-wrap: wrap; }
.cs2-num { display: flex; flex-direction: column; }
.cs2-num b { font-family: var(--font-head); font-weight: 600; font-size: 44px; line-height: 1; }
.cs2-num span { font-size: var(--fs-xs); font-weight: 600; }
.cs2-numcard.is-a { background: var(--accent-soft); }
.cs2-numcard.is-a, .cs2-numcard.is-a p, .cs2-numcard.is-a .cs2-label { color: var(--accent-ink); }

.cs2-quote { margin: 0; background: var(--accent-soft); border-radius: var(--radius-card); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.cs2-quote p { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 1.5; color: var(--accent-ink); }
.cs2-quote footer { font-size: var(--fs-xs); color: var(--accent-ink); }

.cs2-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cs2-compare-col { border: 1px solid var(--rule); border-radius: var(--radius-card); padding: 24px; }
.cs2-compare h4 { font-family: var(--font-body); font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.cs2-compare ul { margin: 0; padding-left: 18px; font-size: var(--fs-sm); line-height: 1.7; color: var(--body-text); }

.cs2-takeaway { background: var(--ink-panel); color: var(--white); border-radius: var(--radius-card); padding: 28px 32px; display: flex; gap: 20px; align-items: center; }
.cs2-takeaway .cs2-label { color: #B9BFC8; white-space: nowrap; }
.cs2-takeaway p { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 1.4; }

.cs2-model { background: var(--panel); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.cs2-model ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; }
.cs2-model li { background: var(--white); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.cs2-model-n { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--accent); }
.cs2-model li b { font-size: 17px; }
.cs2-model li span:last-child { font-size: var(--fs-xs); line-height: 1.55; color: var(--body-text); }
.cs2-model-flow { margin: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cs2-model-flow span { background: var(--white); border-radius: var(--radius-2); padding: 12px 16px; font-size: var(--fs-sm); font-weight: 600; }
.cs2-model-flow span[aria-hidden] { background: none; padding: 0; color: var(--accent); font-size: 20px; }
.cs2-model-flow .is-dark { background: var(--base-text); color: var(--white); font-weight: 700; }

.cs2-decisions { display: flex; flex-direction: column; gap: 12px; }
.cs2-decisions ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cs2-decisions li { border: 1px solid var(--rule); border-radius: var(--radius-3); padding: 18px; display: flex; gap: 12px; font-size: var(--fs-sm); line-height: 1.55; font-weight: 600; }
.cs2-decisions li span { font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 400; color: var(--accent); padding-top: 3px; }

.cs2-h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.cs2-h3 h3 { font-family: var(--font-head); font-weight: 600; font-size: 26px; line-height: 1.3; }

.cs2-flow { background: var(--panel); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.cs2-flow ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 22px; }
.cs2-flow-step { position: relative; background: var(--white); border-radius: var(--radius-2); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.cs2-flow-step b { font-size: var(--fs-sm); }
.cs2-flow-step span { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--muted); }
.cs2-flow-step:not(.is-last)::after { content: "→"; position: absolute; right: -17px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 16px; }
.cs2-flow-step.is-last { background: var(--base-text); color: var(--white); }
.cs2-flow-step.is-last span { color: #B9BFC8; }
.cs2-flow.is-a { background: var(--accent-soft); }
.cs2-flow.is-a .cs2-label, .cs2-flow.is-a p, .cs2-flow.is-a p a { color: var(--accent-ink); }
.cs2-flow p { margin: 0; font-size: var(--fs-sm); line-height: 1.65; max-width: 820px; }

.cs2-plan { display: flex; flex-direction: column; gap: 10px; }
.cs2-plan-card { border: 1px solid var(--rule); border-radius: var(--radius-3); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.cs2-plan-card p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; font-weight: 600; }
.cs2-plan-card p.is-after { color: var(--accent-ink); font-weight: 700; }
.cs2-plan-tag { font-size: 13px; color: var(--muted); }
.cs2-plan-card .cs2-plan-tag:nth-of-type(2) { padding-top: 6px; }

.cs2-timeline { margin: 0; padding: 28px 28px 24px; list-style: none; background: var(--panel); border-radius: var(--radius-card); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.cs2-timeline li { display: flex; flex-direction: column; gap: 8px; padding-right: 10px; position: relative; }
.cs2-timeline li::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: #C9CDD3; }
.cs2-tl-dot { position: relative; width: 12px; height: 12px; margin: 2px 0; border-radius: 50%; background: var(--base-text); }
.cs2-timeline li.is-major .cs2-tl-dot { width: 16px; height: 16px; margin: 0; background: var(--accent); }
.cs2-timeline b { font-size: var(--fs-xs); line-height: 1.4; }

.cs2-fact { background: var(--panel); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 12px; height: 100%; box-sizing: border-box; }
.cs2-fact p { margin: 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--body-text); }
.cs2-fact-big { font-family: var(--font-head); font-weight: 600; font-size: 44px; line-height: 1; }
.cs2-fact-head { font-family: var(--font-head); font-weight: 600; font-size: 24px; line-height: 1.25; }
.cs2-fact a { margin-top: auto; font-weight: 600; color: var(--accent); }
.cs2-fact.is-dark { background: var(--ink-panel); color: var(--white); }
.cs2-fact.is-dark .cs2-label { color: #B9BFC8; }
.cs2-fact.is-dark p { color: var(--rule); }

/* ── Next ── */
.cs2-next { max-width: var(--cs-w); margin: 0 auto; padding: 112px 24px 0; box-sizing: border-box; }
.cs2-next a { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: var(--panel); border-radius: var(--radius-4); padding: 40px 44px; color: var(--base-text); text-decoration: none; }
.cs2-next a > span:first-child { display: flex; flex-direction: column; gap: 6px; }
.cs2-next b { font-family: var(--font-head); font-weight: 600; font-size: 36px; }
.cs2-next a > span:first-child > span:last-child { font-size: 16px; color: var(--body-text); }
.cs2-next-arrow { font-size: 32px; color: var(--accent); }
.cs2-next a:hover { background: var(--panel-strong); }

/* ── Narrower screens ── */
@media (max-width: 1100px) {
  .cs2-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cs2-hero h1 { font-size: 48px; }
  .cs2-chapter { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 80px; }
  .cs2-chapter-rail { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
  .cs2-row { grid-template-columns: minmax(0, 1fr); }
  .cs2-model ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs2-decisions ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs2-flow ol { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 12px; }
  .cs2-flow-step::after { display: none; }
  .cs2-timeline { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
}
@media (max-width: 860px) {
  .cs2-cov-grid { grid-template-columns: minmax(0, 1fr); }
  .cs2-cov > a, .cs2-cov.is-out { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .cs2-numbers, .cs2-compare { grid-template-columns: minmax(0, 1fr); }
  .cs2-takeaway { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 560px) {
  .cs2-hero { padding-top: 40px; }
  .cs2-hero h1 { font-size: 34px; line-height: 1.2; }
  .cs2-hero-lead { font-size: 17px; }
  .cs2-hero-shot { margin-top: 32px; padding: 0 16px; }
  .cs2-hero-frame { height: 240px; padding: 14px 14px 0; border-radius: 18px; }
  .cs2-hero-frame img { height: 320px; border-radius: 8px 8px 0 0; }
  .cs2-hero, .cs2-covered, .cs2-chapter, .cs2-next { padding-left: 16px; padding-right: 16px; }
  .cs2-covered { margin-top: 48px; }
  .cs2-stepbar { margin-top: 48px; top: 64px; padding: 8px 16px; gap: 12px; }
  .cs2-stepbar-name { display: none; }
  .cs2-chapter { padding-top: 64px; }
  .cs2-chapter-body > h2 { font-size: 28px; }
  .cs2-lead { font-size: 16px; line-height: 1.7; }
  .cs2-step-badge { width: 36px; height: 36px; font-size: 14px; }
  .cs2-model, .cs2-story, .cs2-quote, .cs2-fact, .cs2-flow, .cs2-timeline { padding: 20px; }
  .cs2-model ol, .cs2-decisions ol, .cs2-flow ol { grid-template-columns: minmax(0, 1fr); }
  .cs2-quote p, .cs2-takeaway p { font-size: 19px; }
  .cs2-fig--crop .cs2-fig-frame { height: 420px; padding: 14px 14px 0; }
  .cs2-fig--line .cs2-fig-frame { padding: 12px; }
  .cs2-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs2-h3 h3 { font-size: 22px; }
  .cs2-next a { padding: 28px 24px; }
  .cs2-next b { font-size: 28px; }
  .cs2-more-btn .cs2-label { display: none; }
  .cs2-model-flow { flex-direction: column; align-items: stretch; gap: 8px; }
  .cs2-model-flow span[aria-hidden] { display: none; }
}

/* ── Diagram as the hero image ── */
.cs2-hero-fig { display: flex; flex-direction: column; gap: 12px; margin-top: 48px; margin-bottom: 0; }
.cs2-hero-fig .cs2-fig-frame { background: var(--white); border: 1px solid var(--rule-light); border-radius: 28px; padding: 40px; }
.cs2-hero-fig img { display: block; width: 100%; height: auto; }
.cs2-hero-fig figcaption { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }

/* ── A step I didn't cover: one dashed line in the story ── */
.cs2-gap { max-width: calc(var(--cs-w) - 48px); margin: 40px auto 0; box-sizing: border-box; border: 1.5px dashed var(--rule); border-radius: var(--radius-card); padding: 20px 24px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: center; }
.cs2-chapter + .cs2-gap { margin-top: 96px; }
.cs2-gap-step { display: flex; align-items: center; gap: 12px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.cs2-gap-step .step-num { margin: 0; background: transparent; color: var(--muted); border: 1.5px solid #C9CDD3; }
.cs2-gap p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body-text); }
.cs2-gap p .cs2-label { margin-right: 10px; }
.cs2-gap a { color: var(--accent); font-weight: 600; }

/* ── Matrix (a small table) ── */
.cs2-matrix { background: var(--panel); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.cs2-matrix-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cs2-matrix-scroll { overflow-x: auto; }
.cs2-matrix table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 8px; margin: -8px; table-layout: fixed; }
.cs2-matrix thead th { text-align: left; padding: 0 16px 2px; font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 400; color: var(--muted); }
.cs2-matrix tbody th, .cs2-matrix td { text-align: left; vertical-align: top; padding: 16px; background: var(--white); border-radius: var(--radius-2); }
.cs2-matrix tbody th { background: var(--base-text); color: var(--white); }
.cs2-matrix b { display: block; font-size: var(--fs-sm); }
.cs2-matrix tbody span { display: block; padding-top: 4px; font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--body-text); }
.cs2-matrix tbody th span { color: var(--rule); }

/* ── Cards (short labelled statements) ── */
.cs2-cards { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.cs2-card { background: var(--panel); border-radius: var(--radius-3); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.cs2-card p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; font-weight: 600; }
.cs2-card.is-a { background: var(--accent-soft); }
.cs2-card.is-a p, .cs2-card.is-a .cs2-label { color: var(--accent-ink); }

@media (max-width: 1100px) {
  .cs2-gap { margin-left: 24px; margin-right: 24px; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cs2-model ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .cs2-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cs2-gap { margin-left: 16px; margin-right: 16px; padding: 16px; }
  .cs2-hero-fig { margin-top: 32px; }
  .cs2-hero-fig .cs2-fig-frame { padding: 14px; border-radius: 18px; }
  .cs2-matrix { padding: 16px; }
  .cs2-model ol { grid-template-columns: minmax(0, 1fr); }
}

/* ── Stack (layered model, e.g. a system's layers) ── */
.cs2-hero-block { margin-top: 48px; }
.cs2-stack { margin: 0; background: var(--panel); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.cs2-stack-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cs2-stack ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cs2-stack li { display: grid; grid-template-columns: 150px 110px minmax(0, 1fr); gap: 16px; align-items: baseline; background: var(--white); border-radius: 14px; padding: 16px 20px; }
.cs2-stack li b { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.cs2-stack li .cs2-label { color: var(--accent); }
.cs2-stack li span:last-child { font-size: var(--fs-sm); line-height: 1.55; color: var(--body-text); }
.cs2-stack li:last-child { background: var(--ink-panel); color: var(--white); }
.cs2-stack li:last-child .cs2-label { color: #B9BFC8; }
.cs2-stack li:last-child span:last-child { color: var(--rule); }
.cs2-stack figcaption { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }

/* ── Numbered cards (lessons, principles, audiences) ── */
.cs2-numbered { display: flex; flex-direction: column; gap: 12px; }
.cs2-numbered ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; }
.cs2-numbered li { border: 1px solid var(--rule); border-radius: var(--radius-3); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.cs2-numbered li b { font-size: 16px; line-height: 1.35; }
.cs2-numbered li span:last-child { font-size: var(--fs-xs); line-height: 1.55; color: var(--body-text); }
.cs2-numbered.is-panel { background: var(--panel); border-radius: var(--radius-card); padding: 24px; }
.cs2-numbered.is-panel li { border: 0; background: var(--white); }
.cs2-numbered.is-panel li:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }

/* ── Timeline with a line of text per point ── */
.cs2-timeline.has-text b { font-size: var(--fs-sm); }
.cs2-tl-text { font-size: var(--fs-xs); line-height: 1.5; color: var(--body-text); }

/* ── Theme illustration (same components, different tokens) ── */
.cs2-themes { margin: 0; background: var(--panel); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.cs2-themes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cs2-theme { background: var(--white); border-radius: var(--radius-3); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.cs2-theme-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cs2-theme-head b { font-size: var(--fs-sm); }
.cs2-theme-bar { height: 8px; border-radius: 4px; background: var(--tp); }
.cs2-theme-title { font-family: var(--tf); font-weight: 700; font-size: 22px; line-height: 1.25; }
.cs2-theme-ui { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cs2-theme-btn { background: var(--tp); color: var(--white); border: 1.5px solid var(--tp); border-radius: 8px; padding: 8px 13px; font-size: var(--fs-xs); font-weight: 600; }
.cs2-theme-btn.is-ghost { background: var(--white); color: var(--tp); }
.cs2-theme-tag { background: var(--ts); color: var(--tp); border-radius: var(--radius-pill); padding: 5px 10px; font-size: 12px; font-weight: 600; }
.cs2-themes figcaption { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }

@media (max-width: 1100px) {
  .cs2-numbered ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs2-numbered.is-panel li:last-child:nth-child(3n + 1) { grid-column: auto; }
  .cs2-numbered.is-panel li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .cs2-stack li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .cs2-stack li span:last-child { grid-column: 1 / -1; }
  .cs2-themes-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cs2-hero-block { margin-top: 32px; }
  .cs2-stack, .cs2-themes, .cs2-numbered.is-panel { padding: 16px; border-radius: var(--radius-card); }
  .cs2-numbered ol { grid-template-columns: minmax(0, 1fr); }
  .cs2-numbered.is-panel li:last-child:nth-child(odd) { grid-column: auto; }
}

/* ── What I covered: one segmented track (2026-10 revision) ──
   Covered steps get an ink segment; the rest stay light. No card boxes. */
.cs2-cov-grid { gap: 0 8px; }
.cs2-cov > a, .cs2-cov.is-out { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; border-radius: 0; background: none; height: auto; }
.cs2-cov.is-in > a { background: none; border-top: 0; }
.cs2-cov.is-in > a:hover { background: none; }
.cs2-cov.is-in > a:hover .cs2-cov-label { text-decoration: underline; text-underline-offset: 3px; }
.cs2-cov-seg { display: block; height: 6px; border-radius: 3px; background: var(--rule); margin-bottom: 12px; }
.cs2-cov.is-in .cs2-cov-seg { background: var(--base-text); }
.cs2-cov-label { font-size: 16px; font-weight: 700; }
.cs2-cov.is-out .cs2-cov-label { color: var(--muted); }
.cs2-cov-jobs { display: block; font-size: var(--fs-xs); line-height: 1.5; color: var(--body-text); }
.cs2-cov.is-out .cs2-cov-jobs { color: var(--muted); }
.cs2-covered-head { margin-bottom: 10px; align-items: baseline; }
.cs2-covered-role { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cs2-covered-role b { font-family: var(--font-head); font-weight: 600; font-size: 17px; }
@media (max-width: 860px) {
  .cs2-cov-grid { gap: 14px; }
  .cs2-cov > a, .cs2-cov.is-out { display: grid; grid-template-columns: 6px 28px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; flex-direction: initial; }
  .cs2-cov > a, .cs2-cov.is-out { align-items: start; }
  .cs2-cov-seg { grid-column: 1; grid-row: 1 / 3; align-self: stretch; width: 6px; height: auto; margin: 0; }
  .cs2-cov .cs2-label { grid-column: 2; grid-row: 1; padding-top: 3px; }
  .cs2-cov-label { grid-column: 3; grid-row: 1; }
  .cs2-cov-jobs { grid-column: 3; grid-row: 2; }
}

/* ── Interactive prototype (iframe that reports its height) ── */
.cs2-proto { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.cs2-proto-frame { border: 1px solid var(--rule-light); border-radius: var(--radius-card); overflow: hidden; background: var(--white); }
.cs2-proto iframe { display: block; width: 100%; border: 0; }
.cs2-proto figcaption { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }

/* Links on the dark fact card */
.cs2-fact.is-dark a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
