/* Alex shares the editorial palette and never changes the evidence graphics. */
:root{--alex-ink:#203d48;--alex-paper:#fffdf5;--alex-brass:#9d8355}
.alex-topbar{display:flex;align-items:center;gap:8px;border:0;background:none;color:#3a5356;cursor:pointer;padding:6px;font:11px Arial,sans-serif;white-space:nowrap}
.alex-topbar>span{display:grid;place-items:center;border:1px solid #b8ac8a;background:#ede9d9;border-radius:50%;width:27px;height:27px;font:18px Georgia}.alex-topbar>b{font-size:10px;font-weight:500}
#alex-guide{position:fixed;right:24px;bottom:24px;z-index:95;font-family:Arial,sans-serif;color:var(--alex-ink)}
#alex-guide [hidden]{display:none!important}#alex-guide button,#alex-guide a,#alex-guide summary{touch-action:manipulation}
#alex-guide button{font-family:inherit;cursor:pointer}#alex-guide button:focus-visible,#alex-guide a:focus-visible,#alex-guide summary:focus-visible,.alex-topbar:focus-visible{outline:3px solid #aa7c33;outline-offset:4px}
.alex-sprite{display:block;background-image:image-set(url("assets/alex/alex-poses-light-768.webp") 1x,url("assets/alex/alex-poses-light-1536.webp") 2x);background-size:300% 100%;background-repeat:no-repeat;width:100px;height:200px;pointer-events:none}
.alex-sprite.pose-welcome{background-position:0 0}.alex-sprite.pose-present{background-position:50% 0}.alex-sprite.pose-walk{background-position:100% 0}
.alex-launcher{border:1px solid #c6c9bb;border-radius:40px;background:#fffdf6;display:flex;align-items:center;gap:10px;padding:8px 15px 8px 8px;min-height:62px;box-shadow:0 5px 22px #223b4824;text-align:left;color:var(--alex-ink)}
.alex-launcher-portrait{height:44px;width:44px;overflow:hidden;border-radius:50%;background:#e8e5d9;position:relative;flex:none;border:1px solid #ded9c9}
.alex-launcher-portrait .alex-sprite{width:54px;height:108px;position:absolute;left:-5px;top:-2px}
.alex-launcher b,.alex-launcher small{display:block}.alex-launcher b{font:22px/1.1 Georgia}.alex-launcher small{font-size:10px;margin-top:4px;color:#627273}.alex-launcher i{font-style:normal;margin-left:4px;color:#8e7953}
.alex-panel{width:365px;background:var(--alex-paper);border:1px solid #b8b9a5;border-top:3px solid #ae9564;box-shadow:0 18px 70px #1c34392b,0 3px 12px #1c343912;position:relative;animation:alex-entrance .4s cubic-bezier(.2,.7,.2,1)}
.alex-companion{position:absolute;left:-110px;bottom:10px;width:115px;height:230px;filter:drop-shadow(0 5px 4px #293d4120);animation:alex-arrive .65s ease-out}
.alex-panel-header{display:flex;justify-content:space-between;align-items:center;padding:15px 19px;border-bottom:1px solid #e0dfd1;background:#f5f3e8}
.alex-panel-header>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.alex-panel-header b{font:26px Georgia}.alex-panel-header small{font-size:8px;letter-spacing:.13em;margin-left:4px;color:#6c7667}.alex-status-dot{width:6px;height:6px;border-radius:50%;background:#69846e}
.alex-close{width:38px;height:38px;font-size:25px;color:#53615b;background:none;border:0;margin:-4px -8px -4px 0}
.alex-scroll{padding:22px 22px 16px;max-height:min(500px,65dvh);overflow:auto;overscroll-behavior:contain}
.alex-kicker{font-size:8px;letter-spacing:.15em;font-weight:700;color:#927b50;margin-bottom:12px}
.alex-copy h2{font:400 26px/1.14 Georgia,serif;letter-spacing:-.025em;margin:0 0 13px;color:#27494b;max-width:100%;outline:none}
.alex-copy p{font-size:12px;line-height:1.85;color:#536664;margin:0 0 20px}
.alex-actions{display:flex;gap:14px;align-items:center;justify-content:space-between}
.alex-primary{display:inline-flex;align-items:center;justify-content:center;background:var(--alex-ink);border:1px solid var(--alex-ink);color:#fffdf3;font-size:11px;min-height:44px;padding:12px 17px;border-radius:2px}
.alex-primary:hover{background:#33545e}.alex-back,.alex-text{border:0;background:none;color:#5e746d;font-size:11px;min-height:44px;padding:10px 0}
.alex-step-track{display:flex;gap:4px;margin:0 0 20px}.alex-step-track>span{height:3px;flex:1;background:#e0e1d5}.alex-step-track>span.done{background:#a38c59}
.alex-locate{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #e5e3d7;background:none;color:#6e795e;font-size:10px;min-height:44px;padding:14px 0;margin:8px 0 0}
.alex-settings{margin-top:16px}.alex-settings summary{font-size:10px;color:#6c7770;cursor:pointer;padding:6px 0;min-height:28px}.alex-settings label{display:flex;gap:9px;font-size:11px;align-items:center;line-height:1.5;margin-top:12px}.alex-settings input{width:16px;height:16px;accent-color:#3d655d}.alex-settings p{font-size:10px;line-height:1.7;color:#7d8578;margin:5px 0}
.alex-panel-footer{padding:10px 17px;display:flex;gap:15px;justify-content:space-between;align-items:center;background:#f3f1e5;border-top:1px solid #dedfce;font-size:9px;line-height:1.5;color:#7a816e}.alex-panel-footer>button{border:0;background:none;min-height:30px;font-size:10px;color:#3d6259}
.alex-next-page{display:block;margin-top:18px;padding:12px 0;border-top:1px solid #d9dacd;font-size:11px;color:#4c6d61}
#main .alex-tour-target{outline:3px solid #ac8b47!important;outline-offset:7px;scroll-margin-top:120px;scroll-margin-bottom:440px;box-shadow:0 0 0 11px #b9a77720;transition:outline-color .2s}
#main{padding-bottom:100px}.alex-guide-open #main{padding-bottom:340px}
body:has(dialog[open]) #alex-guide{visibility:hidden}body:has(dialog[open]) .alex-tour-target{outline:none!important}
@keyframes alex-entrance{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes alex-arrive{0%{opacity:0;transform:translateX(35px) rotate(-3deg)}50%{opacity:1;transform:translateX(12px) translateY(-4px) rotate(1deg)}100%{transform:translateX(0) rotate(0)}}
@media(max-width:950px){#alex-guide{right:16px;bottom:16px}.alex-panel{width:340px}.alex-companion{width:86px;height:172px;left:-83px}.alex-topbar>b{display:none}}
@media(max-width:600px){#alex-guide{right:12px;bottom:12px;max-width:calc(100vw - 24px)}#alex-guide.is-open{left:12px}.alex-panel{width:100%}.alex-companion{width:70px;height:140px;left:auto;right:12px;bottom:auto;top:-105px}.alex-panel-header{padding:11px 15px;min-height:54px}.alex-panel-header b{font-size:23px}.alex-scroll{padding:16px 18px 12px;max-height:38dvh}.alex-copy h2{font-size:23px}.alex-copy p{font-size:12px;line-height:1.75;margin-bottom:14px}.alex-panel-footer{padding:7px 13px}.alex-panel-footer>span{font-size:8px}.alex-settings{margin-top:10px}.alex-launcher{min-height:54px;padding:5px 11px 5px 5px}.alex-launcher-portrait{width:40px;height:40px}.alex-launcher b{font-size:19px}.alex-launcher small{font-size:9px}.alex-launcher i{display:none}.alex-topbar{margin-left:auto}.alex-topbar>span{width:26px;height:26px}.topbar{gap:10px}#main .alex-tour-target{outline-offset:4px;scroll-margin-top:92px}.alex-guide-open #main{padding-bottom:400px}}
@media(max-height:620px){.alex-scroll{max-height:43dvh}.alex-companion{height:150px;width:75px;left:-75px}.alex-copy h2{font-size:22px}}
@media(prefers-reduced-motion:reduce){.alex-panel,.alex-companion{animation:none!important}#main .alex-tour-target{transition:none}}
@media print{#alex-guide,.alex-topbar{display:none!important}#main,.alex-guide-open #main{padding-bottom:0!important}.alex-tour-target{outline:none!important;box-shadow:none!important}}

/* The open guide occupies the navigation rail on wide screens.
   Keep lesson artwork, explanations and controls unobstructed. */
@media(min-width:1200px){
 #alex-guide.is-open{right:auto;left:8px;bottom:18px}
 .is-open .alex-panel{width:214px}
 .is-open .alex-panel-header{padding:11px 12px}
 .is-open .alex-panel-header small{font-size:7px;margin-left:0}
 .is-open .alex-panel-header b{font-size:23px}
 .is-open .alex-scroll{padding:17px 14px 13px;max-height:58dvh}
 .is-open .alex-copy h2{font-size:23px}
 .is-open .alex-copy p{font-size:11px}
 .is-open .alex-actions{gap:8px}
 .is-open .alex-primary{font-size:10px;padding:10px 12px}
 .is-open .alex-panel-footer{padding:8px 10px;gap:5px}
 .is-open .alex-panel-footer>span{font-size:8px}
 .is-open .alex-companion{left:112px;bottom:auto;top:-164px;width:82px;height:164px}
}
@media(max-width:1199px){
 .is-touring .alex-scroll{max-height:27dvh}
 .is-touring .alex-actions{position:sticky;bottom:-12px;padding:10px 0;background:var(--alex-paper);box-shadow:0 -10px 10px var(--alex-paper);z-index:1}
 .is-touring .alex-settings{margin-top:5px}
}
/* Keep five platform destinations usable between phone and tablet widths. */
@media(max-width:950px){.p9-tool-nav{grid-template-columns:repeat(3,minmax(0,1fr))}.p9-tool-nav a{min-width:0;border-bottom:1px solid var(--p9-line)}}
