/* FUSE Builder storyboards: the list of steps (storyboard.js) and presenting.
   Used by the console (index.html) and the page a storyboard link opens (sb/index.html); both define
   the colour tokens (--bg --card --ink --ink-2 --ink-3 --line --soft --ok --bad --warn --blue),
   light and dark. Every class is sb- prefixed: the console already has .choices, .pts and .step. */
.sb-head{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap;margin-bottom:12px}
.sb-head .sb-title{flex:1;min-width:240px}
.sb-head h1{font-size:24px;font-weight:500;margin:0 0 4px;overflow-wrap:anywhere}
.sb-head .sub{margin:0}
.sb-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.sb-btn-present{display:inline-flex;align-items:center;gap:6px}
.sb-intro{background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0 0 14px;font-size:14px;color:var(--ink-2);line-height:1.5}
.sb-intro b{color:var(--ink)}
.sb-who{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.sb-who label{margin:0;font-size:14px;color:var(--ink)}
.sb-who input{width:auto;flex:1;min-width:160px;max-width:320px}
.sb-who.need input{outline:2px solid var(--bad);outline-offset:1px}
.sb-bar{display:flex;gap:10px 16px;align-items:center;flex-wrap:wrap;padding:10px 0 12px;border-bottom:1px solid var(--line);margin-bottom:6px;font-size:13px;color:var(--ink-2)}
.sb-bar .sb-count b{color:var(--ink);font-weight:500}
.sb-bar select{width:auto;font-size:13px;padding:6px 8px}
.sb-bar .spacer{flex:1}
.sb-scene{margin-top:22px}
.sb-scene > h2{font-size:17px;font-weight:500;margin:0 0 8px;display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.sb-scene > h2 small{font-size:12px;color:var(--ink-3);font-weight:400}
.sb-scenepic{width:100%;max-height:260px;object-fit:cover;border-radius:10px;display:block;margin-bottom:12px;background:var(--soft)}
.sb-nopic{border:1px dashed var(--line);border-radius:10px;padding:14px;color:var(--ink-3);font-size:13px;margin-bottom:12px}
.sbc{background:var(--card);border:1px solid var(--line);border-left:4px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:12px;scroll-margin-top:80px}
.sbc.st-ok{border-left-color:var(--ok)} .sbc.st-change{border-left-color:var(--bad)} .sbc.st-question{border-left-color:var(--warn)}
.sbc.flash{outline:3px solid var(--blue);outline-offset:2px}
.sbc[hidden]{display:none}
.sbc-h{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.sbc-num{font-weight:500;color:var(--ink-3);min-width:1.6em;font-size:15px}
.sbc-type{font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid var(--line);color:var(--ink-2);white-space:nowrap}
.sbc-h h3{flex:1;min-width:160px;font-size:16px;font-weight:500;margin:0;overflow-wrap:anywhere}
.sbc-h .sb-here{font-size:12px}
.sbb{margin:0 0 10px}
.sbb h4{font-size:12px;font-weight:500;color:var(--ink-3);margin:0 0 2px;text-transform:none}
.sbb p{font-size:15px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.sbb.set{font-size:12px;color:var(--ink-3);display:flex;gap:6px;flex-wrap:wrap}
.sbb.set b{font-weight:500}
.sb-ch{list-style:none;margin:2px 0 0;padding:0;display:flex;flex-direction:column;gap:4px}
.sb-ch li{font-size:15px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;overflow-wrap:anywhere}
.sb-ch li.right{border-color:var(--ok)}
.sb-ch li em{font-style:normal;font-size:11px;color:var(--ok);margin-left:8px;font-weight:500}
.sb-pts{margin:2px 0 0 20px;display:flex;flex-direction:column;gap:4px;font-size:15px}
.sb-pts b{font-weight:500;margin-right:6px}
.sb-next{list-style:none;margin:2px 0 0;padding:0;font-size:14px;display:flex;flex-direction:column;gap:3px}
.sb-next a{cursor:pointer}
.sb-linkbtn{font:inherit;font-size:13px;background:none;border:0;padding:4px 0;color:var(--blue);cursor:pointer;min-height:32px}
.sb-linkbtn:hover{text-decoration:underline}
.sb-sug{margin-top:6px;display:flex;flex-direction:column;gap:6px}
.sb-sug textarea{min-height:70px}
.sb-sug .row{justify-content:flex-start}
.sbc-marks{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.sb-mark{font:inherit;font-size:13px;padding:7px 12px;border-radius:999px;border:1px solid var(--line);background:transparent;color:var(--ink);cursor:pointer;min-height:36px}
.sb-mark:hover{background:var(--soft)}
/* pressed = a 2px border in the status colour, a faint tint and the page's own ink, with a tick:
   white text on the dark theme's status colours measured 2.4 to 2.9:1 */
.sb-mark[aria-pressed="true"]{border-width:2px;padding:6px 11px;font-weight:500}
.sb-mark[aria-pressed="true"]::before{content:"✓ "}
.sb-mark[aria-pressed="true"].ok{border-color:var(--ok);background:rgba(63,191,117,.14)}
.sb-mark[aria-pressed="true"].change{border-color:var(--bad);background:rgba(255,107,107,.14)}
.sb-mark[aria-pressed="true"].question{border-color:var(--warn);background:rgba(224,169,74,.16)}
.sb-tally{font-size:12px;color:var(--ink-3);flex-basis:100%;margin-top:2px}
.sbc-notes{margin-top:8px;display:flex;flex-direction:column;gap:8px}
.sbn{border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-size:14px;background:var(--bg)}
.sbn-h{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;font-size:12px;color:var(--ink-3);margin-bottom:3px}
.sbn-h b{color:var(--ink);font-weight:500;font-size:13px}
.sbn p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.sbn .sb-diff{margin-top:4px;padding:6px 8px;border-radius:6px;background:var(--soft);white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
.sbn .sb-diff-h{font-size:12px;color:var(--ink-3);margin-top:4px}
.sb-diff del{background:rgba(201,42,42,.14);color:var(--bad);text-decoration:line-through}
.sb-diff ins{background:rgba(23,122,65,.16);color:var(--ok);text-decoration:none}
.sbn.done{opacity:.8}
.sbn .row{margin-top:6px}
.sb-done summary{cursor:pointer;font-size:13px;color:var(--ink-2);padding:4px 0}
.sbc-add{margin-top:8px;display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}
.sbc-add textarea{flex:1;min-width:200px;min-height:42px;height:42px;resize:vertical}
.sb-empty{padding:30px;text-align:center;color:var(--ink-2)}
.sb-share .lnk{font-family:"Ubuntu Mono",ui-monospace,monospace;font-size:13px;word-break:break-all;background:var(--soft);border-radius:6px;padding:8px 10px;flex:1;min-width:180px}
.sb-share p{margin:8px 0;font-size:14px;color:var(--ink-2);line-height:1.5}

/* ---------- presenting: always dark, whatever the page's theme, like a projector wants ---------- */
.sbp{position:fixed;inset:0;z-index:60;background:#0b0d12;color:#f1f2f6;display:flex;flex-direction:column;font-family:Ubuntu,system-ui,sans-serif}
.sbp:focus{outline:none}
.sbp-stage{flex:1;min-height:0;position:relative;overflow:hidden}
.sbp-slide{position:absolute;inset:0;display:flex;padding:clamp(16px,4vw,56px);gap:clamp(16px,3vw,40px)}
.sbp-cover{flex-direction:column;justify-content:center;max-width:1100px;margin:0 auto}
.sbp-cover .k{font-size:clamp(13px,1.4vw,18px);color:#aab0c0;letter-spacing:.02em}
.sbp-cover h1{font-size:clamp(30px,5.2vw,68px);font-weight:500;line-height:1.1;margin:10px 0 18px;overflow-wrap:anywhere}
.sbp-cover p{font-size:clamp(16px,1.9vw,24px);color:#d6d9e2;line-height:1.5;max-width:60ch}
.sbp-cover .facts{margin-top:22px;font-size:clamp(13px,1.4vw,18px);color:#aab0c0}
.sbp-scene{align-items:flex-end;background:#0b0d12 center/cover no-repeat}
.sbp-scene::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(11,13,18,.05) 30%,rgba(11,13,18,.92))}
.sbp-scene > div{position:relative}
.sbp-scene .k{font-size:clamp(14px,1.6vw,20px);color:#d6d9e2}
.sbp-scene h2{font-size:clamp(28px,4.6vw,60px);font-weight:500;margin:6px 0 0;overflow-wrap:anywhere}
.sbp-step{align-items:stretch}
.sbp-pic{flex:1.25;min-width:0;border-radius:14px;background:#171a22 center/cover no-repeat;position:relative;overflow:hidden}
.sbp-pic.none{display:grid;place-items:center;color:#8d95a8;font-size:15px;border:1px dashed #2a2f3c}
.sbp-text{flex:1;min-width:0;overflow:auto;display:flex;flex-direction:column;gap:12px;padding-right:4px}
.sbp-text .k{font-size:clamp(12px,1.2vw,15px);color:#aab0c0}
.sbp-text .type{align-self:flex-start;font-size:12px;padding:3px 10px;border-radius:999px;border:1px solid #3a4047;color:#d6d9e2}
.sbp-text h2{font-size:clamp(22px,2.8vw,40px);font-weight:500;line-height:1.15;margin:0;overflow-wrap:anywhere}
.sbp-b h4{font-size:clamp(11px,1vw,13px);font-weight:500;color:#8d95a8;margin:0 0 3px}
.sbp-b p{font-size:clamp(16px,1.7vw,24px);line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;color:#f1f2f6}
.sbp-b ul,.sbp-b ol{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.sbp-b li{font-size:clamp(15px,1.6vw,22px);padding:8px 12px;border:1px solid #2a2f3c;border-radius:10px;overflow-wrap:anywhere}
.sbp-b li.right{border-color:#3fbf75;background:rgba(63,191,117,.12)}
.sbp-b li em{font-style:normal;font-size:12px;color:#3fbf75;margin-left:10px;font-weight:500}
.sbp-b.next li{font-size:clamp(13px,1.3vw,17px);border:0;padding:2px 0;color:#d6d9e2}
.sbp-end{flex-direction:column;justify-content:center;align-items:center;text-align:center}
.sbp-end h2{font-size:clamp(28px,4.4vw,56px);font-weight:500;margin:0 0 12px}
.sbp-end p{font-size:clamp(16px,1.8vw,22px);color:#d6d9e2;max-width:60ch;line-height:1.5}
.sbp-notes{position:absolute;top:0;right:0;bottom:0;width:min(380px,100%);background:#171a22;border-left:1px solid #2a2f3c;padding:16px;overflow:auto;display:flex;flex-direction:column;gap:10px;z-index:2}
.sbp-notes[hidden]{display:none}
.sbp-notes h3{font-size:15px;font-weight:500;margin:0}
.sbp-notes .sbn{background:#0f1116;border-color:#2a2f3c;color:#f1f2f6}
.sbp-notes .sbn-h{color:#aab0c0} .sbp-notes .sbn-h b{color:#f1f2f6}
.sbp-notes .sb-diff{background:#1f2330}
.sbp-notes .sb-diff del{color:#ff8a8a} .sbp-notes .sb-diff ins{color:#6fdc9c}
.sbp-bar{display:flex;align-items:center;gap:8px;padding:10px clamp(10px,2vw,20px);border-top:1px solid #2a2f3c;background:#0f1116;flex-wrap:wrap}
.sbp-bar button{font:inherit;font-size:14px;min-height:40px;min-width:40px;padding:6px 12px;border-radius:9px;border:1px solid #3a4047;background:transparent;color:#f1f2f6;cursor:pointer}
.sbp-bar button:hover{background:#1f2330}
.sbp-bar button[aria-pressed="true"]{border-color:#8da8ff;color:#c9d6ff}
.sbp-bar .count{font-size:14px;color:#d6d9e2;min-width:64px;text-align:center}
.sbp-bar .where{font-size:13px;color:#aab0c0;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sbp-prog{height:3px;background:#1f2330}
.sbp-prog i{display:block;height:100%;background:#ff4522;transition:width .2s}
@media (max-width:760px){
  .sbp-step{flex-direction:column}
  .sbp-pic{flex:none;height:32vh}
  .sbp-bar .where{flex-basis:100%;order:9}
}
@media (max-width:640px){ .sbc{padding:12px} .sb-head h1{font-size:20px} }
@media print{ .sb-actions,.sbc-marks .sb-mark,.sbc-add,.sb-linkbtn,.sb-bar select{display:none!important} .sbc{break-inside:avoid} }
