/* A.Z TRADERS — storefront styles */

.page-help {
  --orbit-cap-height: 0px;
}

.page-help .page-main {
  padding: 0 !important;
  min-height: calc(100vh - var(--dock-h));
  background: #F3F0EA;
}

.page-help .a57-orbit-cap {
  display: none;
}

.af57-hc-atlas {
  --hc-display: "Syne", "Bricolage Grotesque", system-ui, sans-serif;
  --hc-body: "Manrope", system-ui, sans-serif;
  --hc-teal: #0B5E5E;
  --hc-teal-deep: #042F2F;
  --hc-coral: #FF5E3A;
  --hc-gold: #E8C547;
  --hc-ink: #0F1A1A;
  --hc-muted: #5C7575;
  --hc-paper: #FAFAF8;
  --hc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hc-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --hc-fluid-sm: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
  --hc-fluid-md: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --hc-fluid-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --hc-fluid-xl: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  color: var(--hc-ink);
}

/* ── Atrium search hero ── */
.af57-hc-atrium {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.af57-hc-atrium-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, var(--hc-teal-deep) 0%, #0a4848 45%, #1a3a35 100%);
  pointer-events: none;
}

.af57-hc-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}

.af57-hc-glow-a {
  width: 45%;
  height: 55%;
  top: -15%;
  left: 10%;
  background: var(--hc-coral);
  animation: hc-glow-drift 14s ease-in-out infinite alternate;
}

.af57-hc-glow-b {
  width: 40%;
  height: 50%;
  bottom: -20%;
  right: 5%;
  background: var(--hc-gold);
  animation: hc-glow-drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes hc-glow-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(3%, 4%); }
}

.af57-hc-grid-lines {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    linear-gradient(#fff 1px, transparent 1px),
    linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

.af57-hc-atrium-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  color: #FAFAF8;
}

.af57-hc-eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--hc-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hc-coral);
}

.af57-hc-title {
  margin: 0 0 0.75rem;
  font-family: var(--hc-display);
  font-size: var(--hc-fluid-xl);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #FAFAF8;
}

.af57-hc-title span {
  background: linear-gradient(120deg, var(--hc-gold), var(--hc-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.af57-hc-sub {
  margin: 0 auto 2rem;
  max-width: 46ch;
  font-size: var(--hc-fluid-sm);
  line-height: 1.65;
  color: rgba(250, 250, 248, 0.72);
}

.af57-hc-search-hub {
  text-align: left;
}

.af57-hc-search-ring {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.65rem 0.65rem 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px) saturate(1.3);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--hc-spring);
}

.af57-hc-search-ring:focus-within {
  border-color: var(--hc-coral);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.25),
    0 0 0 4px rgba(255, 94, 58, 0.25);
  transform: translateY(-2px);
}

.af57-hc-search-icon {
  font-size: 1.25rem;
  opacity: 0.65;
  flex-shrink: 0;
}

.af57-hc-search-ring input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: var(--hc-fluid-md);
  color: #fff !important;
  caret-color: #fff;
  min-width: 0;
}

.af57-hc-search-ring input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.af57-hc-search-count {
  flex-shrink: 0;
  min-width: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-family: var(--hc-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hc-gold);
  opacity: 0;
  transition: opacity 0.25s;
}

.af57-hc-search-count.is-visible { opacity: 1; }

.af57-hc-suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.af57-hc-suggest-chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 0.25s var(--hc-spring), background 0.25s, border-color 0.25s, color 0.25s;
}

.af57-hc-suggest-chip:hover,
.af57-hc-suggest-chip.is-active {
  transform: translateY(-2px);
  background: rgba(255, 94, 58, 0.22);
  border-color: var(--hc-coral);
  color: #fff;
}

/* ── Quick orbit cards ── */
.af57-hc-orbit {
  margin-top: -2.25rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  position: relative;
  z-index: 2;
}

.af57-hc-orbit-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.65rem, 2vw, 1rem);
  max-width: 960px;
  margin-inline: auto;
}

.af57-hc-orbit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.15rem 1.2rem 1.15rem 1.2rem;
  border-radius: 1.15rem;
  background: var(--hc-paper);
  border: 1px solid rgba(11, 94, 94, 0.1);
  box-shadow:
    0 4px 0 rgba(11, 94, 94, 0.06),
    0 16px 40px rgba(4, 47, 47, 0.1);
  text-decoration: none;
  color: var(--hc-ink);
  overflow: hidden;
  transition: transform 0.35s var(--hc-spring), box-shadow 0.35s;
  animation: hc-rise 0.5s calc(var(--orbit-i, 0) * 0.07s) var(--hc-ease) both;
}

@keyframes hc-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.af57-hc-orbit-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 94, 94, 0.06), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
}

.af57-hc-orbit-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow:
    0 8px 0 rgba(11, 94, 94, 0.08),
    0 28px 56px rgba(4, 47, 47, 0.14);
}

.af57-hc-orbit-card:hover::before { opacity: 1; }

.af57-hc-orbit-glyph {
  font-size: 1.35rem;
  color: var(--hc-teal);
  margin-bottom: 0.25rem;
}

.af57-hc-orbit-label {
  font-family: var(--hc-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--hc-ink);
}

.af57-hc-orbit-card em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hc-muted);
}

.af57-hc-orbit-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1rem;
  color: var(--hc-coral);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s, transform 0.3s var(--hc-spring);
}

.af57-hc-orbit-card:hover .af57-hc-orbit-arrow {
  opacity: 1;
  transform: none;
}

/* ── Bento topic grid ── */
.af57-hc-bento-wrap {
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem);
  max-width: 1040px;
  margin-inline: auto;
}

.af57-hc-section-head {
  margin-bottom: 1.25rem;
}

.af57-hc-section-head h2,
.af57-hc-library-head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--hc-display);
  font-size: var(--hc-fluid-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hc-ink);
}

.af57-hc-section-head p,
.af57-hc-library-head p {
  margin: 0;
  font-size: var(--hc-fluid-sm);
  color: var(--hc-muted);
}

.af57-hc-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(100px, auto);
  gap: 0.75rem;
}

.af57-hc-bento-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 1.15rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 1.25rem;
  background: var(--hc-paper);
  box-shadow:
    0 2px 0 rgba(11, 94, 94, 0.05),
    0 12px 32px rgba(4, 47, 47, 0.08);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s var(--hc-spring), box-shadow 0.4s, border-color 0.3s;
}

.af57-hc-bento-tile::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--tile-hue, var(--hc-teal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--hc-ease);
}

.af57-hc-bento-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(4, 47, 47, 0.12);
}

.af57-hc-bento-tile.is-active {
  border-color: var(--tile-hue, var(--hc-teal));
  box-shadow:
    0 4px 0 color-mix(in srgb, var(--tile-hue, var(--hc-teal)) 25%, transparent),
    0 20px 48px color-mix(in srgb, var(--tile-hue, var(--hc-teal)) 18%, transparent);
}

.af57-hc-bento-tile.is-active::after { transform: scaleX(1); }

.af57-hc-bento-wide { grid-column: span 7; grid-row: span 2; }
.af57-hc-bento-tall { grid-column: span 5; grid-row: span 2; }
.af57-hc-bento-normal { grid-column: span 4; grid-row: span 1; }

.af57-hc-tile-glyph {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--tile-hue, var(--hc-teal)) 14%, white);
  color: var(--tile-hue, var(--hc-teal));
  font-family: var(--hc-display);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.af57-hc-tile-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tile-hue, var(--hc-teal));
}

.af57-hc-bento-tile strong {
  font-family: var(--hc-display);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--hc-ink);
}

.af57-hc-bento-tile small {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--hc-muted);
  max-width: 36ch;
}

.af57-hc-bento-tile em {
  margin-top: auto;
  padding-top: 0.5rem;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hc-muted);
}

.af57-hc-bento-all {
  grid-column: span 4;
  grid-row: span 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, var(--hc-teal), #147878);
  color: #fff;
  box-shadow: 0 16px 40px rgba(11, 94, 94, 0.3);
}

.af57-hc-bento-all span {
  font-family: var(--hc-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.af57-hc-bento-all small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ── Answer library (always visible) ── */
.af57-hc-library {
  padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(2.5rem, 6vw, 4rem);
  max-width: 1040px;
  margin-inline: auto;
}

.af57-hc-library-head {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed rgba(11, 94, 94, 0.15);
}

.af57-hc-stream {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.af57-hc-entry {
  position: relative;
  padding: 1.15rem 1.25rem 1.25rem;
  border-radius: 1.15rem;
  background: var(--hc-paper);
  border: 1px solid rgba(11, 94, 94, 0.08);
  box-shadow: 0 8px 28px rgba(4, 47, 47, 0.06);
  transition: opacity 0.35s, transform 0.35s var(--hc-spring), box-shadow 0.35s;
  animation: hc-rise 0.45s calc(var(--entry-i, 0) * 0.05s) var(--hc-ease) both;
}

.af57-hc-entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 3px;
  border-radius: 999px;
  background: var(--entry-hue, var(--hc-teal));
  opacity: 0.6;
  transition: opacity 0.3s, width 0.3s;
}

.af57-hc-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(4, 47, 47, 0.1);
}

.af57-hc-entry:hover::before {
  opacity: 1;
  width: 4px;
}

.af57-hc-entry.is-hidden {
  display: none !important;
}

.af57-hc-entry.is-dimmed {
  opacity: 0.35;
  transform: scale(0.98);
}

.af57-hc-entry.is-match {
  border-color: color-mix(in srgb, var(--entry-hue, var(--hc-teal)) 35%, transparent);
  box-shadow: 0 12px 36px color-mix(in srgb, var(--entry-hue, var(--hc-teal)) 15%, transparent);
}

.af57-hc-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.af57-hc-entry-topic {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--entry-hue, var(--hc-teal));
}

.af57-hc-entry-id {
  font-family: var(--hc-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--hc-muted);
}

.af57-hc-entry-q {
  margin: 0 0 0.65rem;
  padding-left: 0.5rem;
  font-family: var(--hc-display);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--hc-ink);
}

.af57-hc-entry-a {
  padding-left: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--hc-muted);
}

.af57-hc-entry-a a {
  color: var(--hc-teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.af57-hc-entry-a a:hover { color: var(--hc-coral); }

.af57-hc-empty {
  margin-top: 1.5rem;
  padding: 1.5rem;
  text-align: center;
  border-radius: 1rem;
  background: var(--hc-paper);
  border: 2px dashed rgba(11, 94, 94, 0.15);
  color: var(--hc-muted);
  font-size: var(--hc-fluid-sm);
}

.af57-hc-empty a { font-weight: 700; color: var(--hc-teal); }

/* ── Bridge CTA ── */
.af57-hc-bridge {
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 4rem);
}

.af57-hc-bridge-panel {
  max-width: 1040px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--hc-teal-deep), #0a5050);
  color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 24px 64px rgba(4, 47, 47, 0.25);
}

.af57-hc-bridge-copy h2 {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--hc-display);
  font-size: var(--hc-fluid-lg);
  font-weight: 800;
  color: #fff;
}

.af57-hc-bridge-copy p {
  margin: 0;
  font-size: var(--hc-fluid-sm);
}

.af57-hc-bridge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.af57-hc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-family: var(--hc-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.3s var(--hc-spring), box-shadow 0.3s;
}

.af57-hc-btn-fill {
  background: linear-gradient(135deg, var(--hc-coral), #ff7a5c);
  color: var(--on-dark) !important;
  box-shadow: 0 8px 24px rgba(255, 94, 58, 0.35);
}

.af57-hc-btn-line {
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: var(--on-dark) !important;
  background: rgba(255, 255, 255, 0.06);
}

.af57-hc-btn-fill:hover,
.af57-hc-btn-line:hover {
  color: var(--on-dark) !important;
}

.af57-hc-btn:hover {
  transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .af57-hc-orbit {
    margin-top: -1.75rem;
  }

  .af57-hc-orbit-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .af57-hc-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .af57-hc-bento-wide,
  .af57-hc-bento-tall,
  .af57-hc-bento-normal,
  .af57-hc-bento-all {
    grid-column: span 1;
    grid-row: span 1;
  }

  .af57-hc-stream {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .af57-hc-atlas {
    padding-bottom: var(--dock-h, 68px);
  }

  .af57-hc-orbit-track {
    grid-template-columns: 1fr;
    overflow-x: auto;
    display: flex;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
  }

  .af57-hc-orbit-card {
    flex: 0 0 78vw;
    scroll-snap-align: start;
  }

  .af57-hc-bridge-actions {
    width: 100%;
  }

  .af57-hc-btn {
    flex: 1;
    min-width: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af57-hc-glow-a,
  .af57-hc-glow-b,
  .af57-hc-orbit-card,
  .af57-hc-entry {
    animation: none;
  }
}
