/* 2026-11-23: edge-to-edge shell; real responsive layout, without page zoom. */
html:has(body.home-page),html:has(body.gov-subpage){background:#fff;overflow-x:clip;scrollbar-gutter:auto}
body.home-page,body.gov-subpage{width:100%;max-width:none;margin:0;zoom:1;box-shadow:none;min-height:100vh;min-height:100svh}
.profile-lightbox{zoom:1;max-width:96vw;max-height:94dvh}
.profile-lightbox>img{max-width:100%;max-height:76dvh;object-fit:contain}
.mobile-site-menu,.mobile-submenu-toggle{display:none}
@media(max-width:999px){
 html{scroll-padding-top:12px}
 body.home-page,body.gov-subpage{overflow-x:clip;font-size:16px}
 .home-page .wrap,.gov-subpage .wrap,.gov-subpage .gov-breadcrumb{width:calc(100% - 32px);max-width:100%;margin-inline:auto}
 .home-page>.values-banner{height:auto;aspect-ratio:1000 / 201.843318;min-height:0}
 .home-page>.values-banner>img{top:-32.648%;width:100%;height:auto}
 .home-page .unified-brand-carousel,.home-page .unified-brand-carousel .platform-slogan-slide{width:100%;height:112px;min-height:112px;margin:0}
 .home-page .unified-brand-carousel .brand-slide-content{width:100%;height:auto;min-height:0;padding:18px 16px}
 .home-page .brand strong{font-size:clamp(21px,5.7vw,30px);line-height:1.5;letter-spacing:1px;white-space:normal}
 .home-page .unified-brand-carousel .platform-slogan-slide:not(:first-child){padding:18px 20px 28px}
 .home-page .unified-brand-carousel .platform-slogan-slide:not(:first-child)>span{font-size:clamp(17px,4.7vw,25px);line-height:1.6;white-space:normal;max-width:100%;overflow-wrap:break-word}
 .home-page .platform-slogan-dots{bottom:2px;right:8px;gap:0}
 .home-page .platform-slogan-dots button{width:28px;height:28px;border:0;border-radius:0;background:radial-gradient(circle,#fff 0 3px,#a42424 3px 4px,transparent 4px)}
 .home-page .platform-slogan-dots button[aria-pressed=true]{background:radial-gradient(circle,#a42424 0 4px,transparent 4px)}
 .gov-subpage .site-header .brand-row{min-height:100px;padding:20px 0 16px}
 .gov-subpage .brand strong{font-size:clamp(21px,5.7vw,30px);line-height:1.5;letter-spacing:1px}
 .gov-subpage .profile-menu{display:none}
 .mobile-site-menu{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;padding:12px 16px;border:0;background:#a42424;color:#fff;font:600 16px/1.5 var(--sans);cursor:pointer}
 .home-page .platform-nav,.gov-subpage .profile-nav{display:none;width:100%;margin:0;padding:0;border:0;background:#fff;box-shadow:none;letter-spacing:0}
 .home-page .platform-nav.mobile-nav-open,.gov-subpage .profile-nav.mobile-nav-open{display:block}
 .home-page .platform-nav>.platform-nav-item,.gov-subpage .profile-nav>.nav-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 48px;align-items:stretch;min-width:0;border:0;border-bottom:1px solid #e2e6ea}
 .home-page .platform-nav-item>a,.gov-subpage .profile-nav>.nav-item>a,.gov-subpage .profile-nav>a{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:48px;padding:12px 16px;font:600 16px/1.5 var(--sans);text-align:left;white-space:normal;color:#842124;background:#fff}
 .home-page .platform-nav-item>a[aria-current=page],.gov-subpage .profile-nav>.nav-item>a[aria-current=page]{background:#f9eeee;color:#842124}
 .mobile-submenu-toggle{display:block;grid-column:2;grid-row:1;min-height:48px;padding:8px;border:0;border-left:1px solid #eadbdb;background:#fbf5f5;color:#842124;font-size:22px;cursor:pointer}
 .home-page .platform-nav .platform-nav-item:nth-child(n)>.platform-submenu,.gov-subpage .profile-nav>.nav-item:nth-child(n)>.nav-submenu{display:none;position:static;grid-column:1/-1;width:100%;max-width:none;min-width:0;margin:0;padding:8px 12px;grid-template-columns:minmax(0,1fr);gap:0;border:0;border-radius:0;box-shadow:none;background:#f8f9fa}
 .home-page .platform-nav .platform-nav-item.mobile-submenu-open>.platform-submenu,.gov-subpage .profile-nav>.nav-item.mobile-submenu-open>.nav-submenu{display:grid}
 .home-page .platform-nav-item>.platform-submenu>a,.gov-subpage .profile-nav>.nav-item>.nav-submenu>a{display:flex;align-items:center;min-height:44px;padding:10px 14px;font:400 16px/1.5 var(--sans);white-space:normal;color:#344759;background:transparent;border-radius:0}
 .home-page .platform-hot{display:flex;align-items:baseline;min-height:56px;padding:12px 16px;gap:8px;font-size:14px;line-height:1.8}
 .home-page .platform-hot>strong{flex:0 0 auto}
 .home-page .platform-hot>span{font-size:14px;white-space:normal;overflow:visible;animation:none;transform:none}
 .home-page .class-photo-feature{padding:0;margin:0}
 .home-page .home-banner-viewport{width:100%;height:auto;min-height:0;aspect-ratio:auto;overflow:hidden}
 .home-page .home-banner-slide{position:static;width:100%;height:auto;display:none}
 .home-page .home-banner-slide.is-active{display:block}
 .home-page .home-banner-slide>img{width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:auto;object-fit:contain;transform:none}
 .home-page .featured-news{display:flex;flex-direction:column;gap:0;width:100%;margin:0;padding:24px 16px;min-height:0;border:0;background:#fff}
 .home-page .featured-news>.national-news-head,.home-page .featured-news>.featured-news-list{width:100%;margin:0;min-width:0}
 .home-page .featured-news>.featured-news-copy{position:static;width:100%;margin:20px 0 0}
 .home-page .featured-news-title{width:100%;padding:12px 0;font:400 16px/1.8 var(--sans);white-space:normal;overflow:visible}
 .home-page .featured-news-title>span{display:block;white-space:normal;overflow-wrap:break-word}
 .home-page .template-notices-head{min-height:44px;padding:0 0 10px;margin:0;align-items:center}
 .home-page .template-notices-head>h2{font:600 22px/1.5 var(--serif);padding:5px 12px;margin:0}
 .home-page .template-module{display:block;min-height:0}
 .home-page .template-module-inner{display:flex;flex-direction:column;width:100%;gap:20px;padding:24px 16px;min-height:0}
 .home-page .template-notices{order:0;width:100%;padding:0;min-height:0}
 .home-page .template-module-inner>.template-photo-carousel{order:1}
 .home-page .template-photo-carousel,.home-page .featured-news-copy .template-photo-carousel{display:grid;grid-template-rows:auto auto;width:100%;height:auto;min-height:0;margin:0}
 .home-page .template-photo-viewport,.home-page .featured-news-copy .template-photo-viewport{position:relative;width:100%;height:auto;min-height:0;aspect-ratio:3/2;padding:8px}
 .home-page .template-photo-viewport>.template-photo-slide{position:absolute;inset:8px;width:auto;height:auto}
 .home-page .template-photo-slide>img{width:100%;height:100%;object-fit:contain;transform:none}
 .home-page .template-photo-carousel>figcaption{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-height:44px;padding:8px 10px;font-size:13px;line-height:1.6}
 .home-page .template-photo-carousel .template-poster-dots{gap:0}
 .home-page .template-photo-carousel .template-poster-dots button{width:28px;height:28px;border:0;border-radius:0;background:radial-gradient(circle,#fff 0 2px,#8293a1 2px 3px,transparent 3px)}
 .home-page .template-photo-carousel .template-poster-dots button[aria-pressed=true]{background:radial-gradient(circle,#8293a1 0 3px,transparent 3px)}
 .home-page .institute-news-list{display:block;margin:0;padding:0;list-style:none}
 .home-page .institute-news-list>li{display:block;border-bottom:1px solid #e2e6ea}
 .home-page .institute-news-list .featured-news-title{font:400 16px/1.8 var(--sans);padding:12px 0}
 .gov-subpage .honor-grid,.gov-subpage .article-grid,.gov-subpage .archive-grid,.gov-subpage .gallery-grid,.gov-subpage .document-library,.gov-subpage .activity-library,.gov-subpage .column-directory,.gov-subpage .original-photo-grid{grid-template-columns:minmax(0,1fr);gap:20px}
 .gov-subpage .column-directory .student-section-heading{writing-mode:horizontal-tb;white-space:normal;word-break:normal}
 .gov-subpage .page-heading h1,.gov-subpage .record-heading{font-size:25px;line-height:1.5}
 .gov-subpage .page-heading,.gov-subpage .page-body{padding-top:24px;padding-bottom:24px}
 .gov-subpage .page-body p,.gov-subpage .reading p{overflow-wrap:break-word;word-break:normal}
 .gov-subpage .certificate-detail,.gov-subpage .balanced-certificate-detail,.gov-subpage .biography-split,.gov-subpage .culture-split{grid-template-columns:minmax(0,1fr);gap:24px}
 .gov-subpage .certificate-originals,.gov-subpage .original-photo-panel,.gov-subpage .annotation{min-width:0;padding:16px}
 .gov-subpage .original-photo-panel>header{display:block}
 .gov-subpage .video-entry video{width:100%;height:auto;aspect-ratio:16/9;object-fit:contain}
 .home-page>footer{flex:0 0 104px;height:104px;min-height:104px;padding:8px 0;background-size:100% 100%}
 .home-page>footer .footer-grid{width:calc(100% - 32px);gap:2px}
 .home-page>footer .footer-grid>div:first-child>.eyebrow{font-size:11px;letter-spacing:2px}
 .home-page>footer .footer-grid>div:first-child>p{font-size:clamp(16px,4.8vw,20px);line-height:1.2;letter-spacing:1px;margin:2px 0 0}
 .home-page>footer .footer-grid .text-link{font-size:11px;padding-block:3px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.featured-news-title:hover>span{animation:none}}

@media(max-width:999px){
 .gov-subpage.contact-directory-page .contact-directory{grid-template-columns:minmax(0,1fr)}
 .gov-subpage.contact-directory-page .contact-directory-info{padding:24px 20px}
 .gov-subpage.contact-directory-page .contact-primary-phone{font-size:clamp(24px,7vw,36px);letter-spacing:1px;max-width:100%}
 .gov-subpage.contact-directory-page .contact-directory-wechat{width:100%;min-width:0;padding:24px 20px;border-left:0;border-top:1px solid #e2e6ea}
 .home-page .platform-nav>.platform-nav-item:not(:has(.mobile-submenu-toggle)),.gov-subpage .profile-nav>.nav-item:not(:has(.mobile-submenu-toggle)){grid-template-columns:minmax(0,1fr)}
}

/* Let the preview shell follow natural content height when its menu closes. */
html.responsive-preview body.home-page,html.responsive-preview body.gov-subpage{min-height:0}

/* Keep the notice legible instead of sliding underneath its fixed label. */
.home-page .platform-hot>strong{flex:0 0 auto}
.home-page .platform-hot>span{animation:none;transform:none;white-space:normal;overflow-wrap:break-word}

/* Progressive enhancement: static navigation remains usable without JavaScript. */
@media(max-width:999px){
 html:not(.js) .home-page .platform-nav:not(.mobile-nav-ready),html:not(.js) .gov-subpage .profile-nav:not(.mobile-nav-ready){display:block}
 html:not(.js) .home-page .platform-nav:not(.mobile-nav-ready) .platform-nav-item:nth-child(n)>.platform-submenu,html:not(.js) .gov-subpage .profile-nav:not(.mobile-nav-ready)>.nav-item:nth-child(n)>.nav-submenu{display:grid}
}

@media(max-width:999px){html.js .home-page .platform-nav:not(.mobile-nav-ready),html.js .gov-subpage .profile-nav:not(.mobile-nav-ready){display:block;height:48px;max-height:48px;overflow:hidden;visibility:hidden}}

/* Explicit keyboard focus, without altering the protected footer. */
.site-header :is(a,button):focus-visible,main :is(a,button,input,[role="button"]):focus-visible,.profile-lightbox :is(button,[role="button"]):focus-visible{outline:3px solid #1465b4;outline-offset:3px}
