/* Help center hub: search hero, the guide running order, quick answers,
   free tools, and the ticket-window contact band. */

/* ---------- Hero + search ---------- */

.help-intro {
  padding-bottom: 64px;
}

.help-search {
  position: relative;
  max-width: 640px;
  margin: 30px auto 0;
}

.help-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.help-search input {
  width: 100%;
  min-height: 54px;
  padding: 0 54px 0 48px;
  border: 1px solid rgba(251, 247, 238, 0.25);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--black);
  font-size: 1rem;
}

.help-search input::placeholder {
  color: var(--muted);
}

.help-search input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.help-search input::-webkit-search-cancel-button {
  display: none;
}

.help-search-key {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  pointer-events: none;
}

.help-search.is-searching .help-search-key {
  display: none;
}

.help-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: left;
}

.help-search-group {
  margin: 0;
  padding: 12px 16px 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.help-search-result {
  display: block;
  padding: 9px 16px;
  color: var(--black);
}

.help-search-result strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}

.help-search-result span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.help-search-result:hover,
.help-search-result.is-active {
  background: var(--paper-2);
}

.help-search-result.is-active strong {
  color: var(--red);
}

.help-search-empty {
  margin: 0;
  padding: 18px 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.help-search-empty a {
  color: var(--black);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

.help-popular {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 18px auto 0;
  font-size: 0.9rem;
}

.help-popular span {
  color: rgba(251, 247, 238, 0.55);
  font-weight: 800;
}

.help-popular a {
  color: rgba(251, 247, 238, 0.85);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(200, 149, 42, 0.65);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.help-popular a:hover,
.help-popular a:focus-visible {
  color: var(--warm);
  text-decoration-color: var(--gold);
  outline: 0;
}

/* ---------- Section scaffolding: label column + content column ---------- */

.help-section {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 40px 72px;
  padding-top: 64px;
  padding-bottom: 64px;
}

.help-section + .help-section {
  border-top: 1px solid var(--line);
}

.help-section-label .eyebrow {
  color: var(--red);
}

.help-section-label h2 {
  margin: 0 0 12px;
  max-width: none;
  font-size: 2rem;
  line-height: 1.02;
  text-align: left;
}

.help-section-label p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- The guide running order ---------- */

.guide-path {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.guide-path > li + li {
  border-top: 1px solid var(--line);
}

.guide-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 26px;
  padding-right: 26px;
  color: var(--black);
}

a.guide-row {
  transition: background 150ms ease;
}

a.guide-row:hover,
a.guide-row:focus-visible {
  background: var(--paper-2);
  outline: 0;
}

/* The number cell reads like a torn ticket stub: serif numeral, perforated edge. */
.guide-row-no {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-right: 1px dashed var(--line-strong);
  background: var(--paper-2);
  color: var(--black);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
}

.guide-row-no i {
  color: var(--muted);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

a.guide-row:hover .guide-row-no,
a.guide-row:focus-visible .guide-row-no {
  background: var(--gold);
}

.guide-row-body {
  display: block;
  padding: 22px 0;
  min-width: 0;
}

.guide-row-title {
  display: block;
  margin-bottom: 4px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.15;
}

.guide-row-desc {
  display: block;
  max-width: 560px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.guide-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.guide-row-meta > span + span::before {
  content: "·";
  margin-right: 18px;
  color: var(--line-strong);
}

.guide-row-flag {
  color: var(--gold);
  font-style: italic;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.84rem;
}

.guide-row-progress {
  color: var(--gold);
}

.guide-row-progress.is-done {
  color: var(--red);
}

.guide-row-go {
  color: var(--red);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

a.guide-row:hover .guide-row-go,
a.guide-row:focus-visible .guide-row-go {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.guide-row.is-pending .guide-row-no {
  color: var(--muted);
}

.guide-row.is-pending .guide-row-title {
  color: var(--muted);
}

.guide-row.is-pending .guide-row-meta {
  font-style: italic;
  font-weight: 400;
}

/* ---------- Quick answers ---------- */

.help-faq {
  border-top: 1px solid var(--line-strong);
}

.help-faq-item {
  border-bottom: 1px solid var(--line);
}

.help-faq-item summary {
  position: relative;
  padding: 18px 44px 18px 0;
  list-style: none;
  color: var(--black);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
}

.help-faq-item summary::-webkit-details-marker {
  display: none;
}

.help-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 160ms ease;
}

.help-faq-item[open] summary::after {
  content: "\2212";
  color: var(--red);
}

.help-faq-item summary:hover,
.help-faq-item summary:focus-visible {
  color: var(--red);
  outline: 0;
}

.help-faq-answer {
  padding: 0 44px 20px 0;
}

.help-faq-answer p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.help-faq-answer a {
  color: var(--black);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

/* ---------- Free tools ---------- */

.help-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: stretch;
  gap: 30px;
  padding: 30px;
  border: 1px solid var(--black);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(200, 149, 42, 0.22), transparent 55%),
    var(--black);
  color: var(--warm);
}

.help-tool-copy h3 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  line-height: 1.02;
}

.help-tool-copy p {
  margin: 0;
  max-width: 480px;
  color: rgba(251, 247, 238, 0.74);
  font-size: 0.98rem;
}

.help-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* Live palette strip: stripes widen under the cursor like swatch cards fanning. */
.help-tool-preview {
  display: flex;
  min-height: 170px;
  border: 1px solid rgba(251, 247, 238, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.help-tool-preview span {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  transition: flex-grow 220ms ease;
}

.help-tool-preview:hover span:hover {
  flex-grow: 2.2;
}

/* ---------- Ticket window (escalation) ---------- */

.help-contact {
  padding-top: 0;
  padding-bottom: 78px;
}

.help-contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px 40px;
  padding: 38px 40px;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--warm);
  overflow: hidden;
}

/* A faint row of marquee bulbs across the top of the band. */
.help-contact-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 4px;
  background-image: radial-gradient(circle, var(--marquee-bulb-lit-soft) 0 1.6px, transparent 2px);
  background-size: 22px 4px;
  background-position: 11px 50%;
  opacity: 0.65;
  pointer-events: none;
}

.help-contact-panel h2 {
  margin: 0 0 10px;
  max-width: none;
  font-size: 2rem;
  line-height: 1.02;
  text-align: left;
}

.help-contact-panel p:last-child {
  margin: 0;
  max-width: 520px;
  color: rgba(251, 247, 238, 0.74);
}

.help-contact-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.help-contact-actions .button {
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .help-section {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .help-section-label p:last-child {
    max-width: 560px;
  }

  .help-contact-panel {
    grid-template-columns: 1fr;
  }

  .help-contact-actions {
    justify-items: start;
  }
}

@media (max-width: 760px) {
  .help-intro {
    padding-bottom: 52px;
  }

  .help-search input {
    min-height: 50px;
    font-size: 0.95rem;
  }

  .help-search-key {
    display: none;
  }

  .help-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .guide-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0 18px;
    padding-right: 18px;
  }

  .guide-row-no {
    font-size: 1.35rem;
  }

  .guide-row-body {
    padding: 18px 0;
  }

  .guide-row-go {
    display: none;
  }

  .help-tool {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .help-tool-preview {
    min-height: 120px;
  }

  .help-contact {
    padding-bottom: 56px;
  }

  .help-contact-panel {
    padding: 28px 24px 30px;
  }
}
