/* Help drawer, the help buttons (Pin, from pin-art.js), Help buttons and the first-visit tour inside the planner. */
.ev-help-q{width:22px;height:24px;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;padding:0;cursor:pointer;flex:none;display:inline-grid;place-items:center;vertical-align:middle;margin-left:8px;position:relative;transition:transform .12s;}
.ev-help-q::after{content:"";position:absolute;inset:-8px;border-radius:50%;}
.ev-help-q .ev-pin-head{width:100%;height:100%;display:block;}
.ev-help-q:hover{transform:translateY(-1px);}
.ev-help-q:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.ev-card-head h2 .ev-help-q,.ev-card-head>.ev-help-q{margin-left:8px;}
.ev-card-head>div>.ev-help-q{margin-left:6px;}
.ev-group-title .ev-help-q{margin-left:8px;}
.ev-help-btn svg{width:16px;height:16px;}
.ev-help-btn .ev-pin-head{width:17px;height:20px;}
.ev-help-btn.is-new,.eh-help.is-new{position:relative;}
.ev-help-btn.is-new::after,.eh-help.is-new::after{content:"";position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px #fff;}
.ev-help-backdrop{position:fixed;inset:0;z-index:209;background:#10263855;display:none;}
.ev-help{position:fixed;top:0;right:0;bottom:0;width:min(460px,100vw);z-index:210;background:#fff;box-shadow:-18px 0 44px rgba(18,43,62,.22);display:flex;flex-direction:column;font-family:'Hanken Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);}
.ev-help[hidden]{display:none;}
.ev-help-pin{flex:none;width:28px;height:33px;display:grid;place-items:center;}
.ev-help-pin svg{width:28px;height:33px;display:block;}
.ev-help-head{display:flex;align-items:center;gap:8px;padding:calc(12px + env(safe-area-inset-top,0px)) 14px 12px 18px;background:var(--ev-navy);color:#fff;flex:none;}
.ev-help-title{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2;}
.ev-help-title span{font-size:var(--text-2xs);letter-spacing:.1em;text-transform:uppercase;color:var(--ev-sky);font-weight:700;}
.ev-help-title b{font-size:15px;font-weight:700;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
.ev-help-icon{width:36px;height:36px;border-radius:9px;border:1px solid #ffffff33;background:#ffffff14;color:#fff;cursor:pointer;display:grid;place-items:center;padding:0;flex:none;}
.ev-help-icon svg{width:16px;height:16px;}
.ev-help-icon:hover{background:#ffffff28;}
.ev-help-search{display:flex;align-items:center;gap:8px;margin:12px 16px 0;border:1px solid var(--line2);border-radius:10px;padding:0 12px;min-height:42px;color:#586e80;background:var(--panel);flex:none;}
.ev-help-search svg{width:15px;height:15px;flex:none;}
.ev-help-search input{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:var(--text-sm);color:var(--ink);outline:none;min-height:40px;}
.ev-help-search:focus-within{border-color:var(--ev-navy);outline:3px solid var(--focus,var(--ev-navy));outline-offset:2px;background:#fff;}
.ev-help-search input:focus-visible{outline:none;}
.ev-help-body{flex:1;overflow:auto;padding:14px 18px 24px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
.ev-help-body .g-title:focus{outline:none;}
.ev-help-tip{background:var(--ev-navy);color:#e9f0f5;border-radius:10px;padding:11px 13px;font-size:var(--text-ui);line-height:1.55;margin-bottom:14px;}
.ev-help-new{display:flex;flex-direction:column;gap:3px;background:#ebf2ff;border:1px solid var(--ev-sky);border-radius:10px;padding:11px 13px;margin-bottom:14px;font-size:var(--text-ui);}
.ev-help-new b{font-size:var(--text-sm);}
.ev-help-new span{color:#3d4b57;}
.ev-help-new .ev-help-link{align-self:flex-start;margin-top:4px;}
.ev-help-levels{display:flex;flex-direction:column;gap:16px;}
.ev-help-level-head{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;align-items:center;margin-bottom:6px;}
.ev-help-level-head b{font-size:14.5px;}
.ev-help-level-head small{grid-column:2;font-size:var(--text-xs);color:#586e80;line-height:1.4;}
.ev-help-level a,.ev-help-results a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;color:var(--ink);text-decoration:none;font-size:var(--text-sm);font-weight:600;border:1px solid transparent;}
.ev-help-level a small{margin-left:auto;color:#8aa0b2;font-weight:500;font-size:var(--text-xs);flex:none;}
.ev-help-level a:hover,.ev-help-results a:hover{background:var(--panel);border-color:var(--line);}
.ev-help-results a{align-items:flex-start;}
.ev-help-results a>span:last-child{display:flex;flex-direction:column;gap:2px;}
.ev-help-results a small{color:#586e80;font-weight:500;font-size:var(--text-xs);line-height:1.4;}
.ev-help-results .g-chip-lvl{margin-top:1px;}
.ev-help-none{color:#586e80;font-size:var(--text-sm);}
.ev-help-terms{margin-top:16px;border-top:1px solid #e3e9ef;padding-top:12px;}
.ev-help-terms>b{display:block;font-size:var(--text-2xs);letter-spacing:.08em;text-transform:uppercase;color:#586e80;margin-bottom:8px;}
.ev-help-terms dt{font-weight:700;font-size:var(--text-sm);color:#1d4fb8;}
.ev-help-terms dd{margin:2px 0 10px;font-size:var(--text-ui);line-height:1.5;color:#3d4b57;}
.ev-help-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 18px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid #e3e9ef;flex:none;background:#fff;}
.ev-help-link{font:inherit;font-size:var(--text-ui);font-weight:650;color:#1d4fb8;background:transparent;border:0;padding:6px 0;cursor:pointer;text-decoration:none;}
.ev-help-link:hover{text-decoration:underline;}
.ev-help .g-guide.compact .g-body{font-size:var(--text-sm);}
.ev-help .g-art{padding:6px;}
/* The drawer is at most 460 px wide, so diagrams keep their natural size and scroll sideways at every screen width. */
.ev-help .g-art-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;}
.ev-help .g-art-scroll svg{min-width:620px;}
.ev-help .g-art-hint{display:block;}
/* Pin in the navy head of the planner's technical dialogs (cable calculations, earthing, DNO, simulator, materials, CDM). */
.wlc-head h2 .ev-help-q,.evsp-cdm-head h2 .ev-help-q{width:26px;height:28px;margin-left:10px;vertical-align:-2px;}
.wlc-head h2 .ev-help-q:focus-visible,.evsp-cdm-head h2 .ev-help-q:focus-visible{outline-color:var(--ev-sky);}
/* Portrait and narrow screens: a half-height sheet at the bottom with no backdrop, so the tool strip, plan strip and the top of the
   canvas stay usable. The header button expands it; an expanded sheet on a phone covers the page and becomes modal. */
.ev-help-expand{display:none;}
.ev-help.is-expanded .ev-help-expand svg{transform:rotate(180deg);}
@media (max-width:840px),(orientation:portrait) and (max-width:1024px){
  .ev-help{top:auto;left:0;right:0;width:auto;height:min(52dvh,560px);border-radius:16px 16px 0 0;box-shadow:0 -14px 40px rgba(18,43,62,.24);}
  .ev-help.is-expanded{height:calc(100dvh - 40px);}
  .ev-help .ev-help-head{border-radius:16px 16px 0 0;padding-top:12px;}
  .ev-help-expand{display:grid;}
}
@media (max-width:720px){
  .ev-help.is-expanded{height:100dvh;border-radius:0;}
  .ev-help.is-expanded .ev-help-head{border-radius:0;padding-top:calc(12px + env(safe-area-inset-top,0px));}
  .ev-help-backdrop{display:block;}
  .ev-help-backdrop[hidden]{display:none;}
}
.ev-help-new-actions{display:flex;gap:16px;align-items:center;margin-top:4px;}
.ev-help-new .ev-help-new-actions .ev-help-link{margin-top:0;}
.ev-help-link.quiet{color:var(--dim);font-weight:600;}
.ev-help-foot [hidden]{display:none;}
.ev-tour{position:fixed;inset:0;z-index:230;background:#10263899;display:flex;align-items:center;justify-content:center;padding:20px;font-family:'Hanken Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);}
.ev-tour[hidden]{display:none;}
.ev-tour-card{width:min(520px,100%);background:#fff;border-radius:18px;box-shadow:0 30px 80px rgba(10,16,22,.45);overflow:hidden;display:flex;flex-direction:column;max-height:100%;}
.ev-tour-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 12px 12px 18px;background:var(--ev-navy);color:var(--ev-sky);font-size:var(--text-xs);letter-spacing:.08em;text-transform:uppercase;font-weight:700;}
.ev-tour-art{background:var(--panel);padding:14px 18px 0;}
.ev-tour-art svg{display:block;width:100%;height:auto;max-width:360px;margin:0 auto;}
.ev-tour-body{padding:18px 22px 6px;overflow:auto;}
.ev-tour-body h3{margin:0 0 8px;font-size:21px;letter-spacing:-.02em;}
.ev-tour-body p{margin:0;font-size:14.5px;line-height:1.6;color:#3d4b57;}
.ev-tour-dots{display:flex;gap:6px;justify-content:center;padding:12px 0 4px;}
.ev-tour-dots i{width:8px;height:8px;border-radius:50%;background:var(--line2);}
.ev-tour-dots i.on{background:var(--ev-navy);width:22px;border-radius:4px;}
.ev-tour-foot{display:flex;justify-content:space-between;gap:10px;padding:10px 18px 18px;}
.ev-tour-btn{font:inherit;font-size:var(--btn-fs);font-weight:650;min-height:var(--btn-h);padding:9px 18px;border-radius:var(--btn-r);border:1px solid var(--line2);background:#fff;color:var(--ink);cursor:pointer;}
.ev-tour-btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accentInk);}
.ev-tour-btn.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);}
@media print{.ev-help,.ev-help-backdrop,.ev-tour,.ev-help-q,.ev-help-btn{display:none!important;}}

.ev-tour-go{margin-top:14px;}
/* Phones: the tour is a sheet at the bottom so the tool strip stays in view above it. */
@media (max-width:720px){
  .ev-tour{align-items:flex-end;padding:0;}
  .ev-tour-card{width:100%;border-radius:18px 18px 0 0;max-height:88dvh;}
  .ev-tour-art svg{max-width:240px;}
  .ev-tour-foot{padding-bottom:calc(18px + env(safe-area-inset-bottom,0px));}
}
