#open-r3-toggle { margin-top: 1.25rem; }
#open-r3-editor { margin-top: 1.5rem; border-top: 1px solid #b4c6c0; padding-top: 1rem; }
#open-r3-editor[hidden], .preview[hidden] { display: none !important; }
#r3-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
#r3-fields input:not([type=checkbox]), #r3-fields select { width: 100%; min-width: 0; }
#r3-fields input[type=checkbox] { width: 1.25rem; height: 1.25rem; }
.r3-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
#r3-review-text { white-space: pre-wrap; overflow-wrap: anywhere; background: #edf3ef; padding: 1rem; font-size: .8rem; max-height: 28rem; overflow: auto; }
.controls.r3-editing > #design-controls, .controls.r3-editing > .config-route, .controls.r3-editing > .config-pager, .controls.r3-editing > #open-error { display: none !important; }
@media(max-width: 640px) { #r3-fields { grid-template-columns: 1fr; } }

.workspace.r3-workspace { grid-template-columns: minmax(0, 1fr); }
.workspace.r3-workspace .controls { max-width: 900px; width: 100%; margin-inline: auto; }
#open-r3-editor [hidden] { display: none !important; }

#open-fold-study{margin-top:2rem;border:1px solid #bdccc2;border-radius:8px;padding:1.25rem;background:#edf3ef}
#open-fold-study h3{font-size:1.5rem;line-height:1.25;margin:.5rem 0 1rem}
#open-fold-study .fold-consent{display:flex;align-items:flex-start;gap:.7rem;padding:1rem;background:#e2eadf;border:1px solid #b5c6b7;line-height:1.5}
#open-fold-study .fold-consent input{width:1.2rem;height:1.2rem;flex:none;margin-top:.2rem}
#fold-canvas{width:100%;height:460px;display:block;background:#e8efeb;touch-action:none;border:1px solid #c6d3ca;border-radius:5px;cursor:grab}
#fold-canvas:focus-visible{outline:3px solid #486852;outline-offset:3px}
#fold-view{margin-top:1rem}#fold-details{white-space:pre-wrap;overflow-wrap:anywhere;max-height:24rem;overflow:auto;font-size:.75rem;background:#e0e9e2;padding:1rem}
#fold-status{min-height:1.5rem;font-weight:550}#fold-help,#fold-metrics{font-size:.85rem;line-height:1.6}
@media(max-width:640px){#open-fold-study{padding:1rem}.fold-consent{font-size:.85rem}#fold-canvas{height:320px}}
