/* ============================================================
   Bumpr help center, on the main-direction system (styles.css + nav-a.css).
   One orange ask field, answers as hairline-ruled rows.
   No cards, no shadows: a question is a row.
   ============================================================ */

/* Components below set display; hidden must still win. */
[hidden] { display: none !important; }

/* ---------------- Ask field ---------------- */

.help-ask { padding: calc(clamp(40px, 6vw, 72px) + 76px) 0 clamp(40px, 5vw, 60px); }
.help-ask .wrap { align-items: stretch; }
.ask-inner { max-width: 760px; }

.aud { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-bottom: var(--s-xl); }
.aud .label { color: var(--roast-soft); margin-right: var(--s-sm); }
.aud-tab {
  min-height: 48px; padding: 0 2px;
  border: 0; background: none; cursor: pointer;
  font-family: var(--sora); font-weight: 700; font-size: 17px; letter-spacing: -0.02em;
  color: var(--roast-soft);
}
.aud-tab span {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border-radius: var(--r-chip);
  transition: background .25s var(--ease-out), color .25s;
}
.aud-tab:hover span { color: var(--roast); }
/* On orange the active stamp inverts to roast, the same call nav-a makes for its stamp. */
.aud-tab[aria-pressed="true"] span { background: var(--roast); color: var(--cream); }

.help-ask .hero-sub { margin-top: var(--s-md); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search { position: relative; margin-top: var(--s-xxl); max-width: 640px; }
.search svg {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--roast); pointer-events: none;
}
.search input {
  width: 100%; height: 60px; padding: 0 20px 0 52px;
  border: 0; border-radius: var(--r-control);
  background: var(--cream); color: var(--roast);
  font-family: var(--inter); font-weight: 500; font-size: 17px;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--clay); opacity: 1; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input:focus { outline: 2px solid var(--roast); outline-offset: 3px; }

.popular { margin-top: var(--s-md); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-xl); font-size: 14px; }
.popular .label { color: var(--roast-soft); }
.popular a {
  padding: 12px 0; font-weight: 700; color: var(--roast);
  text-decoration: underline; text-decoration-thickness: 1.5px;
  text-underline-offset: 4px; text-decoration-color: rgba(46,21,2,.35);
}
.popular a:hover { text-decoration-color: var(--roast); }

/* ---------------- Body: index + answers ---------------- */

.help-body { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }
.help-grid { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }

.topic-index { position: sticky; top: 92px; }
.topic-index .label { display: block; color: var(--clay); padding-bottom: var(--s-md); }
.topic-index ol { list-style: none; border-top: 1px solid var(--hairline); }
.topic-index a {
  display: flex; align-items: baseline; gap: var(--s-md);
  padding: 14px 0; border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  font-family: var(--sora); font-weight: 700; font-size: 15px; letter-spacing: -0.02em; line-height: 1.25;
  transition: color .15s;
}
.topic-index a b { margin-left: auto; font-family: var(--mono); font-size: 12.5px; letter-spacing: -0.02em; color: var(--clay); }
.topic-index a:hover { color: var(--clay); }
/* Position mark: radius 3, the system's tick. */
.topic-index a::before {
  content: ""; flex: none; align-self: center;
  width: 8px; height: 8px; border-radius: var(--r-mark);
  background: var(--primary);
  margin-right: -20px; opacity: 0; transform: scale(.4);
  transition: opacity .2s, transform .3s var(--ease-out), margin .3s var(--ease-out);
}
.topic-index a.is-on::before { opacity: 1; transform: none; margin-right: 0; }

/* ---------------- Topics and answers ---------------- */

.topic { scroll-margin-top: 96px; }
.topic + .topic { margin-top: clamp(48px, 6vw, 72px); }
.topic-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-lg); padding-bottom: var(--s-md); }
.topic-head h2 { font-family: var(--sora); font-weight: 800; font-size: clamp(1.625rem, 2.8vw, 2.125rem); line-height: 1.1; letter-spacing: -0.028em; }
.topic-head span { flex: none; font-size: 12.5px; color: var(--clay); }
.topic-head span b { font-family: var(--mono); letter-spacing: -0.02em; }

.qa { border-top: 1px solid var(--hairline); scroll-margin-top: 96px; }
.qa:last-child { border-bottom: 1px solid var(--hairline); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-lg);
  min-height: 72px; padding: 14px 0;
  font-family: var(--sora); font-weight: 700; font-size: 18px; line-height: 1.3; letter-spacing: -0.02em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:focus-visible { outline-offset: 2px; }
.qa summary i {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--r-full);
  background: var(--cream-dim); color: var(--roast);
  transition: background .2s;
}
.qa summary i svg { width: 16px; height: 16px; transition: transform .35s var(--ease-out); }
.qa summary:hover i { background: var(--primary-wash); }
.qa[open] summary i { background: var(--primary); }
.qa[open] summary i svg { transform: rotate(45deg); }

.answer { padding: 0 60px var(--s-xxl) 0; max-width: calc(64ch + 60px); }
.answer p { font-size: 15px; font-weight: 400; line-height: 1.6; }
.answer p + p, .answer p + .facts, .answer .facts + p { margin-top: var(--s-md); }
.answer b { font-family: var(--mono); letter-spacing: -0.02em; }
.answer strong { font-weight: 700; }
.answer a { font-weight: 700; text-underline-offset: 3px; }
.answer a:hover { color: var(--clay); }
.answer .facts { margin-top: var(--s-md); max-width: none; }
.answer .fact { grid-template-columns: 128px 1fr; gap: var(--s-lg); padding: 10px 0; }
.answer .fact dd { font-size: 14.5px; }
.qa[open] .answer { animation: answer-in .35s var(--ease-out); }
@keyframes answer-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------------- Search states ---------------- */

.no-match { padding: var(--s-xxxl) 0; border-top: 1px solid var(--hairline); }
.no-match h2 { font-family: var(--sora); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; letter-spacing: -0.028em; overflow-wrap: anywhere; }
.no-match p { margin-top: var(--s-sm); color: var(--clay); max-width: 52ch; }
.no-match .stamp { margin-top: var(--s-xl); }
.other-hint {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-sm) var(--s-lg);
  margin-bottom: var(--s-xxl); padding: var(--s-md) var(--s-lg);
  background: var(--primary-wash); color: var(--roast-soft);
  border-radius: var(--r-control);
  font-size: 13.5px;
}
.other-hint b { font-family: var(--mono); letter-spacing: -0.02em; color: var(--roast); }
.other-hint button {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--sora); font-weight: 700; font-size: 14px; letter-spacing: -0.02em; color: var(--roast);
  text-decoration: underline; text-underline-offset: 4px;
}

/* ---------------- Contact ---------------- */

.help-contact { background: var(--cream-dim); padding: clamp(56px, 7vw, 96px) 0; scroll-margin-top: 64px; }
.help-contact .closer-sub { max-width: 52ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--s-md); margin-top: clamp(28px, 4vw, 40px); }
.commit-roast { background: var(--roast); color: var(--cream); }
.commit-roast:hover { background: var(--roast-soft); }
.commit small { display: block; margin-top: 4px; font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: -0.02em; opacity: .8; }
.commit-roast small { color: var(--sand); opacity: 1; }

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

@media (max-width: 900px) {
  .help-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-xxxl); }
  /* The index becomes a band pinned under the nav bar (76px tall; 68px on phones): a ground, not a floating bar. */
  .topic-index {
    top: 76px; z-index: 10;
    margin: 0 calc(-1 * var(--s-xl));
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
  }
  .topic-index .label { display: none; }
  .topic-index ol { display: flex; gap: var(--s-sm); overflow-x: auto; scrollbar-width: none; border: 0; padding: 8px var(--s-xl); }
  .topic-index ol::-webkit-scrollbar { display: none; }
  .topic-index a { white-space: nowrap; border: 0; min-height: 44px; padding: 0 14px; border-radius: var(--r-chip); background: var(--cream-dim); align-items: center; }
  .topic-index a::before { display: none; }
  .topic-index a b { margin-left: 0; }
  .topic-index a.is-on { background: var(--primary); color: var(--roast); }
  .topic-index a.is-on b { color: var(--roast-soft); }
  .help-body { padding-top: 0; }
  .topic, .qa { scroll-margin-top: 136px; }
  .help-grid > div:last-child { padding-top: var(--s-xxl); }
}

@media (max-width: 720px) {
  .topic-index { top: 68px; }
  .help-ask { padding-top: 100px; }
  .help-ask .hero-type { font-size: 2.6rem; }
  .aud .label { width: 100%; margin-bottom: 2px; }
  .search input { height: 56px; }
  .qa summary { font-size: 16.5px; }
  .answer { padding-right: 0; }
  .answer .fact { grid-template-columns: 1fr; gap: 2px; }
  .contact-actions { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .qa[open] .answer { animation: none; }
  .qa summary i svg, .aud-tab span, .topic-index a::before { transition: none; }
}
