/* Scoped additions: use the reader's light/dark tokens. */
.study-lab { margin-block: 1.5rem; padding: 1.4rem; border: 1px solid var(--note-border); border-radius: var(--note-radius); background: var(--note-surface); min-width: 0; }
html.no-js [data-study-lab] { display: none; }
.study-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.study-field { min-width: 0; }
.study-field:has(textarea), .study-field:has(input[type=text]) { grid-column: 1 / -1; }
.study-lab label { display: block; font-weight: 600; margin-bottom: .4rem; }
.study-lab :is(input:not([type=radio]),select,textarea) { display: block; width: 100%; min-width: 0; min-height: 44px; padding: .6rem .7rem; font: inherit; font-size: 16px; color: var(--note-text); background: var(--note-bg); border: 1px solid var(--note-field-border); border-radius: .4rem; }
.study-lab textarea { resize: vertical; font-family: ui-monospace,monospace; line-height: 1.7; }
.study-lab small, .study-caption { color: var(--note-muted); font-size: .875em; }
.study-lab small { display: block; margin-top: .3rem; }
.study-lab button { min-height: 44px; cursor: pointer; }
.study-lab button:disabled { opacity: .5; cursor: default; }
.study-lab :is(button,input,select,textarea,a):focus-visible { outline: 3px solid var(--note-accent); outline-offset: 3px; }
.study-lab .lab-buttons, .study-step-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.study-prediction { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--note-border); }
.study-lab .study-error { margin: .3rem 0 0; color: var(--note-text); font-weight: 600; }
.study-error:empty { display: none; }
.study-lab [aria-invalid=true] { border: 2px solid var(--note-accent); }
.study-result { margin-top: 1.5rem; overflow-wrap: anywhere; }
.study-result h2 { font-size: 1.2em; }
.study-steps { padding-left: 1.5rem; }
.study-steps li { padding: .5rem .75rem; border-bottom: 1px solid var(--note-border); }
.study-steps li[hidden] { display: none; }
.study-steps h3 { font-size: 1em; font-weight: 650; }
.study-lab fieldset { border: 0; padding: 0; min-width: 0; margin-bottom: 1rem; }
.study-lab legend { font-size: 1.1em; font-weight: 650; margin-bottom: 1rem; }
.study-lab .study-option { display: flex; align-items: flex-start; gap: .65rem; min-height: 44px; padding: .7rem; margin-block: .6rem; border: 1px solid var(--note-border); border-radius: .4rem; cursor: pointer; font-weight: 400; }
.study-option:has(:checked) { border-color: var(--note-accent); background: var(--note-muted-surface); }
.study-option input { flex: none; width: 20px; height: 20px; margin-top: .3rem; accent-color: var(--note-accent); }
@media(max-width:600px) { .study-lab { padding: 1rem .75rem; } .study-fields { grid-template-columns: 1fr; } .study-lab .lab-buttons button { flex: 1 1 auto; } }
@media print { .study-lab form, .study-step-controls { display: none; } .study-lab { padding: 0; border: 0; } }
