﻿.study-shell{max-width:1400px;margin:0 auto;padding:24px 19px 75px;color:#253e32}
.study-back{font-size:13px;font-weight:800;color:#287b50;text-decoration:none}
.study-intro{margin:15px 0 22px}
.study-kicker{font-size:11px;letter-spacing:1.6px;color:#608c70;font-weight:850}
.study-intro h1{font-size:clamp(28px,4vw,44px);line-height:1.13;letter-spacing:-1.2px;color:#1e5339;margin:9px 0}
.study-intro p{max-width:820px;font-size:14px;line-height:1.65;color:#697d71}
.study-switch{display:inline-flex;gap:8px;background:#eff7f0;padding:5px;border-radius:12px;margin-top:8px}
.study-switch a{font-size:13px;text-decoration:none;color:#46745b;font-weight:800;border-radius:9px;padding:10px 15px}
.study-switch .selected{background:#2e7750;color:#fff}
.study-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(290px,.85fr);gap:17px;align-items:start}
.study-input-panel,.study-output-panel{background:#fff;border:1px solid #d8e6dd;border-radius:17px;padding:19px;min-width:0;box-shadow:0 4px 22px #17412b0a}
.study-input-panel h2,.study-output-panel h2{font-size:17px;color:#285b42;margin:3px 0 9px}
.study-hint{font-size:12px;line-height:1.63;color:#748778;margin:3px 0 13px}
.study-upload-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:15px}
.study-upload-actions input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.study-upload,.study-primary{font:800 12px system-ui;cursor:pointer;border-radius:10px;background:#2a7550;color:white;display:inline-flex;justify-content:center;align-items:center;padding:12px 14px;min-height:43px;border:1px solid #28724d}
.study-upload.secondary,.study-secondary{font:750 12px system-ui;border:1px solid #bbd6c4;border-radius:10px;background:#f5faf5;color:#2e6b50;padding:11px 13px;min-height:43px;cursor:pointer}
.study-upload:focus-within,.study-primary:focus-visible,.study-secondary:focus-visible,.study-link:focus-visible{outline:3px solid #f6c85b;outline-offset:2px}
.study-upload-actions label{flex:1}
.study-file-list{display:grid;gap:4px;margin-bottom:10px}
.study-file-list span{font-size:11px;color:#557967;background:#eff8f1;padding:7px 10px;border-radius:7px}
.study-label{display:block;font-size:12px;font-weight:800;color:#356b4c;margin-bottom:7px}
.study-input-panel textarea{display:block;box-sizing:border-box;width:100%;min-width:0;border:1px solid #cddfcf;border-radius:12px;padding:12px 13px;color:#1c392c;background:#fcfefc;resize:vertical;font:500 13px/1.5 system-ui}
.study-input-panel textarea:focus{outline:2px solid #75a88b;outline-offset:1px}
.study-metadata{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;color:#7b8e82;margin:6px 0 17px}
.study-link{border:0;background:none;cursor:pointer;color:#38805d;font-weight:750}
.study-questions{border-top:1px solid #e1eae5;margin-top:19px;padding-top:19px}
.study-settings{border-top:1px solid #e1eae5;padding-top:17px;margin-top:15px}
.study-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.study-settings-grid label{font-size:11px;font-weight:800;color:#426c56;display:grid;gap:5px}
.study-settings-grid select{border-radius:9px;border:1px solid #c9ddcf;background:#fff;color:#284333;padding:10px 9px;font:500 12px system-ui;max-width:100%;min-width:0}
.study-consent{border:1px solid #cde4d6;background:#f1f8f3;border-radius:12px;padding:13px;margin-top:20px}
.study-consent label{font-size:12px;color:#2c6244;line-height:1.6;display:flex;gap:9px;cursor:pointer;align-items:start}
.study-consent input{accent-color:#30845b;margin-top:3px;flex-shrink:0}
.study-consent p{font-size:11px;line-height:1.55;color:#64816f;margin:8px 0 0}
.study-run{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:16px}
.study-primary{font-size:13px;flex:2}
.study-primary:disabled,.study-secondary:disabled{opacity:.5;cursor:not-allowed}
#study-quota{font-size:11px;color:#7a8d7e}
#study-status{font-size:12px;line-height:1.6;color:#2d7953;min-height:23px}
#study-status.error{color:#b43e4e}
.study-output{font-size:13px;line-height:1.72;border-radius:12px;background:#f6faf7;border:1px solid #e0ebe2;padding:18px;min-height:320px;white-space:pre-wrap;overflow-wrap:anywhere;color:#273f30;max-height:1000px;overflow:auto}
.study-output .study-placeholder{color:#789186;margin:0}
.study-export{display:flex;gap:9px;margin-top:15px;flex-wrap:wrap}
.study-export button{flex:1;min-width:90px}
.study-footer-note{font-size:12px;line-height:1.7;margin:22px 2px;color:#7c8b7e}
html[data-banana-theme=dark] .study-shell{color:#d8eddf}
html[data-banana-theme=dark] .study-intro h1,html[data-banana-theme=dark] .study-input-panel h2,html[data-banana-theme=dark] .study-output-panel h2{color:#d3f2dd}
html[data-banana-theme=dark] .study-intro p,html[data-banana-theme=dark] .study-hint,html[data-banana-theme=dark] .study-footer-note{color:#acbfb4}
html[data-banana-theme=dark] .study-switch{background:#162e35}
html[data-banana-theme=dark] .study-switch a:not(.selected){color:#b5d7bf}
html[data-banana-theme=dark] .study-input-panel,html[data-banana-theme=dark] .study-output-panel{background:#1b2938;border-color:#43596b}
html[data-banana-theme=dark] .study-input-panel textarea,html[data-banana-theme=dark] .study-settings-grid select{background:#15263a;border-color:#476276;color:#e2f1e8}
html[data-banana-theme=dark] .study-label,html[data-banana-theme=dark] .study-settings-grid label{color:#c3e2cf}
html[data-banana-theme=dark] .study-consent{background:#1c3836;border-color:#456d5c}
html[data-banana-theme=dark] .study-consent label{color:#cfebd7}
html[data-banana-theme=dark] .study-output{background:#152634;border-color:#405b65;color:#dfefe6}
html[data-banana-theme=dark] .study-upload.secondary,html[data-banana-theme=dark] .study-secondary{background:#244153;color:#d0e7d7;border-color:#527565}
html[data-banana-theme=dark] .study-file-list span{background:#254134;color:#dcf2e4}
@media(max-width:920px){.study-layout{grid-template-columns:1fr}.study-output{min-height:230px}}
@media(max-width:500px){.study-shell{padding:15px 11px 50px}.study-input-panel,.study-output-panel{padding:13px}.study-intro h1{font-size:29px}.study-settings-grid{gap:9px}.study-switch{display:flex}.study-switch a{font-size:12px;flex:1;text-align:center;padding:10px 6px}.study-upload{font-size:11px;padding:10px 8px}.study-run .study-primary{flex-basis:100%}}

.study-basis{border-top:1px solid #e2ebe5;margin-top:18px;padding-top:17px;display:grid;gap:9px}
.study-basis label{font-size:13px;color:#2e6447}
.study-basis select{background:#fff;border:1px solid #c8dfce;border-radius:10px;padding:12px;color:#254735;font:600 12px system-ui;width:100%}
html[data-banana-theme=dark] .study-basis label{color:#d2e9d9}
html[data-banana-theme=dark] .study-basis select{background:#172839;border-color:#476174;color:#d5efde}

.study-instructions{border-top:1px solid #dce9e0;margin-top:18px;padding-top:17px}
.study-instructions h2{font-size:17px;margin:0 0 6px}
.study-instruction-presets{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}
.study-instruction-presets button{cursor:pointer;min-height:38px;font:700 11px system-ui;border:1px solid #bcdac7;background:#f2faf5;color:#286347;border-radius:100px;padding:9px 12px}
.study-instruction-presets button:focus-visible,#study-voice-button:focus-visible{outline:3px solid #e9b53c}
.study-voice-row{display:flex;align-items:stretch;gap:9px}
.study-voice-row textarea{flex:1}
#study-voice-button{flex:0 0 auto;align-self:start;white-space:nowrap;background:#e5f6ee;color:#235e42}
#study-voice-button.listening{background:#ffe6e6;color:#991c32;border-color:#dc7885}
#study-voice-status{margin:4px 0;color:#5f826c}
html[data-banana-theme=dark] .study-instruction-presets button{background:#20433c;color:#daf0dd;border-color:#4a7365}
html[data-banana-theme=dark] #study-voice-button{background:#294f4d;color:#e2f3e8;border-color:#50766f}
@media(max-width:460px){.study-voice-row{display:grid;grid-template-columns:1fr}.study-voice-row #study-voice-button{width:100%}}
/* Stage8 BananaTools voice-question fix — question field voice row */
.study-question-voice-row{display:flex;align-items:stretch;gap:9px;margin-bottom:0}
.study-question-voice-row textarea{flex:1}
#study-voice-question-button{flex:0 0 auto;align-self:start;white-space:nowrap;background:#e5f6ee;color:#235e42}
#study-voice-question-button.listening{background:#ffe6e6;color:#991c32;border-color:#dc7885}
#study-voice-question-status{margin:4px 0 10px;color:#5f826c;font-size:12px;line-height:1.55;min-height:18px}
#study-voice-question-button:focus-visible{outline:3px solid #e9b53c}
html[data-banana-theme=dark] #study-voice-question-button{background:#294f4d;color:#e2f3e8;border-color:#50766f}
html[data-banana-theme=dark] #study-voice-question-status{color:#a8c9b4}
@media(max-width:460px){.study-question-voice-row{display:grid;grid-template-columns:1fr}.study-question-voice-row #study-voice-question-button{width:100%}}

/* Voice question header and prominent mic button styling */
.study-field-header{display:flex;justify-content:space-between;align-items:center;margin-top:14px;margin-bottom:8px;flex-wrap:wrap;gap:8px}
.study-field-header .study-label{margin:0;font-weight:600;font-size:15px;color:var(--text, #1e293b)}
.study-mic-btn{background:#2563eb;color:#ffffff;border:1px solid #1d4ed8;border-radius:7px;padding:7px 15px;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:background .2s, transform .1s}
.study-mic-btn:hover{background:#1d4ed8}
.study-mic-btn:active{transform:scale(0.97)}
.study-mic-btn.listening{background:#dc2626!important;border-color:#b91c1c!important;color:#fff!important;animation:studyMicPulse 1.5s infinite}
#study-voice-button{display:inline-flex;align-items:center;gap:5px;font-size:13px;padding:6px 12px}
#study-voice-button.listening{background:#dc2626!important;color:#fff!important;animation:studyMicPulse 1.5s infinite}
@keyframes studyMicPulse{0%{opacity:1;transform:scale(1)}50%{opacity:0.85;transform:scale(0.98)}100%{opacity:1;transform:scale(1)}}
