/* Internal pages use the approved ivory / navy editorial system.
   Existing navigation, document rendering and chat viewport logic stay in charge. */
body[data-mas-page],body:has(#readerMain){
 --mas-editorial-font:"Source Serif 4",Georgia,serif;
 --mas-ivory:#f7f4ee;--mas-paper:#fffdfa;--mas-navy:#0c2d45;
 --mas-champagne:#b99b6b;--mas-warm-line:#ded7cb;--mas-warm-muted:#586774;
 --reader-font:var(--mas-font,Manrope,system-ui,sans-serif);
 --reader-ink:#17374c;--reader-muted:#586774;--reader-line:#ded7cb;
 --reader-accent:#0c2d45;--reader-paper:#fffdfa;
}
body[data-mas-page]:not([data-mas-page=index]){background:var(--mas-ivory);color:var(--mas-navy)}
body[data-mas-page]:not([data-mas-page=index]) main{color:var(--mas-navy)}
body[data-mas-page]:not([data-mas-page=index]) main>section:not(.pagehero){padding-block:44px}
body[data-mas-page]:not([data-mas-page=index]) main .pagehero{
 background:var(--mas-ivory)!important;border-bottom:1px solid var(--mas-warm-line);
 padding:46px 0 48px!important;color:var(--mas-navy);
}
body[data-mas-page]:not([data-mas-page=index]) main :is(h1,h2){
 font-family:var(--mas-editorial-font)!important;font-weight:500!important;
 color:var(--mas-navy);letter-spacing:-.035em;text-wrap:balance;
}
body[data-mas-page]:not([data-mas-page=index]) main h1{
 font-size:clamp(40px,4.3vw,62px)!important;line-height:1.06!important;max-width:1100px;
}
body[data-mas-page]:not([data-mas-page=index]) main h2{
 font-size:clamp(29px,2.8vw,38px)!important;line-height:1.16!important;
}
body[data-mas-page]:not([data-mas-page=index]) main h3{
 font-family:var(--mas-font,Manrope,system-ui,sans-serif)!important;
 color:var(--mas-navy);font-size:21px!important;font-weight:650!important;letter-spacing:-.025em;
}
body[data-mas-page]:not([data-mas-page=index]) main :is(h1,h2) :is(span,b,strong,a){font-family:inherit!important}
body[data-mas-page]:not([data-mas-page=index]) main .pagehero h1{margin:15px 0 19px}
body[data-mas-page]:not([data-mas-page=index]) main .pagehero p{
 max-width:70ch;margin:0;color:var(--mas-warm-muted)!important;font-size:17px!important;line-height:1.65!important;
}
body[data-mas-page]:not([data-mas-page=index]) main .pagehero :is(.eyebrow,.micro-label){
 color:#816b48!important;font-size:11px!important;letter-spacing:.12em;line-height:1.5;font-weight:650;
}
body[data-mas-page]:not([data-mas-page=index]) .site-breadcrumbs{
 padding-top:18px!important;padding-bottom:12px!important;background:var(--mas-ivory);
 color:#63717a;font-size:12px;border-bottom:1px solid #e8e1d6;
}
body[data-mas-page]:not([data-mas-page=index]) .site-breadcrumbs a{color:#486073;text-underline-offset:4px}
body[data-mas-page]:not([data-mas-page=index]) main :is(p,li,td,th){color:#314b5c}
body[data-mas-page]:not([data-mas-page=index]) main :is(.small-note,.muted,.read-source){color:#5d6c76!important}
body[data-mas-page]:not([data-mas-page=index]) main :is(.article,.feeTable,.levels,.panel){
 background:var(--mas-paper)!important;border:1px solid var(--mas-warm-line)!important;
 border-radius:6px;box-shadow:none;padding:30px 32px;
}
body[data-mas-page]:not([data-mas-page=index]) main .article>p,
body[data-mas-page]:not([data-mas-page=index]) main .article>:is(ul,ol){max-width:84ch}
body[data-mas-page]:not([data-mas-page=index]) main .article h2{margin:32px 0 18px}
body[data-mas-page]:not([data-mas-page=index]) main .article h2:first-child{margin-top:0}
body[data-mas-page]:not([data-mas-page=index]) main .article h3{margin:28px 0 14px}
body[data-mas-page]:not([data-mas-page=index]) main .article :is(p,li){line-height:1.8!important}
body[data-mas-page]:not([data-mas-page=index]) main .article a:not([class]):not([data-library-doc]){text-decoration:underline;text-decoration-color:#bca479;text-underline-offset:4px}
body[data-mas-page]:not([data-mas-page=index]) main .card{
 background:transparent!important;border:1px solid var(--mas-warm-line)!important;
 border-radius:5px;box-shadow:none;padding:25px;transition:background .18s,border-color .18s;
}
body[data-mas-page]:not([data-mas-page=index]) main a.card:hover{background:var(--mas-paper)!important;border-color:var(--mas-champagne)!important}
body[data-mas-page]:not([data-mas-page=index]) main .card small{color:#816b48;font-size:11px;letter-spacing:.06em}
body[data-mas-page]:not([data-mas-page=index]) main :is(.sideNav,.section-sidebar){
 background:transparent;border:0!important;border-left:1px solid var(--mas-warm-line)!important;
 border-radius:0;box-shadow:none;padding:0 0 0 15px;
}
body[data-mas-page]:not([data-mas-page=index]) main :is(.sideNav,.section-sidebar) :is(a,button){
 color:#4e6271;border:0;border-radius:3px!important;min-height:44px;
 font-size:13px!important;line-height:1.5;padding:11px 12px!important;
}
body[data-mas-page]:not([data-mas-page=index]) main :is(.sideNav,.section-sidebar) :is(a,button):hover{background:#ece5d9;color:var(--mas-navy);transform:none}
body[data-mas-page]:not([data-mas-page=index]) main .sideNav :is([aria-pressed=true],.active),
body[data-mas-page]:not([data-mas-page=index]) main .section-sidebar a.active{background:var(--mas-navy);color:#fff}
body[data-mas-page]:not([data-mas-page=index]) main :is(.source-meta,.source-stamp,.mas-publication-meta){
 background:transparent!important;border:0!important;border-bottom:1px solid var(--mas-warm-line)!important;
 border-radius:0!important;padding:12px 0!important;font-size:12px!important;color:#5d6c76!important;
}
body[data-mas-page]:not([data-mas-page=index]) main .source-outline{
 background:#f0ebe2;border:1px solid #e0d6c7;border-left:3px solid var(--mas-champagne);
 border-radius:3px;box-shadow:none;padding:18px 20px;margin-bottom:28px;
}
body[data-mas-page]:not([data-mas-page=index]) main .source-outline>a{color:var(--mas-navy);font-size:13px;text-decoration-color:#b9a17c}
body[data-mas-page]:not([data-mas-page=index]) main :is(.info-callout,.draft-note,.verified-document-note,.archived-explanation,.application-note){
 background:#f0ebe2!important;border:1px solid #e0d6c7!important;border-radius:4px;
 box-shadow:none;color:#314b5c;
}
body[data-mas-page]:not([data-mas-page=index]) main :is(.source-document-card,.source-materials-panel){
 background:var(--mas-paper)!important;border:1px solid var(--mas-warm-line)!important;
 border-left:3px solid var(--mas-champagne)!important;border-radius:5px;box-shadow:none;padding:28px 30px;
}
body[data-mas-page]:not([data-mas-page=index]) main .source-document-card h2{font-family:var(--mas-editorial-font)!important;font-size:32px!important;line-height:1.2!important}
body[data-mas-page]:not([data-mas-page=index]) main :is(.source-document-card,.source-materials-panel)>.micro-label{color:#816b48;font-size:11px}
body[data-mas-page]:not([data-mas-page=index]) main .source-materials-list,
body[data-mas-page]:not([data-mas-page=index]) main .source-materials-list li{border-color:var(--mas-warm-line)}
body[data-mas-page]:not([data-mas-page=index]) main .source-file-format{background:#f0ebe2;border-color:#ded2bf;border-radius:3px;color:#6a593f}
body[data-mas-page]:not([data-mas-page=index]) main .source-materials-all{background:transparent;border-color:#b9a17c;border-radius:4px;color:var(--mas-navy);min-height:44px}
body[data-mas-page]:not([data-mas-page=index]) main .source-file-download{display:inline-flex;align-items:center;min-height:44px;color:#526875}

body[data-mas-page]:not([data-mas-page=index]) main :is(.btn,.pro-button){font-size:13px!important;line-height:1.45;min-height:44px;letter-spacing:0}
body[data-mas-page]:not([data-mas-page=index]) main .document-featured-grid article{background:var(--mas-paper);border-color:var(--mas-warm-line);border-radius:5px;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main .document-featured-grid small{color:#816b48;font-size:11px;letter-spacing:.06em}
body[data-mas-page]:not([data-mas-page=index]) main .document-action{background:var(--mas-navy)!important;border-color:var(--mas-navy)!important;border-radius:4px!important;box-shadow:none;font:600 13px/1.45 var(--mas-font,Manrope,system-ui,sans-serif)!important;min-height:44px}
body[data-mas-page]:not([data-mas-page=index]) main .official-frame-shell{border-color:var(--mas-warm-line);border-radius:5px;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main .official-frame-shell>.embedded-tool-top{background:var(--mas-navy);color:var(--mas-paper)}
body[data-mas-page]:not([data-mas-page=index]) main .official-frame-shell>.registry-official-actions{background:#eee7dc;border-color:var(--mas-warm-line)}
body[data-mas-page]:not([data-mas-page=index]) main .registry-official-actions :is(a,button){background:var(--mas-paper);border-color:#cbb898;color:var(--mas-navy);border-radius:4px;min-height:44px}
body[data-mas-page]:not([data-mas-page=index]) main .registry-official-actions a[href="/extract"]{background:var(--mas-navy);border-color:var(--mas-navy);color:var(--mas-paper)}
body[data-mas-page]:not([data-mas-page=index]) main .mas-table-scroll:before{background:#f0ebe2;color:#586774}

/* Precise tables: row rules carry the structure, shaded headings carry the context. */
body[data-mas-page]:not([data-mas-page=index]) main .mas-table-scroll{border:1px solid var(--mas-warm-line);border-radius:4px;scrollbar-color:#b8a68d #f0ebe2}
body[data-mas-page]:not([data-mas-page=index]) main table{
 border-collapse:collapse;background:var(--mas-paper);border-color:var(--mas-warm-line);color:#243e50;
}
body[data-mas-page]:not([data-mas-page=index]) main :is(table.join-table,.fee-comparison){border:1px solid var(--mas-warm-line);border-radius:4px}
body[data-mas-page]:not([data-mas-page=index]) main :is(table td,table th){
 border:0!important;border-bottom:1px solid var(--mas-warm-line)!important;
 padding:15px 17px!important;vertical-align:top;line-height:1.65!important;
}
body[data-mas-page]:not([data-mas-page=index]) main table thead th{
 background:#eee7dc!important;color:var(--mas-navy)!important;
 font-size:12px!important;font-weight:700!important;text-transform:none;letter-spacing:.025em;
}
body[data-mas-page]:not([data-mas-page=index]) main table tbody th{background:#f5f0e7!important;color:var(--mas-navy)!important;font-size:14px!important;font-weight:650!important}
body[data-mas-page]:not([data-mas-page=index]) main table td{font-size:14px!important;background:var(--mas-paper)!important}
body[data-mas-page]:not([data-mas-page=index]) main table tr:nth-child(even) td{background:#faf7f1!important}
body[data-mas-page]:not([data-mas-page=index]) main table caption{
 background:#f0ebe2;color:#52616c;text-align:left;padding:13px 17px;font:500 12px/1.65 var(--mas-font,Manrope,system-ui,sans-serif);
}
body[data-mas-page]:not([data-mas-page=index]) main #nostroy-contribution :is(th,td){background:#f0e8d8!important}
body[data-mas-page]:not([data-mas-page=index]) main .join-section-nav{
 background:#fbf8f2f2;border:1px solid var(--mas-warm-line);border-radius:4px;box-shadow:0 5px 18px #0c2d4506;
}
body[data-mas-page]:not([data-mas-page=index]) main .join-section-nav a{border-radius:3px;min-height:44px;color:#52616c}
body[data-mas-page]:not([data-mas-page=index]) main .join-section-nav a:hover{background:#ece4d7;color:var(--mas-navy)}
body[data-mas-page]:not([data-mas-page=index]) main .join-section-nav a[aria-current=location]{background:var(--mas-navy);border-color:var(--mas-navy);color:white;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main .join-info-section{padding-top:40px}
body[data-mas-page]:not([data-mas-page=index]) main .join-info-section .sectionHead{padding-bottom:15px;border-bottom:1px solid var(--mas-warm-line)}
body[data-mas-page]:not([data-mas-page=index]) main .join-steps li:before{background:#f0e8da;border-color:#d9c9ae;border-radius:3px;color:#786343}
body[data-mas-page]:not([data-mas-page=index]) main :is(.applicant-packages>a,.member-task-grid>a,.fund-levels){background:var(--mas-paper);border-color:var(--mas-warm-line);border-radius:5px;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main :is(.join-help-strip,.member-service-note){background:#eee7dc;border:1px solid var(--mas-warm-line);border-radius:4px}
body[data-mas-page]:not([data-mas-page=index]) main .fund-summary article{background:var(--mas-paper);border-color:var(--mas-warm-line);border-radius:4px;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main .fund-summary article.total{background:var(--mas-navy);border-color:var(--mas-navy);color:white}
body[data-mas-page]:not([data-mas-page=index]) main .fund-summary article.total :is(small,strong,span){color:#fffdfa}
body[data-mas-page]:not([data-mas-page=index]) main .org-chart{background:var(--mas-paper);border-color:var(--mas-warm-line);border-radius:5px;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main .org-node{background:var(--mas-paper);border-color:var(--mas-warm-line);border-radius:4px;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main .org-node-primary{background:var(--mas-navy);border-color:var(--mas-navy)}
body[data-mas-page]:not([data-mas-page=index]) main .org-node-primary :is(h2,p,span){color:#fffdfa}
body[data-mas-page]:not([data-mas-page=index]) main .org-node-council{background:#f0e8d9;border-color:#d8c8ab}

/* Compact correspondence forms retain plain labels and a clear primary action. */
body[data-mas-page]:not([data-mas-page=index]) main :is(.contact-compose,.draft-compose){
 background:var(--mas-paper);border:1px solid var(--mas-warm-line);border-radius:5px;box-shadow:none;padding:26px!important;
}
body[data-mas-page]:not([data-mas-page=index]) main .compact-heading .eyebrow{color:#816b48;font-size:10px;letter-spacing:.1em}
body[data-mas-page]:not([data-mas-page=index]) main .compact-heading h2{font-size:30px!important;margin:9px 0 11px}
body[data-mas-page]:not([data-mas-page=index]) main .compact-heading p{font-size:13px!important;line-height:1.65!important;color:#586774;margin-bottom:20px}
body[data-mas-page]:not([data-mas-page=index]) main :is(.compact-draft-form,.mas-contact-form) label{font-size:13px!important;line-height:1.5;color:#314b5c;font-weight:500}
body[data-mas-page]:not([data-mas-page=index]) main :is(input:not([type=checkbox]):not([type=radio]),select,textarea){
 background:#fffdfa;border:1px solid #cfc5b4;border-radius:4px!important;color:var(--mas-navy);min-height:44px;box-shadow:none;
}
body[data-mas-page]:not([data-mas-page=index]) main :is(.compact-draft-form,.mas-contact-form) :is(input:not([type=checkbox]),select,textarea){padding:10px 12px;min-height:44px}
body[data-mas-page]:not([data-mas-page=index]) main :is(.compact-draft-form,.mas-contact-form) textarea{min-height:88px}
body[data-mas-page]:not([data-mas-page=index]) main :is(input,textarea)::placeholder{color:#6b777d;opacity:1}
body[data-mas-page]:not([data-mas-page=index]) main :is(input[type=checkbox],input[type=radio]){accent-color:var(--mas-navy)}
body[data-mas-page]:not([data-mas-page=index]) main .optional-fields{border-color:var(--mas-warm-line)}
body[data-mas-page]:not([data-mas-page=index]) main .optional-fields>summary{min-height:44px;display:flex;align-items:center;color:#486073;font-size:13px}
body[data-mas-page]:not([data-mas-page=index]) main :is(.compact-draft-form .submit,.mas-contact-form button[type=submit],.pro-button-navy){
 background:var(--mas-navy)!important;color:#fffdfa!important;border:1px solid var(--mas-navy)!important;
 border-radius:4px!important;box-shadow:none;font-weight:600;min-height:44px;padding:11px 17px;
}
body[data-mas-page]:not([data-mas-page=index]) main :is(.pro-button-white,.btn-light){
 background:transparent!important;color:var(--mas-navy)!important;border:1px solid #c5b18e!important;
 border-radius:4px!important;box-shadow:none;min-height:44px;
}
body[data-mas-page]:not([data-mas-page=index]) main :is(.form-result pre,.mas-contact-form [role=status]){background:#f2ede4;border-color:var(--mas-warm-line);border-radius:4px;color:#314b5c}
body[data-mas-page]:not([data-mas-page=index]) main .mas-contact-form .consent{font-size:12px!important;line-height:1.65}
body[data-mas-page]:not([data-mas-page=index]) main .mas-contact-form>.small-note{font-size:12px!important;line-height:1.65!important}
body[data-mas-page]:not([data-mas-page=index]) main [aria-invalid=true]{border-color:#a34238!important}

/* Staff is a directory: position, name and contact channels align in calm rows. */
body[data-mas-page=contacts] main .contact-overview{
 background:#eee7dc!important;border-color:#dccfb9;border-radius:5px;box-shadow:none;padding:30px;
}
body[data-mas-page=contacts] main .contact-overview h2{font-size:32px!important}
body[data-mas-page=contacts] main .contact-overview>a{color:var(--mas-navy);min-height:44px;display:flex;align-items:center}
body[data-mas-page=contacts] main .contact-overview #admission-contact{border-color:#d8c8aa;color:#586774}
body[data-mas-page=contacts] main .contact-overview #admission-contact strong{color:var(--mas-navy)!important}
body[data-mas-page=contacts] main .people-grid{background:var(--mas-paper);border:1px solid var(--mas-warm-line);border-radius:4px;box-shadow:none}
body[data-mas-page=contacts] main .staff-person-row{background:var(--mas-paper);border-bottom:1px solid var(--mas-warm-line);padding:27px 29px;gap:28px}
body[data-mas-page=contacts] main .staff-person-row:nth-child(even){background:#faf7f1}
body[data-mas-page=contacts] main .staff-person-row:hover{background:#f3ede3}
body[data-mas-page=contacts] main .staff-role{color:#7b6747;font-size:12px;letter-spacing:.015em;font-weight:550;margin-bottom:7px}
body[data-mas-page=contacts] main .staff-identity h3{font-family:var(--mas-font,Manrope,system-ui,sans-serif)!important;font-size:20px!important;line-height:1.4!important;font-weight:650!important;color:var(--mas-navy)}
body[data-mas-page=contacts] main .staff-channel>span{color:#65717a;font-size:10px;letter-spacing:.075em}
body[data-mas-page=contacts] main .staff-channel>a{font-size:15px;line-height:1.5;font-weight:550;color:var(--mas-navy);min-height:44px;display:flex;align-items:center}

/* Library, filter and pagination stay dense enough to work with large archives. */
body[data-mas-page]:not([data-mas-page=index]) main :is(.catalog-controls,.catalog-toolbar){background:#f0ebe2;border-color:var(--mas-warm-line);border-radius:4px;box-shadow:none;padding:18px;gap:14px}
body[data-mas-page]:not([data-mas-page=index]) main .catalog-controls label{font-size:12px;color:#586774;font-weight:550;line-height:1.5;gap:7px}
body[data-mas-page]:not([data-mas-page=index]) main .catalog-controls :is(input,select){background:var(--mas-paper);width:100%;min-width:0;border-color:#d0c5b4;font-size:14px;min-height:44px}
body[data-mas-page]:not([data-mas-page=index]) main .catalog-heading{padding-bottom:20px;border-bottom:1px solid var(--mas-warm-line);margin-bottom:20px}
body[data-mas-page]:not([data-mas-page=index]) main .catalog-heading h2{margin:8px 0 0}
body[data-mas-page]:not([data-mas-page=index]) main .catalog-heading .micro-label{color:#816b48;font-size:10px}
body[data-mas-page]:not([data-mas-page=index]) main .inside-toggle{font-size:12px;color:#586774;min-height:44px}
body[data-mas-page]:not([data-mas-page=index]) main .library-row{
 background:transparent;border:0;border-top:1px solid var(--mas-warm-line);border-radius:0;
 padding:23px 0;margin:0;box-shadow:none;gap:18px;
}
body[data-mas-page]:not([data-mas-page=index]) main .library-row:last-child{border-bottom:1px solid var(--mas-warm-line)}
body[data-mas-page]:not([data-mas-page=index]) main .library-file{background:#eee7dc;border:1px solid #ded1ba;color:#786443;border-radius:3px;font-size:10px;font-weight:650;padding:13px 9px}
body[data-mas-page]:not([data-mas-page=index]) main .library-row h3{font-size:17px!important;line-height:1.5!important;color:var(--mas-navy);margin:7px 0}
body[data-mas-page]:not([data-mas-page=index]) main .library-row small{font-size:11px;color:#6a757b;letter-spacing:.015em}
body[data-mas-page]:not([data-mas-page=index]) main .library-row p{font-size:13px!important;line-height:1.65!important;color:#586774}
body[data-mas-page]:not([data-mas-page=index]) main .library-availability{font-size:11px;color:#68767d}
body[data-mas-page]:not([data-mas-page=index]) main .library-row-actions button{background:#f0ebe2;border:1px solid #d7cbb7;border-radius:4px;color:#314b5c;min-height:44px;font-size:12px;padding:10px 14px}
body[data-mas-page]:not([data-mas-page=index]) main .library-row-actions button:first-child{background:var(--mas-navy);border-color:var(--mas-navy);color:var(--mas-paper)}
body[data-mas-page]:not([data-mas-page=index]) main :is(.catalog-pagination,.pagination){padding-top:22px;margin-top:8px;border-top:1px solid var(--mas-warm-line);gap:10px;color:#586774}
body[data-mas-page]:not([data-mas-page=index]) main :is(.catalog-pagination,.pagination) button{min-height:44px;padding:10px 16px;border:1px solid #cbb898;border-radius:4px;background:var(--mas-paper);color:var(--mas-navy);font-size:13px;cursor:pointer}
body[data-mas-page]:not([data-mas-page=index]) main :is(.catalog-pagination,.pagination) button:disabled{opacity:.4;cursor:default}
body[data-mas-page]:not([data-mas-page=index]) main .protocol{background:var(--mas-paper);border:1px solid var(--mas-warm-line);border-radius:4px;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main .protocol small{color:#7a6749}
body[data-mas-page]:not([data-mas-page=index]) main .search-workspace{background:var(--mas-paper);border-color:var(--mas-warm-line);border-radius:5px;box-shadow:none}
body[data-mas-page]:not([data-mas-page=index]) main .search-workspace .discovery-result h3{font-size:18px!important;color:var(--mas-navy)}
body[data-mas-page]:not([data-mas-page=index]) main .search-kind-tabs{background:#eee7dc;border-radius:4px}
body[data-mas-page]:not([data-mas-page=index]) main .search-kind-tabs button{min-height:44px;border-radius:3px;color:#52616c;font-size:12px}
body[data-mas-page]:not([data-mas-page=index]) main .search-kind-tabs button[aria-pressed=true]{background:var(--mas-paper);color:var(--mas-navy);box-shadow:none}

/* Non-modal search and assistant: palette only, no viewport or position changes. */
body[data-mas-page] :is(.mas-assistant,.discovery-dialog){background:#fbf8f2f7;border-color:#d7cbb8;box-shadow:0 18px 65px #0c2d452b}
body[data-mas-page] .mas-assistant>header{background:var(--mas-navy);border-bottom:1px solid #577081}
body[data-mas-page] .assistant-brand-icon{background:#ffffff0d;border-color:#b99b6b8c;color:#e1c795}
body[data-mas-page] .mas-assistant>header span{color:#e8dcc5}
body[data-mas-page] .mas-assistant>header h2{color:#fffdfa}
body[data-mas-page] .mas-assistant>header button{background:#ffffff08;border-color:#ffffff45;color:#fffdfa}
body[data-mas-page] :is(.assistant-mode,.assistant-disclosure,.mas-chat-empty p,.mas-chat-form>small,.chat-bubble small){color:#586774}
body[data-mas-page] .assistant-mode button{background:#fffdfa;border-color:#d2c4ad;color:#52616c}
body[data-mas-page] .assistant-disclosure{border-color:var(--mas-warm-line)}
body[data-mas-page] .mas-chat-empty h3{color:var(--mas-navy)}
body[data-mas-page] .mas-chat-empty button{background:#fffdfa;border-color:var(--mas-warm-line);color:var(--mas-navy)}
body[data-mas-page] .chat-bubble{background:#fffdfa;border-color:var(--mas-warm-line);color:#314b5c}
body[data-mas-page] .chat-bubble.user{background:#eee6d8;border-color:#d9cbb2;color:#294153}
body[data-mas-page] :is(.chat-navigation,.chat-sources){border-color:var(--mas-warm-line)}
body[data-mas-page] .chat-navigation :is(a,button){background:#fffdfa;border-color:var(--mas-warm-line);color:var(--mas-navy)}
body[data-mas-page] .chat-navigation :is(a,button):hover{background:#f0e8da;border-color:#bfa783}
body[data-mas-page] .chat-navigation .chat-more-results{background:transparent;border:0;color:var(--mas-navy)}
body[data-mas-page] .mas-chat-form{background:#f0ebe2;border-color:var(--mas-warm-line)}
body[data-mas-page] .mas-chat-form textarea{background:var(--mas-paper);border-color:#c5b79f;color:var(--mas-navy)}
body[data-mas-page] .mas-chat-send-row button{background:var(--mas-navy);border-color:var(--mas-navy);color:var(--mas-paper)}
body[data-mas-page] .mas-chat-send-row [data-stop-answer]{background:var(--mas-paper);color:var(--mas-navy);border-color:#c5b79f}
body[data-mas-page] :is(.discovery-form,.all-results){border-color:#d2c4ad;box-shadow:none}
body[data-mas-page] .discovery-form{background:var(--mas-paper)}
body[data-mas-page] .discovery-form input{color:var(--mas-navy)}
body[data-mas-page] .discovery-form button{background:var(--mas-navy);color:var(--mas-paper)}
body[data-mas-page] :is(.discovery-info,.result-meta,.search-count,.search-suggestions b){color:#63717a}
body[data-mas-page] .discovery-result{border-color:var(--mas-warm-line)}
body[data-mas-page] .discovery-result h3{color:var(--mas-navy)}
body[data-mas-page] .discovery-result p{color:#536773}
body[data-mas-page] .result-icon{background:#eee7dc;border-color:#d8ccb7;color:#796545}
body[data-mas-page] :is(.result-links a,.result-links button,.all-results){color:var(--mas-navy)}
body[data-mas-page] :is(.all-results,.search-suggestions button:hover){background:#eee7dc}
body[data-mas-page] .search-suggestions button{color:#314b5c}
body[data-mas-page] mark,body:has(#readerMain) mark{background:#e9d7b0;color:#17374c}

/* Document preview reads as a library viewer, with the original file unchanged. */
body[data-mas-page] .pro-document{background:#ede8de;border-color:#d7cbb7;border-radius:8px;box-shadow:0 25px 100px #0c2d4566}
body[data-mas-page] .pro-document>header{background:var(--mas-navy)!important;border-bottom-color:#496276!important}
body[data-mas-page] .pro-document>header>div>span{color:#e6d9bf}
body[data-mas-page] .pro-document>header h2{color:#fffdfa}
body[data-mas-page] .pro-document .document-modal-type{background:#eee5d2;border-color:#cbb58c;color:#354853;border-radius:3px}
body[data-mas-page] .pro-document .document-modal-meta{color:#d5dfe4}
body[data-mas-page] .pro-document>header .modal-close{background:#ffffff0d;border-color:#ffffff5c;border-radius:5px;color:#fffdfa;min-width:44px;min-height:44px}
body[data-mas-page] .pro-document>header .modal-close:hover{background:#ffffff1f}
body[data-mas-page] .pro-document>iframe{background:#ede8de}
body[data-mas-page] .pro-document::backdrop{background:#09223599;backdrop-filter:blur(7px)}
body:has(#readerMain){background:#ede8de;color:var(--reader-ink);font-family:var(--reader-font)}
body:has(#readerMain) .reader-heading{background:var(--mas-ivory);border-color:var(--mas-warm-line)}
body:has(#readerMain) .reader-heading h1{font-family:var(--mas-editorial-font)!important;font-size:26px;font-weight:500;line-height:1.25;letter-spacing:-.025em}
body:has(#readerMain) .reader-heading>a{color:#756344}
body:has(#readerMain) .reader-bar{background:#f8f5eef5;border-color:var(--mas-warm-line)}
body:has(#readerMain) .reader-tabs{background:#ece4d6;border-color:#d9cbb4;border-radius:5px}
body:has(#readerMain) .reader-tabs button{border-radius:3px;color:#53616b;min-height:44px}
body:has(#readerMain) .reader-tabs button[aria-pressed=true]{background:var(--mas-navy);color:#fffdfa;box-shadow:none}
body:has(#readerMain) .reader-actions a{border-color:#cdbb9a;background:#fffdfa;color:var(--mas-navy);border-radius:4px;min-height:44px}
body:has(#readerMain) .reader-actions #readerDownload{background:#eee4d1;border-color:#c6ad7e}
body:has(#readerMain) .reader-status-row{background:#f1ece3;border-color:var(--mas-warm-line)}
body:has(#readerMain) :is(#readerStatus,.reader-details summary){color:#566874}
body:has(#readerMain) .reader-details[open]>div{background:#fffdfa;border-color:#d3c6ae;border-radius:5px}
body:has(#readerMain) #pdfToolbar{background:#f8f5eef2;border-color:var(--mas-warm-line)}
body:has(#readerMain) #pdfToolbar :is(button,input){border-color:#d3c6ae;background:#fffdfa;border-radius:4px;color:var(--mas-navy);min-height:44px}
body:has(#readerMain) #pdfToolbar button{min-width:44px}
body:has(#readerMain) #pdfToolbar button:hover:not(:disabled){background:#eee5d4;border-color:#b79d72}
body:has(#readerMain) :is(#textPane,#fallbackPane,.archive-files){background:#fffdfa;border-color:var(--mas-warm-line);border-radius:5px}
body:has(#readerMain) .text-search{background:#fffdfa}
body:has(#readerMain) .text-search input{background:#fffdfa;border-color:#cdbb9a;border-radius:4px;min-height:44px}
body:has(#readerMain) .text-search button{background:var(--mas-navy);border-radius:4px;min-height:44px}
body:has(#readerMain) .text-provenance{border-color:var(--mas-warm-line);color:#586774}
body:has(#readerMain) #documentText{color:#243e50;font-family:var(--reader-font)}
body:has(#readerMain) .archive-files article{border-color:var(--mas-warm-line)}
body:has(#readerMain) .archive-format{background:#eee7dc;border-color:#dacbad;border-radius:3px;color:#796545}
body:has(#readerMain) .archive-files article>a{background:#f5efe4;border-color:#d8c8aa;border-radius:4px;min-height:44px}
body:has(#readerMain) #pdfCanvas{border-color:#d5ccbd;box-shadow:0 10px 28px #0c2d4514}

@media(max-width:1000px){
 body[data-mas-page]:not([data-mas-page=index]) main .contentgrid{gap:28px}
 body[data-mas-page]:not([data-mas-page=index]) main :is(.sideNav,.section-sidebar){border-left:0!important;border-top:1px solid var(--mas-warm-line)!important;padding:12px 0 0}
 body[data-mas-page=contacts] main .staff-person-row{gap:18px 24px}
}
@media(max-width:650px){
 body[data-mas-page]:not([data-mas-page=index]) main>section:not(.pagehero){padding-block:29px}
 body[data-mas-page]:not([data-mas-page=index]) main .pagehero{padding:30px 0 34px!important}
 body[data-mas-page]:not([data-mas-page=index]) main h1{font-size:39px!important;line-height:1.08!important;letter-spacing:-.035em;overflow-wrap:break-word}
 body[data-mas-page]:not([data-mas-page=index]) main h2{font-size:30px!important;line-height:1.18!important}
 body[data-mas-page]:not([data-mas-page=index]) main h3{font-size:19px!important}
 body[data-mas-page]:not([data-mas-page=index]) main .pagehero p{font-size:16px!important;line-height:1.65!important}
 body[data-mas-page]:not([data-mas-page=index]) main :is(p,li){font-size:15px!important}
 body[data-mas-page]:not([data-mas-page=index]) .site-breadcrumbs{font-size:11px;padding-block:13px 10px!important}
 body[data-mas-page]:not([data-mas-page=index]) main :is(.article,.feeTable,.levels,.panel){padding:22px 20px;border-radius:4px}
 body[data-mas-page]:not([data-mas-page=index]) main :is(.card,.source-document-card,.source-materials-panel){padding:22px 20px}
 body[data-mas-page]:not([data-mas-page=index]) main .source-document-card h2{font-size:28px!important}
 body[data-mas-page]:not([data-mas-page=index]) main :is(.contact-compose,.draft-compose){padding:21px 19px!important}
 body[data-mas-page]:not([data-mas-page=index]) main .compact-heading h2{font-size:28px!important}
 body[data-mas-page]:not([data-mas-page=index]) main .compact-heading p{font-size:13px!important}
 body[data-mas-page]:not([data-mas-page=index]) main .mas-contact-form .consent{font-size:13px!important}
 body[data-mas-page]:not([data-mas-page=index]) main :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px!important}
 body[data-mas-page]:not([data-mas-page=index]) main .optional-fields>summary{font-size:13px}
 body[data-mas-page]:not([data-mas-page=index]) main .join-section-nav{gap:4px;padding:7px}
 body[data-mas-page]:not([data-mas-page=index]) main .join-section-nav a{font-size:12px;padding:10px 11px}
 body[data-mas-page]:not([data-mas-page=index]) main .join-info-section{padding-top:29px}
 body[data-mas-page]:not([data-mas-page=index]) main :is(table td,table th){padding:12px 14px!important;line-height:1.6!important}
 body[data-mas-page]:not([data-mas-page=index]) main table td{font-size:14px!important}
 body[data-mas-page]:not([data-mas-page=index]) main .catalog-controls{padding:15px;gap:12px}
 body[data-mas-page]:not([data-mas-page=index]) main .catalog-heading{padding-bottom:17px}
 body[data-mas-page]:not([data-mas-page=index]) main .library-row{padding:22px 0;gap:12px}
 body[data-mas-page]:not([data-mas-page=index]) main .library-row h3{font-size:16px!important;line-height:1.5!important}
 body[data-mas-page]:not([data-mas-page=index]) main .library-row small{font-size:10px}
 body[data-mas-page]:not([data-mas-page=index]) main .library-row-actions{padding-left:0;width:100%;gap:9px;flex-wrap:wrap}
 body[data-mas-page]:not([data-mas-page=index]) main .library-row-actions button{min-width:100px;font-size:12px}
 body[data-mas-page=contacts] main .contact-overview{padding:24px 22px}
 body[data-mas-page=contacts] main .staff-person-row{padding:22px;gap:14px}
 body[data-mas-page=contacts] main .staff-identity h3{font-size:19px!important}
 body[data-mas-page=contacts] main .staff-channel{gap:0}
 body[data-mas-page=contacts] main .staff-channel>a{font-size:15px}
 body[data-mas-page] .pro-document{border-radius:5px}
 body:has(#readerMain) .reader-heading h1{font-size:23px}
 body:has(#readerMain) .reader-status-row{flex-wrap:wrap;align-items:start}
 body:has(#readerMain) #pdfToolbar{gap:10px}
 body:has(#readerMain) #pdfToolbar :is(button,input){min-height:44px}
 body:has(#readerMain) .reader-zoom-controls{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){body[data-mas-page]:not([data-mas-page=index]) main .card{transition:none}}
@media print{
 body[data-mas-page]:not([data-mas-page=index]),body:has(#readerMain){background:white;color:#111}
 body[data-mas-page]:not([data-mas-page=index]) main :is(.article,.source-document-card,.source-materials-panel){background:white!important;box-shadow:none}
}

/* Give both official MAS registries the same reading area as ROSA. */
body[data-mas-page=registry] main .wrap:has(>.registry-sources),
body[data-mas-page=erch] main .wrap:has(>.official-frame-shell){width:min(1720px,calc(100% - 48px));max-width:none}
body:is([data-mas-page=registry],[data-mas-page=erch]) main .official-frame-shell:not(.frame-full)>.service-frame{display:block;width:100%;height:clamp(820px,90dvh,1200px);min-height:820px;max-height:1200px}
@media(max-width:760px){
 body[data-mas-page=registry] main .wrap:has(>.registry-sources),
 body[data-mas-page=erch] main .wrap:has(>.official-frame-shell){width:calc(100% - 24px)}
 body:is([data-mas-page=registry],[data-mas-page=erch]) main .official-frame-shell:not(.frame-full)>.service-frame{height:clamp(620px,78svh,900px);min-height:620px;max-height:900px}
}
