/* ============================================================
   /case-studies/obie-homeowners/ — page-only styles (R-121, R-120(b)).
   Loaded after e.css. Maps the legacy components (tension diagram,
   decision cards, flow diagram, system map, platform comparison,
   outcome cards) to direction E: Newsreader, plain type, light rules,
   no boxes, no mono, no numbered labels, no checkmarks (R-118(a)).
   Static page: no motion (R-78).
   ============================================================ */

/* Prose that follows a figure or diagram inside the same block. */
.cs-after { margin-top: 64px; }

/* A statement set larger than body: "The core design challenge". */
.e-prose p.cs-statement { font-size: var(--t-pull); line-height: 1.25; font-weight: 300; letter-spacing: -0.01em; margin-top: 40px !important; }
.cs-statement strong { font-weight: 600; }

/* ---------- The three forces (was the tension diagram) ---------- */
.cs-forces { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 40px 48px; margin-top: 64px; max-width: 1000px; }
.cs-force { padding-top: 18px; border-top: 1px solid var(--e-ink); }
.dir-e .cs-force h3 { font-size: var(--t-h3); font-weight: 400; line-height: 1.2; }
.cs-force ul { margin-top: 12px; }
.cs-force li { font-size: var(--t-small); line-height: 1.5; color: var(--e-body-soft); padding: 8px 0; border-top: 1px solid var(--e-rule); }
.cs-force li:first-child { border-top: 0; }

/* ---------- Role columns ---------- */
.cs-cols { margin-top: 64px; max-width: 1100px; }

/* ---------- Key decisions (were decision cards) ---------- */
.cs-decision { margin-top: 96px; max-width: 1000px; padding-top: 28px; border-top: 1px solid var(--e-rule); }
.dir-e .cs-decision-head h3 { font-size: var(--t-h3); line-height: 1.2; font-weight: 400; letter-spacing: -0.005em; }
.cs-decision-head p { margin-top: 12px !important; font-size: var(--t-body); line-height: 1.55; color: var(--e-soft) !important; font-style: italic; }
.cs-decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; margin-top: 40px; }
/* R-127: h4 is retired; the decision-block labels are label-style <p>s. */
.dir-e .cs-decision .cs-label { font-size: var(--t-label); line-height: 1.5; font-weight: 400; color: var(--e-soft) !important; margin: 0 0 8px !important; }
.cs-decision-grid p, .cs-impact p { font-size: var(--t-body); line-height: 1.55; }

/* Options: chosen = ink with a filled marker; rejected = soft with a ring.
   Shape carries the difference, not colour alone. */
.cs-options li { position: relative; padding: 11px 0 11px 22px; border-top: 1px solid var(--e-rule); font-size: var(--t-small); line-height: 1.5; }
.cs-options li:first-child { border-top: 0; padding-top: 0; }
.cs-options li::before { content: ""; position: absolute; left: 0; top: calc(11px + 0.45em); width: 9px; height: 9px; border-radius: 50%; box-sizing: border-box; border: 1px solid var(--e-soft); }
.cs-options li:first-child::before { top: 0.45em; }
.cs-options li.rejected { color: var(--e-soft); }
.cs-options li.chosen { color: var(--e-ink); font-weight: 600; }
.cs-options li.chosen::before { background: var(--e-ink); border-color: var(--e-ink); }
.cs-note { font-style: italic; font-weight: 400; color: var(--e-soft); }

.cs-impact { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--e-rule); max-width: 760px; }
/* The price, then what it bought: the second label in one block gets its own interval. */
.dir-e .cs-decision .cs-impact p + .cs-label { margin-top: 24px !important; }

/* ---------- Data-preservation flow (was the flow diagram) ---------- */
.cs-flow { margin: 48px 0 0; }
.cs-flow figcaption { font-size: var(--t-label); color: var(--e-soft); margin-bottom: 20px; }
.cs-flow ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 32px; }
.cs-flow li { position: relative; padding-top: 16px; border-top: 1px solid var(--e-ink); }
.cs-flow li + li::before { content: "\2192"; position: absolute; left: -26px; top: 6px; color: var(--e-soft); font-size: 17px; }
.cs-flow-label { font-size: var(--t-small); line-height: 1.35; }
.cs-flow-value { margin-top: 6px !important; font-size: var(--t-pull); line-height: 1.15; font-weight: 300; letter-spacing: -0.01em; }
.cs-flow-desc { margin-top: 8px !important; font-size: var(--t-label); line-height: 1.45; color: var(--e-soft) !important; }

/* ---------- Figure headers (were mono badges + titles) ---------- */
.cs-fighead { font-size: var(--t-label); line-height: 1.5; margin-bottom: 16px !important; max-width: 680px; }
.cs-figkind { color: var(--e-soft); margin-right: 6px; }
.cs-figure { margin-top: 96px; }
.cs-pairhead { margin-bottom: 0 !important; }
.cs-figure > .e-figure-pair { margin-top: 16px; }
.cs-pair-next { margin-top: 48px; }
.e-figure-pair .e-figure { min-width: 0; }

/* ---------- System map ---------- */
.cs-map { margin: 96px 0 0; }
.cs-map-body { background: var(--e-surface); border-radius: 3px; box-shadow: 0 1px 0 var(--e-rule); padding: 40px 32px 28px; }
.cs-map-steps { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px 10px; }
.cs-map-steps > li:not(.cs-arrow) { position: relative; flex: 1 1 110px; padding: 12px 14px; border-top: 1px solid var(--e-rule); display: flex; flex-direction: column; gap: 2px; }
.cs-map-steps > li.is-branch { background: var(--e-ground); }
.cs-map-steps > li.is-checkpoint::after { content: ""; position: absolute; top: -4px; right: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--e-ink); }
.cs-arrow { align-self: center; color: var(--e-soft); font-size: 17px; flex: none; }
.cs-step-k { font-size: var(--t-label); color: var(--e-soft); }
.cs-step-v { font-size: var(--t-small); line-height: 1.3; }
.cs-map-key { margin-top: 28px !important; padding-top: 14px; border-top: 1px solid #ECEAE4; font-size: var(--t-label); color: var(--e-soft) !important; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.cs-key { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cs-key-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--e-ink); display: inline-block; }
.cs-key-fill { width: 12px; height: 12px; border-radius: 2px; background: var(--e-ground); box-shadow: inset 0 0 0 1px var(--e-rule); display: inline-block; }

/* The architecture features list sits under its h3. */
.cs-after + .e-facts { margin-top: 32px; }
.e-facts strong { font-weight: 600; }

/* ---------- Platform comparison ---------- */
.cs-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 32px 40px; align-items: start; margin-top: 64px; max-width: 1000px; }
.cs-model { padding-top: 18px; border-top: 1px solid var(--e-ink); }
.dir-e .cs-model h3 { font-size: var(--t-h3); font-weight: 400; line-height: 1.2; }
.cs-model ul { margin-top: 12px; }
.cs-model li { font-size: var(--t-small); line-height: 1.5; padding: 9px 0; border-top: 1px solid var(--e-rule); }
.cs-model li:first-child { border-top: 0; }
.cs-model-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.cs-model-grid li:nth-child(2) { border-top: 0; }
.cs-shared { margin-top: 12px !important; font-size: var(--t-small); padding-bottom: 9px; border-bottom: 1px solid var(--e-ink); }
.cs-model-note { margin-top: 14px !important; font-size: var(--t-label); font-style: italic; color: var(--e-soft) !important; }
.cs-compare-arrow { align-self: center; font-size: 28px; color: var(--e-soft); }

/* ---------- Outcomes (were outcome cards) ---------- */
.cs-outcomes { margin-top: 56px; max-width: 880px; }
.cs-outcomes li { padding: 24px 0; }
.cs-outcome-value { font-size: var(--t-pull); line-height: 1.15; font-weight: 300; letter-spacing: -0.01em; }
.cs-outcome-label { margin-top: 6px !important; font-size: var(--t-small); color: var(--e-soft) !important; }
.cs-outcome-detail { margin-top: 10px !important; font-size: var(--t-body); line-height: 1.55; max-width: 720px; }

.cs-principle { margin-top: 112px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 720px) {
    .cs-decision { margin-top: 72px; }
    .cs-decision-grid { grid-template-columns: 1fr; }
    .cs-flow ol { grid-template-columns: 1fr; gap: 20px; }
    .cs-flow li + li::before { content: "\2193"; left: auto; right: 0; top: 14px; }
    .cs-map-body { padding: 24px 20px 20px; }
    .cs-map-steps { flex-direction: column; gap: 2px; }
    .cs-map-steps > li:not(.cs-arrow) { flex: none; padding: 10px 12px; }
    .cs-arrow { transform: rotate(90deg); }
    .cs-compare { grid-template-columns: 1fr; }
    .cs-compare-arrow { transform: rotate(90deg); justify-self: start; }
    .cs-figure, .cs-map { margin-top: 72px; }
}
/* R-204: one role column left after the cut; it keeps the prose measure. */
.cs-cols > div:only-child { max-width: 680px; }

/* R-210: the two tall customization screenshots (2800 and 3810px tall) never outgrow the viewport.
   Contained as ruled for the Part 16 sketch: capped height, top of the screen shown, a fade where it's
   cut, and a tap opens the full screenshot. */
.cs-tall a.e-figure-media { display: block; position: relative; max-height: 78vh; overflow: hidden; cursor: zoom-in; }
.cs-tall a.e-figure-media img { display: block; width: 100%; height: auto; }
.cs-tall a.e-figure-media::after { content: "Open the full screen \2197"; position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 14px;
  background: linear-gradient(transparent, var(--e-surface) 70%); font-size: var(--t-label); color: var(--e-ink); text-align: center; }
