/* Phone-first overrides shared by every view, including account and admin. */
@media(max-width:767px){
 :root{--mobile-bar:64px;--mobile-bottom:calc(var(--mobile-bar) + env(safe-area-inset-bottom,0px))}
 html{scroll-padding-top:82px;scroll-padding-bottom:calc(var(--mobile-bottom) + 22px);-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body{font-size:15px;padding-bottom:var(--mobile-bottom)}
 .shell{padding:0 16px;min-width:0;min-height:60svh}.shell>*{min-width:0}
 .topbar{height:calc(64px + env(safe-area-inset-top,0px));padding-top:env(safe-area-inset-top,0px)}
 .topbar-inner{padding:0 max(12px,env(safe-area-inset-left,0px)) 0 max(12px,env(safe-area-inset-right,0px));gap:8px;max-width:none}
 .wordmark{font-size:clamp(18px,5.1vw,24px);letter-spacing:-1px}.school-crest{width:30px;height:30px;margin-right:7px}.wordmark>i{font-size:8px;margin-left:6px}
 .toplinks,.top-actions>.button{display:none}.top-actions{gap:6px}.top-actions .search-link{font-size:29px;display:flex;width:44px;height:44px;align-items:center;justify-content:center}.login-link{min-height:44px;display:flex;align-items:center;font-size:11px;white-space:nowrap}.top-actions .avatar{width:38px;height:38px;min-width:38px;max-width:38px;line-height:38px}
 .mobile-nav{display:flex;position:fixed;inset:auto 0 0;height:var(--mobile-bottom);padding:0 max(8px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(8px,env(safe-area-inset-left,0px));background:var(--paper);border-top:1px solid var(--line);z-index:30;align-items:center;justify-content:space-around;transition:transform .16s}
 .mobile-nav>a{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1;min-width:0;min-height:50px;gap:3px;font-size:23px;line-height:1.2;padding:5px 2px;color:#796f62}.mobile-nav span{font-size:11px}.mobile-nav .mobile-publish{font-size:27px;color:var(--red)}
 .mobile-nav>a[aria-current]{background:#e7dcc8;color:var(--red);border-radius:8px}.mobile-nav>a[aria-current]:after{display:none}
 .keyboard-open .mobile-nav{transform:translateY(110%);visibility:hidden}.keyboard-open #toast{bottom:14px}
 .footer{margin:32px 16px 0;padding:24px 0 28px;gap:16px;flex-wrap:wrap}.footer .wordmark{font-size:20px}.footer p{font-size:11px}.footer>a:not(.wordmark){min-height:44px;display:inline-flex;align-items:center;font-size:12px}.footer-note{display:none}
 #toast{bottom:calc(var(--mobile-bottom) + 12px);font-size:13px;line-height:1.6;padding:12px 16px;max-width:calc(100vw - 28px);width:max-content}
 .button,.chip,.text-button{min-height:44px;align-items:center}.text-button{display:inline-flex}.button{padding:11px 16px;font-size:14px}.button.small{padding:10px 13px;font-size:13px}.chip{font-size:12px;padding:10px 12px}.pagination a,.comment-links a,.comment-links button{min-height:44px;display:inline-flex;align-items:center}.pagination{align-items:center;font-size:12px;flex-wrap:wrap}
 input:not([type=checkbox]),textarea,select,.entry-card input:not([type=checkbox]),.verification-forms input{font-size:16px;min-height:46px;padding:11px 12px;max-width:100%;min-width:0}
 textarea{line-height:1.75;scroll-margin-top:100px;scroll-margin-bottom:100px}textarea[name=body]{min-height:190px}#comment-form textarea,.review textarea{min-height:125px}label{font-size:13px;line-height:1.8;margin-top:20px}
 .form-note,.entry-card .form-note,.binding-intro,.binding-caption,.md-hint{font-size:12px;line-height:1.85}.muted{font-size:13px}.form-error{font-size:13px}input[type=checkbox]{width:20px;height:20px;min-width:20px;accent-color:var(--red)}label.check{min-height:44px;gap:9px;align-items:center}
 .paper{padding:22px 18px;margin-bottom:22px;min-width:0}.page-heading{padding:28px 0 25px;margin-bottom:24px}.page-heading p{font-size:14px}.page-heading h1{font-size:30px;line-height:1.45;overflow-wrap:anywhere}.page-heading .eyebrow{font-size:10px}.section-heading{gap:12px;flex-wrap:wrap}.section-heading h2{font-size:21px}.section-heading>a{font-size:12px;min-height:44px;display:inline-flex;align-items:center}
 .home-grid{display:block}.left-rail{margin-bottom:20px}.rail-label,.rail-note,.rail-stats{display:none}.section-nav{display:flex;flex-direction:row;overflow-x:auto;gap:8px;padding:4px 3px 9px;scrollbar-width:thin}.section-nav a{flex-shrink:0;min-height:44px;font-size:13px;padding:9px 13px;border:1px solid var(--line)}.section-nav a>span,.section-nav a small{display:none}
 .masthead{padding-top:16px}.masthead h1{font-size:clamp(38px,10.8vw,58px);letter-spacing:-2px;line-height:1.2}.masthead-main{padding:24px 0 26px}.masthead-main p{font-size:13px;max-width:70%;line-height:1.9}.headline-kicker{font-size:11px;letter-spacing:.7px}.issue-line{font-size:8px;letter-spacing:.2px;gap:12px}.issue-line>span:first-child{max-width:47%}.masthead-art{position:absolute;width:95px;height:80px;top:65px;right:0;background:none;margin:0}.sticker{font-size:11px;left:0;top:5px;padding:6px;border-width:1px;box-shadow:2px 2px 0 var(--ink)}.masthead-art svg{width:60px;top:28px;left:16px}.art-note{display:none}.ticker{gap:8px}.ticker strong{font-size:10px;flex-shrink:0}.ticker>span:nth-of-type(2){font-size:11px}.ticker>a{display:none}
 .trouble-launchers{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:86%;overflow-x:auto;scroll-snap-type:x mandatory;gap:14px;padding:5px 7px 10px 0;margin-bottom:23px}.trouble-launchers>a{padding:16px;scroll-snap-align:start}.trouble-launchers strong{font-size:19px}.trouble-launchers small{font-size:12px}
 .feed-heading h2{font-size:22px}.feed-heading h2 span{font-size:9px}.feed-tabs{gap:25px;font-size:13px;height:56px}.feed-tabs>span{display:none}.search{height:48px}.search input{font-size:16px;min-height:44px}.search button{min-width:50px;min-height:44px;font-size:12px}.post-card{padding:22px 0}.post-card h2{font-size:19px;line-height:1.65}.excerpt{font-size:14px;line-height:1.85}.post-meta{font-size:11px;gap:8px}.post-meta time{font-size:10px}.byline{font-size:12px}.post-bottom{gap:12px;flex-wrap:wrap}.counts{font-size:12px;gap:14px;min-height:34px;margin-left:auto}.stamp{font-size:11px}.tiny-avatar{width:25px;height:25px}.account-verified{font-size:10px}
 .right-rail{display:block;margin-top:25px}.right-rail>section:not(.mood-card),.right-rail>.rail-signoff{display:none}.mood-card{padding:18px;transform:none}.mood-card form{display:flex;flex-direction:column;gap:9px}.mood-card button{min-height:46px;font-size:13px;padding:10px 14px}.mood-card h3{font-size:23px}.mood-card h3 br{display:none}.mood-card>p,.mood-foot{font-size:12px}
 .detail-wrap{margin:24px auto}.detail h1{font-size:28px;line-height:1.5}.body-text,.detail>.body-text,.material-entry>.body-text{font-size:15px;line-height:1.95}.detail-actions{gap:9px}.detail-actions>.form-note{width:100%;margin:4px 0}.comment .body-text{font-size:14px}.comment-links{gap:18px;font-size:12px}.comment-links .text-button{font-size:12px}.poll{padding:17px 12px}.poll>p{font-size:12px}.poll-option{min-height:56px;flex-wrap:wrap;padding:12px;gap:10px;font-size:14px}.poll-option span{width:100%}.poll-option b{font-size:11px}.poll-option meter{min-width:60px}.attachments{grid-template-columns:1fr}.attachments img{height:auto;width:auto;max-width:100%}.resource-card{padding:14px;gap:12px;min-width:0}.resource-card>span:last-child{min-width:0}.resource-card strong{font-size:14px}.resource-card small{font-size:12px}.attachments:has(.resource-card)>a:not(.resource-card){max-width:100%}
 .case-file .section-heading{display:block}.case-file .section-heading>.button{margin-top:14px}.case-file .section-heading h2{font-size:23px}.event-facts{padding:16px}.event-facts .body-text{font-size:14px}.event-banner{flex-wrap:wrap;font-size:11px}.case-counters{gap:16px;font-size:12px}.case-counters strong{font-size:22px}.material-tabs{gap:7px}.material-tabs a{min-height:44px;display:flex;align-items:center;padding:8px 10px;font-size:12px}.material-entry h3{font-size:20px}.source-note{font-size:12px}.material-footer{font-size:12px}.material-footer a{min-height:44px;display:inline-flex;align-items:center;margin-left:0}.material-composer>h3{font-size:22px}
 .class-grid,.account-grid,.auth-grid{grid-template-columns:1fr;gap:18px}.class-filter{flex-wrap:wrap;gap:12px}.class-filter label{width:calc(50% - 6px)}.fields-three{grid-template-columns:1fr;gap:0}.class-card p{font-size:14px}.class-card a.text-link{display:inline-flex;min-height:44px;align-items:center}.teaching-head{flex-wrap:wrap}.teaching-head small{margin:0}.form-actions{flex-wrap:wrap;gap:15px}.upload-box{padding:7px 12px}.upload-box input[type=file]{font-size:14px;min-height:48px}fieldset{padding:14px 12px;margin:24px 0}
 .entry-layout{display:block;max-width:460px;margin:24px auto 32px}.entry-note{padding:0;margin-bottom:24px}.entry-note h1{font-size:34px;line-height:1.3;margin:14px 0}.entry-note h1 br,.entry-note>p br{display:none}.entry-note>p{font-size:13px}.entry-scribble,.entry-note>small{display:none}.entry-card{padding:0 18px 23px;box-shadow:3px 3px 0 #e4dccc}.entry-tabs a{min-height:52px;font-size:14px}.entry-email{font-size:12px}.entry-email small{font-size:11px}.entry-privacy,.entry-footnote{font-size:12px}.entry-recover{min-height:44px;display:flex;align-items:center;justify-content:flex-end;font-size:12px}.entry-card .google-signin{font-size:14px;min-height:48px}
 .account-shortcuts{gap:8px 16px}.account-shortcuts a{display:inline-flex;align-items:center;min-height:44px;font-size:13px}.verification-panel{padding:20px!important}.binding-info p{font-size:12px}.binding-info h3{font-size:14px}.binding-status{font-size:10px}.binding-email>summary{min-height:46px;padding:12px 0;font-size:13px}.binding-google>.button{min-height:44px;font-size:12px}.weight-badge{font-size:11px}.login-settings .eyebrow{font-size:10px}.verification-forms label{font-size:13px}.backup-login{font-size:12px}.backup-login summary{min-height:44px;padding:9px 0}
 .md-toolbar{padding:5px;gap:2px}.md-toolbar button{min-height:44px;min-width:40px;font-size:12px;padding:6px}.md-preview{font-size:14px;max-height:55svh}.md-editor textarea{font-size:16px}.markdown-body table{font-size:13px}.markdown-body pre{font-size:13px}.rules{margin-top:24px}.rules h1{font-size:31px}.rules h2{font-size:21px}.rules p{font-size:14px}.rules-promise{padding:18px 14px}.rules-promise p{font-size:14px}.rules-promise p:last-child{font-size:12px}.community-intro h2{font-size:22px}.community-intro p{font-size:14px}.community-intro>a{min-height:44px;font-size:13px}
 .admin-status{grid-template-columns:1fr;gap:12px}.admin-status p{font-size:13px}.table-scroll{max-width:100%;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin}.table-scroll table{min-width:560px;font-size:12px}details>summary{min-height:44px;cursor:pointer;padding-top:9px;padding-bottom:9px}.paper>form select{min-width:0}
 dialog{max-height:calc(100dvh - 30px);overflow-y:auto;overscroll-behavior:contain;padding:23px 18px;width:calc(100% - 24px)}dialog h2{font-size:23px}dialog p{font-size:13px}dialog .button{width:100%}
}
@media(max-width:480px){.fields-two{grid-template-columns:1fr;gap:0}.fields-two label:first-child{margin-top:18px}.issue-line>span:first-child{display:none}.issue-line>span:last-child{width:100%;text-align:right}.post-meta time{margin-left:0}.page-heading .eyebrow{letter-spacing:1px}.class-filter label{width:100%}.md-toolbar{gap:0}.md-toolbar button{min-width:36px;padding:5px}.binding-google{gap:10px}}
@media(max-width:359px){.shell{padding:0 12px}.wordmark{font-size:17px}.school-crest{width:26px;height:26px;margin-right:5px}.topbar-inner{padding:0 8px}.top-actions .search-link{width:36px}.login-link{font-size:10px}.wordmark>i{font-size:7px;margin-left:4px}.paper{padding:20px 14px}.entry-card{padding:0 13px 22px}.md-toolbar button{font-size:11px;min-width:32px}.entry-card .cf-turnstile{margin-left:-8px}}
@media(min-width:768px) and (max-width:950px) and (pointer:coarse){.shell{padding:0 24px}.home-grid{grid-template-columns:145px minmax(0,1fr);gap:20px}.button,.chip{min-height:44px}input:not([type=checkbox]),textarea,select{font-size:16px}.topbar{height:64px}.masthead h1{font-size:48px}.masthead-art{width:190px}.entry-layout{gap:25px;grid-template-columns:1fr 390px}.account-grid{grid-template-columns:1fr}.fields-two{min-width:0}}
@media(prefers-reduced-motion:reduce){.mobile-nav{transition:none}}

@media(max-width:767px){.cf-turnstile{margin:14px 0;max-width:100%}.reputation-progress{border-top:1px dashed var(--line);margin-top:20px;padding-top:16px}.reputation-progress h3{font-size:15px}.reputation-progress p{font-size:12px;line-height:1.9;margin:10px 0}.reputation-progress .text-link{display:inline-flex;min-height:44px;align-items:center}}
