/* Scoped extension of Studio D: source catalog remains readable without scripts. */
#reader-comparison[hidden]{display:none!important}
#reader-comparison{margin:1.5rem 0 2rem}
#ms-models .reader-comparison-selectors,#ms-models .reader-comparison-output{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.25rem}
#ms-models .reader-comparison-selectors label{display:block;font-weight:700;min-width:0}
#ms-models .reader-comparison-selectors select{display:block;width:100%;min-width:0;min-height:48px;margin:.5rem 0 1rem;padding:.65rem 2rem .65rem .75rem;font:inherit;color:#404146;background:#fefcff;border:1px solid #515e67;border-radius:4px}
#ms-models .reader-model-card{min-width:0;padding:1.25rem;background:#edf2f5;border-top:3px solid #1f4760}
#ms-models .reader-model-card h4{font-size:1.2rem;line-height:1.35;margin:0 0 1rem;color:#404146;overflow-wrap:break-word}
#ms-models .reader-model-card dl,#ms-models .reader-model-card dd{margin:0}
#ms-models .reader-model-card dt{font-weight:700;margin:1rem 0 .25rem}
#ms-models .reader-model-card dd{line-height:1.6;overflow-wrap:break-word}
#ms-models .reader-catalog summary,.reader-model-context>summary{cursor:pointer;min-height:48px;padding:.8rem 0;font-weight:700;color:#1f4760}
#ms-models .reader-catalog-wrap{max-width:100%;overflow:visible}
#ms-models .reader-catalog-table{width:100%;min-width:0;table-layout:fixed}
#ms-models .reader-catalog-table th,#ms-models .reader-catalog-table td{white-space:normal;overflow-wrap:break-word}
#ms-models select:focus-visible,#ms-models summary:focus-visible,.reader-model-context>summary:focus-visible{outline:3px solid #245c79;outline-offset:4px}
html[data-reader-theme="night"] #ms-models .reader-model-card{background:#1a2c39;border-color:#dcebf2}
html[data-reader-theme="night"] #ms-models .reader-model-card h4,html[data-reader-theme="night"] #ms-models select{color:#f1f7fa}
html[data-reader-theme="night"] #ms-models select{background:#101d26;border-color:#c0d0da}
html[data-reader-theme="night"] #ms-models summary,html[data-reader-theme="night"] .reader-model-context>summary{color:#dcebf2}
@media(max-width:650px){
 #ms-models .reader-comparison-selectors,#ms-models .reader-comparison-output{grid-template-columns:minmax(0,1fr);gap:.75rem}
 #ms-models .reader-model-card{padding:1rem}
 #ms-models .reader-catalog-table,#ms-models .reader-catalog-table tbody{display:block}
 #ms-models .reader-catalog-table thead{display:none}
 #ms-models .reader-catalog-table tr{display:block;margin:1rem 0;border:1px solid #ccd8df;padding:.75rem}
 #ms-models .reader-catalog-table tr[hidden]{display:none!important}
 #ms-models .reader-catalog-table th,#ms-models .reader-catalog-table td{display:block;width:auto!important;min-width:0!important;padding:.5rem!important;border:0!important}
 #ms-models .reader-catalog-table th{font-size:1.1rem}
 #ms-models .reader-catalog-table td::before{content:attr(data-label);display:block;font-weight:700;margin-bottom:.2rem}
 #ms-models .reader-catalog-table caption{display:block;text-align:left}
}

#ms-models input[type="checkbox"]{accent-color:#1f4760}
/* Attribute-first comparison: one DOM, close pairs on phones. */
#ms-models .reader-comparison-output{display:block}
#ms-models .reader-attribute{margin:0 0 1.25rem;padding:1.1rem;background:#edf2f5;border-top:2px solid #1f4760;min-width:0}
#ms-models .reader-attribute h4{margin:0 0 .8rem;font-size:1.1rem;line-height:1.4;color:#404146}
#ms-models .reader-attribute dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.25rem;margin:0}
#ms-models .reader-attribute dt{font-size:1rem;font-weight:800;margin:0 0 .4rem}
#ms-models .reader-attribute dd{margin:0;font-size:1rem;line-height:1.6;overflow-wrap:break-word}
.reader-routes{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}
.reader-routes a{display:flex;align-items:center;min-height:48px;padding:.5rem .8rem;border:1px solid #515e67;border-radius:4px;font-size:1rem;font-weight:700}
.reader-routes a[aria-current]{background:#1f4760;color:#fff}
.reader-routes a:focus-visible{outline:3px solid #245c79;outline-offset:3px}
.reader-model-context>summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;list-style:none;font-size:1rem;line-height:1.4}
.reader-model-context>summary::-webkit-details-marker{display:none}
.reader-model-context>summary svg{flex:none;transition:transform .15s}
.reader-model-context[open]>summary svg{transform:rotate(180deg)}
.ms-jump .reader-contents-group{display:flex;flex-direction:column;gap:.3rem;margin:.5rem 0 1rem}
.ms-jump .reader-contents-group strong{font-size:1rem;color:#515e67}
html[data-reader-theme="night"] #ms-models .reader-attribute{background:#1a2c39;border-color:#dcebf2}
html[data-reader-theme="night"] #ms-models .reader-attribute h4,html[data-reader-theme="night"] .ms-jump .reader-contents-group strong{color:#f1f7fa}
html[data-reader-theme="night"] .reader-routes a{border-color:#c0d0da}
html[data-reader-theme="night"] .reader-routes a[aria-current]{background:#dcebf2;color:#101d26}
#ms-models .ms-filter{min-height:48px;display:flex;align-items:center;gap:.75rem}
#ms-models input[type="checkbox"]{width:24px;height:24px;flex:none}
@media(max-width:650px){#ms-models .reader-attribute dl{grid-template-columns:minmax(0,1fr);gap:1rem}#ms-models .reader-attribute{padding:1rem}.reader-routes{flex-direction:column}}
@media(prefers-reduced-motion:reduce){.reader-model-context>summary svg{transition:none}}
html:root body#aiv-publication.studio #ms-feature .reader-routes a[aria-current]{background:#1f4760!important;color:#fefcff!important}
html:root[data-reader-theme="night"] body#aiv-publication.studio #ms-feature .reader-routes a[aria-current]{background:#dcebf2!important;color:#101d26!important}
html:root body#aiv-publication.studio #ms-feature .work-trial-detail,html:root body#aiv-publication.studio #ms-feature .reader-model-context{padding:0!important;border:0!important;border-top:1px solid #ccd8df!important;border-bottom:1px solid #ccd8df!important;border-radius:0!important;background:transparent!important;margin:20px 0!important}
html:root body#aiv-publication.studio #ms-feature .work-trial-detail>summary,html:root body#aiv-publication.studio #ms-feature .reader-model-context>summary{padding:14px 0!important;min-height:48px;cursor:pointer;font-weight:700}
html:root body#aiv-publication.studio #ms-feature #work-trial-copy{min-height:48px;padding:12px 18px;border:0;border-radius:6px;background:#1f4760!important;color:#fefcff!important;font:700 16px/1.4 Hanken,sans-serif;cursor:pointer}
html:root body#aiv-publication.studio #ms-feature #work-trial-copy:focus-visible{outline:3px solid #245c79;outline-offset:4px}
html:root body#aiv-publication.studio #ms-feature #work-trial-input{box-sizing:border-box;width:100%;min-height:240px;resize:vertical;padding:14px;background:#fefcff;color:#404146;border:1px solid #515e67;border-radius:6px;font:400 16px/1.65 Hanken,sans-serif}
html:root body#aiv-publication.studio #ms-feature .work-trial-reply{font-size:17px;line-height:1.7;margin:20px 0;padding:18px;border:1px solid #ccd8df;background:#edf2f5}
html:root[data-reader-theme="night"] body#aiv-publication.studio #ms-feature #work-trial-input,html:root[data-reader-theme="night"] body#aiv-publication.studio #ms-feature .work-trial-reply{background:#1a2c39!important;color:#f1f7fa!important;border-color:#6d8899}
html:root[data-reader-theme="night"] body#aiv-publication.studio #ms-feature #work-trial-copy{background:#dcebf2!important;color:#101d26!important}
html:root body#aiv-publication.studio #ms-feature .work-trial-detail>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none}
.work-trial-detail>summary::-webkit-details-marker{display:none}
.work-trial-detail>summary .article-disclosure-chevron{flex:none;transition:transform .15s}
.work-trial-detail[open]>summary .article-disclosure-chevron{transform:rotate(180deg)}
@media(prefers-reduced-motion:reduce){.work-trial-detail>summary .article-disclosure-chevron{transition:none}}
/* The historical night link rule repeats the body ID three times. Keep this filled action readable. */
html:root[data-reader-theme="night"] body#aiv-publication#aiv-publication#aiv-publication.studio #ms-feature .reader-routes a[aria-current]{color:#101d26!important}
