/* ============================================================
   Part One — The Delivery System (R-121, wave 2 of R-118/R-120).
   Page-only styles on top of e.css. Static page (R-78): no motion.
   ============================================================ */

/* The "figures verified" line sits under the factlist as a quiet meta line. */
.e-masthead .cs-stamp { margin-top: 32px !important; margin-bottom: 0 !important; font-size: var(--t-label); }
/* R-127: the five figures read as the page's evidence, not as list items. */
.dir-e .e-facts li { font-size: var(--t-pull); line-height: 1.2; font-weight: 300; letter-spacing: -0.01em; padding-block: 14px; }

/* The intro follows the masthead directly; it is not a new section. */
.dir-e .cs-intro { padding-top: 96px; }

/* The former metric strip, now an .e-facts list inside the reading column.
   .e-prose's sibling spacing would otherwise pull it tight to the paragraph. */
.e-prose > .e-facts { margin-top: 40px !important; margin-bottom: 18px; }

/* Bold run-in leads inside list items read as plain emphasis, not labels. */
.e-prose ul:not([class]) li strong { font-weight: 600; }

/* The gate-refusal capture is a tall terminal screenshot (2080x2589):
   hold it to the reading column so it doesn't run to ~1250px tall. */
.e-figure.cs-gate { max-width: none; margin-top: 72px; }  /* R-127(c): full container width */
.cs-gate .e-figure-media { background: #201B18; }

@media (max-width: 720px) {
    .dir-e .cs-intro { padding-top: 72px; }
    .e-figure.cs-gate { margin-top: 56px; }
}

/* R-128(11): the three-line summary under the factlist. One line per row:
   label in the label style, statement at small size. Stacks under 720px. */
.cs-summary { display: grid; gap: 10px; margin-top: 40px; max-width: 820px; }
.cs-summary > div { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: baseline; }
.cs-summary dt { font-size: var(--t-label); color: var(--e-soft); }
.cs-summary dd { margin: 0; font-size: var(--t-small); line-height: 1.45; }
.cs-summary a, .cs-facts-note a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--e-underline); }

/* R-128 / brief 05: the prototype-vs-production line closes the fact list. */
.e-prose > .cs-facts-note { margin-top: 28px !important; }

@media (max-width: 720px) {
    .cs-summary > div { grid-template-columns: 1fr; gap: 2px; }
}

/* R-143: in-page diagrams (no screenshots): The Line's rules, the six-way split, and the
   one-direction flow. Built from the page's own tokens. */
.cs-diagram { max-width: 880px; }
.e-figure--wide.cs-diagram { max-width: none; }
.cs-rules, .cs-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cs-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-rules li, .cs-flow li { background: var(--e-surface); border-radius: 3px; box-shadow: 0 0 0 1px var(--e-rule); padding: 18px 20px; font-size: var(--t-small); line-height: 1.45; color: var(--e-body-soft); }
.cs-rules li span, .cs-flow li span { display: block; font-size: var(--t-h3); line-height: 1.2; color: var(--e-ink); margin-bottom: 6px; }
.cs-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.cs-flow li { position: relative; }
.cs-flow li + li::before { content: "\2192"; position: absolute; left: -28px; top: 50%; transform: translateY(-50%); color: var(--e-soft); font-size: var(--t-small); }
.dir-e .cs-flow-back { margin: 16px 0 0; padding: 14px 18px; border: 1px dashed var(--e-underline); border-radius: 3px; font-size: var(--t-small); line-height: 1.45; color: var(--e-body-soft); max-width: none; }
.cs-fan { display: grid; justify-items: center; gap: 10px; }
.cs-fan-node { background: var(--e-surface); border-radius: 3px; box-shadow: 0 0 0 1px var(--e-ink); padding: 12px 20px; font-size: var(--t-small); text-align: center; }
.cs-fan-node--soft { box-shadow: 0 0 0 1px var(--e-rule); color: var(--e-body-soft); }
.cs-fan-arrow { color: var(--e-soft); font-size: var(--t-small); line-height: 1; }
.cs-fan-lanes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; width: 100%; }
.cs-fan-lanes li { background: var(--e-surface); border-radius: 3px; box-shadow: 0 0 0 1px var(--e-rule); padding: 12px 8px; text-align: center; font-size: var(--t-label); color: var(--e-body-soft); }
.cs-fan-out { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cs-diagram figcaption { margin-top: 16px; }
.bth-after { margin-top: 48px; }
@media (max-width: 720px) {
    .cs-rules, .cs-flow { grid-template-columns: 1fr; }
    .cs-flow { gap: 30px; }
    .cs-flow li + li::before { content: "\2193"; left: 20px; top: -24px; transform: none; }
    .cs-fan-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Percy: a portrait photo beside the Saturday paragraph on wide screens, below it on narrow. */
.cs-walk { display: grid; grid-template-columns: minmax(0, 760px) 340px; gap: 64px; align-items: start; }
.e-figure.cs-percy { max-width: 340px; margin: 0; }
.cs-percy .e-figure-media img { width: 100%; height: auto; display: block; border-radius: 3px; }
.cs-walk + .cs-diagram { margin-top: 64px; }
@media (max-width: 1000px) {
  .cs-walk { grid-template-columns: 1fr; gap: 40px; }
  .e-figure.cs-percy { max-width: 420px; }
}

/* Recreated artifacts (The Line, a decision log entry): framed like a page, tap to open full size. */
.cs-artifact .e-figure-media { display: block; background: #fff; box-shadow: 0 0 0 1px var(--e-rule), var(--e-shadow); border-radius: 3px; overflow: hidden; }
.cs-artifact img { width: 100%; height: auto; display: block; }

/* R-201: the gate screenshot shows at its own size, never upscaled (natural 1040px) and never taller
   than the viewport; it centers on its dark frame. */
.cs-gate .e-figure-media img { display: block; width: auto; max-width: min(100%, 1040px); max-height: 86vh; margin: 0 auto; }
