/* Workflow-specific layout; existing scholarly tools remain available. */
.sw-entry{padding:1.25rem 1.5rem;margin-bottom:1.2rem;background:#eaf1ec;border:1px solid #b6cabc;border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:1rem}.sw-entry h2{margin:0 0 .35rem}.sw-entry p{margin:.2rem 0;max-width:70ch}.sw-dialog{width:min(1600px,98vw);max-width:98vw;height:96vh;max-height:96vh;margin:auto;padding:1.3rem;box-sizing:border-box}.sw-dialog *{box-sizing:border-box}.sw-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.sw-header h2{margin:.3rem 0 1rem}.sw-stages{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin:.5rem 0 1rem}.sw-stages button{display:flex;gap:.6rem;align-items:center;justify-content:center;border:1px solid #bdcbbf;border-radius:8px;padding:.8rem;background:#fff;color:#224d3b}.sw-stages button span{display:grid;place-items:center;border:1px solid currentColor;border-radius:50%;width:1.5rem;height:1.5rem;flex:0 0 auto}.sw-stages [aria-current=step]{background:#245945;color:white;border-color:#245945}.sw-context{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:.35rem 1rem;align-items:end}.sw-context>label:nth-of-type(1){grid-column:1;grid-row:1}.sw-context>select:nth-of-type(1){grid-column:1;grid-row:2}.sw-context>label:nth-of-type(2){grid-column:2;grid-row:1}.sw-context>select:nth-of-type(2){grid-column:2;grid-row:2}.sw-context>.sw-actions{grid-column:3;grid-row:1/3}.sw-status{background:#f0f5ef;border-left:3px solid #789e7f;padding:.7rem 1rem;font-size:.9rem;min-height:2.7rem;margin:.8rem 0}.sw-status.error{background:#fff2e6;border-color:#9a592e}.sw-intro{margin:1rem 0}.sw-intro h3{margin:.5rem 0}.sw-intro p{max-width:100ch}.sw-map-grid,.sw-reader-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:1.5rem}.sw-map-grid section,.sw-reader-grid section{min-width:0}.sw-text{white-space:pre-wrap;font-family:Georgia,'Times New Roman',serif;line-height:1.9;font-size:1.15rem;border:1px solid #ccd2c7;padding:1.1rem;max-height:25rem;overflow:auto;overflow-wrap:anywhere;margin:.4rem 0 .7rem}.sw-reader-grid .sw-text{max-height:20rem}.sw-tools,.sw-actions,.sw-save-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem;margin:.5rem 0}.sw-tools button,.sw-actions button,.sw-save-actions button{padding:.5rem .75rem}.sw-tools [aria-pressed=true]{background:#245945;color:white}.sw-tools label{display:flex;align-items:center;gap:.3rem;margin:0;font-size:.85rem}.sw-tools input[type=checkbox],.sw-check input,.sw-editor input[type=checkbox]{width:auto}.sw-pagebar{display:flex;align-items:center;gap:.6rem;margin:1rem 0;flex-wrap:wrap}.sw-pagebar label{margin:0}.sw-pagebar select{width:auto;max-width:25rem;flex:1}.sw-viewport{height:65vh;max-height:780px;min-height:320px;overflow:auto;background:#dfe4db;border:1px solid #aeb8aa;border-radius:6px;position:relative;overscroll-behavior:contain}.sw-surface{position:relative;width:100%;line-height:0}.sw-surface img{display:block;width:100%;height:auto;max-width:none;user-select:none}.sw-surface svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none}.sw-surface svg.sw-drawing{cursor:crosshair}.sw-saved{fill:#358b5b22;stroke:#287149;stroke-width:.0025;cursor:pointer}.sw-stale{stroke-dasharray:.008 .006;stroke:#995b2c}.sw-draft{fill:#c1408622;stroke:#ad326b;stroke-width:.003}.sw-selected{stroke:#ab175a;fill:#c1408640}.sw-coordinates{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem}.sw-coordinates label{grid-row:1}.sw-coordinates input{grid-row:2}.sw-editor{border:1px solid #ccd4c7;border-radius:8px;padding:1rem;margin-top:1rem;background:#fafbf7}.sw-editor h3{margin:.1rem 0 .5rem}.sw-editor label{margin-top:.65rem}.sw-pair-list{display:flex;flex-wrap:wrap;gap:.35rem;margin:.6rem 0}.sw-pair-list button{font-size:.85rem;padding:.45rem;max-width:100%;overflow-wrap:anywhere}.sw-pair-list [aria-pressed=true]{border:2px solid #286448}.sw-group-list{padding-left:1.2rem;font-size:.85rem}.sw-group-list button{font-size:.8rem;padding:.25rem}.sw-group-list label{display:inline}.sw-quote{display:inline-block;margin:.2rem .3rem .2rem 0;border:1px solid #d3c6a3;background:#f5f0da;padding:.4rem .65rem;max-width:100%;overflow-wrap:anywhere}.sw-card{padding:.85rem 1rem;border:1px solid #cbd4c8;border-radius:8px;overflow-wrap:anywhere;min-width:0}.sw-card h4,.sw-card p{margin:.3rem 0}.sw-card pre{white-space:pre-wrap;font-size:.8rem;max-height:28rem;overflow:auto}.sw-link-list,.sw-review-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:.7rem}.sw-table-wrap{overflow:auto}.sw-table-wrap table{width:100%;border-collapse:collapse}.sw-table-wrap th,.sw-table-wrap td{text-align:left;vertical-align:top;border-bottom:1px solid #d6ddcf;padding:.65rem}.sw-table-wrap td small{display:block;max-width:36ch;overflow-wrap:anywhere}.sw-table-wrap th{font-size:.85rem;background:#f1f4eb}.sw-check{display:flex;align-items:center;gap:.5rem;margin:.4rem 0!important}#sw-map-pages{max-height:17rem;overflow:auto}#sw-shapes ol{display:flex;flex-wrap:wrap;gap:.6rem;font-size:.8rem;padding-left:1.3rem}#sw-shapes button{font-size:.8rem;padding:.3rem}#sw-page-regions button{display:block;text-align:left;margin:.4rem 0}#sw-boundary-list{white-space:pre-line;font-size:.85rem}.sw-stage-next{margin:1.5rem 0;text-align:right}#sw-pending{border:1px solid #bd8251;background:#fff5e8;padding:.75rem;margin-bottom:1rem}.sw-dialog button:focus-visible,.sw-dialog input:focus-visible,.sw-dialog textarea:focus-visible,.sw-dialog select:focus-visible{outline:3px solid #497cbb;outline-offset:2px}.sw-dialog details{margin:.8rem 0}.sw-dialog details>summary{cursor:pointer}.sw-dialog textarea,.sw-dialog input:not([type=checkbox]),.sw-dialog select{max-width:100%}.sw-dialog button:disabled{opacity:.55;cursor:wait}
@media(max-width:1000px){.sw-reader-grid,.sw-map-grid{grid-template-columns:1fr}.sw-viewport{height:52vh}.sw-context{grid-template-columns:1fr 1fr}.sw-context>.sw-actions{grid-column:1/3;grid-row:3}.sw-stages button{font-size:.85rem;padding:.65rem .35rem;flex-direction:column;gap:.25rem}.sw-entry{align-items:flex-start;flex-direction:column}}@media(max-width:560px){.sw-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:.75rem}.sw-header h2{font-size:1.35rem}.sw-header>button{font-size:.8rem;padding:.4rem}.sw-stages{gap:.25rem}.sw-context{display:block}.sw-context>label{margin-top:.5rem}.sw-text{font-size:1.05rem}.sw-pagebar{gap:.35rem}.sw-pagebar select{max-width:100%;min-width:0}.sw-pagebar label{font-size:.8rem}.sw-viewport{height:45vh;min-height:250px}.sw-tools button{font-size:.85rem;padding:.4rem}.sw-save-actions{flex-direction:column;align-items:stretch}}

/* Keep the manuscript visible while a long independent link/reading form scrolls. */
.sw-mapped-focus{border-left:3px solid #8a7948;background:#f8f5e8;padding:.6rem .8rem;margin:.6rem 0}.sw-mapped-focus p{white-space:pre-wrap;max-height:8rem;overflow:auto;margin:.4rem 0}.sw-specialist-tools{margin:1rem 0}.sw-specialist-tools>summary{cursor:pointer;padding:.65rem}
@media(min-width:1001px){.sw-reader-grid{align-items:start}.sw-pagebar{position:sticky;top:0;z-index:5;background:#fff;padding:.5rem 0;border-bottom:1px solid #ccd4c7}.sw-image-pane{position:sticky;top:5rem;max-height:calc(96vh - 7rem);overflow:auto;padding:.2rem .4rem .6rem .1rem}.sw-text-pane{max-height:calc(96vh - 7rem);overflow:auto;padding:.2rem .4rem .6rem .1rem;overscroll-behavior:contain}.sw-viewport{height:52vh;min-height:260px}.sw-image-pane:focus-within,.sw-text-pane:focus-within{scroll-margin-top:5rem}}

.sw-reading-detail p{white-space:pre-wrap}

/* One reading workspace, with specialist detail disclosed in place. */
.sw-header h2{font-family:Georgia,'Times New Roman',serif;font-weight:500;font-size:1.7rem}.sw-dialog{background:#fffefa;color:#24362d}.sw-stages button{min-height:48px}.sw-status{margin:.65rem 0;font-size:.86rem}.sw-task-choice{display:flex;gap:.35rem;flex-wrap:wrap;margin:.75rem 0}.sw-task-choice button{flex:1;min-width:100px;font-size:.88rem;padding:.6rem}.sw-task-choice [aria-pressed=true]{background:#245945;color:#fff;border-color:#245945}.sw-primary-reading textarea{font-family:Georgia,'Times New Roman',serif;font-size:1.2rem;line-height:1.7;min-height:7rem}.sw-editor{margin-top:0;padding:1rem 1.15rem;background:#fffefa}.sw-editor h3{font-family:Georgia,'Times New Roman',serif;font-size:1.35rem}.sw-editor>details{border-top:1px solid #dce2d8;padding-top:.6rem}.sw-editor details>summary{font-weight:600;font-size:.9rem;min-height:32px}.sw-area-status{font-size:.84rem;color:#4c6254}.sw-primary-reading>details{background:#f1f5ef;padding:.7rem;border-radius:6px}.sw-save-actions{border-top:1px solid #d5dfd0;padding-top:.9rem;margin-top:1.1rem}.sw-save-actions .primary{flex:1}.sw-save-actions button{min-height:44px}.sw-editor label:has(>#sw-reading-enable){font-size:.86rem}.sw-reading-controls{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:.5rem 0;border-bottom:1px solid #dce2d8}.sw-ratio{display:flex;align-items:center;gap:.6rem;font-size:.8rem;margin:0}.sw-ratio input{width:130px!important;min-height:30px;padding:0}.sw-pane-tabs{display:none;gap:.3rem}.sw-pane-tabs [aria-pressed=true]{background:#245945;color:#fff}.sw-page-count{font-size:.9rem;font-weight:600;color:#245945}.sw-pagebar{margin:.65rem 0}.sw-pagebar select{max-width:20rem}.sw-page-readings{padding-bottom:.8rem;border-bottom:1px solid #d6decf;margin-bottom:1rem}.sw-page-readings button{display:block;text-align:left;width:100%;padding:.7rem;margin:.4rem 0;background:#f2f5ee;white-space:pre-wrap}.sw-page-readings button small{display:block;color:#52665a;font-size:.8rem;margin-top:.3rem}.sw-page-readings button span{font-family:Georgia,'Times New Roman',serif;font-size:1.1rem}#sw-reference-panel{margin-top:1rem;padding:1rem;border:1px solid #d3dccf;border-radius:8px}.sw-search-focus{padding:.85rem 1rem;border-left:4px solid #876632;background:#faf3e3;margin:.7rem 0}.sw-search-focus blockquote{margin:.5rem 0;white-space:pre-wrap;line-height:1.6}.sw-search-selected{stroke:#b55d08!important;fill:#ffbf4b44!important;stroke-width:.004}.sw-search-focus mark,.sms-hit mark{background:#ffe1a0;color:#27251e}.sw-dialog [hidden]{display:none!important}#sw-assertions fieldset{padding:.8rem;margin:.8rem 0;border:1px solid #c9d6c7;border-radius:6px}#sw-assertions legend{font-size:.9rem;font-weight:600}.sw-review-summary{display:flex;gap:.65rem;flex-wrap:wrap;margin:.9rem 0}.sw-review-summary>span{padding:.6rem .8rem;border:1px solid #cbd8c6;border-radius:6px;background:#f2f5ee;font-size:.9rem}.sw-preview-card{padding:1.25rem;border:1px solid #b5cbb9;border-radius:10px;background:#eff5ed;margin:1rem 0}.sw-preview-card h3{margin:0 0 .6rem;font-family:Georgia,'Times New Roman',serif;font-size:1.4rem}.sw-preview-card .sw-tools .primary{min-height:44px}.sw-preview-card input,.sw-preview-card select{max-width:42rem!important}.sw-stage-nav{display:flex;justify-content:space-between;gap:.7rem;padding:1rem 0;margin-top:1rem;border-top:1px solid #d1d9ca}.sw-stage-nav button{min-height:44px}.sw-empty{max-width:42rem;background:#f2f5ee;border:1px solid #d3ddce;border-radius:8px;padding:1.25rem;margin:1rem 0}.sw-review-list{margin-top:1rem}.sw-records-details>summary{font-size:1.05rem;font-weight:600;padding:.8rem 0}
@media(min-width:761px){.sw-reader-grid{grid-template-columns:minmax(0,var(--sw-image-share,52%)) minmax(0,1fr);gap:1rem;align-items:start}.sw-image-pane{position:sticky;top:.4rem;max-height:83vh;overflow:auto;padding:.2rem}.sw-text-pane{max-height:83vh;overflow:auto;padding:.2rem;overscroll-behavior:contain}.sw-viewport{height:59vh;min-height:300px}.sw-pagebar{position:static}.sw-image-pane>.sw-tools button{font-size:.8rem;padding:.45rem}.sw-reader-grid .sw-text{max-height:23rem}}
@media(max-width:760px){.sw-pane-tabs{display:flex;flex:1}.sw-pane-tabs button{flex:1;min-height:44px;padding:.5rem}.sw-ratio{display:none}.sw-reading-controls{position:sticky;top:0;z-index:7;background:#fffefa;gap:.25rem;padding:.4rem 0}.sw-reading-controls>.sw-tools{margin:.2rem 0;flex:1 1 100%;justify-content:space-between}.sw-reading-controls>.sw-tools button{font-size:.85rem;min-height:40px}.sw-reader-grid{display:block}.sw-text-pane{max-height:none;padding:0}.sw-image-pane{position:static;max-height:none}.sw-dialog [data-pane=image] .sw-text-pane,.sw-dialog [data-pane=text] .sw-image-pane,.sw-dialog [data-pane=annotation] .sw-image-pane{display:none}.sw-dialog [data-pane=text] #sw-editor,.sw-dialog [data-pane=annotation] #sw-reference-panel{display:none}.sw-viewport{height:52dvh;min-height:270px}.sw-editor{padding:.85rem}.sw-task-choice button{min-width:80px;font-size:.8rem}.sw-pagebar{position:static;gap:.3rem}.sw-page-count{flex-basis:100%}.sw-pagebar>label[for=sw-capture]{display:none}.sw-pagebar>#sw-capture{font-size:.8rem;flex-basis:100%}#sw-reference-panel{margin-top:0;padding:.8rem}.sw-save-actions{position:sticky;bottom:0;background:#fffefa;z-index:3;padding:.6rem 0;box-shadow:0 -5px 12px #fffefa}.sw-save-actions button{width:100%}.sw-save-actions{flex-direction:row}.sw-save-actions .primary{flex-basis:100%}.sw-save-actions button:not(.primary){flex:1;width:auto;font-size:.8rem}.sw-review-summary>span{flex:1}.sw-context>.sw-actions button{font-size:.78rem}.sw-stages{gap:.25rem}.sw-stages button{font-size:.78rem;padding:.5rem .2rem}.sw-header h2{font-size:1.35rem}.sw-preview-card{padding:1rem}.sw-preview-card .sw-tools button{width:100%}}

/* Keep the page itself near the top on ordinary laptop widths. */
.sw-header .eyebrow{margin:.1rem 0;font-size:.72rem}.sw-header h2{margin:.2rem 0 .5rem}.sw-header>button{font-size:.8rem;padding:.4rem .65rem}.sw-stages{margin:.3rem 0 .65rem}.sw-status{padding:.45rem .7rem;min-height:0;margin:.55rem 0}.sw-reading-controls{padding:.25rem 0}.sw-reading-controls .sw-tools{margin:.2rem 0}.sw-context>label{font-size:.8rem;margin:0}.sw-context>select{padding:.4rem .55rem;min-height:36px}.sw-pagebar{padding:.25rem 0;margin:.4rem 0}.sw-pagebar>label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.sw-pagebar button{padding:.45rem .6rem;font-size:.83rem}.sw-pagebar select{padding:.4rem .5rem;min-height:36px;font-size:.86rem}
@media(min-width:761px){.sw-dialog{padding:1rem 1.2rem}.sw-header h2{font-size:1.5rem}.sw-stages button{flex-direction:row;font-size:.84rem;padding:.45rem .4rem;min-height:42px;gap:.4rem}.sw-stages button span{width:1.3rem;height:1.3rem}.sw-context{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:.25rem .8rem}.sw-context>.sw-actions{grid-column:3;grid-row:1/3;display:flex;flex-direction:column;align-items:stretch;margin:0;gap:.2rem}.sw-context>.sw-actions button{font-size:.74rem;padding:.25rem .5rem;min-height:26px}.sw-pagebar{display:grid;grid-template-columns:auto auto minmax(100px,1fr) auto minmax(110px,.7fr);gap:.45rem}.sw-pagebar select{width:100%;max-width:none;min-width:0}.sw-page-count{font-size:.8rem;max-width:8rem;overflow-wrap:anywhere}.sw-image-pane>.sw-tools{gap:.3rem;margin:.3rem 0}}

@media(max-width:650px){#sw-dialog .sw-pagebar button{min-height:44px}}

/* Saved records stay beside the source; selecting is separate from editing. */
.sw-record-browser{border:1px solid #cbd8ce;border-radius:9px;background:#f6f8f3;padding:.8rem;margin:.7rem 0}
.sw-record-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap}
.sw-record-head h3{font-size:1.08rem;margin:0}.sw-record-head h3 span{font-family:system-ui,sans-serif;font-size:.8rem;background:#dfe9df;border-radius:1rem;padding:.15rem .45rem;margin-left:.25rem}
.sw-record-head button{font-size:.82rem;padding:.4rem .6rem;min-height:36px}
.sw-record-filters{display:grid;grid-template-columns:1fr 1fr;gap:.45rem;margin:.6rem 0}
.sw-record-filters label{font-size:.76rem;margin:0}.sw-record-find{grid-column:1/-1}
.sw-record-filters input,.sw-record-filters select{width:100%;padding:.4rem .5rem;min-height:36px;font-size:.83rem}
.sw-record-list{max-height:15rem;overflow:auto;overscroll-behavior:contain;display:grid;gap:.35rem;scrollbar-gutter:stable}
.sw-record-row{min-width:0}.sw-record-row>button{display:block;text-align:left;width:100%;padding:.6rem .7rem;background:#fffefa;border:1px solid #d7ded2;border-radius:6px;overflow-wrap:anywhere}
.sw-record-row strong,.sw-record-row small,.sw-record-excerpt{display:block}.sw-record-row strong{font-size:.86rem;font-weight:600}.sw-record-row small{font-size:.74rem;color:#52665a;margin-top:.25rem}
.sw-record-type{font-size:.69rem;color:#4d6656}.sw-record-excerpt{font-family:Georgia,'Times New Roman',serif;font-size:1rem;white-space:pre-wrap;max-height:3rem;overflow:hidden;margin-top:.15rem}
.sw-record-row.is-selected>button{border-color:#286448;box-shadow:inset 3px 0 #286448;background:#eaf2e8}
.sw-record-detail{border-top:1px solid #c7d5c8;margin-top:.65rem;padding-top:.7rem;font-size:.88rem}
.sw-record-detail blockquote{margin:.4rem 0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:7rem;overflow:auto;font-family:Georgia,'Times New Roman',serif}
.sw-record-detail code{display:block;overflow-wrap:anywhere;font-size:.75rem}.sw-record-detail .sw-tools button{font-size:.82rem}
.sw-record-state{font-size:.78rem;font-weight:600;color:#286448;margin-bottom:.3rem}.sw-confirmed{background:#edf4e9;border-color:#bfd0bb}
.sw-record-mark{background:#e7eddf;color:inherit;border-bottom:1px solid #839d78;cursor:pointer}.sw-record-mark.is-selected{background:#f2dfa8;border-bottom:2px solid #8d6521}
.sw-record-selected{stroke:#936416!important;fill:#e8b64e4d!important;stroke-width:.004}
.sw-reading-controls{position:sticky;top:0;z-index:7;background:#fffefa}
.sw-record-browser{scroll-margin-top:6rem}
#sw-reference-panel{margin-top:0;padding:.65rem .8rem}#sw-reference-panel>h3{font-size:1rem;margin:.1rem 0 .4rem}#sw-reference-panel .sw-text{max-height:11rem;font-size:1.06rem;padding:.7rem;line-height:1.75}
#sw-linked-quotes{display:none}.sw-record-browser+.sw-editor{margin-top:.7rem}
@media(max-width:760px){.sw-record-browser{padding:.65rem}.sw-record-list{max-height:14rem}.sw-record-head button,.sw-record-detail button,.sw-record-filters input,.sw-record-filters select{min-height:44px}.sw-record-filters{gap:.35rem}.sw-record-head h3{font-size:1rem}}
