/* Ebike World: the hub (template-parts/pages/ebike-world.php) and the step guides (template-parts/guide/guide.php,
   assets/js/eh-guide.js). Layout approved on the canvas 27-11-2026. Signal is a marker, never text on white; one
   Signal button per view (the help card on the done screen). Mobile first: 360, 390 and 1280 px. */

.eh-guide [hidden],.eh-world [hidden]{display:none!important}
.eh-guide{padding-block:20px 72px}
.eh-guide-in{display:block}

/* ---------- start ---------- */
.eh-guide-start{max-width:640px}
.eh-guide-crumb{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font:600 11px/1.4 var(--eh-font);letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin:0 0 12px}
.eh-guide-crumb a{color:var(--ink);text-decoration:none;box-shadow:inset 0 -2px 0 var(--signal)}
.eh-guide-title{margin:0 0 10px;font:800 clamp(28px,6.4vw,44px)/1.08 var(--eh-font);letter-spacing:-.02em}
.eh-guide .eh-lede{font-size:16px;line-height:1.5;margin:0}
.eh-guide-indep{margin:10px 0 0;font-size:12.5px;line-height:1.45;color:var(--muted)}
.eh-guide-field{border:0;margin:28px 0 0;padding:0;min-width:0}
.eh-guide-field>legend,.eh-guide-model legend{font:700 16px/1.3 var(--eh-font);color:var(--ink);padding:0;margin-bottom:12px}
.eh-guide-help{margin:-6px 0 10px;font-size:13.5px;line-height:1.45;color:var(--muted)}
.eh-guide-products{display:grid;gap:10px}
.eh-guide-opt{position:relative;display:block}
.eh-guide-opt input{position:absolute;opacity:0;pointer-events:none}
.eh-guide-opt>span{display:flex;align-items:center;gap:12px;min-height:56px;padding:10px 14px;border:1.5px solid var(--rule);border-radius:10px;background:var(--paper);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
.eh-guide-opt>span:hover{background:var(--off)}
.eh-guide-opt svg{flex:none;width:22px;height:22px;fill:none;stroke:var(--ink);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.eh-guide-opt b{flex:1;font:700 15px/1.3 var(--eh-font)}
.eh-guide-opt small{font-size:12.5px;color:var(--muted)}
.eh-guide-opt input:checked+span{border-color:var(--ink);box-shadow:inset 0 -4px 0 var(--signal)}
.eh-guide-opt input:focus-visible+span{outline:3px solid var(--signal);outline-offset:2px}
.eh-guide-model{margin-top:28px}
.eh-guide-model .eh-hub-field{margin:0}
.eh-guide-misfit{margin:12px 0 0;padding:12px 14px;border-radius:8px;background:var(--ink);color:var(--paper);font-size:14px;line-height:1.45}
.eh-guide-tools{border:1px solid var(--rule);border-radius:10px;padding:4px}

.eh-guide-tick{position:relative;display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 12px;border-radius:8px;cursor:pointer}
.eh-guide-tick:hover{background:var(--off)}
.eh-guide-tick input{position:absolute;opacity:0;pointer-events:none}
.eh-guide-box{flex:none;width:24px;height:24px;border:1.5px solid var(--ink);border-radius:5px;display:flex;align-items:center;justify-content:center;background:var(--paper);transition:background .15s ease}
.eh-guide-box svg{width:14px;height:14px;fill:none;stroke:var(--paper);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .15s ease}
.eh-guide-tick input:checked+.eh-guide-box{background:var(--ink)}
.eh-guide-tick input:checked+.eh-guide-box svg{opacity:1}
.eh-guide-tick input:focus-visible+.eh-guide-box{outline:3px solid var(--signal);outline-offset:2px}
.eh-guide-tick>span:last-child{display:flex;flex-direction:column;gap:2px}
.eh-guide-tick b{font:700 15px/1.3 var(--eh-font)}
.eh-guide-tick small{font-size:12.5px;color:var(--muted)}
.eh-guide-tick.is-check{border:1.5px solid var(--ink);border-radius:10px;background:var(--off);padding:12px 14px}
.eh-guide-tick.is-check small{order:-1;font:700 11px/1 var(--eh-font);letter-spacing:.12em;text-transform:uppercase}

.eh-guide-note{margin:20px 0 0;font-size:13.5px;line-height:1.45;color:var(--body2)}
.eh-guide-resume{margin:20px 0 0;padding:14px 16px;border-radius:10px;background:var(--off);border:1px solid var(--rule);display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.eh-guide-resume p{margin:0;font-weight:600}
.eh-guide-startbar{position:sticky;bottom:0;z-index:5;margin:24px -16px 0;padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px));background:var(--paper);border-top:1px solid var(--rule);display:flex;flex-direction:column;gap:8px}
.eh-guide-startbar .eh-btn{width:100%;min-height:52px;font-size:15px}
.eh-guide-startbar p{margin:0;text-align:center;font-size:12.5px;color:var(--muted)}
.eh-guide .eh-btn:disabled,.eh-guide .eh-btn:disabled:hover{background:var(--rule);border-color:var(--rule);color:var(--muted);cursor:not-allowed;transform:none}

/* ---------- run ---------- */
.eh-guide-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px 8px;margin:0 -8px 14px}
.eh-guide-icon,.eh-guide-all{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--ink);font:600 13px/1 var(--eh-font);cursor:pointer}
.eh-guide-icon:hover,.eh-guide-all:hover{background:var(--off)}
.eh-guide-icon svg,.eh-guide-all svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.eh-guide-progress{margin:0;text-align:center;font:600 11px/1 var(--eh-font);letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.eh-guide-segs{grid-column:1/-1;display:flex;gap:4px;padding:0 8px}
.eh-guide-segs span{flex:1;height:5px;border-radius:3px;background:var(--rule);transition:background .25s ease}
.eh-guide-segs .is-done{background:var(--ink)}
.eh-guide-segs .is-now{background:var(--signal);box-shadow:inset 0 0 0 1.5px var(--ink)}

.eh-guide-listtitle{display:none;margin:48px 0 8px;font:800 24px/1.2 var(--eh-font)}
.eh-guide-steps{list-style:none;margin:0;padding:0}
.eh-guide-step{display:grid;gap:16px}
.eh.eh-guide.is-js .eh-guide-step:not([hidden]){animation:eh-guide-in .35s cubic-bezier(.22,.61,.36,1) both}
@keyframes eh-guide-in{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:none}}
.eh-guide-art{margin:0;background:var(--off);border:1px solid var(--rule);border-radius:10px;padding:6px;overflow:hidden}
.eh-guide-art svg{display:block;width:100%;height:auto}
.eh-guide-text{display:flex;flex-direction:column;gap:12px;min-width:0}
.eh-guide-text h3{display:flex;align-items:center;gap:12px;margin:0;font:800 22px/1.15 var(--eh-font);letter-spacing:-.02em}
.eh-guide-text h3:focus{outline:none}
.eh-guide-hex{flex:none;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);background:var(--ink);color:var(--paper);font:700 13px/1 var(--eh-font)}
.eh-guide-hex i{font-style:normal}
.eh-guide-hex svg{display:none;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.eh-guide-hex.is-big{width:76px;height:76px;background:var(--signal);color:var(--ink)}
.eh-guide-hex.is-big svg{display:block;width:36px;height:36px;stroke-width:2.6}
.eh-guide-only{margin:-4px 0 0;font-size:12.5px;font-weight:600;color:var(--muted)}
.eh-guide-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.eh-guide-chip{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0 12px 0 10px;border-radius:999px;background:var(--ink);color:var(--paper);font:600 13px/1.2 var(--eh-font)}
.eh-guide-chip::before{content:"";width:11px;height:12px;background:var(--signal);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}
.eh-guide-chip.is-none{background:transparent;color:var(--body2);border:1px solid var(--rule);padding:0 12px}
.eh-guide-chip.is-none::before{display:none}
.eh-guide-body{margin:0;font-size:16px;line-height:1.55;color:var(--body2)}
.eh-guide-nav{position:sticky;bottom:0;z-index:5;display:flex;gap:10px;margin:4px -16px 0;padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px));background:var(--paper);border-top:1px solid var(--rule)}
.eh-guide-nav .eh-btn{min-height:52px}
.eh-guide-back{width:52px;padding:0}
.eh-guide-next{flex:1;gap:8px;font-size:15px}
.eh-guide-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* all steps: a sheet from the bottom on phones */
.eh-guide-toc{display:none}
.eh-guide.is-toc .eh-guide-toc{display:flex;flex-direction:column;justify-content:flex-end;position:fixed;inset:0;z-index:60;background:rgba(17,20,24,.55)}
.eh-guide.is-toc .eh-guide-toc>*{background:var(--paper);margin:0;padding-inline:16px}
.eh-guide-toc-head{display:flex;align-items:center;justify-content:space-between;padding-top:10px;border-radius:16px 16px 0 0}
.eh-guide-toc h2{margin:0;font:800 17px/1.2 var(--eh-font)}
.eh-guide-toc h2:focus{outline:none}
.eh-guide-toc .eh-guide-help{margin:0;padding-bottom:8px}
.eh-guide-toc ol{list-style:none;padding-left:0;padding-right:0;padding-top:0;padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))!important;max-height:62vh;overflow-y:auto}
.eh-guide-toc li button{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:6px 8px;border:0;border-top:1px solid var(--rule);background:transparent;text-align:left;font:500 14.5px/1.3 var(--eh-font);color:var(--ink);cursor:pointer}
.eh-guide-toc li button:hover:not(:disabled){background:var(--off)}
.eh-guide-toc li button:disabled{cursor:default}
.eh-guide-toc li button>span:not(.eh-guide-hex){flex:1;min-width:0}
.eh-guide-toc .eh-guide-hex{flex:none;width:28px;height:28px;font-size:12px}
.eh-guide-toc em,.eh-guide-lock{display:none}
.eh-guide-toc .is-done .eh-guide-hex i{display:none}
.eh-guide-toc .is-done .eh-guide-hex svg{display:block}
.eh-guide-toc .is-now button{font-weight:700}
.eh-guide-toc .is-now .eh-guide-hex{background:var(--signal);color:var(--ink)}
.eh-guide-toc .is-now em{display:inline-block;flex:none;white-space:nowrap;font:700 12px/1 var(--eh-font);font-style:normal;padding:6px 9px;border-radius:999px;background:var(--signal);color:var(--ink)}
.eh-guide-toc .is-locked button{color:var(--muted)}
.eh-guide-toc .is-locked .eh-guide-hex{background:#ECEDE9;color:var(--muted)}
.eh-guide-toc .is-locked .eh-guide-lock{display:block;width:16px;height:16px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round}

/* ---------- done ---------- */
.eh-guide-done{max-width:560px;display:flex;flex-direction:column;gap:16px;padding-top:24px}
.eh-guide-done-head{display:flex;flex-direction:column;gap:14px}
.eh-guide-done h2{margin:0;font:800 clamp(28px,6vw,36px)/1.1 var(--eh-font);letter-spacing:-.02em}
.eh-guide-done h2:focus{outline:none}
.eh-guide-done-head p{margin:0;font-size:16px;line-height:1.55;color:var(--body2)}
.eh-guide-help-card{display:flex;flex-wrap:wrap;align-items:center;gap:14px 16px;padding:18px;border-radius:10px;background:var(--ink);color:var(--paper)}
.eh-guide-help-card>div{flex:1 1 240px}
.eh-guide-help-card p{margin:0;font-size:13.5px;line-height:1.45;color:var(--muted-rev)}
.eh-guide-help-card .eh-guide-help-title{font-size:15px;font-weight:700;color:var(--paper);margin-bottom:4px}
.eh-guide-signal,.eh-guide-signal:hover{background:var(--signal);border-color:var(--signal);color:var(--ink);min-height:44px}
.eh-guide-done>.eh-btn{align-self:flex-start;min-height:44px}

/* ---------- before the script runs, and without it ---------- */
.eh-guide.is-pre .eh-guide-run,.eh-guide.is-pre .eh-guide-done{display:none}
.eh-guide:not(.is-js) .eh-guide-top,.eh-guide:not(.is-js) .eh-guide-toc,.eh-guide:not(.is-js) .eh-guide-nav,
.eh-guide:not(.is-js) .eh-guide-startbar,.eh-guide:not(.is-js) .eh-guide-done-head,.eh-guide:not(.is-js) [data-eh-restart]{display:none!important}
.eh-guide:not(.is-js) .eh-guide-listtitle{display:block}
.eh-guide:not(.is-js) .eh-guide-step{padding:28px 0;border-top:1px solid var(--rule)}
.eh-guide:not(.is-js) .eh-guide-done{padding-top:8px}

/* ---------- computers: steps on the right, all steps as a column on the left ---------- */
@media (min-width:1024px){
 .eh-guide{padding-block:40px 96px}
 .eh-guide.is-js[data-screen="run"] .eh-guide-run{display:grid;grid-template-columns:280px minmax(0,1fr);grid-template-rows:auto 1fr;gap:0 48px;align-items:start}
 .eh-guide.is-js .eh-guide-top{grid-column:2;margin:0 0 20px}
 .eh-guide.is-js .eh-guide-all,.eh-guide-toc-head .eh-guide-icon{display:none}
 .eh-guide.is-js .eh-guide-toc{display:flex;flex-direction:column;grid-column:1;grid-row:1/3;position:sticky;top:96px;padding:18px 14px;border-radius:12px;background:var(--off);border:1px solid var(--rule)}
 .eh-guide-toc-head{padding:0 8px 6px}
 .eh-guide-toc .eh-guide-help{padding:0 8px 10px}
 .eh-guide-toc ol{max-height:none;overflow:visible;padding:0!important;margin:0}
 .eh-guide-toc li button{border-top:0;border-radius:8px;min-height:46px}
 .eh-guide.is-js .eh-guide-steps{grid-column:2}
 .eh-guide-step{grid-template-columns:minmax(0,1.45fr) minmax(280px,1fr);gap:36px;align-items:start}
 .eh-guide-text h3{font-size:28px}
 .eh-guide-nav{position:static;margin:8px 0 0;padding:16px 0 0}
 .eh-guide-startbar{position:static;margin:28px 0 0;padding:0;border:0;flex-direction:row;align-items:center;gap:16px}
 .eh-guide-startbar .eh-btn{width:auto;padding-inline:28px}
 .eh-guide-startbar p{text-align:left}
 .eh-guide:not(.is-js) .eh-guide-step{grid-template-columns:minmax(0,1fr) minmax(280px,1fr)}
}

/* ---------- the drawings move: one loop of 3.6 s, Signal is the part in hand ---------- */
.gx-to{animation:gx-to 3.6s cubic-bezier(.65,0,.35,1) infinite}
@keyframes gx-to{0%{transform:translate(0,0);opacity:0}8%{opacity:1}22%{transform:translate(0,0)}62%,88%{transform:translate(var(--dx,0px),var(--dy,0px));opacity:1}100%{transform:translate(var(--dx,0px),var(--dy,0px));opacity:0}}
.gx-drop{animation:gx-drop 3.6s cubic-bezier(.65,0,.35,1) infinite}
@keyframes gx-drop{0%,40%{transform:translate(0,var(--dy0,-50px));opacity:0}50%{transform:translate(0,var(--dy0,-50px));opacity:1}72%,90%{transform:translate(0,0);opacity:1}100%{transform:translate(0,0);opacity:0}}
.gx-spin{transform-box:fill-box;transform-origin:center;animation:gx-spin 3.6s cubic-bezier(.65,0,.35,1) infinite}
@keyframes gx-spin{0%,15%{transform:rotate(0)}60%,100%{transform:rotate(-360deg)}}
.gx-pulse{transform-box:fill-box;transform-origin:center;animation:gx-pulse 1.8s cubic-bezier(.22,.61,.36,1) infinite}
@keyframes gx-pulse{0%{transform:scale(.5);opacity:1}100%{transform:scale(1.6);opacity:0}}
.gx-blink{animation:gx-blink 3.6s ease infinite}
@keyframes gx-blink{0%,45%{opacity:0}55%,92%{opacity:1}100%{opacity:0}}
.gx-tilt{transform-box:view-box;animation:gx-tilt 3.6s cubic-bezier(.65,0,.35,1) infinite}
@keyframes gx-tilt{0%{transform:translate(0,-36px) rotate(-10deg);opacity:0}10%{opacity:1}30%{transform:translate(0,0) rotate(-10deg)}62%,90%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(0,0) rotate(0);opacity:0}}
.gx-pull{animation:gx-pull 3.6s cubic-bezier(.65,0,.35,1) infinite}
@keyframes gx-pull{0%,32%{transform:translate(0,0)}42%,56%{transform:translate(var(--dx,18px),0)}66%,100%{transform:translate(0,0)}}
.gxv-1a{--dx:10px;--dy:-40px}
.gxv-2a{--dx:-120px;--dy:0px}
.gxv-2b{--dx:0px;--dy:-16px}
.gxv-3a{--dx:28px;--dy:0px}
.gxv-4a{--dx:86px;--dy:0px}
.gxv-5a{--dy0:-60px}
.gxv-6a{--dx:90px;--dy:0px}
.gxv-6b{--dy0:-70px}
.gxv-7a{--dx:150px;--dy:0px}
.gxv-8a{--dy0:-30px}
.gxv-9a{transform-origin:120px 192px}
.gxv-9b{--dx:18px}
/* steps 1 and 8 draw the bike the customer chose (eh-guide.js sets data-model); City M until then */
.gx-only-w{display:none}
.eh-guide[data-model="City W"] .gx-only-w{display:inline}
.eh-guide[data-model="City W"] .gx-only-m{display:none}
/* still: on the hub, without the script, and for anyone who asks for less motion, each drawing shows its end */
.eh-world-art .gx-to,.eh-guide:not(.is-js) .gx-to{animation:none;transform:translate(var(--dx,0px),var(--dy,0px))}
.eh-world-art :is(.gx-drop,.gx-spin,.gx-tilt,.gx-pull,.gx-blink),.eh-guide:not(.is-js) :is(.gx-drop,.gx-spin,.gx-tilt,.gx-pull,.gx-blink){animation:none}
.eh-world-art .gx-pulse,.eh-guide:not(.is-js) .gx-pulse{animation:none;opacity:0}
@media (prefers-reduced-motion:reduce){
 .gx-to{animation:none;transform:translate(var(--dx,0px),var(--dy,0px))}
 .gx-drop,.gx-spin,.gx-tilt,.gx-pull,.gx-blink{animation:none}
 .gx-pulse{animation:none;opacity:0}
 .eh.eh-guide.is-js .eh-guide-step:not([hidden]){animation:none}
}

/* ---------- the Ebike World hub ---------- */
.eh-world{padding-block:32px 88px}
.eh-world-head{max-width:640px;margin-bottom:12px}
.eh-world-head h1{margin:0 0 10px;font:800 clamp(32px,7vw,52px)/1.05 var(--eh-font);letter-spacing:-.02em}
.eh-world-head .eh-lede{margin:0}
.eh-world-cat{margin-top:36px}
.eh-world-cat h2{margin:0 0 14px;font:600 11px/1 var(--eh-font);letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.eh-world-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:20px}
.eh-world-card{display:flex;flex-direction:column;gap:6px;height:100%;padding:10px 10px 16px;border:1px solid var(--rule);border-radius:12px;background:var(--paper);color:var(--ink);text-decoration:none;transition:border-color .15s ease,transform .15s ease}
.eh-world-card:hover{border-color:var(--ink);transform:translateY(-2px)}
.eh-world-art{display:block;margin-bottom:8px;background:var(--off);border-radius:8px;padding:6px}
.eh-world-art svg{display:block;width:100%;height:auto}
.eh-world-card b{padding:0 6px;font:800 18px/1.2 var(--eh-font)}
.eh-world-card span:not(.eh-world-art){padding:0 6px;font-size:13px;color:var(--muted)}
.eh-world-card em{margin-top:auto;padding:8px 6px 0;font:600 14px/1 var(--eh-font);font-style:normal}
.eh-world-card em::after{content:" \2192"}
@media (prefers-reduced-motion:reduce){.eh-world-card,.eh-world-card:hover{transition:none;transform:none}}
