:root{--ink:#213039;--muted:#6f7c7b;--paper:#f5f3ed;--card:#fffefa;--line:#dfded6;--teal:#1f746c;--nav:#173b3f;--gold:#c89a4b;--pale:#eaf3ef;--shadow:0 18px 55px rgba(21,50,46,.09)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.55 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}button,input,textarea{font:inherit}button{cursor:pointer}.app-header{position:sticky;z-index:20;top:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px clamp(18px,4vw,58px);border-bottom:1px solid rgba(255,255,255,.13);background:var(--nav);color:white}.brand{display:flex;align-items:center;gap:12px;color:white;text-decoration:none}.dove{width:54px;height:54px;display:grid;place-items:center;border:2px solid var(--gold);border-radius:50%;background:white;overflow:hidden}.dove img{width:46px;height:46px;object-fit:contain}.brand strong,.brand small,.brand em{display:block}.brand strong{font:24px Georgia,serif}.brand small{color:#cbdcd6;font-size:9px;letter-spacing:.13em;text-transform:uppercase}.brand em{color:#dfc386;font-size:11px;font-style:normal}.test-badge{border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:6px 11px;color:#e8d19f;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}main{max-width:1320px;margin:auto;padding:clamp(28px,5vw,70px) clamp(15px,4vw,54px) 60px}.hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);gap:36px;align-items:end;margin-bottom:36px}.eyebrow{margin:0 0 7px;color:var(--teal);font-size:10px;font-weight:850;letter-spacing:.15em;text-transform:uppercase}.hero h1{max-width:820px;margin:0;font:clamp(35px,5.2vw,66px)/1.03 Georgia,serif;letter-spacing:-.025em}.hero>div>p:last-child{max-width:760px;color:var(--muted);font-size:16px}.hero-steps{display:grid;gap:8px}.hero-steps span{display:flex;align-items:center;gap:11px;padding:10px 12px;border-bottom:1px solid var(--line);font-weight:700}.hero-steps b{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:var(--pale);color:var(--teal);font-size:11px}.study-shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:640px;border:1px solid #d9d9d1;border-radius:18px;background:var(--card);box-shadow:var(--shadow);overflow:hidden}.study-nav{padding:22px 12px;background:#1b4144}.study-nav button{width:100%;display:flex;align-items:center;gap:10px;margin-bottom:5px;padding:12px;border:0;border-radius:10px;background:transparent;color:#c8d9d3;text-align:left;font-weight:700}.study-nav button span{color:#d1b06f;font:10px ui-monospace,monospace}.study-nav button.active{background:rgba(255,255,255,.11);color:white;box-shadow:inset 3px 0 0 var(--gold)}.study-content{min-width:0;padding:clamp(20px,3vw,42px)}.panel{display:none}.panel.active{display:block}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.panel h2{margin:0;font:clamp(24px,3vw,36px) Georgia,serif}.panel-copy{max-width:760px;color:var(--muted)}.text-button{border:0;background:none;color:var(--teal);font-weight:800}.drop-zone{padding:30px 22px;border:1.5px dashed #a7bbb3;border-radius:15px;background:#f4f8f5;text-align:center}.drop-zone.dragging{border-color:var(--gold);background:#fff9ec}.upload-icon{width:46px;height:46px;display:grid;place-items:center;margin:0 auto 8px;border-radius:50%;background:white;color:var(--teal);font-size:24px;box-shadow:0 5px 18px rgba(20,60,53,.09)}.drop-zone h3{margin:6px 0 2px;font:22px Georgia,serif}.drop-zone p{margin:0 0 16px;color:var(--muted)}.btn{min-height:42px;border:0;border-radius:10px;padding:10px 15px;font-weight:800}.btn.primary{background:var(--teal);color:white}.btn.quiet{border:1px solid var(--line);background:white;color:var(--ink)}.drop-zone .btn{margin:4px}.btn.small{min-height:35px;padding:7px 10px;font-size:12px}.btn.danger{color:#8f4a43}.field-label{display:block;margin:22px 0 7px;font-weight:800}.document-meta{margin-top:18px;padding:10px 13px;border-left:3px solid var(--gold);background:#fbf5e9;color:#63553e;font-size:13px}textarea{width:100%;min-height:250px;resize:vertical;border:1px solid var(--line);border-radius:12px;background:#fff;padding:15px;color:var(--ink);line-height:1.65;outline-color:#7eaca1}.actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:14px}.status{min-height:24px;color:var(--muted);font-size:12px}.result-list{display:grid;gap:11px;padding-left:28px}.result-list li{padding:14px 16px;border:1px solid var(--line);border-radius:11px;background:#fff;line-height:1.65}.result-list.editable li{outline-color:#7eaca1}.history-tools{display:flex;gap:7px;flex-wrap:wrap}.history-list{margin-top:18px}.history-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:16px 0;border-top:1px solid var(--line)}.history-row span,.history-row strong,.history-row small{display:block}.history-row span{color:var(--teal);font-size:10px;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.history-row strong{margin:3px 0;font:19px Georgia,serif}.history-row small{color:var(--muted)}.history-row-actions{display:flex;gap:6px}.empty{padding:30px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);text-align:center}footer{display:flex;justify-content:space-between;gap:20px;padding:24px clamp(18px,4vw,58px);border-top:1px solid var(--line);color:var(--muted);font-size:12px}footer strong{color:var(--teal);font:18px Georgia,serif}.toast{position:fixed;z-index:40;right:20px;bottom:20px;max-width:360px;padding:11px 16px;border-radius:999px;background:#183b3f;color:white;box-shadow:0 12px 34px rgba(0,0,0,.18);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:none}@media(max-width:760px){.app-header{padding:10px 13px}.dove{width:44px;height:44px}.dove img{width:38px;height:38px}.brand strong{font-size:19px}.brand small{font-size:7px}.brand em{font-size:9px}.hero{grid-template-columns:1fr;gap:18px}.hero h1{font-size:38px}.study-shell{display:block;border-radius:14px}.study-nav{position:sticky;z-index:10;top:65px;display:grid;grid-template-columns:repeat(4,1fr);gap:3px;padding:7px;background:#1b4144}.study-nav button{display:grid;justify-items:center;gap:2px;margin:0;padding:8px 2px;font-size:9px;text-align:center}.study-nav button.active{box-shadow:inset 0 2px 0 var(--gold)}.study-content{padding:18px 14px 24px}.panel-head{display:block}.panel-head .text-button{margin-top:8px;padding:0}.drop-zone{padding:24px 10px}.drop-zone .btn{width:100%;margin:4px 0}.actions .btn{flex:1 1 100%}.history-row{grid-template-columns:1fr}.history-row-actions .btn{flex:1}.history-row-actions{display:flex}footer{display:grid;text-align:center;gap:3px}.test-badge{font-size:8px;padding:5px 8px}}


.paste-workspace{margin:14px 0;padding:18px;border:1px solid var(--line);border-radius:16px;background:#f8fbfa}
.paste-workspace[hidden]{display:none}
.paste-workspace textarea{width:100%;min-height:220px;resize:vertical;padding:13px;border:1px solid #b8c9c4;border-radius:12px;background:#fff;color:var(--ink);font:14px/1.55 inherit}

/* Persistent three-workspace Study layout. */
.study-content{display:grid;gap:18px}
.panel,.panel.active{display:block;padding:22px;border:1px solid var(--line);border-radius:15px;background:#fff}
.panel.current{border-color:#b89a5e;box-shadow:0 0 0 2px rgba(200,154,75,.08)}
.document-reader{height:clamp(420px,60vh,720px);overflow:auto;padding:22px;border:1px solid #d6d9d4;border-radius:12px;background:#fffefa;color:var(--ink);font:15px/1.72 Georgia,"Times New Roman",serif;white-space:pre-wrap;scrollbar-gutter:stable}
.document-reader p{margin:0 0 1em}
.empty-reading,.empty-result{color:var(--muted);font-style:italic}
.result-list .empty-result{list-style:none;margin-left:-28px;background:#fafaf7}
@media(max-width:760px){.study-content{padding:14px 10px 22px}.panel,.panel.active{padding:15px}.drop-zone{padding:18px 10px}.document-reader{height:58vh;min-height:380px;padding:16px;font-size:14px}}
