/* FAQ page — search, table of contents, and accordion styles.
   Nav, drawer, footer, tokens, and buttons come from tokens.css + base.css + chrome.css. */

/* content links (base.css sets `a { color: inherit }` for the nav/footer chrome) */
a{ color: var(--magenta); }
a:hover{ color: var(--magenta-deep); }

/* FAQ uses a slightly tighter type scale than the landing page */
h1{ font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2{ font-size: clamp(1.6rem, 2.6vw, 2.1rem); }

/* -------- hero -------- */
.faq-hero{
  position: relative; overflow: hidden;
  padding: clamp(44px, 6vw, 76px) 0 clamp(36px, 5vw, 56px);
  text-align: center;
}
.faq-hero::before{
  content:""; position:absolute; width: 360px; height:360px; border-radius:50%;
  background: radial-gradient(circle, var(--magenta-soft), transparent 70%);
  top: -160px; right: -80px; opacity:.6; pointer-events:none;
}
.faq-hero::after{
  content:""; position:absolute; width: 320px; height:320px; border-radius:50%;
  background: radial-gradient(circle, #FFE9C2, transparent 70%);
  bottom: -180px; left: -120px; opacity:.6; pointer-events:none;
}
.faq-eyebrow{
  display:inline-block; position: relative;
  font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--magenta); background: var(--magenta-soft);
  padding: 8px 16px; border-radius: var(--radius-pill); margin-bottom: 20px;
}
.faq-hero-logo{
  position: relative;
  display: block;
  width: clamp(240px, 30vw, 360px);
  max-width: 100%;
  height: auto;
  margin: 0 auto 18px;
}
.faq-hero h1{ position: relative; margin-bottom: 14px; }
.faq-hero .sub{
  position: relative;
  max-width: 620px; margin: 0 auto; color: var(--ink-2);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
}

/* search */
.search-wrap{
  position: relative; max-width: 620px; margin: 30px auto 0;
}
.search-box{
  position: relative; display:flex; align-items:center;
  background: var(--paper); border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-box:focus-within{ border-color: var(--magenta); box-shadow: 0 8px 26px rgba(233,30,118,.18); }
.search-box .ic{
  display:grid; place-items:center; width: 54px; height: 54px; flex:none; color: var(--ink-3);
}
.search-box input{
  flex: 1; border: none; background: transparent; outline: none;
  font-family: var(--body); font-size: 1.05rem; color: var(--ink);
  padding: 15px 8px 15px 0;
}
.search-box input::placeholder{ color: var(--ink-3); }
.search-clear{
  border: none; background: transparent; color: var(--ink-3);
  width: 48px; height: 54px; flex:none; font-size: 1.2rem; display:none;
  align-items:center; justify-content:center;
}
.search-clear:hover{ color: var(--magenta); }
.search-clear.show{ display:flex; }
.search-status{
  position: relative;
  margin-top: 14px; font-weight: 600; font-size: .92rem; color: var(--ink-3);
  min-height: 1.2em;
}

/* -------- layout: TOC + content -------- */
.faq-layout{
  display:grid;
  grid-template-columns: 268px 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding-top: clamp(20px, 3vw, 36px);
  padding-bottom: clamp(64px, 8vw, 100px);
}

/* TOC sidebar */
.toc{
  position: sticky; top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 6px;
}
.toc-title{
  font-weight: 800; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 12px 12px;
}
.toc-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap: 2px; }
.toc-list a{
  display:flex; gap: 10px; align-items:baseline;
  text-decoration:none; color: var(--ink-2);
  font-weight: 600; font-size: .94rem; line-height: 1.3;
  padding: 9px 12px; border-radius: 10px;
  border-left: 3px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.toc-list a .num{
  font-family: var(--display); font-weight: 400; font-size: .82rem;
  color: var(--magenta); flex: none;
}
.toc-list a:hover{ background: var(--paper); color: var(--ink); }
.toc-list a.active{
  background: var(--magenta-soft); color: var(--magenta-deep);
  border-left-color: var(--magenta);
}
.toc-list a.active .num{ color: var(--magenta-deep); }

/* content */
.faq-main{ min-width: 0; }
.faq-toolbar{
  display:flex; align-items:center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 22px;
}
.faq-toolbar .count{ font-weight: 600; color: var(--ink-3); font-size: .92rem; }
.expand-toggle{
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--radius-pill); padding: 9px 18px;
  font-weight: 700; font-size: .9rem; color: var(--ink);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.expand-toggle:hover{ border-color: var(--magenta); color: var(--magenta); transform: translateY(-1px); }

.faq-section{ margin-bottom: 40px; scroll-margin-top: 96px; }
.faq-section:last-child{ margin-bottom: 0; }
.faq-section-head{
  display:flex; align-items:center; gap: 14px;
  padding-bottom: 14px; margin-bottom: 16px;
  border-bottom: 2px solid var(--line);
}
.faq-section-head .sec-num{
  font-family: var(--display); font-weight: 400;
  width: 44px; height: 44px; flex:none;
  display:grid; place-items:center;
  background: var(--magenta); color: white;
  border-radius: 12px; font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(233,30,118,.28);
}
.faq-section-head h2{ font-size: clamp(1.5rem, 2.2vw, 1.95rem); }

/* accordion */
.qa{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.qa[open]{ box-shadow: var(--shadow-md); border-color: var(--magenta-soft); }
.qa summary{
  list-style: none; cursor: pointer;
  display:flex; align-items:flex-start; gap: 14px;
  padding: 18px 22px;
  font-family: var(--display); font-weight: 400;
  font-size: 1.12rem; line-height: 1.25; color: var(--ink);
  transition: color .18s ease;
}
.qa summary::-webkit-details-marker{ display:none; }
.qa summary:hover{ color: var(--magenta); }
.qa summary .chev{
  margin-left: auto; flex: none; width: 24px; height: 24px;
  display:grid; place-items:center; color: var(--magenta);
  transition: transform .28s ease;
}
.qa[open] summary .chev{ transform: rotate(180deg); }
.qa .answer{
  padding: 0 22px 20px 22px;
  animation: qaFade .28s ease;
}
.qa .answer p{ margin: 0 0 .8em; color: var(--ink-2); font-size: 1rem; line-height: 1.6; }
.qa .answer p:last-child{ margin-bottom: 0; }
.qa .answer strong.soln{ color: var(--ink); }
.qa .answer ul{ margin: 0 0 .8em; padding-left: 22px; color: var(--ink-2); line-height: 1.6; }
.qa .answer li{ margin-bottom: 6px; }
.qa .answer a{ word-break: break-word; }
@keyframes qaFade{ from{ opacity: 0; transform: translateY(-4px); } to{ opacity: 1; transform: none; } }

mark.hl{ background: #FFE9A8; color: inherit; border-radius: 3px; padding: 0 1px; }

.no-results{
  display:none;
  text-align:center; padding: 60px 20px; color: var(--ink-3);
}
.no-results.show{ display:block; }
.no-results .big{ font-family: var(--display); font-size: 1.6rem; color: var(--ink); margin-bottom: 8px; }

.hidden{ display:none !important; }

/* back to top */
.to-top{
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--magenta); color: white; border: none;
  box-shadow: 0 8px 20px rgba(233,30,118,.4);
  display:grid; place-items:center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .2s ease;
}
.to-top.show{ opacity: 1; visibility: visible; transform: none; }
.to-top:hover{ background: var(--magenta-deep); }

/* still-need-help card */
.help-card{
  margin-top: 44px;
  background: var(--magenta);
  background-image: linear-gradient(135deg, var(--magenta) 0%, #FF6FA8 100%);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  text-align: center; color: white;
  box-shadow: var(--shadow-md);
}
.help-card h3{ color: white; font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 10px; }
.help-card p{ color: rgba(255,255,255,.92); margin: 0 auto 22px; max-width: 480px; }
.help-card .btn{ background: white; color: var(--magenta); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.help-card .btn:hover{ background: var(--ink); color: white; }

/* -------- responsive -------- */
@media (max-width: 940px){
  .faq-layout{ grid-template-columns: 1fr; }
  .toc{
    position: static; max-height: none; overflow: visible;
    padding-right: 0; margin-bottom: 8px;
  }
  .toc-inner{
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 14px 12px; box-shadow: var(--shadow-sm);
  }
  .toc-list{ flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .toc-list a{
    border-left: none; border: 1.5px solid var(--line);
    border-radius: var(--radius-pill); padding: 8px 14px; font-size: .88rem;
  }
  .toc-list a.active{ border-color: var(--magenta); }
  .toc-details summary{
    cursor: pointer; list-style: none;
    font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-3); display:flex; align-items:center; gap: 8px;
  }
  .toc-details summary::-webkit-details-marker{ display:none; }
  .toc-details summary .tchev{ transition: transform .25s ease; }
  .toc-details[open] summary .tchev{ transform: rotate(180deg); }
  .toc-details .toc-list{ margin-top: 12px; }
}
@media (min-width: 941px){
  .toc-details > summary{ display: none; }
}
@media (max-width: 560px){
  .faq-section-head .sec-num{ width: 38px; height: 38px; font-size: 1rem; }
  .qa summary{ font-size: 1.04rem; padding: 16px 18px; }
  .qa .answer{ padding: 0 18px 18px; }
}
