/* Selected-decision receipt: the tree chooses a question; this quiet ledger
   edits its source fields. The accent rule is the visual tether between them. */
.preview [data-select-decision]{cursor:pointer; outline:none}
.paths-views{
  position:relative; display:flex; align-items:center; gap:12px; min-height:44px; margin:0 0 12px;
  padding-bottom:12px; border-bottom:1px solid var(--border);
}
.paths-views-label{
  color:var(--muted); font-size:9px; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
}
.paths-views .segmented{display:flex; flex-wrap:wrap; gap:0}
.paths-views .segmented .btn{min-height:36px; border-radius:0}
.paths-views .segmented .btn + .btn{margin-left:-1px}
.paths-more-views{margin-left:auto; color:var(--muted); font-size:11px}
.paths-more-views summary{cursor:pointer}
.paths-more-views > div{
  position:absolute; z-index:8; right:0; display:grid; min-width:112px; margin-top:6px;
  background:var(--bg); border:1px solid var(--border); box-shadow:var(--shadow);
}
.paths-more-views{position:relative}
.paths-more-views button{
  min-height:36px; padding:7px 11px; color:var(--ink); background:var(--bg); border:0;
  border-bottom:1px solid var(--border); font:600 11px system-ui,-apple-system,"Segoe UI",sans-serif; text-align:left; cursor:pointer;
}
.paths-more-views button:last-child{border-bottom:0}
.paths-more-views button:hover{color:var(--accent-ink); background:var(--hl)}
.action-menu .scoped-receipt-export{
  margin-top:5px; padding-top:12px; border-top:1px solid var(--border);
  color:var(--accent-ink); font-weight:700;
}
/* The four Paths views and their disclosure share the stage's compact action
   language. Their local 36px rule is intentional on desktop, but must not win
   over the touch floor at a phone width with a fine pointer. */
@media (max-width:520px), (pointer:coarse){
  .paths-views .segmented .btn,.paths-more-views summary,.paths-more-views button{min-height:44px}
}
@media (max-width:520px){
  .paths-views{align-items:flex-start; flex-wrap:wrap; gap:8px; margin-bottom:8px}
  .paths-views-label{padding-top:13px}
  .paths-more-views{position:relative; margin-left:0; padding-top:11px}
  /* The mobile disclosure is anchored to the view strip, not to its final
     wrapped trigger. Its left edge therefore never escapes the phone pane. */
  .paths-more-views > div{left:0; right:auto; width:max-content; min-width:112px; max-width:calc(100vw - 20px)}
}
.preview [data-select-decision][data-selected="true"] > polygon,
.preview [data-select-decision][data-selected="true"] > rect:not([data-hit]){
  stroke:var(--accent-ink); stroke-width:3px;
}
.preview [data-select-decision]:focus-visible > polygon,
.preview [data-select-decision]:focus-visible > rect:not([data-hit]){
  stroke:var(--accent); stroke-width:3px;
}
.preview [data-kind="outline-question"][data-selected="true"] > text,
.preview [data-kind="outline-question"]:focus-visible > text{fill:var(--accent-ink)}

/* Paths and Roadmap are adjacent instruments, not interchangeable views. Put
   the boundary where a new document begins, in prose rather than another
   control or shared model. */
.planning-boundary{display:flex;align-items:baseline;gap:10px 16px;flex-wrap:wrap;
  margin:16px 0 0;padding:10px 12px;border-left:3px solid var(--accent);
  background:color-mix(in srgb,var(--accent) 5%,var(--card))}
.planning-boundary span{color:var(--accent-ink);font-size:9px;font-weight:750;
  letter-spacing:.13em;text-transform:uppercase}
.planning-boundary p{flex:1 1 350px;margin:0;color:var(--muted);font-size:12px;line-height:1.45}
.planning-boundary a{color:var(--accent-ink);font-weight:700}
@media (max-width:520px){.planning-boundary{align-items:flex-start;margin-top:12px}.planning-boundary p{flex-basis:100%}}

.paths-viewbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:0 0 12px; padding:0 0 10px; border-bottom:1px solid var(--border);
}
.paths-viewbar .method{
  color:var(--muted); font-size:9px; font-weight:750; letter-spacing:.12em;
  text-transform:uppercase;
}
.paths-view-switch{flex:none}
.paths-projection-jump{
  display:none; min-height:44px; padding:8px 10px; color:var(--accent-ink);
  background:color-mix(in srgb,var(--accent) 7%,var(--card)); border:1px solid var(--accent);
  font:750 10px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:.06em; text-transform:uppercase; cursor:pointer;
}
.paths-projection-jump:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
@media (max-width:430px){
  .paths-viewbar{align-items:stretch; flex-direction:column; gap:7px}
  .paths-view-switch{display:flex; width:100%}
  .paths-view-switch button{flex:1 1 auto}
  .paths-projection-jump:not([hidden]){
    display:flex; align-items:center; justify-content:space-between; width:100%; margin-top:2px;
  }
}

/* Possible Plans is a comparison surface; this adjacent ledger is the moment
   one exact answer set becomes an operational Roadmap. The left answer spine
   keeps complex worlds scannable while the right receipt makes the basis —
   including what did not arise — explicit before navigation. */
.roadmap-projection{
  margin:16px 0 0; color:var(--ink); background:var(--bg);
  border:1px solid var(--border); border-top:3px solid var(--accent);
}
.roadmap-projection[hidden]{display:none}
.projection-head{padding:16px 18px 14px; border-bottom:1px solid var(--border)}
.projection-kicker{
  margin:0 0 4px; color:var(--accent-ink); font-size:9px; font-weight:750;
  letter-spacing:.14em; text-transform:uppercase;
}
.projection-head h2{
  margin:0; font-family:Charter,"Bitstream Charter",Georgia,serif;
  font-size:21px; line-height:1.15;
}
.projection-intro{
  max-width:72ch; margin:6px 0 0; color:var(--muted); font-size:11px; line-height:1.45;
}
.projection-body{display:grid; grid-template-columns:minmax(250px,.82fr) minmax(0,1.55fr)}
.projection-body.is-unselected{grid-template-columns:1fr}
.projection-body.is-unselected .projection-choices{border-right:0}
.projection-choices{
  min-width:0; margin:0; padding:14px; border:0; border-right:1px solid var(--border);
}
.projection-choices legend{
  width:100%; margin:0 0 8px; padding:0; color:var(--muted); font-size:9px;
  font-weight:750; letter-spacing:.11em; text-transform:uppercase;
}
.projection-choice{
  display:grid; grid-template-columns:18px minmax(0,1fr); gap:8px; align-items:start;
  min-height:44px; padding:10px 9px; border-block:1px solid transparent;
  cursor:pointer;
}
.projection-choice + .projection-choice{border-top-color:var(--border)}
.projection-choice:has(input:checked){
  margin-inline:-1px; padding-inline:10px 8px;
  background:color-mix(in srgb,var(--accent) 7%,var(--card));
  border-left:2px solid var(--accent);
}
.projection-choice[data-available="false"]{cursor:not-allowed; background:var(--card)}
.projection-choice input{width:16px; height:16px; margin:2px 0 0; accent-color:var(--accent)}
.projection-choice-copy,.projection-choice-line,.projection-choice-state{display:block; min-width:0}
.projection-choice-reference{
  display:block; margin-bottom:2px; color:var(--muted); font-size:8px; font-weight:750;
  letter-spacing:.1em; line-height:1.35; text-transform:uppercase;
}
.projection-choice-line{font-size:11px; font-weight:680; line-height:1.4; overflow-wrap:anywhere}
.projection-choice-state{margin-top:3px; color:var(--muted); font-size:9px; line-height:1.4}
.projection-choice[data-available="true"] .projection-choice-state{color:var(--accent-ink)}
.projection-choice:has(input:focus-visible){outline:2px solid var(--accent); outline-offset:-2px}
.projection-empty{
  margin:0; color:var(--muted); font-size:11px; line-height:1.5;
}
.projection-scope{
  margin:12px 4px 0; padding-top:10px; color:var(--muted); border-top:1px solid var(--border);
  font-size:9px; line-height:1.45;
}
.projection-confirmation{min-width:0; padding:16px 18px 18px}
.projection-confirmation > h3{
  margin:0 0 14px; font-family:Charter,"Bitstream Charter",Georgia,serif;
  font-size:18px; line-height:1.2;
}
.projection-confirmation > h3:focus{outline:none}
.projection-ledger{display:grid; grid-template-columns:150px minmax(0,1fr); gap:14px; padding:12px 0}
.projection-ledger + .projection-ledger{border-top:1px solid var(--border)}
.projection-ledger h4{
  margin:2px 0 0; color:var(--muted); font-size:9px; font-weight:750;
  letter-spacing:.1em; line-height:1.35; text-transform:uppercase;
}
.projection-ledger-list{list-style:none; margin:0; padding:0}
.projection-ledger-list li{min-width:0}
.projection-ledger-list li + li{margin-top:8px; padding-top:8px; border-top:1px dotted var(--border)}
.projection-ledger-list strong,.projection-ledger-list span{display:block; overflow-wrap:anywhere}
.projection-ledger-list strong{font-size:11px; line-height:1.4}
.projection-ledger-list span,.projection-ledger-empty{margin:2px 0 0; color:var(--muted); font-size:9px; line-height:1.45}
.projection-assumption{
  display:grid; grid-template-columns:22px minmax(0,1fr); gap:8px; align-items:start;
  min-height:44px; cursor:pointer;
}
.projection-assumption input{width:18px; height:18px; margin:1px 0 0; accent-color:var(--accent)}
.projection-assumption:has(input:focus-visible){outline:2px solid var(--accent); outline-offset:3px}
.projection-foot{display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin-top:4px; padding-top:14px; border-top:1px solid var(--border)}
.projection-separation{flex:1 1 300px; margin:0; color:var(--muted); font-size:10px; line-height:1.45}
.projection-create{flex:none}
.projection-message{flex:1 0 100%; margin:0; color:var(--err); font-size:10px; line-height:1.4}

@media (max-width:760px){
  .projection-body{grid-template-columns:1fr}
  .projection-choices{border-right:0; border-bottom:1px solid var(--border)}
}
@media (max-width:480px){
  .projection-head,.projection-confirmation{padding-inline:14px}
  .projection-choices{padding:12px 10px}
  .projection-ledger{grid-template-columns:1fr; gap:6px}
  .projection-ledger h4{margin-top:0}
  .projection-create{width:100%; justify-content:center}
  .stage > .actions > .touch-undo,.stage > .actions > #copypng,
  .stage > .actions > .action-disclosure{flex:1 1 calc(33.333% - 7px)}
  .stage > .actions > .action-disclosure > summary{width:100%; justify-content:center}
  .stage > .actions > .action-disclosure .action-menu{
    right:0; left:auto; width:min(220px,calc(100vw - 32px)); min-width:0;
  }
  .stage > .actions > .method{flex:1 0 100%}
}
@media (pointer:coarse){
  .projection-choice{min-height:52px}
  .projection-choice input{width:20px; height:20px}
  .projection-assumption{min-height:52px; align-items:center}
  .projection-assumption input{width:22px; height:22px}
  .projection-create{min-height:44px}
}

.decision-inspector{
  margin:16px 0 0; padding:16px 18px 18px;
  color:var(--ink); background:var(--bg);
  border:1px solid var(--border); border-left:3px solid var(--accent);
}
.decision-inspector[hidden]{display:none}
.inspector-head{display:flex; align-items:flex-start; justify-content:space-between; gap:16px}
.inspector-kicker{
  margin:0 0 3px; color:var(--muted); font-size:9px; font-weight:700;
  letter-spacing:.12em; text-transform:uppercase;
}
.inspector-head h2{
  margin:0; font-family:Charter,"Bitstream Charter",Georgia,serif;
  font-size:20px; line-height:1.15;
}
.inspector-close{
  min-height:32px; padding:5px 0; color:var(--muted); background:none;
  border:0; font:600 11px system-ui,-apple-system,"Segoe UI",sans-serif; cursor:pointer;
}
.inspector-close:hover{color:var(--accent-ink)}
.inspector-close:focus-visible,
.inspector-value:focus-visible,
.inspector-answer-actions button:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

.inspector-field{min-width:0}
.inspector-field.question-field{margin-top:14px}
.inspector-label{
  display:block; margin:0 0 4px; color:var(--muted); font-size:9px;
  font-weight:700; letter-spacing:.08em; text-transform:uppercase;
}
.inspector-value{
  display:block; width:100%; min-height:30px; padding:3px 2px;
  overflow-wrap:anywhere; color:var(--ink); background:none;
  border:0; border-bottom:1px dotted var(--border); border-radius:0;
  font:500 12px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;
  text-align:left; cursor:text;
}
.question-field .inspector-value{
  min-height:38px; font-family:Charter,"Bitstream Charter",Georgia,serif;
  font-size:17px; font-weight:600; line-height:1.35;
}
.inspector-value:hover{color:var(--accent-ink); border-color:var(--accent)}
.inspector-value.empty{color:var(--muted); font-style:italic}

.inspector-flags{display:flex; flex-wrap:wrap; gap:6px; margin:12px 0 14px}
.inspector-flag{
  display:inline-flex; align-items:center; min-height:22px; padding:2px 8px;
  color:var(--muted); background:var(--card); border:1px solid var(--border);
  font-size:9px; font-weight:700; letter-spacing:.04em;
}
.inspector-flag[data-state="active"],
.inspector-flag[data-state="testable"]{color:var(--accent-ink); border-color:var(--accent)}
.inspector-flag[data-state="untestable"]{color:var(--st-risk-ink)}

.inspector-ledger{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px 20px; padding:14px 0;
  border-block:1px solid var(--border);
}
.inspector-contract{margin:14px 0; padding:12px; background:color-mix(in srgb,var(--accent) 6%,var(--card)); border-left:2px solid var(--accent)}
.inspector-contract h3,.receipt-contract h3{
  margin:0 0 10px; color:var(--accent-ink); font-size:9px; font-weight:750;
  letter-spacing:.1em; text-transform:uppercase;
}
.inspector-contract-fields,.receipt-contract-fields{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px}
.inspector-arms{
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0;
  margin-top:14px; border:1px solid var(--border);
}
.inspector-arm{min-width:0; padding:12px 14px}
.inspector-arm + .inspector-arm{border-left:1px solid var(--border)}
.inspector-arm h3{
  margin:0 0 8px; color:var(--muted); font-size:9px; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase;
}
.inspector-work{list-style:none; margin:0; padding:0}
.inspector-work li + li{margin-top:8px; padding-top:8px; border-top:1px dotted var(--border)}
.inspector-work-title,.inspector-work-meta{display:block; overflow-wrap:anywhere}
.inspector-work-title{font-size:11px; font-weight:650}
.inspector-work-meta,.inspector-arm-empty{margin:2px 0 0; color:var(--muted); font-size:9px; line-height:1.35}
.inspector-answer{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; margin-top:14px}
.inspector-answer-actions{display:flex; flex-wrap:wrap; align-items:end; justify-content:flex-end; gap:6px}
.inspector-answer-help{flex:1 0 100%; margin:0 0 2px; color:var(--muted); font-size:9px; text-align:right}
.inspector-answer-notice{
  grid-column:1/-1; margin:0; padding:8px 10px; color:var(--muted);
  background:var(--card); border-left:2px solid var(--accent); font-size:10px; line-height:1.4;
}
.inspector-answer-actions .btn[aria-pressed="true"]{
  color:var(--accent-ink); border-color:var(--accent); background:var(--hl);
}

@media (max-width:700px){
  .inspector-ledger{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inspector-answer{grid-template-columns:1fr}
  .inspector-answer-actions{justify-content:flex-start}
  .inspector-answer-help{text-align:left}
}
@media (max-width:420px){
  .decision-inspector{padding:14px}
  .inspector-ledger{grid-template-columns:1fr}
  .inspector-arms{grid-template-columns:1fr}
  .inspector-arm + .inspector-arm{border-left:0; border-top:1px solid var(--border)}
}
@media (pointer:coarse){
  .inspector-value,.inspector-close,.inspector-answer-actions .btn,.receipt-edit-source{min-height:44px}
  .inspector-value{font-size:16px}
}

/* Overview keeps the roadmap as the artefact and uses a read-only impact
   receipt beside it. At constrained desktop widths the same receipt becomes a
   drawer over the stage instead of forcing the grid into a phone relayout. */
.overview-live{position:relative; min-width:0}
.overview-live > [hidden]{display:none}
.overview-main{
  grid-area:roadmap; min-width:0;
  display:grid; grid-template-areas:"advisory" "preview"; grid-template-columns:minmax(0,1fr);
}
.overview-main > .fit-readability-advisory{grid-area:advisory}
.overview-main > .preview{grid-area:preview; min-width:0}
.overview-receipt{grid-area:receipt}
.focus-lens{grid-area:focus}
.overview-receipt{
  position:absolute; z-index:4; top:12px; right:12px; width:min(360px,calc(100% - 24px));
  max-height:calc(100vh - 72px); overflow:auto; box-sizing:border-box;
  padding:16px 18px 18px; color:var(--ink); background:var(--bg);
  border:1px solid var(--border); border-left:3px solid var(--accent); box-shadow:var(--shadow);
}
.receipt-head{display:flex; align-items:flex-start; justify-content:space-between; gap:16px}
.receipt-close{
  flex:none; min-width:44px; min-height:44px; padding:8px 0; color:var(--muted);
  background:none; border:0; font:650 11px system-ui,-apple-system,"Segoe UI",sans-serif;
  cursor:pointer;
}
.receipt-close:hover{color:var(--accent-ink)}
.receipt-head h2,.focus-head h2{
  margin:0; overflow-wrap:anywhere; font-family:Charter,"Bitstream Charter",Georgia,serif;
  font-size:20px; line-height:1.2;
}
.receipt-head h2:focus{outline:none}
.receipt-state,.focus-state{
  margin:6px 0 0; color:var(--muted); font-size:11px; font-weight:650; line-height:1.4;
}
.receipt-ledger{
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 16px;
  margin:14px 0; padding:12px 0; border-block:1px solid var(--border);
}
.receipt-fact{min-width:0}
.receipt-fact dt,.impact-section h3,.focus-kind h4{
  margin:0 0 4px; color:var(--muted); font-size:9px; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase;
}
.receipt-fact dd{margin:0; overflow-wrap:anywhere; font-size:11px; font-weight:600; line-height:1.35}
.receipt-provenance{
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin:12px 0 0;
  padding-top:10px; color:var(--muted); border-top:1px solid var(--border);
  font-size:9px; font-weight:700; letter-spacing:.06em; line-height:1.35; text-transform:uppercase;
}
.receipt-edit-source{
  flex:none; min-height:32px; padding:4px 0; color:var(--accent-ink); background:none; border:0;
  font:750 10px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif; letter-spacing:.04em; cursor:pointer;
}
.receipt-edit-source:hover{text-decoration:underline}
.receipt-edit-source:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.receipt-next{
  margin:14px 0; padding:10px 11px; color:var(--ink);
  background:color-mix(in srgb,var(--accent) 7%,var(--card)); border-left:2px solid var(--accent);
}
.receipt-next h3{
  margin:0 0 4px; color:var(--accent-ink); font-size:9px; font-weight:750;
  letter-spacing:.1em; text-transform:uppercase;
}
.receipt-next p{margin:0; overflow-wrap:anywhere; font-size:11px; font-weight:650; line-height:1.4}
.receipt-contract{margin:14px 0; padding:12px; background:color-mix(in srgb,var(--accent) 6%,var(--card)); border-left:2px solid var(--accent)}
.receipt-contract .inspector-value{width:100%; min-height:34px; font-size:11px; line-height:1.4}
.receipt-basis{
  margin:14px 0 0; padding:10px 0 0; color:var(--muted); border-top:1px solid var(--border);
  font-size:9px; font-weight:600; line-height:1.45;
}
.impact-section + .impact-section{margin-top:13px; padding-top:12px; border-top:1px dotted var(--border)}
.impact-list{list-style:none; margin:0; padding:0}
.impact-list li{overflow-wrap:anywhere; font-size:10.5px; line-height:1.4}
.impact-list li + li{margin-top:7px}
.impact-copy{display:block; font-weight:650}
.impact-meta{display:block; margin-top:2px; color:var(--muted); font-size:9.5px; line-height:1.4}
.impact-empty{margin:0; color:var(--muted); font-size:10px; line-height:1.4}
.receipt-focus{width:100%; justify-content:center; margin-top:16px}
.receipt-closeout{
  margin-top:16px; padding-top:14px; border-top:1px solid var(--border);
}
.receipt-closeout-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px}
.receipt-closeout-head h3,.closeout-truth h3,.closeout-authoring h3,.closeout-history h3{
  margin:0; font-size:11px; font-weight:760; letter-spacing:.02em;
}
.closeout-currency{
  padding:4px 7px; color:var(--accent-ink); background:color-mix(in srgb,var(--accent) 9%,var(--card));
  border:1px solid color-mix(in srgb,var(--accent) 42%,var(--border));
  font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
}
.closeout-status-grid{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0;
}
.closeout-status{
  min-width:0; padding:9px 10px; background:var(--card); border:1px solid var(--border);
}
.closeout-status dt{
  margin:0 0 5px; color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
}
.closeout-status dd{margin:0; overflow-wrap:anywhere; font-size:10px; font-weight:720; line-height:1.3}
.closeout-guidance{margin:9px 0 0; color:var(--ink); font-size:10px; font-weight:650; line-height:1.4}
.receipt-closeout-open{width:100%; justify-content:center; margin-top:12px}

.focus-lens{min-height:560px; padding:20px; color:var(--ink); background:var(--bg); border:1px solid var(--border)}
.focus-head{display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding-bottom:16px; border-bottom:1px solid var(--border)}
.focus-identity{max-width:72ch}
.focus-return{flex:none}
.focus-relations{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px;
  margin-top:16px;
}
.focus-relations .impact-section{
  margin:0; padding:12px; background:var(--card); border:1px solid var(--border);
}
.focus-branches{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px}
.focus-branch{min-width:0; padding:16px; border:1px solid var(--border); border-top:3px solid var(--accent)}
.focus-branch h3{margin:0; font-size:15px; line-height:1.3}
.focus-branch-note{margin:4px 0 14px; color:var(--muted); font-size:10px}
.focus-kind + .focus-kind{margin-top:18px; padding-top:14px; border-top:1px dotted var(--border)}
.focus-evidence{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px}
.focus-evidence .impact-section{margin:0; padding:12px; background:var(--card); border:1px solid var(--border)}
.overview-receipt :focus-visible,.focus-lens :focus-visible{outline:2px solid var(--accent); outline-offset:2px}

body.overview-sheet-open{overflow:hidden}
body.overview-sheet-open::before{
  content:""; position:fixed; z-index:19; inset:0;
  background:color-mix(in srgb,var(--ink) 38%,transparent);
}
.overview-receipt[data-sheet="true"]{
  display:block !important; position:fixed; z-index:20; inset:auto 0 0; width:100%;
  max-height:min(78dvh,680px); overflow:auto; overscroll-behavior:contain;
  padding:18px 18px calc(18px + env(safe-area-inset-bottom));
  border:0; border-top:3px solid var(--accent); box-shadow:none;
}
.overview-receipt[data-sheet="true"] .receipt-identity{max-width:calc(100% - 60px)}

.overview-live[data-view="overview"][data-mode="overview"][data-receipt-layout="rail"]{
  display:grid; grid-template-columns:minmax(520px,1fr) 350px;
  grid-template-areas:"roadmap receipt"; align-items:start; gap:16px;
}
.overview-live[data-receipt-layout="rail"] .overview-receipt[data-layout="rail"]{
  position:sticky; top:12px; right:auto; width:350px; max-height:calc(100vh - 48px);
}
.overview-live[data-view="overview"][data-mode="overview"][data-receipt-layout="inline"]{
  display:grid; grid-template-columns:minmax(0,1fr); grid-template-areas:"receipt" "roadmap"; gap:12px;
}
.overview-live[data-receipt-layout="inline"] .overview-receipt[data-layout="inline"]{
  position:static; width:auto; max-width:none; max-height:none; padding:13px 16px 15px;
  border-left-width:3px; box-shadow:none;
}
.overview-live[data-receipt-layout="inline"] .receipt-head{align-items:center}
.overview-live[data-receipt-layout="inline"] .receipt-head h2{font-size:18px}
.overview-live[data-receipt-layout="inline"] .receipt-ledger{
  grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px 14px; margin:12px 0; padding:10px 0;
}
.overview-live[data-receipt-layout="inline"] .receipt-next{margin:0 0 12px}
@media (max-width:860px){
  .overview-live[data-receipt-layout="inline"] .receipt-ledger{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:520px){
  .inspector-contract-fields,.receipt-contract-fields{grid-template-columns:1fr}
  .receipt-provenance{align-items:flex-start; flex-direction:column}
  .receipt-edit-source{min-height:44px}
}
.overview-live[data-receipt-layout="overlay"] .overview-receipt[data-layout="overlay"]{
  position:absolute; top:12px; right:12px;
}
.overview-live[data-mode="focus"]{display:grid; grid-template-areas:"focus"}
.overview-live[data-mode="closeout"]{
  display:grid; grid-template-columns:minmax(0,1fr); grid-template-areas:"receipt";
}
.overview-live[data-mode="focus"] .overview-main,.overview-live[data-mode="closeout"] .overview-main{display:none}
.overview-live[data-focus-layout="stacked"] .focus-relations,
.overview-live[data-focus-layout="stacked"] .focus-branches,
.overview-live[data-focus-layout="stacked"] .focus-evidence{grid-template-columns:1fr}
.overview-live[data-focus-layout="stacked"] .focus-head{display:grid; grid-template-columns:1fr}
.overview-live[data-focus-layout="stacked"] .focus-return{justify-self:start}

.focus-lens[data-closeout-detail="true"],.overview-receipt[data-closeout-detail="true"]{
  --closeout-wash:color-mix(in srgb,var(--accent) 6%,var(--card));
}
.overview-receipt[data-closeout-detail="true"]:not([data-sheet="true"]){
  position:static; width:auto; max-width:none; max-height:none; padding:24px;
}
/* Close-out is the focused detail for one selection, not Brief's compact rail.
   Keep this selector more specific than the rail rule so a desktop return can
   faithfully restore the originating Brief composition afterwards. */
.overview-live[data-mode="closeout"] .overview-receipt[data-closeout-detail="true"]:not([data-sheet="true"]){
  position:static; width:auto; max-width:none; max-height:none;
}
.focus-lens[data-closeout-detail="true"]{padding:24px; min-height:0}
.closeout-head{padding-bottom:18px}
.closeout-boundary{
  margin:14px 0 0; padding:11px 13px; color:var(--muted); background:var(--closeout-wash);
  border-left:2px solid var(--accent); font-size:10px; font-weight:600; line-height:1.5;
}
.closeout-truth,.closeout-authoring,.closeout-history{
  margin-top:14px; padding:16px; background:var(--card); border:1px solid var(--border);
}
.closeout-truth h3,.closeout-authoring h3,.closeout-history h3{
  margin-bottom:13px; color:var(--accent-ink); font-size:9px; letter-spacing:.1em; text-transform:uppercase;
}
.closeout-truth-grid{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 20px; margin:0;
}
.closeout-truth-grid div{min-width:0}
.closeout-truth-grid dt{
  margin:0 0 4px; color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
}
.closeout-truth-grid dd{margin:0; overflow-wrap:anywhere; font-size:11px; font-weight:620; line-height:1.4}
.closeout-edit-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px}
.closeout-edit-grid .inspector-field{min-width:0; margin:0}
.closeout-edit-grid .inspector-value{
  width:100%; min-height:52px; padding:10px; text-align:left; background:var(--bg); border:1px solid var(--border);
  font-size:11px; line-height:1.4;
}
.closeout-edit-grid .inspector-value:hover{border-color:var(--accent)}
.closeout-history-list{list-style:none; margin:0; padding:0}
.closeout-history-list li{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 14px; padding:10px 0}
.closeout-history-list li + li{border-top:1px dotted var(--border)}
.closeout-history-list strong,.closeout-history-list span{font-size:10px; line-height:1.4}
.closeout-history-list span{grid-column:1}
.closeout-history-list small{grid-column:1; color:var(--muted); font-size:9px}
.closeout-history-list time{grid-column:2; grid-row:1; color:var(--muted); font-size:9px}
.closeout-source-note{
  margin:14px 0 0; color:var(--muted); font-size:9px; font-weight:600; line-height:1.45;
}

@media (max-width:760px){
  .closeout-edit-grid,.closeout-truth-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:520px){
  /* The selected receipt is a phone sheet at this width. Keep the route into
     its close-out detail comfortably reachable even when a fine pointer is
     reported by an emulator. */
  .receipt-closeout-open{min-height:44px}
  .closeout-status-grid,.closeout-edit-grid,.closeout-truth-grid{grid-template-columns:1fr}
  .overview-receipt[data-closeout-detail="true"]{max-height:min(88dvh,760px)}
  .overview-receipt[data-closeout-detail="true"] .focus-head{display:grid; grid-template-columns:1fr}
  .overview-receipt[data-closeout-detail="true"] .focus-return{justify-self:start}
  .closeout-truth,.closeout-authoring,.closeout-history{padding:13px}
}
@media (pointer:coarse){
  .receipt-closeout-open,.focus-return,.closeout-edit-grid .inspector-value{min-height:44px}
  .closeout-edit-grid .inspector-value{font-size:16px}
}
