/* Responsive finishing layer: iPhone, iPad, split view and touch laptops. */
@media screen {
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  :is(main,section,article,aside,form,fieldset,label){min-width:0}
  img,video,canvas{max-width:100%}
  :is(.table-wrap,.exam-table-wrap,.ps-table-scroll){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .mobile-cart-shortcut{display:none}
  .study-nav .device-menu-toggle{border-radius:999px}
  .thinking-home-theme #active>.exam-grid{grid-template-columns:minmax(0,1fr) 285px}
}
@media screen and (max-width:1180px), screen and (pointer:coarse) {
  :root{--vip-button-height:44px;--vip-button-font:15px}
  :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px!important;max-width:100%;min-width:0}
  :is(button,a.btn,summary){touch-action:manipulation}
  :is(.exam-option,.ps-option,.choice){min-height:52px}
  :is(.exam-map-button,.ps-qnav,.nav-grid button,.qnum){min-height:44px!important;height:44px!important;min-width:44px!important}
  #ex-map,.ps-question-nav,.nav-grid{grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:8px}
  :is(.ps-products button,.ps-year-card){white-space:normal;overflow-wrap:break-word;min-width:0}
  .ps-products button{min-height:64px}
  .activity-remove,.ps-link-button,.plain-button{min-height:44px;padding:8px 10px}
  .exam-question-map,.ps-answer-card{position:static}
}
/* Match this condition in the navigation and homepage route handlers. */
@media screen and (max-width:1180px), screen and (pointer:coarse) and (max-width:1366px) {
  .study-nav-band{display:block!important;position:relative;z-index:30}
  body .study-nav{width:100%;padding:8px max(16px,env(safe-area-inset-left))!important;flex-wrap:wrap;justify-content:space-between;gap:10px;min-height:60px}
  body .device-menu-toggle{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 16px;background:transparent;color:#fff;border:1px solid #ffffff65;font:700 14px/1.2 'Atkinson Hyperlegible Next',Arial}
  .device-menu-toggle[hidden]{display:none!important}
  body .device-nav-links{flex:1 1 100%;flex-direction:column;align-items:stretch!important;order:3;padding:10px;background:#202b43;border:1px solid #45516a;border-radius:18px}
  body .device-nav-ready .device-nav-links{display:none;position:absolute;top:calc(100% + 4px);left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));z-index:45;max-height:calc(100vh - 180px);max-height:calc(100dvh - 180px);overflow-y:auto;overscroll-behavior:contain;box-shadow:0 12px 28px #202b4340}
  body .device-nav-ready[data-menu-open=true] .device-nav-links{display:flex}
  body .device-nav-links>a,body .device-nav-links>.product-menu{width:100%;max-width:none;margin:0!important;color:#fff}
  body .device-nav-links .product-menu>summary{width:100%;justify-content:space-between!important;text-align:left}
  body .device-nav-links .menu-panel{position:static;width:100%;max-width:100%;max-height:none;margin-top:8px;padding:10px;background:#fff;box-shadow:none;overflow:visible!important}
  body .device-nav-links .menu-panel>a{min-height:48px;padding-block:12px;white-space:normal}
  body .study-nav>.device-primary{margin:0!important;max-width:calc(100% - 110px)}
  .studio-nav>.studio-container{gap:10px;flex-direction:row;align-items:center;flex-wrap:wrap;padding-block:10px}
  .studio-mobile-toggle{display:inline-flex!important;align-items:center;gap:9px;border:1px solid #ffffff65;border-radius:999px;background:transparent;color:white;padding:10px 16px;font:700 14px 'Atkinson Hyperlegible Next',Arial;min-height:44px}
  .studio-nav .studio-nav-actions{margin-left:auto;flex-wrap:wrap}
  .studio-nav a.studio-nav-cta{display:inline-flex!important}
  .studio-nav-links{width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;order:3;gap:8px}
  .studio-nav[data-mobile-ready] .studio-nav-links{display:none;padding-top:8px}
  .studio-nav[data-menu-open=true] .studio-nav-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media screen and (min-width:1181px) and (pointer:fine), screen and (min-width:1367px){.studio-mobile-toggle{display:none!important}}
@media screen and (max-width:1180px){
  .activity-layout{grid-template-columns:minmax(0,1fr)}
  .activity-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .activity-cart{position:static;width:100%;max-width:760px;margin-inline:auto}
  .activity-search{grid-template-columns:repeat(2,minmax(0,1fr))}
  .activity-hero{grid-template-columns:minmax(0,1fr);padding:24px}
  .activity-hero-photo img{min-height:0;height:300px}
  .activity-points{grid-template-columns:repeat(2,minmax(0,1fr))}
  .exam-workspace,.ps-workspace,.vip-studio .work-layout{grid-template-columns:minmax(0,1fr)}
  .vip-studio .prompt-panel{position:static}
  .exam-question-map,.ps-answer-card{max-width:100%}
  .thinking-home-theme #active>.exam-grid{grid-template-columns:minmax(0,1fr)}
  .thinking-home-theme .navigator{position:static}
  .thinking-home-theme .nav-grid{grid-template-columns:repeat(auto-fit,minmax(44px,1fr))}
  .exam-hero{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:24px}
  .exam-session-head,.ps-session-head,.session-bar{flex-wrap:wrap;gap:16px}
  .activity-cart:target{outline:3px solid #d91457;outline-offset:4px}
  .activity-mobile-page{padding-bottom:calc(80px + env(safe-area-inset-bottom))}
  .mobile-cart-shortcut{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:25;justify-content:space-between;align-items:center;gap:14px;background:#fff;border-top:1px solid #dfe3ea;padding:10px max(16px,env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));box-shadow:0 -5px 20px #202b4314}
  .mobile-cart-shortcut>span{font-size:14px;font-weight:700;color:#202b43}
  .mobile-cart-shortcut>.btn{background:#d91457;color:#fff}
}
@media screen and (max-width:760px){
  .site-home .wrap,.site-product .wrap,.exam-site .wrap,.ps-wrap,.studio-container{width:calc(100% - 32px);max-width:100%}
  body .study-nav.wrap{width:100%}
  .study-masthead,.studio-brandbar{min-height:80px;gap:12px}
  .study-masthead .brand,.studio-brand{font-size:clamp(25px,7vw,31px);min-width:0;max-width:100%}
  .study-masthead .brand small,.studio-brand small{font-size:11px;letter-spacing:.04em;white-space:normal;line-height:1.6}
  .study-header-info,.studio-brand-note{display:none}
  .site-home .hero{min-height:0;padding-block:36px}
  .site-home .hero h1{font-size:clamp(32px,8.5vw,44px)}
  .site-home #catalog,.site-products #pathways .grid3,.exam-grid{grid-template-columns:1fr}
  .site-home #welcome{grid-template-columns:1fr;gap:24px}
  .exam-hero,.exam-modes,.activity-points,.activity-home-banner>.wrap{grid-template-columns:1fr}
  .exam-hero h1{font-size:clamp(32px,8.5vw,40px)}
  .activity-hero{padding:20px;gap:20px}
  .activity-hero h1{font-size:32px}
  .activity-cards{grid-template-columns:1fr}
  .activity-categories{grid-template-columns:repeat(2,minmax(0,1fr))}
  .activity-category-tile{min-height:80px;padding:12px;line-height:1.5}
  .activity-search,.activity-course-filter{padding-inline:16px}
  .activity-course-filter{padding-inline:0}
  .activity-hero-photo img{height:auto;aspect-ratio:3/2;min-height:0}
  .activity-card-photo img{height:auto;aspect-ratio:3/2}
  .activity-price strong{font-size:28px}
  .activity-quantity{flex-wrap:wrap}
  .activity-cart{padding:20px}
  .exam-question,.exam-stimulus,.exam-review{padding:18px}
  .exam-options{padding:0;border:0;min-width:0}
  .exam-option{padding:14px;min-width:0}
  .exam-option>span,.ps-option>span{min-width:0;overflow-wrap:anywhere}
  .exam-clock{font-size:24px}
  .exam-table-wrap td,.exam-table-wrap th{font-size:15px}
  .vip-studio :is(.hero,.ps-hero){grid-template-columns:1fr;padding:26px 22px;gap:20px}
  .vip-studio :is(.hero h1,.ps-hero h1){font-size:clamp(30px,8vw,38px)}
  .vip-studio :is(.setup-card,.ps-setup-card,.panel,.ps-question-card){padding:20px}
  .vip-studio .ps-year-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .vip-studio .ps-year-card{min-height:160px;padding:16px;align-items:flex-start}
  .vip-studio .ps-year-card[aria-pressed=true]{padding:16px}
  .vip-studio .ps-year-card small{min-height:0}
  .vip-studio .ps-products{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ps-question-nav,#ex-map,.nav-grid{grid-template-columns:repeat(auto-fit,minmax(44px,1fr))!important}
  .ps-answer-tools,.session-actions,.start-row{flex-wrap:wrap;gap:12px}
  .ps-stimulus{max-height:none;overflow:visible;font-size:16px;padding:16px}
  .vip-studio .stage-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .vip-studio .work-layout,.vip-studio .form-grid,.vip-studio .session-details{grid-template-columns:1fr}
  .studio-nav[data-menu-open=true] .studio-nav-links{grid-template-columns:repeat(2,minmax(0,1fr))}
  .studio-nav .studio-nav-actions{gap:8px}
  .thinking-home-theme .exam-toolbar{position:static;flex-wrap:wrap;gap:12px;padding:16px}
  .thinking-home-theme .top-inner,.top .wrap{flex-wrap:wrap;gap:12px}
  .thinking-home-theme .top nav{flex-wrap:wrap;gap:8px}
  .thinking-home-theme .question-card{padding:18px}
  .ac-masthead{gap:16px;flex-wrap:wrap}
  .ac-nav>div{gap:8px}
  .ac-nav .ac-nav-actions{margin-left:0;flex-wrap:wrap}
  .ac-card,.ac-hero{padding:22px}
  .ac-topline,.ac-total,.ac-actions{flex-wrap:wrap;gap:12px}
  :is(dialog:not(#vip-product-dialog):not(#vip-timed-dialog)){box-sizing:border-box;width:calc(100% - 28px);max-width:560px;max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);overflow-y:auto;padding:22px}
}
@media screen and (max-width:420px){
  .activity-search,.exam-filters{grid-template-columns:1fr}
  .activity-search .btn{width:100%}
  .exam-jump{gap:8px;padding:14px}
  .exam-jump a{min-height:44px;padding:10px 12px}
  .ps-result-hero{grid-template-columns:1fr}
  .study-masthead .brand{font-size:27px}
  .ac-brand{font-size:27px}
  .activity-cart .activity-total-row{gap:10px}
  .activity-total-row.final{font-size:20px}
}
@media screen and (pointer:coarse) and (orientation:landscape){
  .study-nav-band{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
  .device-nav-ready .device-nav-links{max-height:calc(100dvh - 90px)!important}
}
@media print{.mobile-cart-shortcut,.studio-mobile-toggle{display:none!important}}
/* Keep the Scholarship title and provider links together in every product menu. */
body .study-nav .product-menu .menu-panel>div>a[href$="scholarship-practice.html"],
body .study-nav .product-menu .menu-panel>div>a[href$="scholarship-practice.html"]+small>a {
  min-height:28px;
  padding-block:0;
  line-height:1.5;
}
body .study-nav .product-menu .menu-panel>div>a[href$="scholarship-practice.html"]+small {
  margin-top:2px;
}
@media(pointer:coarse) {
  body .study-nav .product-menu .menu-panel>div>a[href$="scholarship-practice.html"] {
    min-height:44px;
    justify-content:flex-end;
  }
  body .study-nav .product-menu .menu-panel>div>a[href$="scholarship-practice.html"]+small>a {
    min-height:44px;
    justify-content:flex-start;
  }
}
@media (max-width:1180px),(pointer:coarse) and (max-width:1366px){
body .device-nav-ready .device-nav-links{flex-wrap:nowrap!important;overflow-x:hidden!important;align-items:stretch!important}
body .device-nav-ready .device-nav-links>*{flex-shrink:0!important}
body .device-nav-links .product-menu>summary{justify-content:space-between!important}
.studio-nav[data-mobile-ready] .studio-nav-links{flex:1 1 100%!important;width:100%!important}
.studio-nav[data-menu-open=true] .studio-nav-links{grid-template-columns:1fr!important}}
