/* V20: language links, mobile menu, section progress, talking helmet assistant */
#sbh .lang a{display:inline-flex;align-items:center;font:700 13px var(--display);color:#C9D5E2;padding:9px 12px;text-decoration:none}
#sbh .lang a[aria-current="page"]{background:#fff;color:#0B2545}
@media (max-width:440px){#sbh .lang a{padding:7px 8px;font-size:12px}}

/* mobile menu */
#sbh .menu-panel{display:none}
@media (max-width:1180px){
 #sbh .menu-panel{position:absolute;left:0;right:0;top:100%;z-index:30;background:#0B2545;border-top:1px solid rgba(255,255,255,.12);padding:8px 16px 16px;box-shadow:0 18px 30px rgba(11,37,69,.35)}
 #sbh .menu-panel.open{display:block}
 #sbh .menu-panel a{display:block;padding:14px 4px;border-bottom:1px solid rgba(255,255,255,.1);color:#fff;font:600 16px var(--body);text-decoration:none}
 #sbh .menu-panel a.cta{margin-top:12px;border:0;text-align:center;border-radius:8px;background:linear-gradient(180deg,#FF7A2F,#F4561C)}
 #sbh header{position:relative}
}

/* progress bar */
.sb-progress{position:fixed;left:0;top:0;height:4px;width:100%;z-index:60;background:transparent;pointer-events:none}
.sb-progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#F4561C,#FF7A2F)}

/* section numbers */
.sb-num{display:inline-block;font:800 12px "Montserrat",system-ui,sans-serif;letter-spacing:.14em;color:#F4561C;margin-right:10px}

/* side dots (desktop) */
.sb-dots{position:fixed;right:18px;top:50%;transform:translateY(-50%);z-index:40;display:flex;flex-direction:column;gap:10px}
.sb-dots a{display:flex;align-items:center;justify-content:flex-end;gap:8px;text-decoration:none}
.sb-dots a b{width:10px;height:10px;border-radius:50%;border:2px solid #9FB3C8;background:#fff;transition:.2s}
.sb-dots a span{opacity:0;transform:translateX(6px);transition:.2s;font:700 11px "Inter",system-ui,sans-serif;color:#0B2545;background:#fff;border:1px solid #E3EAF2;border-radius:6px;padding:4px 8px;white-space:nowrap;box-shadow:0 6px 16px rgba(11,37,69,.12)}
.sb-dots a:hover span,.sb-dots a:focus-visible span{opacity:1;transform:none}
.sb-dots a.on b{background:#F4561C;border-color:#F4561C;transform:scale(1.25)}
@media (max-width:1180px){.sb-dots{display:none}}

/* mobile section chip + back to top */
.sb-chip{position:fixed;left:12px;bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:40;display:none;align-items:center;gap:8px;background:#0B2545;color:#fff;border-radius:999px;padding:9px 14px;font:700 12px "Inter",system-ui,sans-serif;box-shadow:0 10px 24px rgba(11,37,69,.3);text-decoration:none;opacity:0;transition:opacity .2s}
.sb-chip b{color:#FF8A4C}
.sb-chip.show{opacity:1}
@media (max-width:1180px){.sb-chip{display:inline-flex}}

/* talking helmet assistant */
.chat-launcher.sb-helmet{width:86px;height:86px;background:transparent;border:0;box-shadow:none;right:20px;bottom:20px;padding:0;overflow:visible}
.chat-launcher.sb-helmet .chat-logo{width:100%;height:100%;object-fit:contain;border-radius:0;filter:drop-shadow(0 10px 18px rgba(11,37,69,.35));transform-origin:50% 90%}
.chat-launcher.sb-helmet::before{content:"";position:absolute;inset:12% 6% 0;border-radius:50%;background:radial-gradient(circle,rgba(255,122,47,.35),rgba(255,122,47,0) 70%);z-index:-1}
.chat-launcher.sb-helmet .chat-pulse{right:10px;top:12px}
.chat-launcher.sb-helmet.talking .chat-logo{animation:sbNod .45s ease-in-out infinite alternate}
.sb-bubble{position:fixed;right:112px;bottom:46px;z-index:51;max-width:240px;background:#fff;color:#0B2545;border:1px solid #E3EAF2;border-radius:14px 14px 4px 14px;padding:12px 34px 12px 14px;font:600 14px/1.35 "Inter",system-ui,sans-serif;box-shadow:0 14px 34px rgba(11,37,69,.22);opacity:0;transform:translateY(8px);transition:.3s;pointer-events:none}
.sb-bubble.show{opacity:1;transform:none;pointer-events:auto}
.sb-bubble b{color:#F4561C}
.sb-bubble button{position:absolute;right:6px;top:4px;border:0;background:none;font-size:18px;color:#7E8EA0;cursor:pointer}
@media (prefers-reduced-motion:no-preference){.chat-launcher.sb-helmet .chat-logo{animation:sbBob 3.2s ease-in-out infinite}}
@keyframes sbBob{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-4px) rotate(-3deg)}}
@keyframes sbNod{from{transform:rotate(-6deg)}to{transform:rotate(5deg)}}
@media (max-width:620px){.chat-launcher.sb-helmet{width:64px;height:64px;right:10px;bottom:10px}.sb-bubble{right:80px;bottom:24px;max-width:200px;font-size:13px}}

/* voice controls in the assistant panel */
.sb-voice{display:flex;gap:8px;padding:10px 15px;border-top:1px solid #E3EAF2;background:#F7FAFC}
.sb-voice button{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;border:1px solid #CBD7E4;background:#fff;color:#0B2545;border-radius:8px;padding:9px 8px;font:700 12.5px "Inter",system-ui,sans-serif;cursor:pointer}
.sb-voice button[aria-pressed="true"]{background:#0B2545;color:#fff;border-color:#0B2545}
.sb-voice small{display:block;width:100%;font-size:11px;color:#5D6F84}
#sbh nav a{white-space:nowrap}
#sbh .sbhw small{white-space:normal}
@media (max-width:1320px){#sbh nav{gap:0}#sbh nav a{padding:8px 7px;font-size:14px}}

/* V21: dominant logo mark */
#sbh .sbhb img{height:100px}
#sbh .hb{min-height:116px}
@media (max-width:1180px){#sbh .sbhb img{height:80px}}
@media (max-width:620px){#sbh .hb{min-height:84px}#sbh .sbhb img{height:60px}#sbh .sbhb{gap:8px}}
@media (max-width:440px){#sbh .sbhb img{height:52px}#sbh .sbhw b{font-size:19px}}
@media (max-width:370px){#sbh .sbhb img{height:44px}#sbh .sbhw b{font-size:17px}}

/* V21: phone landscape — photo pinned top-right at its own scale (arm stays visible), sample card under it */
@media (max-height:520px) and (orientation:landscape){
 #sbh .hb{min-height:80px}
 #sbh .sbhb img{height:66px}
 #sbh .hero{background:linear-gradient(180deg,#EEF5FC,#fff 75%);min-height:0}
 #sbh .hero::before{display:none}
 #sbh .hero>.wrap,#sbh .hgrid{position:static}
 #sbh .hgrid{max-width:46%;padding-block:10px 32px}
 #sbh .mphoto{display:block;position:absolute;z-index:1;right:0;top:var(--sbhh,84px);width:54%;height:auto;aspect-ratio:1672/940;margin:0;background:url(assets/hero-bright.webp) center/cover no-repeat;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16%);mask-image:linear-gradient(90deg,transparent 0,#000 16%)}
 #sbh .card{display:block;position:absolute;z-index:2;left:auto;right:16px;bottom:auto;top:calc(var(--sbhh,84px) + 54vw*940/1672 + 16px);width:min(340px,calc(54% - 40px));margin:0}
 #sbh .ribbon{font-size:12px}
}

/* long words never spill out of cards; hide the scrollbar strip on touch screens */
h1,h2,h3,h4,.card,[class*=card] *{overflow-wrap:break-word;hyphens:auto}
@media (pointer:coarse){html{scrollbar-width:none}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}}
@media (max-height:520px) and (orientation:landscape) and (max-width:820px){#playbooks [class*=grid]{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
#sbh .btn.hdr{white-space:nowrap}
@media (max-width:400px){#sbh .sbhb img{height:44px}#sbh .sbhw b{font-size:17px}#sbh .sbhw small{font-size:6.5px;letter-spacing:.06em}#sbh .hb{gap:6px}}
@media (max-height:520px) and (orientation:landscape){#sbh .hb{gap:12px}#sbh .btn.hdr{padding-inline:14px}#sbh .sbhw b{font-size:24px}}
@media (max-height:520px) and (orientation:landscape){#sbh .sbhw small{font-size:9px;letter-spacing:.1em}#sbh .sbhw em{font-size:9px;letter-spacing:.14em}}
@media (max-height:520px) and (orientation:landscape) and (max-width:760px){html[lang^=es] #sbh .btn.hdr{display:none}}
@media (min-width:1181px){html[lang^=es] #sbh .btn.hdr{white-space:normal;max-width:170px;text-align:center}}
@media (min-width:1181px){html[lang^=es] #sbh .hb{gap:14px}html[lang^=es] #sbh nav a{padding:8px 8px;font-size:14px}}
@media (min-width:1181px) and (max-width:1320px){#sbh .sbhb img{height:80px}#sbh .sbhw b{font-size:32px}html[lang^=es] #sbh nav a{padding:8px 6px;font-size:13.5px}}
@media (min-width:1181px) and (max-width:1260px){html[lang^=es] #sbh nav a[href="#trades"]{display:none}}
/* V21: mic recording state — red, countdown, time bar */
.sb-voice button.listening{position:relative;overflow:hidden;flex-wrap:wrap;background:#D7263D;border-color:#D7263D;color:#fff;box-shadow:0 0 0 0 rgba(215,38,61,.5);animation:sbMic 1.4s ease-out infinite}
.sb-voice button.listening::after{content:"";position:absolute;left:0;bottom:0;height:3px;width:var(--sbp,100%);background:#fff;transition:width 1s linear}
.sb-voice button.listening small{display:block;width:100%;font-size:10px;font-weight:600;color:#FFD9DE;text-align:center}
.sb-rec{width:9px;height:9px;border-radius:50%;background:#fff;animation:sbBlink 1s steps(2) infinite}
@keyframes sbMic{to{box-shadow:0 0 0 10px rgba(215,38,61,0)}}
@keyframes sbBlink{50%{opacity:.2}}
@media (max-width:520px){html[lang^=es] #sbh .sbhw small{font-size:6px;letter-spacing:.03em}html[lang^=es] #sbh .sbhb img{height:42px}html[lang^=es] #sbh .hb{gap:6px}}
@media (max-width:900px){html[lang^=es] #sbh .btn.hdr{display:none}}
@media (min-width:621px) and (max-width:860px){#sbh .sbhb img{height:62px}#sbh .sbhw b{font-size:26px}#sbh .hb{gap:12px}}
@media (min-width:621px) and (max-width:700px){#sbh .sbhb img{height:52px}#sbh .sbhw b{font-size:22px}#sbh .btn.hdr{padding:0 12px;font-size:13px}}
@media (min-width:621px) and (max-width:640px){#sbh .sbhw small{font-size:8px;letter-spacing:.08em}#sbh .sbhw em{font-size:8px;letter-spacing:.1em}}
@media (max-height:520px) and (orientation:landscape) and (max-width:660px){#sbh .sbhb img{height:50px}#sbh .sbhw b{font-size:20px}#sbh .sbhw small,#sbh .sbhw em{font-size:7.5px}}
/* V22: adaptive header steps (set by v20.js only when the row does not fit) */
#sbh header.sb-t1 .sbhw small,#sbh header.sb-t1 .sbhw em{display:none}
#sbh header.sb-t1 .btn.hdr{display:none}
#sbh header.sb-t2 .sbhb img{height:36px}
#sbh header.sb-t2 .hb{gap:6px}
#sbh header.sb-t3 .hb{flex-wrap:wrap;row-gap:0;padding-bottom:8px}#sbh header.sb-t3 .lang{order:5;flex-basis:100%;display:flex;justify-content:flex-end;border:0;background:none}#sbh header.sb-t3 .lang a{border:1px solid rgba(255,255,255,.35);padding:5px 14px;font-size:12px}#sbh header.sb-t3 .lang a:first-child{border-radius:6px 0 0 6px}#sbh header.sb-t3 .lang a:last-child{border-radius:0 6px 6px 0;border-left:0}
#sbh .menu-panel .menu-lang{display:flex;gap:0;margin:6px 0 4px;border:1px solid rgba(255,255,255,.3);border-radius:8px;overflow:hidden;width:max-content}
#sbh .menu-panel .menu-lang a{border:0;padding:10px 18px;font:700 14px Montserrat,system-ui,sans-serif;color:#C9D5E2}
#sbh .menu-panel .menu-lang a[aria-current="page"]{background:#fff;color:#0B2545}
#sbh header.sb-t3.sb-measure .lang{flex-basis:auto;order:0}
@media (min-width:1321px){#sbh .sbhb img{height:88px}#sbh .hb{gap:16px}#sbh nav a{padding:8px 9px}html[lang^=es] #sbh nav a{padding:8px 7px;font-size:14px}}
@media (min-width:1181px){html[lang^=es] #sbh .sbhw small{letter-spacing:.1em}}
