@media screen {
body[data-theme="studio"]{
  color-scheme:light;--digits:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color:var(--text);background:var(--bg)
}
body[data-theme="studio"] :is(h1,h2,h3,h4){color:var(--ink);font-weight:600}
body[data-theme="studio"] .lab-scene{
  position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,34%);
  align-items:center;column-gap:28px;row-gap:12px;min-height:180px;padding:24px;margin:20px 0;
  border:1px solid var(--line);border-radius:16px;
  background-color:#edf3f8;background-image:linear-gradient(#7895b018 1px,transparent 1px),linear-gradient(90deg,#7895b018 1px,transparent 1px);background-size:32px 32px
}
body[data-theme="studio"] .lab-scene .lab-copy{max-width:none;min-width:0}
body[data-theme="studio"] .lab-scene h1{font-size:clamp(26px,3vw,38px);margin:0 0 5px;color:var(--ink)}
body[data-theme="studio"] .lab-scene p{font-size:14px;color:var(--text);margin:0}
body[data-theme="studio"] .lab-scene .criteria-link{display:inline-block;margin-top:12px;font-size:13px;color:var(--primary);text-decoration:underline;text-underline-offset:3px}
.lab-monitor{grid-column:2;grid-row:1 / 3;margin:0;justify-self:end;width:min(100%,325px);border-radius:8px;background:var(--screen);border:3px solid #405265;box-shadow:0 2px 6px #233f5a20;overflow:hidden}
.lab-monitor img{display:block;width:100%;height:100%;max-height:127px;object-fit:contain}
body[data-theme="studio"] #workflow.workflow{display:flex;justify-content:flex-start;gap:clamp(12px,2vw,30px);margin:0;padding:0;border:none;background:transparent;border-radius:0;font-size:13px;color:var(--muted)}
body[data-theme="studio"] #workflow li{gap:7px;color:var(--muted)}
body[data-theme="studio"] #workflow li span{width:20px;height:20px;background:#fff;color:#526a80;border:1px solid #98abbb}
body[data-theme="studio"] #workflow li.active{color:#254f70}
body[data-theme="studio"] #workflow li.active span{background:#d9e9f7;color:#204f73;border-color:#91b4d0}
body[data-theme="studio"] #workflow li[aria-current] span{background:#2b628a;color:white;border-color:#2b628a;outline:none}
body[data-theme="studio"] #empty-review{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:clamp(20px,3vw,34px);margin:18px 0 38px}
#empty-review h2{font-size:22px;margin:0 0 7px}#empty-review p{font-size:14px;margin:0}
body[data-theme="studio"] :is(#empty-review,.context-card,.file-card,.material-panel,.report-panel,.report-hero,.analysis-wait,.loading-panel,.studio-sidebar,.studio-file-card,.studio-suggestion,.studio-entry,.studio-facts,.studio-preview,.studio-context,.studio-notice,.insufficient,#run-log,dialog){
  color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:none
}
body[data-theme="studio"] :is(.button.primary,#empty-review a.button.primary){background:var(--primary);color:white;border:1px solid var(--primary);text-decoration:none}
body[data-theme="studio"] :is(.button.primary,#empty-review a.button.primary):is(:hover,:focus-visible){background:var(--primary-hover);color:white}
body[data-theme="studio"] :is(.button.secondary,.button.quiet,.preview-tools button,#role-chips button,.studio-pick,.studio-sidebar nav button){color:var(--text);background:#fff;border:1px solid #c6d3df}
body[data-theme="studio"] :is(.preview-tools button,#role-chips button)[aria-pressed=true],body[data-theme="studio"] .studio-sidebar nav button.active{color:#194c73;background:#e6f1fa;border-color:#739bbc}
body[data-theme="studio"] :is(.context-card label,.material-heading h3,.file-card b,.dimension-head,.score-number,.score-denominator,.studio-entry h4,dialog label){color:var(--ink)}
body[data-theme="studio"] :is(.method-note,.section-caption,.section-heading p,.context-card p,.file-card small,.material-heading p,.score-copy p,.dimension p,.strength-card p,.improvement-card p,.competency p,.report-foot p,.rewrite-why,.question-list,.key-guide,dialog p,.studio-suggestion p,.studio-facts p,.studio-entry p){color:var(--text)}
body[data-theme="studio"] :is(.context-card label,dialog label){font-size:14px;font-weight:600}
body[data-theme="studio"] :is(.context-card input,dialog input,dialog select,dialog textarea){height:auto;min-height:44px;border:1px solid #adbdcc;background:#fff;color:var(--ink);font-size:14px;padding:9px 11px}
body[data-theme="studio"] input::placeholder,body[data-theme="studio"] textarea::placeholder{color:#64778a}
body[data-theme="studio"] :is(.send-notice,.service-note,.message,.action-box,.studio-notice){background:#edf4fa;color:#344e64;border-color:#cfdeea}
body[data-theme="studio"] :is(.file-card #parse-summary,#start-hint,.privacy-note p,.send-notice p,.send-notice label,.analysis-wait p,.loading-panel p){color:var(--muted)}
body[data-theme="studio"] :is(.text-button,.send-notice a,.key-guide a,.score-label,.rubric-rule strong,#source-hint){color:var(--primary)}
body[data-theme="studio"] :is(.message.error,.studio-notice.error){color:#892e2d;background:#fff0ee;border-color:#e9bdb7}
body[data-theme="studio"] :is(.rubric-rule,.dimension,.dimension-head,.strength-card,.improvement-card,.score-block,.competency){border-color:var(--line);color:var(--text)}
body[data-theme="studio"] :is(.dimension-bar,.weight-line){background:#dce7ef}
body[data-theme="studio"] :is(.dimension-bar i,.weight-line i){background:#4d86ad}
body[data-theme="studio"] .dimension-bar{position:relative}.dimension-bar::after{content:"";position:absolute;inset:0;background-image:repeating-linear-gradient(90deg,transparent 0 calc(20% - 1px),var(--surface) calc(20% - 1px) 20%);pointer-events:none}
body[data-theme="studio"] .weight-line i{background-image:repeating-linear-gradient(90deg,transparent 0 8px,#fff 8px 9px)}
body[data-theme="studio"] :is(.report-foot,.method-note,.report-panel p,#run-events,dialog p){font-size:13px}
body[data-theme="studio"] .report-hero{grid-template-columns:minmax(110px,.5fr) minmax(0,1.3fr) minmax(220px,1fr);gap:20px}
.evidence-radar{margin:0;align-self:center;min-width:0;text-align:center}.evidence-radar svg{display:block;width:100%;max-height:235px}
.evidence-radar figcaption{font-size:12px;color:var(--muted)}.radar-ring,.radar-axis{fill:none;stroke:#adbecc;stroke-width:1}
.evidence-radar text{fill:#314f66;font-size:12px}.radar-measured{fill:#70b9e940;stroke:#326e99;stroke-width:2}.radar-vertex{fill:#78baea;stroke:#2a648f}
body[data-theme="studio"] .quote-button{display:flex;align-items:baseline;gap:10px;width:100%;text-align:left;padding:10px 12px;border:1px solid #c6deef;border-left:3px solid #65a5d2;border-radius:4px;background:#eef7fd;color:#27435a}
body[data-theme="studio"] .quote-button .quote-anchor{color:#275d84;font-size:12px;flex:none}
body[data-theme="studio"] .quote-button .quote-body{display:block;color:#314554;font-size:13px;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
body[data-theme="studio"] .improvement-card .quote-button{background:#fff5e5;border-color:#e7d5b8;border-left-color:#ce953f}
body[data-theme="studio"] .improvement-card .quote-anchor{color:#86550c}
body[data-theme="studio"] :is(.stale-banner,.priority,.priority.medium,.priority.low,.rewrite-notice,.rewrite-review .rewrite-after,.insufficient){background:#fff5e6;border-color:#ead7b9;color:#754e1a}
body[data-theme="studio"] :is(.insufficient p,.insufficient li,.rewrite-review h4,.rewrite-issues,.rewrite-next-step,#settings-message){color:#724d1f}
body[data-theme="studio"] :is(.rewrite-before,.rewrite-after,.studio-before,.studio-after,.competency .state,.strength-card .number){background:#edf3f8;border-color:#d1dee7;color:var(--text)}
body[data-theme="studio"] dialog{border-color:#b9c9d6;box-shadow:0 12px 50px #253b5426}
body[data-theme="studio"] dialog::backdrop{background:#23374f66;backdrop-filter:blur(2px)}
body[data-theme="studio"] .close-button{background:#edf2f7;color:#38556b}
body[data-theme="studio"] #evidence-range{font-size:13px;color:var(--primary)}
/* Only the source reader uses a dark background. */
body[data-theme="studio"] :is(#formatted-source,#analysis-source,#evidence-content,.cited-source){position:relative;background:var(--screen);color:#e4edf5;border:1px solid #2f4358;border-radius:6px;font-family:inherit}
body[data-theme="studio"] #formatted-source h4{color:#d2e9ff}
.numbered-line{display:grid;grid-template-columns:3ch minmax(0,1fr);column-gap:14px;line-height:1.75}
.line-number{color:#a5b5c7;text-align:right;user-select:none;font-size:12px;font-family:var(--digits);font-variant-numeric:tabular-nums;font-weight:400}
.numbered-line>span:last-child{overflow-wrap:anywhere;white-space:pre-wrap}
.source-label{color:#9cd5ff;font-weight:500}
body[data-theme="studio"] #raw-source-box{display:grid;grid-template-columns:4ch minmax(0,1fr);border:1px solid #2f4358;border-radius:6px;background:var(--screen);overflow:hidden}
#raw-line-numbers,#raw-source-box textarea{margin:0;padding:16px 8px;line-height:24px;font-size:13px;height:clamp(230px,38vh,420px);box-sizing:border-box}
#raw-line-numbers{background:#142236;color:#a5b5c7;text-align:right;overflow:hidden;font-family:var(--digits)}
body[data-theme="studio"] #raw-source-box textarea{font-family:inherit;line-height:24px;border:0;resize:none;white-space:pre;overflow:auto;border-radius:0}
body[data-theme="studio"] #evidence-content{padding:16px;white-space:normal}
body[data-theme="studio"] #evidence-content mark,.cited-source mark{background:#b1ddff;color:#142838}
body[data-theme="studio"] #evidence-content[data-tone=improve] mark,.cited-source mark[data-tone=improve]{background:#ffd28d;color:#2e1e0a}
#run-log{margin:16px 0;padding:12px 16px}#run-log summary,.report-citations summary{cursor:pointer;font-weight:600}
#run-events{list-style:none;margin:8px 0 0;padding:0}#run-events li{display:flex;align-items:baseline;gap:15px;padding:3px 0}#run-events time{font-family:var(--digits);color:var(--primary)}
.signal-orbit{width:26px;height:26px;border-radius:50%;border:2px solid #c3d3df;border-top-color:#376c95;margin:0 auto 14px}
.report-citations{margin:16px 0;padding:16px;background:white;border:1px solid var(--line);border-radius:8px}
.cited-source{max-height:360px;overflow:auto;padding:14px;margin-top:10px;font-size:14px}
.report-citations .legend{display:flex;gap:18px;flex-wrap:wrap;color:var(--muted);font-size:13px}
.legend span::before{content:"";display:inline-block;width:10px;height:10px;margin-right:6px;border-radius:3px;background:#85c4f3}.legend .improve::before{background:#efb75e}
body[data-theme="studio"] :is(.studio-heading p,.studio-sidebar p,.studio-preview-toolbar>span,.studio-preview>p,.studio-file-card span,.studio-facts li,.studio-why,.studio-storage-note){color:var(--muted)}
body[data-theme="studio"] .studio-tag{background:#e6f0f8;color:#315b79}body[data-theme="studio"] .studio-before{color:var(--text)!important}
body[data-theme="studio"] :is(#studio-send-text,#studio-source-text){color:var(--text);background:var(--surface-2);border-color:var(--line)}
body[data-theme="studio"] .studio-sidebar{padding:18px 14px;align-self:start}body[data-theme="studio"] .studio-context{padding:12px}
@media(max-width:940px){body[data-theme="studio"] .report-hero{grid-template-columns:140px minmax(0,1fr)}.evidence-radar{grid-column:1/-1;width:min(100%,360px);margin-inline:auto}}
@media(max-width:660px){
body[data-theme="studio"] .lab-scene{grid-template-columns:minmax(0,1fr) minmax(88px,31%);min-height:180px;gap:10px;padding:24px}
body[data-theme="studio"] .lab-scene h1{font-size:23px}
body[data-theme="studio"] .lab-scene p{font-size:13px}
body[data-theme="studio"] #workflow.workflow{grid-column:1/-1;gap:10px;font-size:12px;margin-top:0}
body[data-theme="studio"] #workflow li{gap:4px;white-space:nowrap}
body[data-theme="studio"] #workflow li span{width:16px;height:16px;font-size:10px}
body[data-theme="studio"] .lab-monitor{grid-row:1;align-self:center;margin-top:0}
body[data-theme="studio"] #empty-review{align-items:flex-start;flex-direction:column}
body[data-theme="studio"] .report-hero{display:flex;flex-direction:column;align-items:stretch}.numbered-line{column-gap:8px}
}
@media(prefers-reduced-motion:no-preference){.source-scanned::after{content:"";position:absolute;inset:0 0 auto;height:1px;background:linear-gradient(90deg,transparent,#ffbf5b,transparent);pointer-events:none;animation:studio-scan 1.2s ease-out 1 both}
.signal-orbit{animation:studio-rotate 2s linear infinite}@keyframes studio-scan{0%{top:0;opacity:0}15%{opacity:1}100%{top:96%;opacity:0}}@keyframes studio-rotate{to{transform:rotate(360deg)}}}
}
@media print{#run-log,.report-citations{display:none}.evidence-radar{max-width:290px}.evidence-radar svg{width:100%}.radar-ring,.radar-axis{fill:none;stroke:#acb8bc}.radar-measured{fill:#8fb7c566;stroke:#276579}.evidence-radar text{font-size:12px}.quote-button .quote-body{display:inline!important;color:#253438}.quote-anchor{margin-right:8px}}
.cited-source mark[data-tone="both"]{background:#b1ddff;color:#142838;border-bottom:3px solid #e7a84d}

@media screen {
body[data-theme="studio"] :is(input:not([type=checkbox]),textarea,select):focus-visible{outline:1px solid var(--primary);outline-offset:0;box-shadow:0 0 0 3px rgba(42,92,128,.18)}
body[data-theme="studio"] :is(.cited-source,#evidence-content) mark{background:transparent;color:#e6f1ff;text-decoration:underline 2px #91cfff;text-underline-offset:3px}
body[data-theme="studio"] :is(.cited-source mark[data-tone=improve],#evidence-content[data-tone=improve] mark){background:transparent;color:#fff1dc;text-decoration-color:#e8a33d}
body[data-theme="studio"] .cited-source mark[data-tone=both]{border-bottom:2px solid #e8a33d}
}

@media screen{
body[data-theme="studio"] .lab-copy h1{font-family:"Songti SC","STSong","Noto Serif SC",Georgia,serif;font-weight:700}
body[data-theme="studio"] #workflow li[aria-current] span,body[data-theme="studio"] :is(.dimension-bar i,.weight-line i){background-color:var(--primary);border-color:var(--primary)}
body[data-theme="studio"] :is(#formatted-source,#raw-source-box,#analysis-source){max-height:420px}
body[data-theme="studio"] #formatted-source,body[data-theme="studio"] #raw-source-box{mask-image:linear-gradient(to bottom,#000 calc(100% - 12px),transparent);padding-bottom:16px}
}
