*{box-sizing:border-box}body{margin:0;background:#f5f8f6;color:#22343b;font:15px/1.5 system-ui,sans-serif}header{background:#103a35;color:white;padding:16px 28px;display:flex;justify-content:space-between;align-items:center;gap:16px}header strong{font-size:23px}header span,header small{color:#bce9d4}header small{display:block}header form{display:inline}main{max-width:1250px;margin:24px auto;padding:0 20px}.layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px}aside,.panel{background:white;border:1px solid #dce5e4;border-radius:12px;padding:20px}aside{align-self:start}.panel{margin:20px 0}.login{max-width:460px;margin:45px auto}h1,h2,h3{margin:0 0 12px;line-height:1.25}h1{font-size:28px}h2{font-size:19px}h3{font-size:16px}.nav{display:block;padding:10px;color:#11695c;text-decoration:none;border-radius:7px}.active{background:#e7f4ef;font-weight:bold}label{display:block;font-weight:600;margin:12px 0}input,select,textarea{display:block;width:100%;max-width:520px;border:1px solid #bacbc8;border-radius:6px;padding:9px;font:inherit;color:inherit;background:white}textarea{min-height:80px}button{background:#11695c;color:white;border:1px solid #11695c;border-radius:7px;padding:8px 13px;font:inherit;font-weight:600;cursor:pointer}.secondary{background:white;color:#11695c}.notice,.error{padding:12px 16px;background:#e7f4ef;border-left:4px solid #11695c}.error{background:#ffe9e9;border-color:#a33}.row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #dce5e4}.group{border:1px solid #dce5e4;border-radius:8px;padding:15px;margin:14px 0}.tag{display:inline-block;background:#e7f4ef;padding:4px 10px;border-radius:20px;margin:4px}footer{text-align:center;color:#64757a;padding:22px}@media(max-width:650px){.layout{display:block}header{flex-wrap:wrap}aside{margin-bottom:20px}}
.doc-layout{display:grid;grid-template-columns:minmax(180px,28%) minmax(0,1fr);gap:20px}.doc-list{max-height:65vh;overflow:auto;border-right:1px solid #dce5e4;padding-right:10px}.doc-list details{padding-left:10px}.doc-list .nav{overflow-wrap:anywhere;padding:5px 8px}summary{cursor:pointer;font-weight:600;padding:8px 0}.source-text{white-space:pre-wrap;overflow-wrap:anywhere;background:#f7faf9;border:1px solid #dce5e4;padding:20px;margin:16px 0;min-height:120px}.check{display:inline-flex;align-items:center;gap:6px;margin:5px 12px 5px 0;font-weight:400}.check input{width:auto;display:inline}.grouping{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:16px}.grouping label{margin:0}.inline{display:inline-block}fieldset{border:1px solid #dce5e4;margin:10px 0}details.panel summary{font-size:19px}@media(max-width:850px){.doc-layout{display:block}.doc-list{max-height:35vh;border-right:0;border-bottom:1px solid #dce5e4;margin-bottom:15px}}
.coded-span{background:#fff0a6}.coded-span.overlap{background:#f4c769}.coded-span.located{background:#abdcd0;outline:1px solid #11695c}.coding-panel{border:1px solid #dce5e4;border-radius:8px;padding:14px;margin:14px 0}.selection-preview,.assignment-quote{white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f8f6;padding:10px;margin:8px 0;border-left:3px solid #96bcb1}.selection-preview{max-height:160px;overflow:auto}.coding-tags{max-height:200px;overflow:auto}.assignment{border-top:1px solid #dce5e4;padding:12px 0}.assignment button{font-size:13px}button:disabled{opacity:.5;cursor:not-allowed}.source-text::selection,.source-text *::selection{background:#a9d5f5;color:#142c35}
.mode-clean .coded-span{background:transparent;outline:none}.mode-clean .coded-span.located{background:#abdcd0;outline:1px solid #11695c}.comment-box{margin:8px 0;padding:0 10px;border-left:2px solid #dce5e4}.comment{padding:10px 0;border-bottom:1px solid #dce5e4}.history-text{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;background:#f5f8f6;padding:8px}.coding-tags small{color:#11695c;cursor:help}
.retrieval-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;align-items:start}.retrieval-filters fieldset{min-width:0;max-height:350px;overflow:auto}.retrieval-counts{border-collapse:collapse;width:100%}.retrieval-counts th,.retrieval-counts td{padding:.5rem;text-align:left;border-bottom:1px solid #ddd}.retrieval-context{white-space:pre-wrap;overflow-wrap:anywhere;padding:.7rem;background:#fafafa}.retrieval-context mark{background:#ffdf80;color:inherit}

/* v0.6a: dedicated workspaces and shared navigation */
main{max-width:1600px}.layout{grid-template-columns:minmax(240px,285px) minmax(0,1fr)}.main-content{min-width:0}.brand{display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none}.brand img{background:#fff;border-radius:6px;padding:3px;object-fit:contain}.project-links{padding-left:12px;border-left:2px solid #dce5e4;margin:4px 0 12px}.project-links .nav,.account-links .nav{padding:6px 9px}.account-links,.sidebar-documents{border-top:1px solid #dce5e4;margin-top:16px;padding-top:16px}.sidebar-documents h2{font-size:16px}.sidebar-documents .grouping{display:block}.sidebar-documents .grouping label{margin:8px 0}.sidebar-documents .doc-list{border:0;padding:0;max-height:55vh}.project-card a{color:#11695c}.project-role{color:#64757a}.document-workspace{margin-top:12px}@media(max-width:750px){.layout{display:block}.sidebar-documents .doc-list{max-height:35vh}}

.coding-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr);gap:18px;align-items:start}.coding-reading,.coding-tools{min-width:0}.coding-tools .coding-panel:first-child{margin-top:0}@media(max-width:1100px){.coding-layout{display:block}}

/* v0.6b: scroll the whole navigation pane, not a nested document list. */
.layout > aside {min-width:0; overflow-wrap:anywhere;}
.layout > aside .doc-list {max-height:none;overflow:visible;margin-bottom:0;}
@media(min-width:751px){
 .layout > aside {position:sticky;top:16px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;}
}
.metadata-note{color:#64757a;font-size:13px;margin:6px 0;}
.management-action{border:1px solid #dce5e4;border-radius:7px;padding:4px 12px;margin:10px 0 18px;}
.management-action summary{color:#8b3030;font-size:14px;}
.danger{background:#8b3030;border-color:#8b3030;color:#fff;}
/* v0.6c: researcher's coding lenses; fixed slot positions. */
.target-1{background:#ffaa55}.target-2{background:#ff1a1a}.target-3{background:#f291c1}.target-4{background:#8000ff}
.target-dot{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:5px;vertical-align:baseline;border:1px solid #0002}
.target-controls{border:1px solid #dce5e4;border-radius:8px;padding:0 10px 8px;margin-top:12px}.target-row{display:flex;align-items:end;flex-wrap:wrap;gap:8px}.target-row>label:first-child{flex:1;min-width:140px}.target-row .check{margin-bottom:18px}
.source-text{line-height:2.65}.mode-clean{line-height:1.65}.coded-span{box-decoration-break:clone;-webkit-box-decoration-break:clone}.mode-clean .coded-span{box-shadow:none!important}
.reading-with-margin.with-margin{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,31%);gap:8px;align-items:start}.annotation-margin{position:relative;background:transparent;border:0;padding:0;min-width:0;margin:16px 0;min-height:120px}.margin-label{display:block;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:12px;padding:5px;margin:0;border-color:#dce5e4}.annotation-margin.positioned .margin-label{position:absolute;left:0}
.tag-root{border:1px solid #dce5e4;border-radius:6px;padding:0 8px 6px;margin:6px 0}.coding-tags{max-height:350px}.tag-choice{display:flex;align-items:start;flex-wrap:wrap;gap:5px;margin:4px 0}.tag-button{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border:1px solid #bacbc8;border-radius:6px;margin:0;cursor:pointer;font-size:14px;font-weight:500}.tag-button{position:relative}.tag-button input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}.tag-button:focus-within{outline:2px solid #11695c;outline-offset:2px}.tag-button:has(input:checked){background:#d1eee1;border-color:#11695c}.tag-info{flex:0 1 auto;max-width:100%}.tag-info summary{padding:4px;color:#11695c}.tag-info[open]{flex-basis:100%}.assignment-heading{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.assignment-heading>form{display:inline}.assignment-heading .icon-control{padding:3px 7px}.recode-control summary{padding:3px 7px;color:#11695c}.recode-control[open]{flex-basis:100%}.compact-comments:not([open]){border:0;padding:0;margin:3px 0}.compact-comments summary{padding:3px;font-size:14px}.reviewer-id{display:inline-block;border-radius:5px;background:#e7f4ef;font-size:11px;padding:1px 4px;margin-left:4px;vertical-align:middle}
@media(max-width:750px){.reading-with-margin.with-margin{display:block}.annotation-margin.positioned .margin-label{position:static}.annotation-margin{height:auto!important}.margin-label{margin:4px 0}}
.source-text:not(.mode-clean) .target-mask-1{padding-bottom:16px;background-image:linear-gradient(#ffaa55,#ffaa55);background-position:0 calc(100% - 12px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-2{padding-bottom:16px;background-image:linear-gradient(#ff1a1a,#ff1a1a);background-position:0 calc(100% - 8px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-3{padding-bottom:16px;background-image:linear-gradient(#ffaa55,#ffaa55),linear-gradient(#ff1a1a,#ff1a1a);background-position:0 calc(100% - 12px),0 calc(100% - 8px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-4{padding-bottom:16px;background-image:linear-gradient(#f291c1,#f291c1);background-position:0 calc(100% - 4px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-5{padding-bottom:16px;background-image:linear-gradient(#ffaa55,#ffaa55),linear-gradient(#f291c1,#f291c1);background-position:0 calc(100% - 12px),0 calc(100% - 4px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-6{padding-bottom:16px;background-image:linear-gradient(#ff1a1a,#ff1a1a),linear-gradient(#f291c1,#f291c1);background-position:0 calc(100% - 8px),0 calc(100% - 4px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-7{padding-bottom:16px;background-image:linear-gradient(#ffaa55,#ffaa55),linear-gradient(#ff1a1a,#ff1a1a),linear-gradient(#f291c1,#f291c1);background-position:0 calc(100% - 12px),0 calc(100% - 8px),0 calc(100% - 4px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-8{padding-bottom:16px;background-image:linear-gradient(#8000ff,#8000ff);background-position:0 calc(100% - 0px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-9{padding-bottom:16px;background-image:linear-gradient(#ffaa55,#ffaa55),linear-gradient(#8000ff,#8000ff);background-position:0 calc(100% - 12px),0 calc(100% - 0px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-10{padding-bottom:16px;background-image:linear-gradient(#ff1a1a,#ff1a1a),linear-gradient(#8000ff,#8000ff);background-position:0 calc(100% - 8px),0 calc(100% - 0px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-11{padding-bottom:16px;background-image:linear-gradient(#ffaa55,#ffaa55),linear-gradient(#ff1a1a,#ff1a1a),linear-gradient(#8000ff,#8000ff);background-position:0 calc(100% - 12px),0 calc(100% - 8px),0 calc(100% - 0px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-12{padding-bottom:16px;background-image:linear-gradient(#f291c1,#f291c1),linear-gradient(#8000ff,#8000ff);background-position:0 calc(100% - 4px),0 calc(100% - 0px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-13{padding-bottom:16px;background-image:linear-gradient(#ffaa55,#ffaa55),linear-gradient(#f291c1,#f291c1),linear-gradient(#8000ff,#8000ff);background-position:0 calc(100% - 12px),0 calc(100% - 4px),0 calc(100% - 0px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-14{padding-bottom:16px;background-image:linear-gradient(#ff1a1a,#ff1a1a),linear-gradient(#f291c1,#f291c1),linear-gradient(#8000ff,#8000ff);background-position:0 calc(100% - 8px),0 calc(100% - 4px),0 calc(100% - 0px);background-size:100% 3px;background-repeat:no-repeat;}
.source-text:not(.mode-clean) .target-mask-15{padding-bottom:16px;background-image:linear-gradient(#ffaa55,#ffaa55),linear-gradient(#ff1a1a,#ff1a1a),linear-gradient(#f291c1,#f291c1),linear-gradient(#8000ff,#8000ff);background-position:0 calc(100% - 12px),0 calc(100% - 8px),0 calc(100% - 4px),0 calc(100% - 0px);background-size:100% 3px;background-repeat:no-repeat;}

/* v0.6d: compact attention indicators, distinct from review and coding state. */
.comment-count { display:inline; font-size:.78rem; margin-left:.35rem; white-space:normal; }
.comment-count:empty { display:none; }
.unread-badge { display:inline-block; background:#f5d8a0; color:#553400; border-radius:.35rem; padding:.08rem .35rem; font-size:.75rem; font-weight:700; white-space:nowrap; }
.unread-badge[hidden] { display:none; }
.comment-list-item { border-top:1px solid #dce5e2; padding:.8rem 0; }
.comment-list-item p { margin:.25rem 0; }
.comment-filters { margin:.65rem 0; }

/* Keep the located assignment identifiable in the summary and margin. */
.secondary.locate-assignment.located-assignment{background:#abdcd0;color:#103a35;border-color:#11695c}

/* v0.6e: compact group editing and help navigation. */
.header-account a{color:#fff;text-decoration:underline;text-underline-offset:3px;margin-right:8px}
.header-account a:focus-visible{outline:2px solid #bce9d4;outline-offset:3px}
.group-definitions .group-input-row{display:flex;align-items:flex-end;gap:6px;width:100%;max-width:320px;margin:8px 0}
.group-definitions .group-input-row label{flex:1;min-width:0;margin:0;font-size:14px}
.group-definitions .group-input-row input{margin-top:3px;padding:6px 9px}
.group-definitions .group-input-row button{flex:none;min-width:38px;padding:6px 10px;line-height:1.5}
.group-definitions .management-action{max-width:480px;margin:4px 0 12px}
.help-page{max-width:900px}.help-page h3{margin-top:20px}.help-page p{margin:8px 0 14px}.help-page a{color:#11695c}.help-page li{margin:5px 0}

/* v0.6f: a compact coding console, with the document as the main reading scroll. */
.coding-tools [hidden]{display:none!important}
.coding-tabs,.selection-header #expand-selection,.tag-search-label,.coding-actions #coding-pending{display:none}
.coding-enhanced .coding-tabs{display:flex;gap:5px;flex-wrap:wrap;margin:0 0 6px}
.coding-tabs button{padding:5px 9px;font-size:13px}
.coding-tabs button[aria-pressed="true"]{background:#11695c;color:white}
.coding-enhanced .selection-header #expand-selection{display:inline-block;font-size:12px;padding:2px 7px;margin-bottom:4px}
.coding-enhanced .selection-preview{max-height:4.6em;margin:4px 0;padding:6px 8px;font-size:13px}
.coding-enhanced .selection-preview.expanded{max-height:24vh}
.coding-enhanced .tag-search-label{display:block;margin:3px 0;font-size:13px}
.tag-search-label input{padding:5px 8px}
.coding-enhanced .coding-tags{max-height:none;overflow:visible}
.tag-wrap{display:flex;flex-wrap:wrap;align-items:flex-start;gap:4px}
.tag-wrap .tag-choice{display:inline-flex;max-width:100%;margin:0;gap:2px}
.tag-wrap .tag-choice:has(.tag-info[open]){flex-basis:100%}
.tag-wrap .tag-button{min-width:0;max-width:100%;padding:3px 6px;font-size:13px;overflow-wrap:anywhere}
.tag-wrap .tag-button span{min-width:0}
.tag-wrap .tag-info summary{padding:2px 3px;font-size:13px}
.tag-root{padding:0 6px 6px;margin:5px 0}
.tag-root>summary{padding:5px 0;font-size:14px}
.coding-enhanced .coding-actions{padding-top:6px;border-top:1px solid #dce5e4;background:white}
.coding-enhanced .coding-actions #coding-pending{display:block;margin:0 0 4px;overflow-wrap:anywhere;max-height:3em;overflow:auto}
.coding-actions button{padding:6px 9px;font-size:13px}
.coding-enhanced .coding-review .coding-panel{margin:0 0 8px;padding:9px}
.coding-enhanced .coding-console h3{margin:0 0 6px}
.coding-enhanced .coding-tab-body>p{margin:4px 0}
@media(min-width:1101px) and (min-height:480px){
 .coding-layout{grid-template-columns:minmax(0,1.2fr) minmax(290px,1fr)}
 .coding-tools.coding-enhanced{position:sticky;top:16px;height:calc(100vh - 32px);height:var(--coding-height,calc(100dvh - 32px));display:flex;flex-direction:column;min-height:0;align-self:start;gap:6px}
 .coding-enhanced .coding-console{display:flex;flex-direction:column;flex:1;min-height:0;margin:0;padding:10px}
 .coding-enhanced .coding-console>form{display:flex;flex-direction:column;flex:1;min-height:0}
 .coding-enhanced .selection-header,.coding-enhanced .coding-actions,.coding-enhanced .coding-tabs{flex:none}
 .coding-enhanced .coding-tab-body,.coding-enhanced .coding-review{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;padding-right:4px}
 .coding-enhanced[data-active-tab="review"] .coding-console,.coding-enhanced[data-active-tab="review"] .coding-console>form{flex:none}
 .coding-enhanced .coding-review{padding-top:2px}
 .coding-enhanced .coding-reading{min-width:0}
}
@media(max-width:1100px),(max-height:479px){.coding-enhanced .coding-tab-body,.coding-enhanced .coding-review{overflow:visible}.coding-enhanced .selection-preview.expanded{max-height:180px}}

.heart-button{color:#a51f46!important;font-size:19px!important;line-height:1.15}.heart-button[aria-pressed="true"]{background:#fce6ee;border-color:#a51f46}.source-text::highlight(saved-passage){background:#abdcd0;color:#103a35}

/* v0.6g.1: compact bulk controls for the Apply tag tree. */
.tag-tree-actions{display:none}
.coding-enhanced .tag-tree-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:4px 0;font-size:13px;color:#64757a}
.tag-tree-actions button{background:transparent;border:0;color:#11695c;padding:3px 2px;border-radius:3px;font-size:13px;text-decoration:underline;font-weight:500}
.tag-tree-actions button:focus-visible{outline:2px solid #11695c;outline-offset:2px}
