.card{background:var(--card);border:1px solid var(--border);border-radius:0;
  box-shadow:var(--shadow);padding:18px}
.chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
/* export-style picker (S4): four mutually-exclusive views — the shared
   .segmented control (Swiss 6c; it was a .chip row with an --accent-inked
   active chip). Wrap so four uppercase segments still fit a phone row. */
.stylepick{flex-wrap:wrap}
#cmhost .cm-editor{min-height:440px}
/* a phone lays the artefact out tall (about 1880px for the example): reserve that while the first render is coming, so nothing below it moves */
@media (max-width:539px){.stage .preview .placeholder[data-boot]{aspect-ratio:auto;min-height:1880px;max-height:none;align-items:flex-start}}
.stage .preview{--reserve-ar: 902 / 576}   /* load-grace: default example's viewBox — see workspace.css */
button:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* Roadmap has a single working sheet: source and artefact share one plane, with
   the divider doing all the separation work. This is deliberately local; other
   workspace tools have their own visual contracts. */
@media (min-width:901px){
  .workspace{border:0;background:var(--card)}
  .workspace .rail,.workspace .stage{background:transparent;box-shadow:none}
}
.stage-head{display:flex;align-items:end;gap:12px 20px;flex-wrap:wrap;
  margin:26px 0 12px;padding-bottom:10px;border-bottom:2px solid var(--ink)}
.stage-head .metrics{flex:1 1 360px;min-width:0;margin:0;padding:0;border:0}
/* The named source return is useful in a reading state, but it must never
   visually run into the roadmap identity beside it. Reserve its full label
   plus a deliberate gutter, not the old icon-sized allowance. */
.workspace.collapsed .stage-head,.workspace.focus-artefact .stage-head{margin-top:12px;padding-left:168px}
.composition-bar{display:flex;align-items:center;gap:10px 16px;flex:0 1 auto;flex-wrap:wrap;
  margin:0;padding:0;border:0}
.composition-label{color:var(--accent-ink);font-size:10px;font-weight:750;letter-spacing:.13em;text-transform:uppercase}
.composition-bar #grouppicker{margin-left:auto}
@media (max-width:720px){
  .stage-head{display:block;margin-top:18px}
  .stage-head .metrics{margin:0 0 10px;padding-bottom:10px;border-bottom:2px solid var(--ink)}
  .composition-bar #grouppicker{margin-left:0;flex-basis:100%}
}
.narrow-composition-note{display:none;margin:0;flex-basis:100%;color:var(--muted);font-size:12px;line-height:1.4}
@media (max-width:900px){.narrow-composition-note{display:block}}
select.ctl{font-size:12.5px;padding:6px 8px;border:1px solid var(--border);border-radius:0;
  background:var(--card);color:var(--ink);font-family:inherit;max-width:210px}
.board-window[hidden]{display:none}
.board-window{gap:6px;min-height:44px;padding-block:2px}
.board-window #boardwindowlabel{color:var(--accent-ink);font-size:10px;font-weight:750;letter-spacing:.13em;text-transform:uppercase}
.board-window #boardrange{min-width:5.5em;text-align:center;font-variant-numeric:tabular-nums}
.board-window #boardjump{max-width:150px}
.board-step{min-width:32px;padding-inline:10px;font-size:19px;line-height:1}
.board-step:disabled{border-color:transparent;background:transparent;opacity:.35}
.preview [data-edit="cardmenu"] [data-empty-control]{opacity:0}
.preview [data-edit="cardmenu"]:hover [data-empty-control],.preview [data-empty-control]:focus{opacity:.6}
.preview [data-add-control]{opacity:0}
.preview [data-add-control]:hover,.preview [data-add-control]:focus-within{opacity:.6}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* The shared rail tab is icon-only elsewhere. Roadmap's collapsed state needs a
   named return path because its source is an explicit authoring mode, not a
   decorative side panel. */
.workspace.collapsed .railtab,.workspace.focus-artefact .railtab{
  top:12px;left:18px;width:auto;min-height:44px;padding:10px 10px 10px 13px;
  border:0;border-left:2px solid var(--accent);background:transparent;
  color:var(--ink);font:700 10px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  letter-spacing:.1em;text-transform:uppercase;opacity:1;
}
.workspace.collapsed .railtab::before,.workspace.focus-artefact .railtab::before{content:none}
.workspace.collapsed .railtab:hover,.workspace.focus-artefact .railtab:hover{background:var(--ink);color:var(--bg)}
@media (pointer:coarse){.preview svg [data-edit]{touch-action:manipulation}}
.workspace.collapsed .railtab::after,.workspace.focus-artefact .railtab::after{content:none}
/* The editor remains a grid item when its column closes. Zero its block
   contribution as well as its width: a hidden CodeMirror document must not
   leave a phantom page-length rail behind the reading artefact. */
.workspace.collapsed .rail,.workspace.focus-artefact .rail{
  align-self:start;min-height:0;max-height:0;height:0;overflow:hidden;
}
/* Keep utility controls in a single, quiet trailing band after the verdict.
   The top rule states a new interaction zone without making another card. */
.roadmap-utilities{margin-top:28px;padding-top:14px;border-top:1px solid var(--border)}
.roadmap-utilities .actions{margin-top:0}
.roadmap-utilities .actions + .actions{margin-top:10px}
.roadmap-utilities .method{font-size:11px}
/* Empty by default. When an item inspection flow supplies content, desktop gives
   it a contextual margin; narrow layouts return it to normal document flow. */
.roadmap-receipt{color:var(--ink);background:transparent;border-left:2px solid var(--accent);
  padding:16px 18px;box-shadow:none}
.receipt-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.inspector-kicker{margin:0;color:var(--accent-ink);font-size:9px;font-weight:750;letter-spacing:.13em;text-transform:uppercase}
.receipt-head h2{margin:4px 0 0;font-family:Charter,Georgia,serif;font-size:21px;line-height:1.08}
#roadmapreceipt-title:focus{outline:0}
.receipt-head .btn{min-height:32px;padding:7px 10px}
.receipt-ledger{margin:18px 0 0;border-top:1px solid var(--border)}
.receipt-ledger > div{display:grid;grid-template-columns:82px minmax(0,1fr);gap:12px;padding:9px 0;border-bottom:1px solid var(--border)}
.receipt-ledger dt{color:var(--muted);font-size:9px;font-weight:750;letter-spacing:.1em;text-transform:uppercase}
.receipt-ledger dd{margin:0;font-size:13px;font-weight:650;line-height:1.3}
.receipt-basis{margin:16px 0 0;padding-top:14px;border-top:2px solid var(--ink);font-size:13px;line-height:1.45}
@media (min-width:1180px){
  .stage{position:relative}
  /* The receipt joins the right margin only after the reader has reclaimed the
     source rail. An open source editor keeps the roadmap at its proven floor
     and receives the receipt below it instead of a squeezed three-pane desk. */
  .workspace.review-margin.collapsed .stage:has(.roadmap-receipt:not([hidden])),
  .workspace.review-margin.focus-artefact .stage:has(.roadmap-receipt:not([hidden])){padding-right:356px}
  .workspace.review-margin.collapsed .roadmap-receipt:not([hidden]),
  .workspace.review-margin.focus-artefact .roadmap-receipt:not([hidden]){position:absolute;z-index:3;top:126px;right:18px;width:320px;
    max-height:calc(100vh - 144px);overflow:auto}
}
.preview svg [data-edit="cardmenu"].is-inspected > rect[data-hit]{fill:color-mix(in srgb,var(--accent) 8%,var(--card));stroke:var(--accent);stroke-width:2px}
@media (max-width:900px){
  .workspace.collapsed .stage-head,.workspace.focus-artefact .stage-head{padding-left:0}
  .roadmap-utilities{margin-top:22px}
}
/* Roadmap's action row sits immediately above the explanatory prose. Its
   treated Export menu therefore opens into the utility area, never over the
   editorial reading column below. */
.roadmap-utilities .actions .action-disclosure:not(.history) .action-menu{top:auto;bottom:calc(100% + 6px)}
.action-menu-label{margin:2px 7px 5px;padding:0 0 6px;border-bottom:1px solid var(--border);
  color:var(--muted);font-size:9px;font-weight:750;letter-spacing:.13em;text-transform:uppercase}
/* the headline field — the UI half of `headline:`. Given its own labelled row
   (2026-07-31): wedged between the style chips and the zoom control it inherited
   the chips' label, and once it held text nothing said what it was. 16px floor on
   coarse pointers or iOS zooms the whole page on focus (the house rule). */
input.hdl{font-size:12.5px;padding:6px 10px;border:1px solid var(--border);border-radius:0;
  background:var(--card);color:var(--ink);font-family:inherit;flex:1 1 420px;min-width:200px;max-width:720px}
input.hdl::placeholder{color:var(--muted)}
input.hdl:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (pointer: coarse){
  input.hdl{font-size:16px;min-height:44px;flex-basis:100%;max-width:none}
}
.importbox{display:none;margin-top:12px}
.importbox.open{display:block}
.importbox textarea{width:100%;min-height:120px;font-size:12.5px;padding:10px;resize:vertical;
  border:1px solid var(--border);border-radius:0;background:var(--bg);color:var(--ink);
  font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace}
.importbox .hint{font-size:12.5px;color:var(--muted);margin:6px 0 8px}
/* drag is a fine-pointer (mouse) affordance only — touch-action:none here would
   fight the narrow stack's vertical swipe-to-scroll on a phone; coarse pointers
   get the card menu's "Move to…" row instead (app.js gates the drag handlers
   the same way) */
/* An edge handle is a MOUSE affordance: dragging a 14px band is not a finger
   gesture, and the phone has "Runs until…" in the card menu instead. Left painted,
   the rects would sit on top of the card's own tap targets and swallow taps meant
   for that menu — in a band at both ends of every spanning card. So they are inert
   unless the pointer is fine. */
.preview svg rect[data-span-edge]{pointer-events:none}
/* what-if hit rect (A4): same fine-pointer-only discipline as the span-edge
   handle above — coarse pointers get the card menu's what-if rows (A5)
   instead. Keyboard access (tabindex/Enter/Space, app.js) is unaffected by
   pointer-events — it's a separate focus/keydown path, not hit-testing. */
.preview svg rect[data-whatif]{pointer-events:none}
@media (pointer: fine){
  .preview svg g[data-edit="cardmenu"]{cursor:grab;touch-action:none}
  .preview svg rect[data-span-edge]{pointer-events:auto;cursor:col-resize}
  .preview svg rect[data-whatif]{pointer-events:auto;cursor:pointer}
}
.preview svg rect[data-whatif]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
/* the hover dim and the drop glide share one transition list: .mo-flip's own rule is less specific than this one, so the glide needs naming here */
@media (prefers-reduced-motion: no-preference){
  .preview svg g[data-line]{transition:opacity var(--dur-fast)}
  .preview svg g[data-line].mo-flip{transition:transform var(--dur-base) var(--ease-out),opacity var(--dur-fast)}
}
.dragghost{
  position:fixed;z-index:50;pointer-events:none;max-width:240px;
  padding:8px 14px;border-radius:0;font-size:13px;font-weight:600;
  background:var(--card);color:var(--ink);border:1px solid var(--accent);
  box-shadow:0 6px 22px rgba(10,30,45,.22),0 2px 6px rgba(10,30,45,.14);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  transform:rotate(1.5deg) scale(1.03);
}
.dropline{
  position:absolute;z-index:5;pointer-events:none;height:3px;border-radius:0;
  background:var(--accent);box-shadow:0 0 0 1px var(--card);
}
/* the edge-drag's floating range readout — same surface as .dragghost, no
   rotation (that flourish belongs to the grabbed-card ghost, not a resize) */
.spanchip{
  position:fixed;z-index:50;pointer-events:none;max-width:240px;
  padding:6px 12px;border-radius:0;font-size:12.5px;font-weight:600;
  background:var(--card);color:var(--ink);border:1px solid var(--accent);
  box-shadow:0 6px 22px rgba(10,30,45,.22),0 2px 6px rgba(10,30,45,.14);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.method{color:var(--muted);font-size:12.5px}
@media (max-width:900px){ #cmhost .cm-editor{min-height:280px} }

/* A multi-page deck is a separate artefact, not an alternative live view.
   The native dialog keeps the interaction contract tight: Escape closes it,
   focus returns to its opener, and the actual rendered page is what downloads. */
.slide-set{width:min(1160px,calc(100vw - 32px));max-width:none;max-height:calc(100vh - 32px);
  margin:auto;padding:18px;border:1px solid var(--border);border-radius:0;
  background:var(--bg);color:var(--ink);box-shadow:var(--shadow)}
.slide-set::backdrop{background:color-mix(in srgb,var(--ink) 38%,transparent)}
.slide-set-head{display:flex;align-items:start;justify-content:space-between;gap:20px;margin-bottom:4px}
.slide-set-kicker{margin:0 0 4px;color:var(--accent-ink);font-size:9px;font-weight:750;letter-spacing:.13em;text-transform:uppercase}
.slide-set h2{margin:0;font-family:Charter,Georgia,serif;font-size:26px;line-height:1.1}
.slide-set-copy{margin:8px 0 14px;color:var(--muted);font-size:12.5px}
.slide-set-art{border:1px solid var(--border);background:var(--card);line-height:0}
.slide-set-art svg{display:block;width:100%;height:auto;max-height:calc(100vh - 265px)}
.slide-set-actions{display:flex;align-items:center;gap:8px;margin-top:14px}
.slide-set-actions .primary{margin-left:auto}
@media (max-width:600px){
  .slide-set{width:calc(100vw - 20px);max-height:calc(100vh - 20px);padding:12px}
  .slide-set h2{font-size:22px}.slide-set-actions{flex-wrap:wrap}
  .slide-set-actions .primary{margin-left:0;flex:1 1 100%}
}
@media (pointer:coarse){.slide-set .btn{min-height:44px}}

/* drag support on top of the shared workspace preview */
.preview{position:relative}
.preview svg{user-select:none;-webkit-user-select:none}

/* the what-if chip (A4): a sibling of the verdict block, OUTSIDE #preview —
   the paint innerHTML-swap wipes anything inside #preview, so this can't
   live there. role="status" is on the element in index.html (announces a
   world flip); hidden whenever no bet is being previewed. Survives the
   <520px narrow relayout unchanged — it isn't part of the SVG artefact. */
.whatif-chip{display:flex;flex-wrap:wrap;align-items:center;gap:6px;
  margin:10px 0 0;padding:8px 12px;font-size:12.5px;color:var(--muted);
  background:var(--card);border:1px solid var(--border)}
.whatif-chip[hidden]{display:none}
.whatif-chip strong{color:var(--ink);font-weight:600}
.whatif-chip button{font:inherit;font-weight:600;color:var(--accent);
  background:none;border:1px solid transparent;border-radius:0;
  padding:2px 7px;margin:0;cursor:pointer}
.whatif-chip button:hover,.whatif-chip button:focus-visible{border-color:var(--border);outline:none}
/* Decision dependency handoff: a quiet semantic strip, not another diagram or
   toolbar. The accent edge names the dependency; the action remains secondary
   to the roadmap itself. */
.conditionality-health{display:grid;grid-template-columns:minmax(0,1fr) auto;
  gap:14px;align-items:center;margin-top:10px;padding:11px 12px 11px 14px;
  border-left:3px solid var(--accent);
  background:color-mix(in srgb,var(--accent) 5%,var(--card));color:var(--ink)}
.conditionality-health[hidden]{display:none}
.conditionality-label{margin:0 0 3px;font-size:10px;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:var(--accent-ink)}
.conditionality-message{margin:0;font-size:12.5px;line-height:1.45;color:var(--muted)}
.conditionality-health .btn{max-width:310px;text-align:left;line-height:1.35}
@media (max-width:620px){
  .conditionality-health{grid-template-columns:1fr}
  .conditionality-health .btn{max-width:none;width:100%;justify-content:center;text-align:center}
}
@media (pointer: coarse){
  .whatif-chip{font-size:13px}
  .whatif-chip button{min-height:44px;padding:10px 12px}
}

/* Chapter lets the artifact own the page. Authoring remains available on demand. */
.chapter-app {font-family:'DM Sans',sans-serif}
.chapter-app > .wrap {max-width:none;padding:0 32px}
.chapter-app .workspace {margin-top:0;max-width:none}
.chapter-app .stage {background:transparent;border:0;padding:14px 24px 24px}
.chapter-app .stage-head {min-height:54px;padding-bottom:16px;border-bottom:1px solid var(--border)}
.chapter-app .stage-head .metrics {display:none}
.chapter-app .composition-bar {width:100%;justify-content:flex-end;gap:12px}
.chapter-app .composition-label {display:none}
.chapter-app .composition-bar .segmented {margin-right:auto}
.chapter-app .btn,.chapter-app .ctl,.chapter-app .segmented button {text-transform:none;letter-spacing:0;font-family:'DM Sans',sans-serif;font-size:14px;font-weight:500;min-height:44px}
.chapter-setting {display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.chapter-setting select.ctl {font-size:14px}
.chapter-setting input[type=color] {width:44px;height:44px;padding:3px;border:1px solid var(--border);background:transparent;cursor:pointer}
.chapter-app .chapter-export {background:var(--ink);color:var(--bg);padding:10px 22px}
.chapter-app .chapter-export:hover{background:transparent;color:var(--ink)}
.chapter-app .preview {padding:0;background:transparent;border:0;margin-top:20px}
/* Diagnosis helps the author; the reading surface carries authored content. */
.chapter-app .workspace.collapsed .vwrap {display:none}
.chapter-app .workspace.collapsed .stage-head {padding-left:168px}
.chapter-app .railtab {font-family:'DM Sans',sans-serif!important;letter-spacing:0!important;text-transform:none!important;font-size:13px!important}
.chapter-app .roadmap-utilities {margin-top:28px}
.chapter-app #verdict {font-size:20px;max-width:900px}
.chapter-app #fontstatus[hidden] {display:none}
.chapter-app #fontstatus {padding:20px;border:1px solid var(--border)}
.chapter-app svg [data-edit]:focus-visible,.chapter-app svg [data-lens]:focus-visible {outline:2px solid var(--accent);outline-offset:5px}
@media(max-width:900px){
 .chapter-app > .wrap{padding:0 20px}
 .chapter-app .stage{padding:8px 12px 20px}
 .chapter-app .stage-head,.chapter-app .workspace.collapsed .stage-head{padding-left:0;padding-top:50px}
 .chapter-app .composition-bar {justify-content:flex-start}
 .chapter-app .composition-bar .segmented {flex-basis:100%;display:flex;margin:0}
 .chapter-app .segmented button {flex:1;padding:8px}
 .chapter-setting {font-size:14px}
 .chapter-setting .ctl {font-size:16px;max-width:135px}
 .chapter-app .chapter-export {margin-left:auto}
 .chapter-app select.ctl,.chapter-app input.ctl {font-size:16px}
 .chapter-app .preview{margin-top:12px}
}

/* The shared workspace hides its rail toggle on phones. Chapter starts with the
   source folded, so its named return must remain available at every width. */
@media(max-width:900px){
 .chapter-app .workspace .railtab{display:block;top:8px;left:12px;width:auto;min-width:44px;min-height:44px;transform:none;padding:0 12px}
 .chapter-app .workspace:not(.collapsed):not(.focus-artefact) .railtab::after{content:none}
}

@media (pointer:coarse){.preview [data-add-control]{opacity:.75}}

.chapter-app #appearance .action-menu{min-width:220px;padding:12px;gap:12px}
.chapter-app #appearance .chapter-setting{justify-content:space-between}
.chapter-app .workspace:not(.collapsed):not(.focus-artefact) .railtab{width:auto;min-height:44px;padding:0 12px;transform:none;writing-mode:horizontal-tb}

.chapter-app .workspace:not(.collapsed):not(.focus-artefact) .railtab{top:12px;left:calc(var(--workspace-rail-width) + 24px);opacity:1;color:var(--ink);border-left:2px solid var(--accent)}
.chapter-app .workspace:not(.collapsed):not(.focus-artefact) .railtab::after{content:none}
.chapter-app .workspace:not(.collapsed):not(.focus-artefact) .stage-head{padding-top:54px}
@media(max-width:900px){
 .chapter-app .workspace:not(.collapsed):not(.focus-artefact) .railtab{left:12px}
}

.export-status{margin:8px 0 0;font-size:13px;color:var(--ink)}.export-status[hidden]{display:none}

/* Control language shared with Timeline (F42, 2026-11-13). Each tool keeps its own look; the
   44px control height and tap floor, the --dur-fast ease and the hover/focus/disabled behaviour
   are the same. Mirrors the closing block of timeline/style.css. */
.board-step:disabled{opacity:.45;cursor:default}
select.ctl:hover:not(:disabled){border-color:var(--ink)}
@media (max-width:520px),(pointer:coarse){.board-step{min-width:44px}}
@media (prefers-reduced-motion:no-preference){
  .btn,.segmented button,select.ctl,.railtab{transition:color var(--dur-fast) var(--ease-out),background-color var(--dur-fast) var(--ease-out),border-color var(--dur-fast) var(--ease-out)}
}
