/* AHD app shell (v4.18.0) — tab bar, transitions, install sheet, app touch feel. */
:root{--ahd-bar-h:64px;--ahd-ink:#121212;--ahd-khaki:#c9ae7e;--ahd-red:#9e1b32}

/* ---------- smooth page transitions (Chrome, Edge, Safari 18+) ---------- */
@view-transition{navigation:auto}
::view-transition-old(root){animation:ahd-out .16s ease-in both}
::view-transition-new(root){animation:ahd-in .22s cubic-bezier(.2,.7,.2,1) both}
@keyframes ahd-out{to{opacity:0;transform:translateY(-6px)}}
@keyframes ahd-in{from{opacity:0;transform:translateY(10px)}}
.topbar,.blog-top{view-transition-name:ahd-topbar}
nav.ahd-tabbar{view-transition-name:ahd-tabbar}
@media (prefers-reduced-motion:reduce){::view-transition-old(root),::view-transition-new(root){animation:none}}

/* ---------- app touch feel ---------- */
html{-webkit-tap-highlight-color:transparent;scroll-behavior:smooth}
a,button{touch-action:manipulation}
.btn,.ap-btn,.local-btn,.pz-card .btn,a.primary,a.secondary{transition:transform .12s ease,filter .12s ease}
.btn:active,.ap-btn:active,.local-btn:active,a.primary:active,a.secondary:active{transform:scale(.97);filter:brightness(.95)}

/* ---------- one tab bar on every page ---------- */
nav.ahd-tabbar{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;z-index:60!important;
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important;align-items:stretch!important;
  margin:0!important;padding:6px 6px calc(6px + env(safe-area-inset-bottom))!important;min-height:var(--ahd-bar-h)!important;width:auto!important;max-width:none!important;
  background:rgba(18,18,18,.94)!important;-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);
  border-top:1px solid rgba(201,174,126,.35)!important;box-shadow:0 -8px 24px rgba(0,0,0,.18)!important;transform:none!important}
html body nav.ahd-tabbar a{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;
  min-height:50px!important;padding:4px 2px!important;margin:0!important;border-radius:12px!important;background:transparent!important;
  color:#cfc3ad!important;text-decoration:none!important;font:800 10.5px/1.1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;letter-spacing:.02em!important;text-transform:none!important;box-shadow:none!important}
html body nav.ahd-tabbar a i{color:inherit!important;opacity:1!important;font-style:normal!important;font-size:19px!important;line-height:1!important;display:block!important}
html body nav.ahd-tabbar a span{color:inherit!important;opacity:1!important;font:inherit!important;display:block!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
html body nav.ahd-tabbar a[aria-current="page"]{color:#fff!important;background:rgba(201,174,126,.16)!important}
html body nav.ahd-tabbar a[aria-current="page"] i{color:var(--ahd-khaki)!important}
html body nav.ahd-tabbar a.nav-start{background:var(--ahd-red)!important;color:#fff!important}
nav.ahd-tabbar a:active{transform:scale(.94)}
body.has-ahd-tabbar{padding-bottom:calc(var(--ahd-bar-h) + env(safe-area-inset-bottom) + 8px)!important}
/* the old bars this replaces */
.blog-bottom:not(.ahd-tabbar),.ahd-student-bottom{display:none!important}
/* wide screens: top tabs do the job where a page has them */
@media (min-width:1100px){
  body:has(.topbar .tabs) nav.ahd-tabbar{display:none!important}
  body:has(.topbar .tabs).has-ahd-tabbar{padding-bottom:0!important}
  nav.ahd-tabbar{left:50%!important;right:auto!important;transform:translateX(-50%)!important;bottom:14px!important;width:520px!important;border:1px solid rgba(201,174,126,.35)!important;border-radius:18px!important;padding:6px!important}
}

/* ---------- installed app mode ---------- */
html.ahd-standalone .seo-program-strip{display:none!important}
html.ahd-standalone .topbar,html.ahd-standalone .blog-top{padding-top:env(safe-area-inset-top)}
html.ahd-standalone .footer-links,html.ahd-standalone .footer-contact span{display:none!important}
.drawer-install{color:var(--ahd-khaki)!important;font-weight:900!important}
html.ahd-standalone .drawer-install{display:none!important}

/* ---------- install sheet (opens only when tapped) ---------- */
.ahd-sheet{position:fixed;inset:0;z-index:90;display:none;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.5);padding:12px}
.ahd-sheet.show{display:flex}
.ahd-sheet-card{position:relative;width:100%;max-width:420px;background:#fffdfa;color:var(--ahd-ink);border-radius:22px;padding:24px 22px calc(18px + env(safe-area-inset-bottom));text-align:center;animation:ahd-up .22s cubic-bezier(.2,.7,.2,1)}
@keyframes ahd-up{from{transform:translateY(30px);opacity:0}}
.ahd-sheet-card img{border-radius:16px}
.ahd-sheet-card h2{font-size:22px;letter-spacing:-.02em;margin:10px 0 12px}
.ahd-sheet-card ol{text-align:left;margin:0 auto 16px;padding-left:22px;line-height:1.6;max-width:320px}
.ahd-sheet-x{position:absolute;top:8px;right:10px;border:0;background:none;font-size:28px;line-height:1;color:#6d6255;cursor:pointer}
.ahd-sheet-ok{width:100%;border:0;border-radius:14px;background:var(--ahd-red);color:#fff;font-weight:900;letter-spacing:.06em;padding:15px;cursor:pointer}

/* ---------- lean app header on phones/tablets: one top bar, one tab bar ---------- */
@media (max-width:1099px){
  body.has-ahd-tabbar .tabs-mobile,body.has-ahd-tabbar .ahd-academy-ribbon{display:none!important}
  .seo-program-strip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px!important;padding:5px 12px!important;letter-spacing:.09em!important}
}
.ahd-sheet{z-index:1000}

/* 6-tab public bar (Oct 2026: Tools added) */
nav.ahd-tabbar.bottom-6,nav.bottom.bottom-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.bottom-6 .nav-start i,.bottom.bottom-6 .nav-start span{color:#fff}
.bottom-6 .nav-start{box-shadow:none}
@media(max-width:380px){.ahd-tabbar.bottom-6 a span{font-size:10px!important}}
/* Thumb-size touch areas for small text links (phone path test, Oct 11). Padding only; the look is unchanged. */
.lp-crumbs a,a.lp-all,.academy-promise a:not(.btn),.pt-decide a:not(.btn),.pt-free a:not(.btn),.gc-pillar-cta a,.al-course b a,.ahd-done-help{display:inline-block;padding-top:11px;padding-bottom:11px}
