/* HuaHai UI: one button system for the whole site.
   Primary   = purple pill (main conversion action).
   Secondary = outline pill (supporting actions); light outline on dark grounds.
   Sizes: 52px default, 44px compact in header and footer, 50px on phones.
   Selectors are wrapped in ':root body :is(...)' so they outrank page-level rules (incl. their !important). */
:root{--hh-btn-p:#5230DA;--hh-btn-p-hover:#3A1FB0;--hh-btn-ink:#171614;--hh-btn-line:rgba(23,22,20,.28);--hh-btn-ease:cubic-bezier(.19,1,.22,1);}
:root body :is(.hd__cta,.ft__btn--p,.hx__cta,.hh-ot-btn,.ab-btn--dark .elementor-button,.hh-qf .elementor-button,.hh-moq-ask-btn,.hh-prof-btn,.hh-cs-all,.hh-fq-btn,.sp-ali,.ab-btn--ghost .elementor-button,.ft__btn--g){border-radius:999px!important;font-family:'Archivo',sans-serif!important;font-weight:500!important;font-size:16px!important;line-height:1!important;letter-spacing:0!important;text-transform:none!important;height:52px!important;min-height:0!important;padding:0 26px!important;box-shadow:none!important;border-width:1px!important;border-style:solid!important;align-items:center!important;justify-content:center!important;gap:10px;text-decoration:none!important;transition:background-color .25s,color .25s,border-color .25s,translate .35s var(--hh-btn-ease)!important;}
:root body :is(.hx__cta,.hh-ot-btn,.hh-moq-ask-btn,.hh-prof-btn,.hh-cs-all,.hh-fq-btn,.sp-ali,.ab-btn--dark .elementor-button,.ab-btn--ghost .elementor-button){display:inline-flex!important;}
:root body :is(.hh-qf .elementor-button){display:flex!important;}
:root body :is(.hd__cta,.ft__btn--p,.hx__cta,.hh-ot-btn,.ab-btn--dark .elementor-button,.hh-qf .elementor-button){background:var(--hh-btn-p)!important;border-color:var(--hh-btn-p)!important;color:#fff!important;}
:root body :is(.hd__cta,.ft__btn--p,.hx__cta,.hh-ot-btn,.ab-btn--dark .elementor-button,.hh-qf .elementor-button):hover{background:var(--hh-btn-p-hover)!important;border-color:var(--hh-btn-p-hover)!important;color:#fff!important;translate:0 -2px;}
:root body :is(.hh-moq-ask-btn,.hh-prof-btn,.hh-cs-all,.hh-fq-btn,.sp-ali,.ab-btn--ghost .elementor-button){background:transparent!important;border-color:var(--hh-btn-line)!important;color:var(--hh-btn-ink)!important;}
:root body :is(.hh-moq-ask-btn,.hh-prof-btn,.hh-cs-all,.hh-fq-btn,.sp-ali,.ab-btn--ghost .elementor-button):hover{background:var(--hh-btn-ink)!important;border-color:var(--hh-btn-ink)!important;color:#fff!important;translate:0 -2px;}
:root body :is(.ft__btn--g){background:transparent!important;border-color:rgba(248,247,245,.28)!important;color:#F8F7F5!important;}
:root body :is(.ft__btn--g):hover{background:#F8F7F5!important;border-color:#F8F7F5!important;color:var(--hh-btn-ink)!important;translate:0 -2px;}
:root body :is(.ab-btn--dark .elementor-button .elementor-button-text,.ab-btn--ghost .elementor-button .elementor-button-text,.hh-qf .elementor-button .elementor-button-text){color:inherit!important;}
:root body :is(.hd__cta,.ft__btn--p,.ft__btn--g){height:44px!important;padding:0 20px!important;font-size:15px!important;}
:root body :is(.hd__cta,.ft__btn--p,.hx__cta,.hh-ot-btn,.ab-btn--dark .elementor-button,.hh-qf .elementor-button,.hh-moq-ask-btn,.hh-prof-btn,.hh-cs-all,.hh-fq-btn,.sp-ali,.ab-btn--ghost .elementor-button,.ft__btn--g):focus-visible{outline:2px solid var(--hh-btn-p)!important;outline-offset:3px;}
@media (max-width:767px){:root body :is(.hx__cta,.hh-ot-btn,.hh-moq-ask-btn,.hh-prof-btn,.hh-cs-all,.hh-fq-btn,.sp-ali,.ab-btn--dark .elementor-button,.ab-btn--ghost .elementor-button,.hh-qf .elementor-button){height:50px!important;padding:0 22px!important;}}
@media (prefers-reduced-motion:reduce){:root body :is(.hd__cta,.ft__btn--p,.hx__cta,.hh-ot-btn,.ab-btn--dark .elementor-button,.hh-qf .elementor-button,.hh-moq-ask-btn,.hh-prof-btn,.hh-cs-all,.hh-fq-btn,.sp-ali,.ab-btn--ghost .elementor-button,.ft__btn--g):hover{translate:none;}}

/* section rail v2 (left): tick index + gliding chapter card (built by hh-motion-v2.js rail()) */
.hh-rail{--g:0;--rail-step:clamp(17px,2.7vh,23px);--rail-ease:cubic-bezier(.22,1,.36,1);position:fixed;z-index:95;left:22px;top:50%;font-family:'Archivo',sans-serif;pointer-events:none;}
.hh-rail-bar,.hh-rail-tg{display:none;}
.hh-rail-box{position:relative;transform:translateY(-50%);pointer-events:auto;}
.hh-rail-list{position:relative;list-style:none;margin:0;padding:14px 12px;border-radius:22px;background:rgba(251,250,249,.5);-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4);box-shadow:inset 0 0 0 1px rgba(23,22,20,.05),0 20px 44px -28px rgba(23,22,20,.45);opacity:0;transform:translateX(-18px) scale(.96);transform-origin:0 50%;transition:opacity .7s var(--rail-ease),transform .9s var(--rail-ease);}
.hh-rail.is-shown .hh-rail-list{opacity:1;transform:none;}
.hh-rail-list li{margin:0;padding:0;opacity:0;transform:translateX(-12px);transition:opacity .6s var(--rail-ease),transform .8s var(--rail-ease);transition-delay:calc(var(--i) * 28ms);}
.hh-rail.is-shown .hh-rail-list li{opacity:1;transform:none;}
.hh-rail-list a{position:relative;display:flex;align-items:center;width:auto;min-width:40px;height:var(--rail-step);text-decoration:none;outline:none;cursor:pointer;}
.hh-rail-tick{position:relative;display:block;height:3px;width:12px;border-radius:3px;background:#CFCAC2;overflow:hidden;transition:background-color .5s var(--rail-ease),height .5s var(--rail-ease);}
.hh-rail-tick i{position:absolute;inset:0;background:#5230DA;border-radius:inherit;transform-origin:0 50%;transform:scaleX(0);}
.hh-rail-list li.is-past .hh-rail-tick{background:rgba(23,22,20,.55);}
.hh-rail-list li.is-past .hh-rail-tick i{opacity:0;}
.hh-rail-list li.is-active .hh-rail-tick{height:5px;background:rgba(82,48,218,.18);}
.hh-rail-list a:hover .hh-rail-tick,.hh-rail-list a:focus-visible .hh-rail-tick{background:#5230DA;}
.hh-rail-list li.is-active a:hover .hh-rail-tick{background:rgba(82,48,218,.28);}
.hh-rail-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
/* gliding chapter card */
.hh-rail-cap{position:absolute;left:calc(100% + 10px);top:0;width:max-content;display:flex;align-items:center;gap:0;padding:9px 12px 9px 12px;border-radius:16px;background:rgba(251,250,249,.82);-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4);box-shadow:inset 0 0 0 1px rgba(23,22,20,.05),0 18px 40px -24px rgba(23,22,20,.5);pointer-events:none;opacity:0;visibility:hidden;transform-origin:0 50%;transition:background-color .4s;}
.hh-rail-num{position:relative;display:block;height:34px;min-width:2.1ch;overflow:hidden;font-family:'Archivo Condensed','Archivo',sans-serif;font-weight:700;font-size:38px;line-height:34px;letter-spacing:-.04em;color:#5230DA;}
.hh-rail-num b{position:absolute;left:0;top:0;font-weight:700;}
.hh-rail-meta{display:grid;grid-template-columns:0fr;transition:grid-template-columns .7s var(--rail-ease);}
.hh-rail-cap.is-open .hh-rail-meta{grid-template-columns:1fr;}
.hh-rail-meta-in{min-width:0;overflow:hidden;display:flex;flex-direction:column;gap:4px;padding-left:12px;margin-left:12px;border-left:1px solid rgba(23,22,20,.1);opacity:0;transition:opacity .45s var(--rail-ease);}
.hh-rail-cap.is-open .hh-rail-meta-in{opacity:1;transition-delay:.12s;}
.hh-rail-name{display:block;white-space:nowrap;font-size:14px;font-weight:500;line-height:1.1;letter-spacing:-.015em;color:#171614;}
.hh-rail-of{display:block;white-space:nowrap;font-family:'DM Mono',monospace;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#8A867F;}
.hh-rail-cap.is-preview{background:rgba(251,250,249,.94);}
.hh-rail-cap.is-preview .hh-rail-num{color:#171614;}
.hh-rail-cap.is-preview .hh-rail-of::before{content:'Jump to · ';}
.hh-rail:not(.is-shown) .hh-rail-box{pointer-events:none;}
@media (max-width:1024px){
  .hh-rail{left:14px;top:auto;bottom:14px;opacity:0;visibility:hidden;transform:translateY(16px);transition:opacity .5s var(--rail-ease),visibility .5s,transform .7s var(--rail-ease);}
  .hh-rail.is-shown{opacity:1;visibility:visible;transform:none;}
  .hh-rail-bar{display:block;position:fixed;left:0;right:0;top:0;height:3px;pointer-events:none;}
  .hh-rail-bar i{position:absolute;inset:0;background:#5230DA;transform-origin:0 50%;transform:scaleX(var(--g));}
  .hh-rail-tg{pointer-events:auto;display:inline-flex;align-items:center;gap:5px;height:40px;padding:0 14px;border:1px solid rgba(23,22,20,.08);border-radius:999px;background:rgba(251,250,249,.9);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 12px 28px -16px rgba(23,22,20,.45);font-family:'DM Mono',monospace;font-size:12px;color:#171614;cursor:pointer;}
  .hh-rail-tg b{font-weight:500;color:#5230DA;}
  .hh-rail-tg span{color:#8A867F;}
  .hh-rail-tg svg{margin-left:4px;transition:transform .4s var(--rail-ease);}
  .hh-rail.is-open .hh-rail-tg svg{transform:rotate(180deg);}
  .hh-rail-box{position:absolute;left:0;bottom:calc(100% + 10px);transform:none;pointer-events:none;}
  .hh-rail.is-open .hh-rail-box{pointer-events:auto;}
  .hh-rail-cap{display:none;}
  .hh-rail-list,.hh-rail.is-shown .hh-rail-list{width:min(280px,calc(100vw - 28px));max-height:min(64vh,520px);overflow:auto;padding:8px;border-radius:18px;background:rgba(251,250,249,.95);opacity:0;transform:translateY(10px) scale(.97);transform-origin:0 100%;transition:opacity .35s var(--rail-ease),transform .5s var(--rail-ease);}
  .hh-rail.is-open .hh-rail-list{opacity:1;transform:none;}
  .hh-rail-list li,.hh-rail.is-shown .hh-rail-list li{opacity:1;transform:none;transition:none;}
  .hh-rail-list a{width:auto;height:auto;gap:12px;padding:10px;border-radius:10px;}
  .hh-rail-tick{flex:none;width:14px!important;}
  .hh-rail-label{position:static;width:auto;height:auto;overflow:visible;clip:auto;display:flex;align-items:baseline;gap:7px;font-size:15px;font-weight:500;color:#171614;}
  .hh-rail-label em{font-style:normal;font-family:'DM Mono',monospace;font-size:10px;color:#8A867F;}
  .hh-rail-list li.is-active a{background:rgba(82,48,218,.08);}
  .hh-rail-list li.is-active .hh-rail-label{color:#5230DA;}
}
@media (prefers-reduced-motion:reduce){.hh-rail,.hh-rail *{transition:none!important;}}
@media print{.hh-rail{display:none!important;}}
/* generic button classes for new components */
.hh-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:46px;padding:0 20px;border-radius:999px;border:1px solid transparent;font-family:'Archivo',sans-serif;font-size:15px;font-weight:500;line-height:1;letter-spacing:0;text-transform:none;text-decoration:none;cursor:pointer;white-space:nowrap;transition:background-color .25s,color .25s,border-color .25s,translate .35s cubic-bezier(.19,1,.22,1);}
.hh-btn--p{background:#5230DA;border-color:#5230DA;color:#fff;}
.hh-btn--p:hover{background:#3A1FB0;border-color:#3A1FB0;color:#fff;translate:0 -2px;}
.hh-btn--s{background:transparent;border-color:rgba(23,22,20,.28);color:#171614;}
.hh-btn--s:hover{background:#171614;border-color:#171614;color:#fff;translate:0 -2px;}
.hh-btn:focus-visible{outline:2px solid #5230DA;outline-offset:3px;}
@media (prefers-reduced-motion:reduce){.hh-btn:hover{translate:none;}}
