/* Clever Ape Academy — mobile app shell, additive to the existing theme. */
.caa-app-nav{display:none}
.caa-icon-library{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.caa-ui-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round;flex:none}
.caa-contact-floats{position:fixed;right:22px;bottom:24px;display:flex;flex-direction:column;align-items:center;gap:12px;z-index:95}
.caa-float-link{display:grid;place-items:center;width:54px;height:54px;border:2px solid #fff;border-radius:19px;color:#fff;box-shadow:0 12px 32px rgba(3,31,66,.2);transition:transform .2s ease,box-shadow .2s ease}
.caa-float-link:hover{transform:translateY(-3px);box-shadow:0 16px 36px rgba(3,31,66,.25);color:#fff}
.caa-float-link:focus-visible,.caa-app-nav a:focus-visible{outline:3px solid #ffbd59;outline-offset:3px}
.caa-float-link .caa-ui-icon{width:26px;height:26px;stroke-width:1.9}
.caa-float-whatsapp{background:#16ad64}
.caa-float-phone{background:var(--g,#1a73e8)}
@media (max-width:767px){
  :root{--caa-dock-height:72px}
  html{scroll-padding-top:84px}
  body{background:#f7faff;padding-bottom:calc(var(--caa-dock-height) + env(safe-area-inset-bottom,0px))}
  .site-header{position:sticky;top:0;z-index:110;background:rgba(255,255,255,.97);box-shadow:0 3px 18px rgba(3,31,66,.055)}
  .site-header .topbar{display:none}
  .site-header .nav-wrap{position:relative;top:auto;background:rgba(255,255,255,.96);border-bottom:1px solid #e9eff8;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
  .site-header .nav-inner{min-height:68px;gap:12px}
  .site-header .brand{min-width:0;max-width:calc(100% - 64px)}
  .site-header .brand img{max-width:165px;max-height:46px;object-fit:contain}
  .site-header .menu-toggle{display:grid;align-content:center;justify-items:center;flex:none;width:44px;height:44px;margin-left:auto;border:1px solid #e2ebf8;border-radius:14px;background:#f0f6ff;cursor:pointer}
  .site-header .menu-toggle span{margin:3px 0;width:22px;height:2px;border-radius:2px}
  .site-header .main-nav{top:calc(100% + 6px);left:14px;right:14px;max-height:calc(100vh - 164px);max-height:calc(100dvh - 164px);border:1px solid #e0e9f5;border-radius:20px;padding:12px;box-shadow:0 20px 48px rgba(3,31,66,.17);overscroll-behavior:contain}
  .site-header .main-nav>ul>li>a{min-height:44px;border-radius:10px}
  .site-header .main-nav>ul>li>a:hover{background:#eef5ff}
  .site-header .main-nav .submenu{border-radius:12px}
  .course-jumpbar,.catalog-jumpbar{top:68px}
  .home-hero,.hero{padding:32px 0 38px;background:linear-gradient(145deg,#eaf3ff 0%,#f8fbff 56%,#fff 100%)}
  .home-hero:before{width:230px;height:230px;right:-86px;top:-85px}
  .home-hero-grid,.hero-grid,.course-hero-grid{gap:23px}
  .home-hero h1,.hero h1{font-size:clamp(32px,9.2vw,43px);line-height:1.09;letter-spacing:-.035em;margin-bottom:16px}
  .home-hero p,.hero p,.course-hero p,.page-hero p{font-size:16px;line-height:1.65}
  .home-hero .kicker,.hero .kicker{font-size:11px;letter-spacing:.08em}
  .home-hero .actions,.hero .actions{display:grid;grid-template-columns:1fr;gap:10px}
  .home-hero .actions .btn,.hero .actions .btn{width:100%;min-height:49px;border-radius:13px;font-size:14px;text-align:center}
  .home-hero-visual,.hero-media{border-radius:21px;padding:8px;box-shadow:0 16px 38px rgba(3,31,66,.095)}
  .home-hero-visual img,.hero-media img{border-radius:15px}
  .trust{margin-top:19px;gap:8px}
  .trust span{padding:6px 10px;border-radius:999px;border:1px solid #dceafe;background:#fff;color:#20538f;font-size:11px;line-height:1.4}
  .section{padding:44px 0}
  .section-head,.section-heading{margin-bottom:23px;text-align:left}
  .section-head h2,.section-heading h2,.cta-box h2{font-size:clamp(26px,7.5vw,34px);line-height:1.16}
  .category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
  .category-card{min-height:190px;padding:15px;border-radius:18px;box-shadow:0 7px 18px rgba(3,31,66,.035)}
  .category-card h3{font-size:17px;line-height:1.2;margin:31px 0 8px;overflow-wrap:break-word}
  .category-card p{font-size:12.5px;line-height:1.48}
  .category-arrow{width:29px;height:29px;top:12px;right:12px;font-size:14px}
  .course-grid,.feature-grid,.module-grid{gap:14px}
  .course-card{border-radius:20px;box-shadow:0 9px 28px rgba(3,31,66,.055)}
  .course-card:hover,.category-card:hover{transform:none}
  .course-body{padding:18px}
  .course-body h3{font-size:21px}
  .course-body p{font-size:14px}
  .feature,.module-card{padding:19px;border-radius:17px}
  .course-hero,.page-hero{padding:35px 0 38px}
  .course-hero h1,.page-hero h1{font-size:clamp(30px,8.5vw,42px)}
  .cta-box{border-radius:21px;padding:25px}
  .site-footer{padding-top:38px}
  .footer-grid{gap:20px}
  .caa-app-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;position:fixed;left:0;right:0;bottom:0;height:calc(var(--caa-dock-height) + env(safe-area-inset-bottom,0px));padding:7px max(7px,env(safe-area-inset-right,0px)) calc(7px + env(safe-area-inset-bottom,0px)) max(7px,env(safe-area-inset-left,0px));background:rgba(255,255,255,.97);border-top:1px solid #e0eafa;border-radius:22px 22px 0 0;box-shadow:0 -12px 34px rgba(3,31,66,.115);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);z-index:130}
  .caa-app-nav a{display:flex;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:14px;padding:5px 2px;color:#64758c;font:600 10px/1.2 Jost,Arial,sans-serif;white-space:nowrap;transition:background .16s ease,color .16s ease}
  .caa-app-nav a .caa-ui-icon{width:22px;height:22px}
  .caa-app-nav a[aria-current="page"]{background:#e8f2ff;color:#075ab8}
  .caa-app-nav a:active{background:#dfecff}
  .caa-contact-floats{right:14px;bottom:calc(var(--caa-dock-height) + env(safe-area-inset-bottom,0px) + 15px);gap:10px;z-index:125}
  .caa-float-link{width:49px;height:49px;border-radius:17px;box-shadow:0 9px 24px rgba(3,31,66,.19)}
  .caa-float-link .caa-ui-icon{width:24px;height:24px}
}
@media(max-width:350px){
  .category-grid{grid-template-columns:1fr}
  .category-card{min-height:145px}
  .caa-app-nav a{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
  .caa-float-link,.caa-app-nav a{transition:none}
}

/* Course pages, older PHP legacy routes and editorial templates share a mobile dock. */
@media(max-width:767px){
  body{overflow-x:clip;-webkit-text-size-adjust:100%}
  main,main>*{min-width:0}
  main :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){font-size:16px;max-width:100%}
  main :is(.btn,.caa-cta,button[type="submit"]){min-height:44px}
  main :is(img,video,iframe){max-width:100%}
  main :is(pre,.caa-table){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .caa-app-nav a{touch-action:manipulation}
  .caa-contact-floats{pointer-events:none}
  .caa-contact-floats>a{pointer-events:auto}
  .tp-header-area,.tp-header-2{max-width:100%}
  .caa-rich-footer .caa-footer-wrap{padding:36px 0 26px}
  .caa-rich-footer .caa-footer-grid{grid-template-columns:minmax(0,1fr);gap:18px}
  .caa-rich-footer .caa-footer-bottom{margin-top:20px;gap:8px}
  .caa-header{z-index:110;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
  .caa-header .caa-header-inner{min-height:68px;gap:8px}
  .caa-header .caa-logo{min-width:0}
  .caa-header .caa-logo img{width:146px;max-height:44px;object-fit:contain}
  .caa-header .caa-mobile-menu{display:grid;place-items:center;margin-left:auto;width:44px;height:44px;border:1px solid #dfe8f5;border-radius:13px;background:#eff5ff;color:#123d73;font-size:23px}
  .caa-header .caa-nav{top:68px;left:12px;right:12px;border:1px solid #dde9f7;border-radius:17px;box-shadow:0 17px 45px rgba(3,31,66,.16);max-height:calc(100dvh - 165px);overflow-y:auto;overscroll-behavior:contain;z-index:115}
  .caa-header .caa-nav a{padding:11px 8px}
  .caa-blog-wrap{padding-bottom:40px}
  .caa-side-card{border-radius:18px;padding:19px}
  .caa-article,.news-article{overflow-wrap:anywhere}
  .caa-article :is(h2,h3){line-height:1.25}
  .caa-breadcrumb{padding:32px 0}
  .caa-breadcrumb h1{font-size:clamp(27px,8vw,37px)}
  .news-layout{min-width:0}
  .news-side-card{border-radius:18px}
}
@media(max-width:767px) and (max-height:580px){
  .caa-contact-floats{gap:6px;bottom:calc(var(--caa-dock-height) + env(safe-area-inset-bottom,0px) + 8px)}
  .caa-float-link{width:43px;height:43px}
}

/* First-party information pages replace old third-party demo layouts. */
.caa-info-hero{background:linear-gradient(135deg,#edf5ff 0%,#fff 74%)}
.caa-info-hero-inner{display:grid;grid-template-columns:1.12fr .88fr;align-items:center;gap:42px}
.caa-info-hero .actions{margin-top:24px}
.caa-info-featured{border:1px solid #d8e6fa;border-radius:25px;padding:36px;background:linear-gradient(140deg,#fff,#f0f7ff);box-shadow:0 19px 44px rgba(3,31,66,.09)}
.caa-info-featured h2{margin:8px 0 24px;color:var(--ink);font-size:clamp(27px,3.3vw,42px);line-height:1.14;letter-spacing:-.025em}
.caa-info-featured h3{font-size:29px;color:var(--ink);margin:9px 0 14px}
.caa-info-featured p{margin:0 0 20px}
.caa-info-pill-row{display:flex;flex-wrap:wrap;gap:8px}
.caa-info-pill-row span{padding:8px 12px;border-radius:999px;background:#e1edff;color:#21538f;font-size:13px;font-weight:700}
.caa-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px}
.caa-info-card{min-width:0;border:1px solid #dfe8f5;border-radius:22px;padding:28px;background:#fff;box-shadow:0 11px 31px rgba(3,31,66,.045);transition:transform .16s ease}
.caa-info-card:hover{transform:translateY(-3px)}
.caa-info-card h3{margin:7px 0 13px;color:var(--ink);font-size:24px;line-height:1.22}
.caa-info-card p{margin:0 0 20px}
.caa-info-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#eaf3ff;color:#125fbf;font-size:24px;font-weight:700}
.caa-email-wrap{overflow-wrap:anywhere}
.caa-location-grid{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:35px}
.caa-location-grid h2{font-size:clamp(28px,3.5vw,44px);color:var(--ink);margin:6px 0 15px}
.caa-location-grid .actions{margin-top:20px}
.caa-faq-wrap{max-width:930px}
.caa-faq-item{border:1px solid #dce7f5;border-radius:16px;margin-bottom:13px;background:#fff;box-shadow:0 6px 18px rgba(3,31,66,.04);overflow:hidden}
.caa-faq-item summary{position:relative;cursor:pointer;list-style:none;min-height:62px;display:flex;align-items:center;padding:18px 54px 18px 20px;color:var(--ink);font-size:18px;font-weight:700;line-height:1.35}
.caa-faq-item summary::-webkit-details-marker{display:none}
.caa-faq-item summary:after{content:"+";position:absolute;right:20px;font-size:27px;color:var(--g)}
.caa-faq-item[open] summary:after{content:"−"}
.caa-faq-answer{padding:0 20px 22px;line-height:1.7}
.caa-faq-item summary:focus-visible{outline:3px solid #ffbf5c;outline-offset:-3px}
@media(max-width:900px){.caa-info-hero-inner{grid-template-columns:1fr}.caa-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.caa-location-grid{grid-template-columns:1fr}}
@media(max-width:640px){
  .caa-info-hero-inner,.caa-location-grid{gap:20px}
  .caa-info-grid{grid-template-columns:1fr;gap:13px}
  .caa-info-featured{padding:23px;border-radius:20px}
  .caa-info-card{padding:22px;border-radius:18px}
  .caa-info-card h3{font-size:22px}
  .caa-info-hero .actions{display:grid;grid-template-columns:1fr}
  .caa-info-hero .actions .btn{width:100%;min-height:48px}
  .caa-faq-item summary{font-size:16px;min-height:55px}
}
