
/* Responsive reading and touch controls. Loaded after the established themes. */
body:is(.site-home,.site-product,.exam-app) :is(button,.btn,.sel-btn,.np-btn,.linkbutton,select){min-height:44px;touch-action:manipulation}
body:is(.site-home,.site-product,.exam-app) :is(button,.btn,.sel-btn,.np-btn){white-space:normal;overflow-wrap:anywhere}
body:is(.site-home,.site-product,.exam-app) :is(.close,.ticker-toggle){width:44px;height:44px;min-width:44px;flex:0 0 44px}
body:is(.site-home,.site-product,.exam-app) :is(input:not([type=checkbox]):not([type=radio]),textarea,select){font-size:16px;max-width:100%}
body:is(.site-home,.site-product,.exam-app) :is(.answer,.option){min-height:52px;font-size:18px;line-height:1.65}
body:is(.site-home,.site-product,.exam-app) :is(.filter,.filters button,.lang button){font-size:16px;min-height:44px;padding:10px 14px}
body:is(.site-home,.site-product,.exam-app) :is(.menu-panel a,.product-menu summary){min-height:44px}
body:is(.site-home,.site-product,.exam-app) .menu-panel a{display:flex;flex-direction:column;justify-content:center}
body:is(.site-home,.site-product,.exam-app) :is(img,svg){max-width:100%}
body:is(.site-home,.site-product,.exam-app) :is(.ref-intro>*,.exam-layout>*,.toolbar>*,.question-top>*){min-width:0}
body:is(.site-home,.site-product,.exam-app) :is(.question-title,.qtext,.option span,.answer,.review p){overflow-wrap:anywhere}
.site-home #catalog,.site-products #pathways .grid3,.site-product .ref-course-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.site-home .study-nav,.site-product .study-nav{position:relative;flex-wrap:nowrap;gap:12px;min-height:64px}
.device-nav-links{display:flex;flex:1;align-items:center;min-width:0;gap:0}
.device-nav-links>a,.device-nav-links>.product-menu{color:#fff;font-size:16px!important;font-weight:650;text-decoration:none;padding:14px 12px!important;line-height:1.5;white-space:normal}
.device-nav-links .product-menu summary{display:flex;align-items:center;gap:8px;padding:0;cursor:pointer}
.device-nav-links .product-menu summary:after{content:'⌄';font-size:20px}
.device-nav-links .menu-panel{top:100%;max-width:min(340px,calc(100vw - 40px));max-height:70vh;max-height:70dvh;overflow-y:auto!important}
.device-nav-links .menu-panel a{color:#202b43;line-height:1.5;font-size:16px}
.device-nav-links .menu-panel>div>small{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.device-nav-links .menu-panel>div>small>a{padding:6px 0;display:inline-flex;align-items:center;min-height:44px}
.device-menu-toggle{display:none}

.site-home #welcome .welcome-selector-intro{align-self:start;min-width:0}
.site-home #welcome .welcome-selector-actions{align-self:end;min-width:0;width:100%}
.site-home #welcome>.ref-start-box .eyebrow{display:block;margin:0 0 10px!important}
.site-home #welcome>.ref-start-box h3{margin:0 0 10px!important}
.site-home #welcome>.ref-start-box p{margin:0!important;line-height:1.6!important}
.site-home #welcome>.ref-start-box>label{margin:24px 0 10px!important}

.site-home #welcome>.ref-start-box select{margin:0}
.site-home #welcome>.ref-start-box .btn{margin:12px 0 0!important}
.site-home #welcome>.ref-start-box small{margin:12px 0 0!important;line-height:1.5!important}
.site-home #welcome .ref-feature-list h3{font-size:18px!important;line-height:1.4!important}
.site-home #welcome .ref-feature-list p{font-size:16px!important;line-height:1.65!important}
.site-home #welcome .ref-feature-list{row-gap:22px!important}
.site-home #catalog .testcard p,.site-home #catalog .test-meta,.site-home #catalog .test-meta span{font-size:16px;line-height:1.6}
.site-product .ref-course-grid[data-layout="photo-pairs"]{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.site-product .ref-course-grid[data-layout^="photo-"] .ref-course-image{height:auto;min-height:0;aspect-ratio:2 / 1;isolation:isolate}
.site-product .ref-course-grid[data-layout^="photo-"] .learning-area-photo{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center;border-radius:0!important}
.site-product .ref-course-grid[data-layout^="photo-"] .ref-course-image:before{display:none}
.site-product .ref-course-grid[data-layout^="photo-"] .ref-course-image:after{inset:auto 0 0;width:100%;height:7px;background:var(--pathway-bg);border:0;border-radius:0;z-index:1}
.site-product .ref-course-grid[data-layout^="photo-"] .ref-course-stamp{top:12px;right:12px;z-index:2;padding:5px 10px;background:#202b43;color:#fff;font:700 12px/1.4 'Atkinson Hyperlegible Next',Arial,sans-serif;letter-spacing:.03em}
@media(max-width:600px){.site-product .ref-course-grid[data-layout="photo-pairs"]{grid-template-columns:1fr;gap:20px}}
.site-home .study-nav>.device-primary,.site-product .study-nav>.device-primary{font-size:16px!important;min-height:44px;padding:11px 16px;margin-left:auto;flex-shrink:0}
body .device-menu-toggle:focus-visible,body .device-nav-links a:focus-visible,body .device-nav-links summary:focus-visible{outline:3px solid #ffcd77;outline-offset:3px}
.sample-dialog-header{gap:12px;align-items:center}
.sample-dialog-header b{font-size:18px;line-height:1.45}
.sample-body:focus{outline:none}
.exam-app .ref-exam-welcome>.help{margin:18px 0 0;padding:20px 24px;background:#fff3cf;border:1px solid #ead59b;border-radius:24px;color:#5c4a25;font-size:17px;line-height:1.65}
.exam-app .ref-exam-welcome>.help h3{margin:0 0 10px;color:#202b43;font-size:21px}
.exam-app .ref-exam-welcome>.help li{margin:7px 0}
.exam-app .ref-exam-welcome>.help .hint{font-size:16px;line-height:1.6;color:#665633}
.exam-app .ref-exam-welcome{min-width:0}
.site-home #content .sample-actions{display:flex;gap:12px;flex-wrap:wrap}
.site-home #content .sample-actions button{flex:1;min-height:48px;font-size:17px}
.exam-app .sidebar details>summary{display:flex;gap:12px;justify-content:space-between;align-items:center;cursor:pointer;font-size:18px;font-weight:750;min-height:48px;list-style:none}
.exam-app .sidebar details>summary::-webkit-details-marker{display:none}
.exam-app .sidebar details>summary:after{content:'+';font-size:25px;flex:none}
.exam-app .sidebar details[open]>summary:after{content:'−'}
.exam-app #answered-label{display:block;font-size:14px;font-weight:400;line-height:1.5;color:#596478}
.exam-app .answer-card-body{padding-top:16px}
.exam-app .qnum{width:44px;height:44px;min-height:44px}
.exam-app .numbers{flex-wrap:wrap}
.exam-app .question-tools label{min-height:44px;display:inline-flex;align-items:center;gap:9px}
.exam-app .question-tools input{width:22px;height:22px}
.exam-app .question-top{gap:12px;flex-wrap:wrap}
.exam-app .options .option input{flex-shrink:0}
.exam-app .question-actions .btn{flex:1;min-height:48px}
body #vip-timed-close,body #vip-product-close,body #vip-timed-resume{min-height:44px;font-size:16px}
body #vip-timed-resume{bottom:calc(16px + env(safe-area-inset-bottom,0px));right:calc(16px + env(safe-area-inset-right,0px))}
body #vip-product-toolbar,body #vip-timed-toolbar{padding-top:max(10px,env(safe-area-inset-top,0px));padding-left:max(14px,env(safe-area-inset-left,0px));padding-right:max(14px,env(safe-area-inset-right,0px))}
body #vip-timed-dialog,body #vip-product-dialog{overscroll-behavior:contain}
@media(max-width:1100px){
  .site-home #catalog,.site-products #pathways .grid3,.site-product .ref-course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .site-home .study-nav,.site-product .study-nav{flex-wrap:wrap}
  .device-nav-links{flex-wrap:wrap}
  .device-nav-links>a,.device-nav-links>.product-menu{font-size:15px!important;padding:10px!important}
  .exam-app .exam-layout{display:flex;flex-direction:column;gap:18px}
  .exam-app .sidebar{order:-1;width:100%;padding:12px 20px}
  .exam-app .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  .exam-app .question-card{width:100%;padding:26px}
  .exam-app #exam-screen>.toolbar{position:sticky;top:0;z-index:5;background:#fff;padding:12px 0;border-bottom:1px solid #e1e4eb}
  .exam-app #section-subtitle{font-size:15px}
  .exam-app #question-content{scroll-margin-top:160px}
  .exam-app .question-actions{position:sticky;bottom:0;z-index:4;background:#fff;padding:12px 0 max(12px,env(safe-area-inset-bottom,0px));margin-bottom:-10px;box-shadow:0 -8px 16px #fff}
}
@media(min-width:960px) and (orientation:landscape){
  .site-home #catalog,.site-products #pathways .grid3,.site-product .ref-course-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1100px) and (orientation:portrait){
  .site-home #welcome,.site-product .ref-intro{grid-template-columns:1fr;gap:24px}
  .site-home .ref-start-box,.site-product .ref-start-box{max-width:100%}
}
@media(max-width:900px){
  .site-home .study-nav,.site-product .study-nav{width:100%;padding:8px max(16px,env(safe-area-inset-left,0px));flex-wrap:wrap;justify-content:space-between;gap:10px;min-height:64px}
  .device-menu-toggle{align-items:center;justify-content:center;gap:9px;background:transparent;color:#fff;border:1px solid #ffffff65;padding:9px 14px;font:700 16px/1.5 'Atkinson Hyperlegible Next',Arial,sans-serif}
  .device-nav-ready .device-menu-toggle{display:inline-flex}
  .device-menu-toggle[hidden]{display:none}
  .device-nav-links{flex:1 1 100%;display:flex;flex-direction:column;align-items:stretch;order:3;padding:8px;background:#202b43;border:1px solid #45516a;border-radius:18px}
  .device-nav-ready .device-nav-links{display:none;position:absolute;top:calc(100% + 6px);left:16px;right:16px;z-index:45;max-height:calc(100vh - 150px);max-height:calc(100dvh - 150px);overflow:auto;box-shadow:0 12px 28px #202b4340}
  .device-nav-ready[data-menu-open=true] .device-nav-links{display:flex}
  .device-nav-links>a,.device-nav-links>.product-menu{display:block!important;margin:0!important;padding:12px 14px!important;font-size:17px!important;border-radius:10px!important;background:transparent!important;color:#fff!important}
  .device-nav-links .product-menu summary{min-height:44px;justify-content:space-between;font-size:17px}
  .device-nav-links .menu-panel{position:static;width:100%;max-width:none;max-height:none;margin-top:8px;padding:8px;background:#fff;box-shadow:none}
  .site-home .study-nav>.device-primary,.site-product .study-nav>.device-primary{font-size:16px!important;min-height:46px;margin:0;padding:11px 14px!important;align-self:center}
}
@media(max-width:600px){
  .site-home #catalog,.site-products #pathways .grid3,.site-product .ref-course-grid{grid-template-columns:1fr;gap:20px}
  .site-product .ref-details .sel-grid,.site-product .ref-details .sel-grid.two,.site-product .ref-details .np-domains{grid-template-columns:1fr}
  .site-home #welcome,.site-product .ref-intro{grid-template-columns:1fr}
  .site-home #catalog .testcard{padding:18px}
  .site-home .hero h1{font-size:clamp(34px,9vw,44px);overflow-wrap:normal}
  .site-home .hero .home-intro>p,.site-home .ref-intro p,.site-product .ref-intro p{font-size:17px;line-height:1.75}
  .site-home .filters{gap:8px}
  .site-home .study-nav>.device-primary,.site-product .study-nav>.device-primary{max-width:calc(100% - 108px)}
  .site-home .study-nav .device-menu-toggle{min-width:94px}
  .site-home .overlay{padding:0;align-items:stretch;overscroll-behavior:contain}
  .site-home .overlay .modal{display:flex;flex-direction:column;width:100%;height:100vh;height:100dvh;max-height:none;padding:0;border-radius:0!important;overflow:hidden}
  .site-home .sample-dialog-header{flex:0 0 auto;padding:max(12px,env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px));border-bottom:1px solid #e1e4eb;background:#fff}
  .site-home .sample-dialog-header b{font-size:17px}
  .site-home #content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 18px max(18px,env(safe-area-inset-bottom,0px))}
  .site-home #content.sample-step{display:flex;flex-direction:column;overflow:hidden;padding:0}
  .site-home #content .sample-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px;scroll-padding-top:18px}
  .site-home #content .sample-actions{flex:0 0 auto;flex-wrap:nowrap;gap:10px;margin:0;padding:12px 18px max(12px,env(safe-area-inset-bottom,0px));border-top:1px solid #e1e4eb;background:#fff;box-shadow:0 -5px 16px #202b4308}
  .site-home #content .qtext{font-size:21px;line-height:1.7;margin:18px 0}
  .site-home #content .answer{width:100%;padding:15px 13px;font-size:17px;line-height:1.65;align-items:flex-start}
  .site-home #content .row.micro{gap:8px;flex-wrap:wrap;font-size:14px}
  .site-home #content>.row{flex-wrap:wrap;gap:14px}
  .exam-app .question-card{padding:18px}
  .exam-app .sidebar{padding:10px 16px}
  .exam-app .sidebar nav{grid-template-columns:1fr}
  .exam-app .toolbar{gap:12px;align-items:center}
  .exam-app .toolbar h1,.exam-app .toolbar h2:where(.vip-screen-title){font-size:21px}
  .exam-app #paper-label{display:none}
  .exam-app #section-subtitle{font-size:13px;line-height:1.5}
  .exam-app .clock{min-width:112px;flex-shrink:0;padding:10px 8px}
  .exam-app .clock strong{font-size:27px}
  .exam-app .clock small{font-size:11px;letter-spacing:0}
  .exam-app .question-title{font-size:22px}
  .exam-app .stimulus{font-size:18px;line-height:1.8;padding:16px}
  .exam-app .question-actions{gap:10px}
  .exam-app .question-actions .btn{font-size:16px;padding:12px 10px}
  .exam-app #confirm-dialog{max-width:calc(100vw - 28px);max-height:calc(100dvh - 28px);overflow-y:auto}
  .exam-app .review-head,.exam-app .result-actions{flex-wrap:wrap;gap:12px}
  body #vip-product-toolbar,body #vip-timed-toolbar{gap:10px}
  body #vip-product-toolbar strong,body #vip-timed-toolbar strong{font-size:16px}
  body #vip-timed-status{font-size:12px;line-height:1.4;display:block}
  body #vip-product-close,body #vip-timed-close{flex-shrink:0;font-size:15px;padding:10px 13px;white-space:nowrap}
  .device-back-label{display:none}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}

/* Keep the timed introduction and paper selector on a shared bottom edge. */
@media(min-width:901px){
 .exam-app .ref-exam-start{align-items:stretch}
 .exam-app .ref-exam-start>.ref-exam-welcome{display:flex;flex-direction:column}
 .exam-app .ref-exam-welcome>.help{flex:1;margin-bottom:0}
 .exam-app .ref-exam-start>.ref-exam-choice{align-self:stretch;margin-bottom:0}
}

/* AAS, Selective and NAPLAN learning areas: four equal-width cards on desktop. */
@media(min-width:1101px){
 .site-product:is([data-pathway="aas"],[data-pathway="selective"],[data-pathway="naplan"]) .ref-course-grid[data-layout="photo-pairs"]{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
 .site-product:is([data-pathway="aas"],[data-pathway="selective"],[data-pathway="naplan"]) .ref-course-grid .ref-course{min-width:0}
 .site-product:is([data-pathway="aas"],[data-pathway="selective"],[data-pathway="naplan"]) .ref-course-grid .ref-course-image{aspect-ratio:2 / 1}
}

/* Edutest: all five learning areas share one compact desktop row. */
@media(min-width:1101px){
 .site-product[data-pathway="edutest"] .ref-course-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
 .site-product[data-pathway="edutest"] .ref-course{min-width:0;padding:10px}
 .site-product[data-pathway="edutest"] .ref-course-copy{padding:14px 4px 8px;min-width:0}
 .site-product[data-pathway="edutest"] .ref-course h3{font-size:18px;line-height:1.4;overflow-wrap:anywhere}
 .site-product[data-pathway="edutest"] .ref-course p{font-size:16px;line-height:1.6}
 .site-product[data-pathway="edutest"] .ref-course .btn{max-width:100%;white-space:normal;text-align:center;font-size:14px;padding:10px 12px}
}

/* Align the pathway selector with the start of the neighbouring introduction. */
.site-home #welcome>.ref-start-box{align-self:start;margin-top:0;height:auto}

/* Align the selector to the highlighted introduction paragraph and final feature row. */
@media(min-width:901px){
 .site-home #welcome{display:grid;grid-template-columns:minmax(0,1fr) 286px;column-gap:36px;row-gap:28px;align-items:start}
 .site-home #welcome>.study-welcome-copy,.site-home #welcome .welcome-intro-copy{display:contents}
 .site-home #welcome .welcome-heading{grid-column:1;grid-row:1}
 .site-home #welcome .welcome-heading h2{margin-bottom:0}
 .site-home #welcome .welcome-intro-copy>p{grid-column:1;grid-row:2;margin:0!important}
 .site-home #welcome #why-viptest{grid-column:1;grid-row:3;padding:0;margin:0;align-self:start}
 .site-home #welcome #why-viptest>article{padding:0!important}
 .site-home #welcome>.ref-start-box{grid-column:2;grid-row:2 / 4;align-self:stretch!important;margin:0;height:auto;min-height:0;box-sizing:border-box;padding:20px!important;display:flex!important;flex-direction:column;justify-content:center;gap:12px}
 .site-home #welcome .welcome-selector-intro>.eyebrow{font-size:11px!important;margin:0 0 8px!important}
 .site-home #welcome .welcome-selector-intro h3{font-size:21px!important;line-height:1.3!important;margin:0 0 10px!important}
 .site-home #welcome .welcome-selector-intro p{font-size:14px!important;line-height:1.6!important;margin:0!important}
 .site-home #welcome>.ref-start-box>label{font-size:12px!important;margin:8px 0 0!important}
 .site-home #welcome .welcome-selector-actions{display:flex;flex-direction:column;gap:10px;align-self:stretch}
 .site-home #welcome .welcome-selector-actions select{height:44px;min-height:44px;padding:8px 10px;font-size:16px;margin:0}
 .site-home #welcome .welcome-selector-actions .btn{margin:0!important;min-height:44px!important;padding:10px 8px!important;font-size:13px!important;line-height:1.3}
 .site-home #welcome .welcome-selector-actions small{margin:0!important;font-size:11px!important;line-height:1.5!important}
}
@media(max-width:900px){.site-home #welcome .welcome-intro-copy,.site-home #welcome .welcome-heading{display:block}.site-home #welcome>.ref-start-box{margin-top:0;height:auto}}

