/* Shared responsive behaviour for public pages and the protected Teaching area. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
main,.contact-layout>*,.feedback-layout>*,.contact-panel,.contact-intro,.search,.tools>*,.term-tools>*,.sheet,.restricted-article,.article-detail,.yd-section,.yd-task{min-width:0}
main,.page-note,.syllabus-text,.status,.viewer span{overflow-wrap:anywhere}
main img,main video{max-width:100%;height:auto}
main iframe,main object,main embed{max-width:100%}
iframe[src*="youtube.com"],iframe[src*="youtube-nocookie.com"]{width:100%;height:auto;aspect-ratio:16/9}
.mobile-table-scroll{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;margin:16px 0}
.mobile-table-scroll:focus-visible{outline:2px solid var(--red,#b72d26);outline-offset:3px}
.mobile-table-scroll>table{margin:0!important}
.site-usage-notice{overflow-wrap:anywhere}
@media(max-width:1100px){
 .topnav{top:var(--site-header-height,74px)!important;bottom:0;height:auto!important;max-height:calc(100dvh - var(--site-header-height,74px));padding-bottom:max(24px,env(safe-area-inset-bottom))!important;overscroll-behavior-y:contain}
 body.site-menu-open{overflow:hidden}
 .topnav a,.topnav .navdrop>button{min-height:44px}
}
@media(max-width:760px){
 .top{gap:12px;padding-left:16px;padding-right:16px}
 .top .brand{min-width:0;font-size:.84rem;letter-spacing:.03em;line-height:1.4}
 .top .mon{flex:0 0 32px;width:32px;height:32px}
 .menubtn{flex-shrink:0;min-height:44px;min-width:60px}
 .topnav{padding-left:12px;padding-right:12px}
 .topnav .dropdown{padding-left:8px!important}
 .topnav a,.topnav button{font-size:1rem!important}
 .topnav .dropdown small{font-size:.8rem;line-height:1.5}
 .hero{min-height:0}
 .hero-copy{padding:36px 20px}
 .hero h1{font-size:clamp(2.5rem,10vw,4rem);line-height:1.05}
 .hero .photo{min-height:clamp(240px,65vw,400px)}
 .section{padding:42px 20px}
 .section h2{font-size:clamp(1.9rem,8vw,3rem);line-height:1.15}
 .section-head{margin-bottom:26px}
 .lead{font-size:1rem;line-height:1.7}
 .profile{gap:26px}
 .profile-copy p:first-child{font-size:1.1rem}
 .kb,.kata-grid,.study-grid,.japan-grid,.pearl-grid,.community-grid,.contact-layout,.feedback-layout,.term-groups{grid-template-columns:minmax(0,1fr)!important}
 .two,.three,.showcase,.self{grid-template-columns:minmax(0,1fr)}
 .elements,.pearl-path{grid-template-columns:repeat(2,minmax(0,1fr))}
 .card,.kata-entry,.study-card,.panel,.community-card,.term-group{min-width:0}
 .card summary,.kata-entry summary{min-height:0;padding:20px}
 .card h3,.kata-entry h3{font-size:1.35rem}
 .article,.kata-body,.study-body,.community-body{padding:18px!important}
 .panel,.study-card,.japan-card,.pearl-card,.darkcard,.scenario{padding:20px}
 .contact-panel{padding:20px}
 .contact-intro h1{font-size:clamp(2rem,9vw,3rem)}
 .contact-panel input,.contact-panel select,.contact-panel textarea,.rich-form input,.rich-form textarea{width:100%;min-width:0;max-width:100%}
 input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea,[contenteditable=true]{font-size:16px!important}
 button,.btn,.filter,.kata-video,.rich-button,.rich-toolbar button,.study-print-button,.content-owner-login,.contact-button,.tab{min-height:44px;max-width:100%;white-space:normal}
 select{max-width:100%;min-width:0}
 .tools,.term-tools{flex-wrap:wrap;gap:12px}
 .term-tools input{width:100%;min-width:0;flex-basis:100%}
 .kata-controls{gap:8px}
 .filter{padding:9px 12px}
 .kata-video{align-items:center;line-height:1.5;white-space:normal}
 .wrap{padding:30px 16px}
 .wrap h1{font-size:clamp(2rem,9vw,3rem);line-height:1.15}
 .status{display:flex;width:fit-content;max-width:100%;overflow-wrap:anywhere}
 .status:before{flex-shrink:0}
 .sheet{padding:20px}
 .sheet-head{flex-wrap:wrap;gap:12px}
 .sheet-head h2{font-size:1.5rem}
 .sheet-head p{overflow-wrap:anywhere}
 .viewer{flex-wrap:wrap}
 .viewer span{flex-basis:calc(100% - 90px);min-width:0}
 .restricted-article summary{padding:18px 48px 18px 18px}
 .restricted-article summary h2{font-size:1.25rem}
 .restricted-article summary:after{top:18px;right:18px}
 .restricted-article summary p,.article-detail,.page-note{overflow-wrap:anywhere}
 .rich-content blockquote{margin-left:0;margin-right:0}
 .rich-actions,.collection-heading,.inbox-actions,.yd-actions,.yd-heading,.yd-week{flex-wrap:wrap}
 .rich-actions [role=status]{min-width:0;flex-basis:100%}
 .rich-toolbar select{max-width:100%;min-width:0}
 .editor-save-actions,.article-editing .content-edit-tools{top:var(--site-header-height,74px)}
 .rich-editor{max-height:60dvh;min-height:200px}
 .yd-section,.yd-task{padding:16px}
 .yd-week label,.yd-week input{max-width:100%;min-width:0}
 .yd-file iframe,.yd-inline-file iframe{height:clamp(260px,65dvh,550px)}
 .yd-content img{height:auto}
 .analytics-controls{gap:14px}
 .analytics-controls label{min-width:0;max-width:100%}
 .analytics-panel,.metric{min-width:0}
 .site-usage-notice{padding:12px 16px!important;text-align:left!important;font-size:12px!important}
 .site-usage-notice a{display:inline-block;padding:4px 0}
 .footer{padding:36px 20px}
 .footer h2{font-size:clamp(2rem,9vw,3rem)}
}
@media(max-width:360px){.kata-controls .filter{flex-grow:1}.metrics{gap:10px}.metric{padding:12px}.metric strong{font-size:1.5rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}.reveal{opacity:1!important;transform:none!important;transition:none!important}}
