:root{color:#24282e;background:#e8eaed;--line:#d0d4da;--muted:#67707b;--accent:#2768b8}body{padding-top:28px}header{margin-bottom:20px}small{color:#687380}h1{font-size:34px;letter-spacing:-1.1px;color:#24282e}h1 span{color:#747d88}.comparison{color:#485768;text-decoration:none;font-size:12px;padding:10px;border:1px solid #c6ccd4;border-radius:6px}.comparison:hover{background:#fff}.preview-note{font-size:12px;color:#5b6572;padding:10px 0 17px}nav{background:#f3f4f6;padding:12px;border:1px solid #cfd5dc;border-radius:8px}button,.button{background:#fff;border-color:#c8cfd8;color:#354254;border-radius:6px}button:hover,.button:hover{background:#e6effa;border-color:#8daed1}#status{background:#e1ebf7;color:#344c69;border-color:#c1d4ea;margin:18px 0}main{grid-template-columns:minmax(0,1.22fr) minmax(0,.9fr);gap:22px}.source,.assembly{background:#fff;color:#24282e;border-color:#d3d8df;box-shadow:0 5px 22px #24334908;padding:22px}.panel-label{font-size:10px;font-weight:650;letter-spacing:.14em;color:#647383;margin-bottom:15px}video{max-height:285px;aspect-ratio:16/9;object-fit:contain;background:#1c2025}.assembly{position:sticky;top:20px}h2{font-size:20px}.passage p{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:16px;line-height:1.85;color:#303a46}.passage{padding:20px 4px}.passage button{color:#43536a;background:#fff;border-color:#cbd4de}.passage button:last-child{background:#fff;border-color:#cbd4de;color:#43536a}.passage button:nth-of-type(2){color:#2462a8;background:#edf4fd;border-color:#c1d5ec}.passage:hover{background:#f8fafc}.card{background:#fafbfc;border-color:#d5dce5;border-left:3px solid #6397d1;box-shadow:0 2px 5px #233a5605;padding:17px}.card p{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#303a46;font-size:15px;line-height:1.75}.card button{color:#455569;background:#fff;border-color:#d0d8e2}.time{color:#6b7888}.trim label{color:#5b6e84}.trim input{background:#fff;color:#2d4058;border-color:#bcc9d8}#duration{color:#2b66aa;background:#edf3fa}#play{color:#fff;background:#2768b8;border-color:#2768b8}#play:hover{background:#1d579b}input{background:#fff;color:#283d55;border-color:#c4cedb}.trim-disclosure{margin:10px 0 17px}.trim-disclosure summary,.original summary{cursor:pointer;font-size:11px;color:#526982;padding:4px 0}.word-editor{margin-top:15px;border:1px solid #b6cee9;border-radius:7px;padding:14px;background:#edf4fc}.word-editor textarea{width:100%;min-height:110px;padding:12px;border:1px solid #afc3db;border-radius:5px;font:15px/1.7 -apple-system,BlinkMacSystemFont,sans-serif;color:#253b55;background:white;resize:vertical}.word-editor .muted{margin:0 0 10px}.original{margin-top:12px}.original p{color:#697889;font-size:13px;border-left:2px solid #b9c7d8;padding-left:12px}.word-editor .actions{margin-bottom:0}footer{color:#637080}@media(max-width:800px){main{grid-template-columns:1fr}.assembly{position:static}.comparison{max-width:135px}.source,.assembly{padding:17px}}
/* Compact reading workspace: fixed transport, separate scrolling reading columns. */
html,body{height:100%;height:100dvh}body{max-width:none;padding:12px 20px 8px;display:flex;flex-direction:column;overflow:hidden;gap:7px}header{margin:0;min-height:35px;gap:16px}header>div{display:flex;align-items:center;gap:16px}small{font-size:9px;letter-spacing:.1em}h1{font-size:20px;letter-spacing:-.6px;margin:0}.comparison{font-size:10px;padding:5px 9px}nav{padding:6px 8px;gap:6px;border-radius:5px}nav button,nav .button{font-size:10px;padding:6px 10px}#status{font-size:10px;margin:0;padding:6px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:4px}main{flex:1;min-height:0;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:12px}.source,.assembly{min-height:0;padding:12px;display:flex;flex-direction:column;border-radius:6px;position:relative;top:auto;overflow:hidden}.source video{height:156px;min-height:100px;width:100%;aspect-ratio:auto;object-fit:contain;margin:0 0 6px;flex-shrink:0}.heading{min-height:30px;flex-shrink:0;gap:10px}h2{font-size:14px;margin:0;letter-spacing:-.2px}#search,#assembly-search{font-size:11px;padding:6px 8px;width:50%}.reading-tools{display:flex;align-items:center;gap:12px;padding:5px 0 10px;border-bottom:1px solid #dbe0e6;flex-shrink:0;font-size:10px;color:#647182}.reading-tools label{display:flex;align-items:center;gap:5px}.reading-tools input{accent-color:#2768b8}.reading-tools button{font-size:10px;padding:4px 8px}#source-time{margin-left:auto}.assembly>.actions{flex-shrink:0;margin:5px 0 8px;gap:6px}.assembly>.actions button{font-size:10px;padding:6px 10px}.assembly-hint{font-size:10px;color:#6c7888;margin:0;padding:0 0 10px;border-bottom:1px solid #dbe0e6;flex-shrink:0}#duration{font-size:11px;padding:4px 7px}#transcript,#cards{overflow-y:auto;overflow-x:hidden;min-height:0;flex:1;scrollbar-gutter:stable;padding:14px 10px 180px 3px;overscroll-behavior:contain}#transcript{line-height:1.95}.reading-paragraph{margin:0 0 15px;font-size:13px;line-height:1.95;position:relative}.reading-paragraph .passage{display:inline;position:relative;padding:2px 1px;margin:0 2px 0 0;border:none;border-radius:3px;cursor:pointer;box-decoration-break:clone;-webkit-box-decoration-break:clone}.reading-paragraph .passage p{display:inline;font-family:Georgia,'Times New Roman',serif;font-size:14px;line-height:1.95;letter-spacing:0;margin:0;color:#303944}.reading-paragraph .passage:hover,.reading-paragraph .passage:focus-within{background:#e8f0fa}.passage:focus-visible,.card:focus-visible{outline:2px solid #6195ce;outline-offset:2px}.reading-paragraph .passage.playing{background:#d3e5fa;box-shadow:0 1px 0 #7aa8da}.cue-tools{display:none;position:absolute;z-index:20;top:100%;left:0;width:315px;max-width:calc(100vw - 70px);padding:10px;background:#fff;border:1px solid #b8cbe0;border-radius:6px;box-shadow:0 5px 14px #20364d20;cursor:default;line-height:1.5}.passage:hover>.cue-tools,.passage:focus-within>.cue-tools{display:block}.cue-tools>.time{display:block;font-size:9px;margin-bottom:7px}.cue-tools>button{font-size:9px!important;padding:5px 7px!important;margin-right:4px}.cue-tools .original summary{font-size:9px}.cue-tools .original p{display:block;font-family:inherit;font-size:11px;line-height:1.5;padding:5px 8px}.reading-paragraph .passage.editing{display:block;background:#f2f6fb;padding:10px}.passage.editing>.cue-tools{display:none}.word-editor{margin:8px 0;padding:10px}.word-editor textarea{font-size:13px;min-height:85px}.word-editor p.muted{display:block;font-family:inherit;font-size:10px;line-height:1.5}.word-editor button{font-size:10px}.card{margin:0 0 8px;padding:9px 11px 10px;border-left-width:2px;border-radius:4px;position:relative}.card>.time{font-size:9px;line-height:1.3}.card>p{font-family:Georgia,'Times New Roman',serif;font-size:14px;line-height:1.8;margin:5px 0 0}.card.playing{background:#e7f0fc;border-color:#74a0d2}.card-tools{display:none;position:relative;margin-top:8px;border-top:1px solid #dce3eb;padding-top:6px}.card:hover>.card-tools,.card:focus-within>.card-tools{display:block}.card-tools button{font-size:9px;padding:4px 7px}.card-tools .trim-disclosure{margin:0 0 6px}.card-tools summary{font-size:9px}.trim{margin:6px 0;gap:8px}.trim input{width:90px;padding:5px;font-size:10px}.trim label{font-size:9px}footer{font-size:9px;margin:0;line-height:1.5;flex-shrink:0}@media(max-width:800px){body{height:auto;min-height:100dvh;overflow:auto;padding:10px}header>div{gap:8px;flex-wrap:wrap}small{font-size:8px}main{display:flex;flex-direction:column;min-height:0}.source,.assembly{overflow:visible}#transcript{max-height:52dvh;min-height:220px}#cards{max-height:50dvh;min-height:160px}.source video{height:145px}.reading-paragraph .passage p,.card>p{font-size:14px}.cue-tools{width:270px}.card-tools{display:block}.comparison{font-size:9px}#status{white-space:normal}.assembly{position:static}}
@media(hover:none){.passage:focus-within>.cue-tools{display:block}.card-tools{display:block}}
/* Grid items must stretch into the remaining viewport for inner overflow to scroll. */
main{align-items:stretch;grid-template-rows:minmax(0,1fr);overflow:hidden}
.source,.assembly{height:100%;max-height:100%;min-height:0}
#transcript,#cards{flex:1 1 0;min-height:0;overflow-y:auto;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#879bb3 #edf1f5}
#transcript::-webkit-scrollbar,#cards::-webkit-scrollbar{width:8px}
#transcript::-webkit-scrollbar-track,#cards::-webkit-scrollbar-track{background:#edf1f5}
#transcript::-webkit-scrollbar-thumb,#cards::-webkit-scrollbar-thumb{background:#879bb3;border-radius:5px;border:2px solid #edf1f5}
@media(max-width:800px){main{overflow:visible;grid-template-rows:none}.source,.assembly{height:auto;max-height:none}#transcript,#cards{flex:0 1 auto}}
/* Fixed action docks and compact paragraph sections. */
.selection-dock{flex-shrink:0;background:#f1f5fa;border:1px solid #d5e0ee;border-radius:5px;padding:7px 8px;margin:0 0 7px;min-height:59px}.selection-dock>span{font-size:10px;color:#56708d;display:block;margin-bottom:6px}.dock-actions{display:flex;gap:4px;flex-wrap:wrap}.dock-actions button{font-size:10px;padding:5px 7px}.dock-actions #add-selection{background:#2768b8;color:#fff;border-color:#2768b8}.reading-paragraph{padding-right:14px;position:relative;padding-top:2px}.paragraph-select{display:block;font-size:9px;padding:3px 6px;color:#587392;background:#f5f8fc;border:1px solid #dce4ee;margin:0 0 4px;cursor:grab}.reading-paragraph .passage{display:inline;user-select:text;cursor:text}.cue-text{font-family:Georgia,'Times New Roman',serif;font-size:14px;line-height:1.95}.reading-paragraph .passage.selected{background:#dbe9fb;box-shadow:0 1px 0 #8eb2dc}.reading-paragraph .passage.playing{background:#bcd7f4}.reading-paragraph .passage:hover{background:#e9f0f9}.section-tile{padding:10px 10px 12px;border:1px solid #d7dee7;border-radius:5px;margin:0 0 9px;background:#fff;position:relative}.section-tile.selected{border-color:#74a3d9;box-shadow:0 0 0 1px #bfd5ef;background:#f8fbff}.section-heading{display:flex;align-items:center;gap:6px;margin-bottom:5px}.section-heading .time{font-size:9px;color:#6f7f92}.drag-handle{padding:0 5px;line-height:1.4;font-size:16px;color:#7990aa;border:0;background:transparent;cursor:grab}.drag-handle:active,.paragraph-select:active{cursor:grabbing}.assembly-paragraph{font-family:Georgia,'Times New Roman',serif;font-size:14px;line-height:1.95;margin:0;color:#303944}.assembly-cue{cursor:pointer;border-radius:2px}.assembly-cue:hover,.assembly-cue:focus{background:#e3edfa;outline:0}.assembly-cue.selected-cue{background:#d0e2f8;box-shadow:0 1px 0 #7ba7d9}.assembly-cue.playing{background:#bcd7f4}.drop-target{background:#f0f6fe;outline:0}.section-tile.drop-before{border-top:3px solid #2768b8}.section-tile:focus-visible,.assembly-cue:focus-visible{outline:2px solid #2768b8;outline-offset:2px}.source #transcript{padding-top:8px}.assembly-hint{border:0;padding-bottom:6px}dialog{border:1px solid #b8c9dd;border-radius:10px;padding:22px;width:min(540px,90vw);background:#fff;color:#293a4e;box-shadow:0 15px 70px #172d4c33}dialog::backdrop{background:#1e304855}dialog h2{font-size:18px;margin-bottom:12px}dialog p{font-size:12px;line-height:1.7;color:#677a90}dialog textarea{width:100%;min-height:140px;padding:12px;font:14px/1.7 -apple-system,BlinkMacSystemFont,sans-serif;border:1px solid #b8c9dd;border-radius:5px;resize:vertical}dialog summary{font-size:11px;color:#4e6888}dialog label{display:block;font-size:12px;margin:10px 0}dialog input{margin-left:12px;width:130px}dialog .actions{margin:16px 0 0}dialog button{font-size:12px}.selection-dock button:disabled{opacity:.4}@media(max-height:700px) and (min-width:801px){.source video{height:112px;min-height:90px}.selection-dock{padding:5px;min-height:52px}.reading-tools{padding-bottom:6px}body{gap:5px}.selection-dock>span{font-size:9px}}
.section-heading{cursor:grab;user-select:none;padding:3px 0}.section-heading:active{cursor:grabbing}.drag-handle{pointer-events:none}
/* Source usage is independent of the current selection and playback cue. */
.reading-paragraph .passage.used{background:#e0e2e5;color:#454c55;box-shadow:0 1px 0 #c4c8ce}
.reading-paragraph .passage.used:hover{background:#d4d9df}
.reading-paragraph .passage.used.selected{background:#cbdcf1;box-shadow:0 1px 0 #789bc5}
.reading-paragraph .passage.used.playing{background:#bcd7f4;box-shadow:0 1px 0 #6594c9}
/* Direct manipulation: cues and assembly sections are the drag surfaces. */
.reading-paragraph .passage{cursor:grab;user-select:none;-webkit-user-select:none}
.reading-paragraph .passage:active,.section-tile:active{cursor:grabbing}
.section-tile{cursor:grab;padding:5px 6px 6px;margin-bottom:5px;border-color:transparent;border-bottom-color:#e0e5ec;border-radius:3px;background:transparent;box-shadow:none}
.section-tile:hover{background:#f4f7fb;border-color:#d5e0ef}
.section-heading{padding:0;margin-bottom:2px;gap:4px}
.section-heading .time{font-size:8px;color:#8190a2}
.drag-handle{display:none}
.assembly-paragraph,.cue-text{font-family:Georgia,'Times New Roman',serif;font-size:14px;line-height:1.95}
.assembly-cue{cursor:grab}
.section-tile.selected{background:#f0f5fc;border-color:#aec8e6;box-shadow:none}
.assembly-paragraph{user-select:none;-webkit-user-select:none}
/* Preview shares the top band with project controls; reading gets the remaining space. */
body{padding:8px;gap:8px}
.workspace-header{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:12px;flex-shrink:0;align-items:start}
.workspace-controls{display:flex;flex-direction:column;gap:8px;min-width:0}
.workspace-controls header{min-height:30px}
.workspace-header video{width:100%;height:132px;min-height:0;max-height:none;object-fit:contain;aspect-ratio:auto;margin:0;background:#1c2025;border-radius:6px}
main{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:10px}
.source,.assembly{grid-row:1;min-height:0;height:100%}
@media(max-height:700px) and (min-width:801px){.workspace-header{grid-template-columns:minmax(0,1fr) 240px}.workspace-header video{height:110px}}
@media(max-width:800px){.workspace-header{grid-template-columns:minmax(0,1fr)}.workspace-header video{height:170px;width:100%;max-width:360px;justify-self:end}main{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;overflow:visible}.source{grid-row:1}.assembly{grid-row:2}.source,.assembly{height:auto}}

@media(min-width:801px){.reading-tools,.assembly>.actions{height:38px;min-height:38px;margin:0 0 7px;padding:5px 0;border-bottom:1px solid #dbe0e6;align-items:center}.selection-dock{height:78px;min-height:78px}}

/* Quiet drop feedback and accessible icon transports. */
#cards:focus{outline:none}#cards:focus-visible{box-shadow:inset 0 0 0 1px #83a8d4}
.transport-icon,.reading-tools .transport-icon,.assembly>.actions .transport-icon{width:30px;height:28px;padding:5px;display:inline-flex;align-items:center;justify-content:center;font-size:13px}
.transport-icon svg{width:16px;height:16px;fill:currentColor}
.autoplay-toggle{position:relative;cursor:pointer;gap:6px!important}
.autoplay-toggle input{position:absolute;width:1px;height:1px;opacity:0}
.switch-track{width:26px;height:15px;border-radius:12px;background:#a5aeb9;padding:2px;display:inline-flex;align-items:center;transition:background .15s}
.switch-track:before{content:'';width:11px;height:11px;border-radius:50%;background:#fff;transition:transform .15s}
.autoplay-toggle input:checked+.switch-track{background:#2768b8}
.autoplay-toggle input:checked+.switch-track:before{transform:translateX(11px)}
.autoplay-toggle input:focus-visible+.switch-track{outline:2px solid #2768b8;outline-offset:3px}

/* Both columns read as paragraphs; editing lives in each paragraph's compact heading. */
.paragraph-heading{display:flex;align-items:center;gap:6px;min-height:24px;margin-bottom:4px;flex-wrap:wrap}
.paragraph-heading .paragraph-select{margin:0;padding:3px 6px}
.mini-action{font-size:11px;line-height:1;padding:3px 5px;min-width:22px;height:22px;background:transparent;border-color:transparent;color:#587392}
.mini-action:hover{background:#e3edf9;border-color:#bed0e6}
.paragraph-actions{display:flex;gap:2px;margin-left:auto;opacity:0}
.section-tile:hover .paragraph-actions,.section-tile:focus-within .paragraph-actions,.section-tile.selected .paragraph-actions{opacity:1}
.source-cue-actions,.assembly-cue-actions{display:inline-flex;align-items:center;gap:2px}
[hidden]{display:none!important}
.cue-position{font:9px -apple-system,BlinkMacSystemFont,sans-serif;color:#647182;margin:0 4px}
.assembly-cue-actions{border-left:1px solid #d8e1ed;padding-left:5px}
.section-tile{padding:2px 3px;margin:0 0 15px;border:0;border-radius:3px}
.section-tile:hover,.section-tile.selected{border:0;background:#f6f8fb}
.section-tile.drop-before{box-shadow:inset 0 2px #2768b8}
.section-heading .time{font-size:9px;cursor:grab}
.assembly-paragraph,.cue-text{font-size:14px;line-height:1.95}
.cue-drop-before{box-shadow:inset 2px 0 #2768b8;background:#edf3fc}
#transcript,#cards{padding-top:8px}
@media(hover:none){.paragraph-actions{opacity:1}}

/* Compact cue stack: source reference and wording share each line. */
.cue-row{display:grid;grid-template-columns:minmax(0,1fr) 20px;align-items:baseline;gap:5px;padding:4px 2px;margin:0 0 3px;border-bottom:1px solid #edf0f3;border-radius:2px;cursor:grab;user-select:none;-webkit-user-select:none}
.cue-content{min-width:0;font:14px/1.95 Georgia,'Times New Roman',serif}.cue-row .assembly-cue{font:inherit;display:inline}
.cue-row:hover,.cue-row.selected{background:#f4f7fb}
.cue-row:focus-visible{outline:2px solid #2768b8;outline-offset:-2px}
.cue-remove{padding:0;width:20px;height:20px;font-size:13px;background:transparent;border:0;color:#778699;align-self:start;margin-top:2px}
.cue-remove:hover{color:#365a87;background:#e7edf5}
.cue-row.drop-before{box-shadow:inset 0 2px #2768b8}
.cue-row:active{cursor:grabbing}
.paragraph-heading{min-height:22px;margin-bottom:3px}
/* Project library and independent preview stations. */
.workspace-header{display:flex;flex-direction:column;gap:5px}.workspace-header header{min-height:30px;gap:10px}.workspace-header nav{padding:0;border:0;background:transparent;flex-shrink:0}
.workspace-header h1{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:45vw}
.preview-deck{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;flex-shrink:0}
.preview-station{display:flex;flex-direction:column;gap:9px;min-width:0;padding:12px;background:#f8f9fb;border:1px solid var(--line);border-radius:7px}
.preview-station video{width:100%;height:clamp(164px,22dvh,220px);max-height:none;aspect-ratio:auto;object-fit:contain;margin:0;background:#1c2025;border:1px solid #252b32;border-radius:4px;align-self:center}
.station-controls{display:flex;flex-direction:column;gap:4px;min-width:0;padding:0}.station-controls>label{font-size:9px;font-weight:650;color:#647182;letter-spacing:.1em}
.station-controls select{width:100%;min-width:0;padding:2px 0;border:1px solid transparent;border-radius:3px;background:transparent;color:#293441;font:600 18px/1.35 -apple-system,BlinkMacSystemFont,sans-serif;letter-spacing:-.35px}.station-controls select:hover{color:var(--accent);background:#edf3fa}
.station-actions{display:flex;gap:5px;flex-wrap:wrap;min-height:24px;margin-left:-5px}.station-actions button,.station-footer .button{display:inline-flex;align-items:center;gap:3px;font-size:10px;padding:4px 5px;background:transparent;border-color:transparent;color:#59697c}.station-actions button:hover,.station-footer .button:hover{background:#e5edf7;color:#2768b8}.station-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:24px}.station-footer .station-note{min-width:0;flex:1}.station-footer .button{flex:none;margin-right:-5px}.station-note,.form-note{font-size:10px;color:#6e7d90;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.form-note{display:block;margin:4px 0 10px}
#assembly-time{margin-left:auto;color:#66788f;font-size:10px}dialog>form>label{margin:10px 0}dialog label input:not([type=file]){width:65%;margin-left:10px}dialog .button{font-size:11px;margin-right:6px}#interview-error,#cut-error{color:#9a4343}
@media(max-height:700px) and (min-width:801px){.preview-station video{height:144px}.station-controls{gap:3px}}
@media(max-width:800px){.preview-deck{grid-template-columns:1fr}.workspace-header header{flex-wrap:wrap}.workspace-header h1{max-width:90vw}.workspace-header header>div{flex-wrap:wrap}.preview-station{padding:12px;gap:9px}.preview-station video{height:160px}.station-controls{gap:3px}}

/* One inline control identifies the interview and locates the original passage. */
.cue-source{display:inline-flex;align-items:center;gap:4px;max-width:min(42%,150px);height:20px;padding:1px 4px;margin:0 6px 0 0;vertical-align:baseline;background:#edf3fa;border:1px solid #cad7e7;border-radius:3px;color:#3b597c;font:10px/1.4 -apple-system,BlinkMacSystemFont,sans-serif;cursor:pointer}
.cue-source-index{flex:none;font:9px/1.4 ui-monospace,SFMono-Regular,monospace;color:#61758e}
.cue-source-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cue-source:hover{background:#e2ecf8;border-color:#aabfd8;color:#2768b8}
.cue-source:focus-visible{outline:2px solid #2768b8;outline-offset:1px}
@media(max-width:800px){.workspace-header nav{flex-wrap:wrap;max-width:100%;min-width:0}}

.cue-row[hidden],#assembly-no-results[hidden]{display:none}
#assembly-search-status{font-size:9px;color:#647182;white-space:nowrap}
@media(max-width:480px){.preview-station video{height:auto;aspect-ratio:16/9}.station-controls select{font-size:17px}}
