/*
 * STRUCTURE AUDIT — help-center.php layouts across Projects
 * — Search hero + category card row + plain FAQ accordion (a36, a97 punchcard pc-strip, many legacy stores)
 * — Tab-only readout / domino stacks (a103, bespoke)
 * — Two-column topic index + reader pane (enterprise pattern; a119 audit note)
 * — Bento topic grid + chip tabs + stacked sections (a119 bento prior)
 * — Guide path hp-guide: mast search · “What do you need help with?” tiles · inline reveal · nested toggles (a119, a120 prior)
 * — CHOSEN (this file hc-*): TOP_SPOTLIGHT_SHELF — five open quick-answer cards · shelf frame (topic index | reader toolbar + panes) · no hero search · no guided picker · not accordion-only wall
 */

.page-help {
  overflow-x: clip;
  background: var(--at-canvas);
}

.hc-hub {
  padding: var(--at-space-5) 0 var(--at-space-7);
  min-width: 0;
}

.hc-hub__wrap {
  min-width: 0;
  max-width: 72rem;
}

.hc-hub__mast {
  margin-bottom: var(--at-space-4);
  max-width: 40rem;
}

.hc-hub__mast .ds-title {
  font-size: clamp(1.5rem, 3vw, var(--at-text-xl));
}

.hc-hub__mast .ds-lede {
  max-width: 48ch;
}

.hc-hub__search-rail {
  margin-top: var(--at-space-4);
  max-width: 40rem;
}

body.a120-body.page-help .hc-hub__search-rail {
  padding-bottom: var(--at-space-2);
}

@media (max-width: 767px) {
  body.a120-body.page-help .hc-hub__search-rail {
    margin-inline: calc(-1 * var(--at-gutter));
    padding: 0 var(--at-gutter) var(--at-space-2);
    max-width: none;
  }
}

.hc-hub__search.ds-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--at-space-3);
  padding: var(--at-space-3) var(--at-space-4);
  margin: 0;
  background: color-mix(in srgb, var(--at-surface) 94%, var(--at-canvas) 6%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hc-hub__search-label {
  flex: 1 1 12rem;
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.hc-hub__search-title {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 600;
  color: var(--at-ink-soft);
}

.hc-hub__search-label .ds-input {
  width: 100%;
  min-height: 2.75rem;
}

.hc-hub__search-clear {
  min-height: 2.75rem;
  flex: 0 0 auto;
}

@media (max-width: 479px) {
  .hc-hub__search.ds-card {
    flex-direction: column;
    align-items: stretch;
  }

  .hc-hub__search-clear {
    width: 100%;
    justify-content: center;
  }
}

/* Spotlight — open answer blocks */
.hc-spotlight {
  margin-bottom: var(--at-space-6);
  min-width: 0;
}

.hc-spotlight__head {
  margin-bottom: var(--at-space-4);
  max-width: 48ch;
}

.hc-spotlight__head .ds-title {
  font-size: var(--at-text-lg);
  margin: 0 0 0.35rem;
}

.hc-spotlight__lede {
  margin: 0;
  font-size: var(--at-text-sm);
}

.hc-spotlight__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--at-space-3);
  min-width: 0;
}

@media (min-width: 640px) {
  .hc-spotlight__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--at-space-4);
  }
}

.hc-spotlight__card {
  padding: var(--at-space-4);
  min-width: 0;
  border: 1px solid var(--at-line);
  box-shadow: var(--at-shadow-sm);
}

.hc-spotlight__card .ds-kicker {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.hc-spotlight__q {
  margin: 0.35rem 0 0.5rem;
  font-family: var(--at-font-display);
  font-size: var(--at-text-md);
  font-weight: 700;
  line-height: 1.35;
  color: var(--at-ink);
  overflow-wrap: anywhere;
}

.hc-spotlight__a {
  font-size: var(--at-text-sm);
  line-height: 1.55;
  color: var(--at-ink);
  overflow-wrap: anywhere;
}

.hc-spotlight__a a {
  color: var(--at-moss);
  font-weight: 600;
}

.hc-spotlight__item[hidden],
.hc-spotlight[hidden] {
  display: none !important;
}

/* Shelf — index + reader */
.hc-shelf {
  min-width: 0;
}

.hc-shelf__head {
  margin-bottom: var(--at-space-4);
  max-width: 52ch;
}

.hc-shelf__head .ds-title {
  font-size: var(--at-text-lg);
  margin: 0 0 0.35rem;
}

.hc-shelf__lede {
  margin: 0;
  font-size: var(--at-text-sm);
}

.hc-shelf__frame {
  display: grid;
  gap: var(--at-space-4);
  min-width: 0;
  align-items: start;
}

@media (min-width: 1024px) {
  .hc-shelf__frame {
    grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
    gap: var(--at-space-5);
  }

  body.a120-body.page-help .hc-shelf__index {
    align-self: start;
    padding-right: 0.15rem;
  }
}

.hc-shelf__topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--at-space-2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
  scroll-snap-type: x proximity;
}

@media (min-width: 1024px) {
  .hc-shelf__topics {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }
}

.hc-shelf__topic {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: grid;
  gap: 0.15rem;
  width: 100%;
  min-width: min(16rem, 78vw);
  min-height: 2.75rem;
  padding: var(--at-space-3);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-md);
  background: var(--at-surface);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color var(--at-dur) var(--at-ease), background var(--at-dur) var(--at-ease);
}

@media (min-width: 1024px) {
  .hc-shelf__topic {
    min-width: 0;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: var(--at-space-3);
    align-items: start;
  }

  .hc-shelf__topic-count {
    grid-column: 2;
  }
}

.hc-shelf__topic:hover {
  border-color: var(--at-moss);
}

.hc-shelf__topic:focus-visible {
  outline: 2px solid var(--at-moss);
  outline-offset: 2px;
}

.hc-shelf__topic.is-active {
  border-color: var(--at-moss);
  background: color-mix(in srgb, var(--at-moss) 8%, var(--at-surface));
  box-shadow: inset 3px 0 0 var(--at-terra);
}

.hc-shelf__topic.is-dim {
  opacity: 0.45;
}

.hc-shelf__topic-stage {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--at-ink-soft);
}

.hc-shelf__topic-title {
  display: block;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-sm);
  font-weight: 800;
  color: var(--at-moss);
  line-height: 1.3;
}

.hc-shelf__topic-blurb {
  display: block;
  font-size: var(--at-text-xs);
  color: var(--at-ink-soft);
  line-height: 1.4;
  margin-top: 0.15rem;
}

@media (max-width: 1023px) {
  .hc-shelf__topic-blurb {
    display: none;
  }
}

.hc-shelf__topic-count {
  font-size: var(--at-text-xs);
  font-weight: 700;
  color: var(--at-ink-soft);
}

.hc-shelf__reader {
  min-width: 0;
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-lg);
  background: color-mix(in srgb, var(--at-surface) 96%, var(--at-canvas-deep) 4%);
  padding: var(--at-space-4);
  scroll-margin-top: calc(var(--at-nav-h) + 5rem);
  box-shadow: var(--at-shadow-sm);
}

.hc-shelf__toolbar {
  display: none;
  margin-bottom: var(--at-space-2);
}

.hc-shelf--in-topic .hc-shelf__toolbar {
  display: block;
}

.hc-shelf__back {
  min-height: 2.75rem;
  width: 100%;
  justify-content: center;
}

.hc-shelf__hint {
  margin: 0 0 var(--at-space-3);
  font-size: var(--at-text-sm);
  color: var(--at-ink-soft);
}

@media (min-width: 1024px) {
  .hc-shelf__hint {
    display: none;
  }
}

.hc-shelf--in-topic .hc-shelf__hint {
  display: none;
}

.hc-shelf__panes {
  min-width: 0;
}

.hc-shelf__pane[hidden] {
  display: none !important;
}

.hc-shelf__pane-head .ds-title {
  font-size: var(--at-text-lg);
  margin: 0.25rem 0;
}

.hc-faq-stack {
  display: grid;
  gap: var(--at-space-2);
  margin-top: var(--at-space-4);
  min-width: 0;
}

.hc-faq {
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-sm);
  overflow: hidden;
  min-width: 0;
}

.hc-faq[hidden] {
  display: none !important;
}

.hc-faq__toggle {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--at-space-3);
  padding: var(--at-space-3);
  border: none;
  background: var(--at-surface);
  text-align: left;
  cursor: pointer;
  min-height: 2.75rem;
  font: inherit;
  color: inherit;
}

.hc-faq__toggle:focus-visible {
  outline: 2px solid var(--at-moss);
  outline-offset: -2px;
}

.hc-faq__toggle[aria-expanded="true"] {
  background: color-mix(in srgb, var(--at-moss) 8%, var(--at-surface));
  border-bottom: 1px dashed var(--at-line);
}

.hc-faq__mark {
  flex-shrink: 0;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 800;
  color: var(--at-ink-soft);
}

.hc-faq__q {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-sm);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hc-faq__body {
  padding: var(--at-space-3) var(--at-space-3) var(--at-space-4);
  font-size: var(--at-text-sm);
  line-height: 1.55;
  color: var(--at-ink);
  overflow-wrap: anywhere;
}

.hc-faq__body[hidden] {
  display: none;
}

.hc-faq__body a {
  color: var(--at-moss);
  font-weight: 600;
}

.hc-faq__body.is-open {
  display: block;
}

/* Mobile stacked reader */
@media (max-width: 1023px) {
  .hc-shelf--in-topic .hc-shelf__index {
    display: none;
  }

  .hc-shelf--in-topic .hc-shelf__reader {
    border-color: var(--at-moss);
  }

  .hc-shelf--mobile-idle .hc-shelf__panes {
    display: none;
  }

}

.hc-hub__body[hidden],
.hc-shelf[hidden] {
  display: none !important;
}

.hc-hub__empty {
  margin: 0 0 var(--at-space-4);
  padding: 0.55rem 0.75rem;
  border-radius: var(--at-radius-sm);
  background: color-mix(in srgb, var(--at-terra) 12%, var(--at-surface));
  font-size: var(--at-text-sm);
  font-weight: 600;
  max-width: 40rem;
}

.hc-hub__empty[hidden] {
  display: none;
}

/* Search hits */
.hc-hub__search-results {
  display: grid;
  gap: var(--at-space-3);
  margin-bottom: var(--at-space-5);
  min-width: 0;
}

.hc-hub__search-results[hidden] {
  display: none !important;
}

.hc-search-hit {
  padding: var(--at-space-4);
  min-width: 0;
}

.hc-search-hit .ds-title {
  font-size: var(--at-text-md);
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
}

.hc-search-hit__body {
  font-size: var(--at-text-sm);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.hc-search-hit__body a {
  color: var(--at-moss);
  font-weight: 600;
}

/* CTA */
.hc-hub__cta {
  display: grid;
  gap: var(--at-space-4);
  padding: var(--at-space-4);
  min-width: 0;
  border: 1px solid var(--at-line);
  margin-top: var(--at-space-6);
  background: color-mix(in srgb, var(--at-surface) 94%, var(--at-dew) 6%);
}

.hc-hub__cta .ds-title {
  font-size: var(--at-text-lg);
  margin: 0.15rem 0 0;
}

@media (min-width: 768px) {
  .hc-hub__cta {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    padding: var(--at-space-5);
  }
}

.hc-hub__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--at-space-3);
}

.hc-hub__cta-actions .ds-btn {
  flex: 1 1 10rem;
  min-height: 2.75rem;
  justify-content: center;
}

.hc-hub__cta-meta {
  margin: 0.35rem 0 0;
  font-size: var(--at-text-sm);
  color: var(--at-ink-soft);
}

.hc-hub__cta-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: var(--at-space-2);
  font-size: var(--at-text-sm);
  font-weight: 600;
}

.hc-hub__cta-nav a {
  color: var(--at-moss);
}

@media (max-width: 359px) {
  .hc-hub__cta-actions {
    flex-direction: column;
  }

  .hc-hub__cta-actions .ds-btn {
    width: 100%;
  }
}
