/* Appily Fifty-One — Canopy Helix Help Desk
   Unique layout: aurora hero + search lens + mosaic tiles
   + sticky topic spine + cascading FAQ leaves (not tab panels) */

.page-help-helix {
  --hx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hx-snap: cubic-bezier(0.34, 1.45, 0.64, 1);
  --hx-ink: #0E1F18;
  --hx-canopy: #0B3D2E;
  --hx-deep: #062820;
  --hx-lime: #C8E86C;
  --hx-mint: #F1F6EF;
  --hx-paper: #FAFCF8;
  --hx-muted: #5A6B62;
  --hx-line: rgba(11, 61, 46, 0.12);
  background:
    radial-gradient(780px 420px at 90% -10%, rgba(200, 232, 108, 0.18), transparent 55%),
    radial-gradient(640px 380px at -10% 40%, rgba(26, 92, 69, 0.08), transparent 50%),
    var(--hx-mint);
}
.page-help-helix .page-main { padding-top: 0; overflow-x: clip; }
.a51-helix { padding-bottom: 0; }

/* ——— Aurora hero ——— */
.a51-helix-hero {
  position: relative;
  color: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6rem);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  background: linear-gradient(165deg, var(--hx-deep) 0%, var(--hx-canopy) 55%, #14523c 100%);
}
.a51-helix-aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.a51-helix-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .45;
  animation: a51HxFloat 10s ease-in-out infinite alternate;
}
.a51-helix-orb--a {
  width: 280px; height: 280px; top: -80px; left: 8%;
  background: rgba(200, 232, 108, 0.55);
}
.a51-helix-orb--b {
  width: 220px; height: 220px; bottom: -60px; right: 12%;
  background: rgba(124, 179, 66, 0.4);
  animation-delay: -3s;
}
.a51-helix-orb--c {
  width: 160px; height: 160px; top: 30%; right: 35%;
  background: rgba(255, 255, 255, 0.12);
  animation-delay: -6s;
}
.a51-helix-vine {
  position: absolute;
  inset: auto 0 0 0;
  height: 72px;
  background: var(--hx-mint);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: scaleX(1.15);
}
@keyframes a51HxFloat {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(18px) scale(1.08); }
}

.a51-helix-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.a51-helix-kicker {
  margin: 0 0 .9rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(200, 232, 108, 0.85);
}
.a51-helix-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
}
.a51-helix-hero h1 span {
  color: var(--hx-lime);
  display: inline-block;
  animation: a51HxShimmer 4.5s ease-in-out infinite;
}
@keyframes a51HxShimmer {
  0%, 100% { filter: brightness(1); transform: translateY(0); }
  50% { filter: brightness(1.15); transform: translateY(-2px); }
}
.a51-helix-lede {
  margin: 0 auto 1.75rem;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
}

/* Search lens */
.a51-helix-lens {
  position: relative;
  display: flex;
  align-items: center;
  gap: .55rem;
  max-width: 560px;
  margin: 0 auto 1.75rem;
  padding: .55rem .55rem .55rem 1.15rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(200, 232, 108, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--hx-snap);
}
.a51-helix-lens:focus-within {
  border-color: var(--hx-lime);
  box-shadow: 0 0 0 4px rgba(200, 232, 108, 0.25), 0 22px 48px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}
.a51-helix-lens-ring {
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 1px dashed rgba(200, 232, 108, 0.35);
  animation: a51HxSpin 18s linear infinite;
  pointer-events: none;
}
@keyframes a51HxSpin { to { transform: rotate(360deg); } }
.a51-helix-lens input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  outline: none;
  min-width: 0;
}
.a51-helix-lens input::placeholder { color: rgba(255, 255, 255, 0.5); }
.a51-helix-lens-clear {
  width: 32px; height: 32px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.a51-helix-lens-go {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--hx-lime);
  color: var(--hx-deep);
  font-weight: 800;
  flex: 0 0 auto;
}

.a51-helix-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}
.a51-helix-stat {
  min-width: 108px;
  padding: .75rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  animation: a51HxRise .7s var(--hx-ease) both;
}
.a51-helix-stat:nth-child(2) { animation-delay: .08s; }
.a51-helix-stat:nth-child(3) { animation-delay: .16s; }
.a51-helix-stat:nth-child(4) { animation-delay: .24s; }
@keyframes a51HxRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.a51-helix-stat strong {
  display: block;
  font-family: var(--a51-font-display);
  font-size: 1.35rem;
  color: var(--hx-lime);
  line-height: 1.1;
}
.a51-helix-stat span {
  font-size: .72rem;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
}
.a51-helix-stat--desk strong { font-size: 1rem; }

/* ——— Mosaic quick paths ——— */
.a51-helix-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .85rem;
  margin-top: -1.5rem;
  margin-bottom: 2.75rem;
  position: relative;
  z-index: 2;
}
.a51-helix-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.15rem 1.1rem 1.2rem;
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--hx-line);
  box-shadow: 0 14px 34px rgba(11, 61, 46, 0.08);
  overflow: hidden;
  transition: transform .25s var(--hx-snap), box-shadow .25s, border-color .25s;
  animation: a51HxRise .65s var(--hx-ease) both;
  animation-delay: calc(var(--tile-i, 0) * 0.05s);
}
.a51-helix-tile--0 { grid-column: span 2; }
.a51-helix-tile--1 { grid-column: span 2; min-height: 132px; }
.a51-helix-tile--2 { grid-column: span 2; }
.a51-helix-tile:hover {
  transform: translateY(-5px) rotate(-0.4deg);
  border-color: var(--hx-lime);
  box-shadow: 0 22px 44px rgba(11, 61, 46, 0.14);
}
.a51-helix-tile::before {
  content: '';
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 120px;
  background: radial-gradient(circle, rgba(200, 232, 108, 0.35), transparent 65%);
  pointer-events: none;
}
.a51-helix-tile-mark {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--hx-canopy);
  opacity: .55;
}
.a51-helix-tile strong {
  font-family: var(--a51-font-display);
  font-size: 1.05rem;
  color: var(--hx-ink);
}
.a51-helix-tile small { color: var(--hx-muted); font-size: .82rem; }
.a51-helix-tile-arrow {
  position: absolute;
  right: .9rem; bottom: .85rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--hx-mint);
  color: var(--hx-canopy);
  font-size: .85rem;
  transition: background .2s, color .2s, transform .25s var(--hx-snap);
}
.a51-helix-tile:hover .a51-helix-tile-arrow {
  background: var(--hx-canopy);
  color: var(--hx-lime);
  transform: rotate(12deg) scale(1.08);
}

/* ——— Stage: spine + cascade ——— */
.a51-helix-stage {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 3.5rem;
}
.a51-helix-spine {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.a51-helix-spine-label {
  margin: 0;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hx-canopy);
}
.a51-helix-spine-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding-left: .35rem;
}
.a51-helix-spine-nav::before {
  content: '';
  position: absolute;
  left: 17px; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--hx-lime), rgba(11, 61, 46, 0.15));
  border-radius: 2px;
}
.a51-helix-spine-link {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: .65rem;
  align-items: center;
  padding: .7rem .75rem .7rem .35rem;
  border-radius: 16px;
  color: var(--hx-ink);
  transition: background .2s, transform .2s;
}
.a51-helix-spine-link:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateX(3px);
}
.a51-helix-spine-link.is-active {
  background: #fff;
  box-shadow: 0 10px 28px rgba(11, 61, 46, 0.1);
}
.a51-helix-spine-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--hx-canopy);
  z-index: 1;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.a51-helix-spine-link.is-active .a51-helix-spine-dot {
  background: var(--hx-lime);
  border-color: var(--hx-lime);
  box-shadow: 0 0 0 4px rgba(200, 232, 108, 0.35);
}
.a51-helix-spine-num {
  font-size: .72rem;
  font-weight: 800;
  color: var(--hx-muted);
}
.a51-helix-spine-link.is-active .a51-helix-spine-num { color: var(--hx-canopy); }
.a51-helix-spine-text strong {
  display: block;
  font-size: .88rem;
  font-family: var(--a51-font-sans);
  font-weight: 700;
  line-height: 1.2;
}
.a51-helix-spine-text small {
  color: var(--hx-muted);
  font-size: .72rem;
}

.a51-helix-desk-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.1rem;
  border-radius: 20px;
  background: var(--hx-canopy);
  color: #fff;
  box-shadow: 0 16px 36px rgba(11, 61, 46, 0.22);
}
.a51-helix-desk-card > span:first-child {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hx-lime);
  font-weight: 800;
}
.a51-helix-desk-card a { color: rgba(255, 255, 255, 0.85); font-size: .88rem; }
.a51-helix-desk-card a:hover { color: var(--hx-lime); }
.a51-helix-desk-cta {
  margin-top: .55rem !important;
  display: inline-flex !important;
  justify-content: center;
  padding: .65rem .9rem;
  border-radius: 999px;
  background: var(--hx-lime) !important;
  color: var(--hx-deep) !important;
  font-weight: 800;
  font-size: .78rem !important;
}

/* Cascade chapters */
.a51-helix-cascade { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.a51-helix-empty {
  margin: 0;
  padding: 1.25rem 1.4rem;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed var(--hx-line);
  color: var(--hx-muted);
}
.a51-helix-empty a { color: var(--hx-canopy); font-weight: 700; }

.a51-helix-chapter {
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--hx-line);
  box-shadow: 0 16px 40px rgba(11, 61, 46, 0.07);
  overflow: hidden;
  transform-origin: top center;
  transition: opacity .3s, transform .35s var(--hx-ease);
}
.a51-helix-chapter.is-dim {
  opacity: .35;
  transform: scale(0.985);
}
.a51-helix-chapter.is-hidden { display: none; }

.a51-helix-chapter-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.4rem 1.4rem 1rem;
  background:
    linear-gradient(120deg, rgba(200, 232, 108, 0.18), transparent 55%),
    var(--hx-paper);
  border-bottom: 1px solid var(--hx-line);
}
.a51-helix-chapter-badge {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: var(--hx-canopy);
  color: var(--hx-lime);
  font-family: var(--a51-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(11, 61, 46, 0.25);
  animation: a51HxPulse 3.2s ease-in-out infinite;
}
@keyframes a51HxPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(11, 61, 46, 0.25), 0 0 0 0 rgba(200, 232, 108, 0.4); }
  50% { box-shadow: 0 10px 24px rgba(11, 61, 46, 0.25), 0 0 0 10px rgba(200, 232, 108, 0); }
}
.a51-helix-chapter-kicker {
  margin: 0 0 .35rem;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hx-canopy);
}
.a51-helix-chapter-head h2 {
  margin: 0 0 .35rem;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}
.a51-helix-chapter-head p {
  margin: 0;
  color: var(--hx-muted);
  font-size: .92rem;
}

.a51-helix-leaves { padding: .65rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
.a51-helix-leaf {
  border-radius: 18px;
  background: var(--hx-mint);
  border: 1px solid transparent;
  overflow: hidden;
  transition: border-color .2s, background .2s, box-shadow .25s;
}
.a51-helix-leaf[open] {
  background: #fff;
  border-color: rgba(200, 232, 108, 0.65);
  box-shadow: 0 12px 28px rgba(11, 61, 46, 0.08);
}
.a51-helix-leaf[hidden] { display: none; }
.a51-helix-leaf summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .85rem;
  align-items: center;
  padding: 1rem 1.05rem;
  font-weight: 700;
  color: var(--hx-ink);
}
.a51-helix-leaf summary::-webkit-details-marker { display: none; }
.a51-helix-leaf-index {
  font-size: .72rem;
  font-weight: 800;
  color: var(--hx-canopy);
  background: rgba(200, 232, 108, 0.35);
  padding: .3rem .5rem;
  border-radius: 999px;
}
.a51-helix-leaf-q { font-size: .95rem; line-height: 1.35; }
.a51-helix-leaf-plus {
  width: 28px; height: 28px;
  border-radius: 50%;
  position: relative;
  background: #fff;
  border: 1px solid var(--hx-line);
  transition: transform .3s var(--hx-snap), background .2s, border-color .2s;
}
.a51-helix-leaf-plus::before,
.a51-helix-leaf-plus::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  background: var(--hx-canopy);
  transform: translate(-50%, -50%);
}
.a51-helix-leaf-plus::before { width: 12px; height: 2px; }
.a51-helix-leaf-plus::after { width: 2px; height: 12px; transition: transform .3s var(--hx-snap); }
.a51-helix-leaf[open] .a51-helix-leaf-plus {
  background: var(--hx-canopy);
  border-color: var(--hx-canopy);
  transform: rotate(90deg);
}
.a51-helix-leaf[open] .a51-helix-leaf-plus::before,
.a51-helix-leaf[open] .a51-helix-leaf-plus::after { background: var(--hx-lime); }
.a51-helix-leaf[open] .a51-helix-leaf-plus::after { transform: translate(-50%, -50%) scaleY(0); }

.a51-helix-leaf-a {
  padding: 0 1.05rem 1.15rem 4.1rem;
  color: var(--hx-muted);
  font-size: .92rem;
  line-height: 1.6;
  animation: a51HxRise .35s var(--hx-ease);
}
.a51-helix-leaf-a a {
  color: var(--hx-canopy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ——— Finale CTA ——— */
.a51-helix-finale {
  position: relative;
  padding: 3.5rem 0 4rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(200, 232, 108, 0.15), transparent 45%),
    linear-gradient(160deg, var(--hx-canopy), var(--hx-deep));
  color: #fff;
  overflow: hidden;
}
.a51-helix-finale-grid {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 1.5rem;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
.a51-helix-finale-main {
  position: relative;
  padding: 1.5rem 0;
}
.a51-helix-finale-pulse {
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(200, 232, 108, 0.35);
  top: -10px; right: 8%;
  animation: a51HxRing 3s ease-out infinite;
}
@keyframes a51HxRing {
  0% { transform: scale(.6); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}
.a51-helix-finale-main h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  color: #fff;
}
.a51-helix-finale-main p {
  margin: 0 0 1.4rem;
  max-width: 40ch;
  color: rgba(255, 255, 255, 0.75);
}
.a51-helix-finale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.a51-helix-ghost {
  color: var(--hx-lime);
  font-weight: 700;
}
.a51-helix-ghost:hover { color: #fff; }

.a51-helix-finale-side {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.a51-helix-pay-card {
  padding: 1.25rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(200, 232, 108, 0.25);
  backdrop-filter: blur(10px);
}
.a51-helix-pay-card h3 {
  margin: 0 0 .75rem;
  font-family: var(--a51-font-sans);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hx-lime);
}
.a51-helix-pay-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.a51-helix-pay-card li {
  font-size: .9rem;
  color: rgba(255, 255, 255, 0.8);
  padding-left: .9rem;
  border-left: 2px solid var(--hx-lime);
}
.a51-helix-policy-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
}
.a51-helix-policy-rail a {
  padding: .7rem .85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: .84rem;
  font-weight: 700;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  transition: background .2s, color .2s, border-color .2s;
}
.a51-helix-policy-rail a:hover {
  background: var(--hx-lime);
  color: var(--hx-deep);
  border-color: var(--hx-lime);
}

@media (max-width: 980px) {
  .a51-helix-mosaic { grid-template-columns: 1fr 1fr; }
  .a51-helix-tile--0,
  .a51-helix-tile--1,
  .a51-helix-tile--2 { grid-column: span 1; }
  .a51-helix-stage { grid-template-columns: 1fr; }
  .a51-helix-spine {
    position: relative;
    top: 0;
  }
  .a51-helix-spine-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
    padding-left: 0;
  }
  .a51-helix-spine-nav::before { display: none; }
  .a51-helix-spine-link {
    background: #fff;
    border: 1px solid var(--hx-line);
    grid-template-columns: auto 1fr;
  }
  .a51-helix-spine-dot { display: none; }
  .a51-helix-finale-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .a51-helix-mosaic { grid-template-columns: 1fr; }
  .a51-helix-spine-nav { grid-template-columns: 1fr; }
  .a51-helix-leaf summary { grid-template-columns: auto 1fr; }
  .a51-helix-leaf-plus { display: none; }
  .a51-helix-leaf-a { padding-left: 1.05rem; }
  .a51-helix-lens-ring { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .a51-helix-orb,
  .a51-helix-lens-ring,
  .a51-helix-chapter-badge,
  .a51-helix-finale-pulse,
  .a51-helix-hero h1 span,
  .a51-helix-tile,
  .a51-helix-stat { animation: none !important; }
}
