/* faq section: owned by its partial templates/marketing/_faq.html.
   Native <details> accordions on the cool canvas. Heading column + accordion column
   on desktop, one column on phones. Height animation only where ::details-content and
   interpolate-size exist and motion is welcome; otherwise answers simply appear. */

.faq-section { background:var(--marketing-paper); color:var(--marketing-ink); padding-block:112px 120px; }
.faq-layout { display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); gap:clamp(48px,7vw,112px); align-items:start; }

/* Heading column: sticks beside the questions on wide screens. */
.faq-intro { align-self:start; }
@media (min-width:901px) and (min-height:720px) { .faq-intro { position:sticky; top:120px; } }
.faq-intro .eyebrow { margin-bottom:20px; }
.faq-intro h1 { margin:0; font:700 clamp(44px,5.4vw,80px)/1 var(--display-font); letter-spacing:-.055em; }
.faq-intro h1 span { display:block; color:var(--field-teal-deep); }
.faq-lede { max-width:380px; margin:24px 0 0; color:var(--marketing-muted); font-size:18px; line-height:1.65; }
.support-contact { max-width:380px; margin-top:28px; padding:22px; border:1px solid var(--marketing-line); border-radius:20px; background:var(--field-teal-tint); }
.support-contact h2 { margin:0 0 10px; font:700 20px/1.3 var(--display-font); }
.support-contact p { margin:0; color:var(--marketing-muted); font-size:16px; line-height:1.65; }
.support-contact a { color:var(--field-teal-deep); font-weight:600; text-underline-offset:3px; overflow-wrap:anywhere; }
.faq-item summary[id] { scroll-margin-top:16px; }

.faq-index { margin-top:40px; }
.faq-index ul { display:grid; gap:2px; margin:0; padding:0; list-style:none; max-width:340px; }
.faq-index a { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:48px; padding:0 16px; border-radius:14px; color:var(--marketing-ink); font-size:16px; font-weight:600; text-decoration:none; transition:background-color .15s ease; }
.faq-index a:hover { background:var(--field-teal-tint); color:var(--field-teal-deep); }
.faq-index-count { display:inline-grid; place-items:center; min-width:28px; height:28px; padding:0 8px; border-radius:999px; background:#fff; box-shadow:inset 0 0 0 1px var(--marketing-line); color:var(--marketing-muted); font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }


/* Accordion column */
.faq-groups { display:grid; gap:48px; }
/* The shell's html scroll-padding-top already clears the sticky header; this only adds breathing room. */
.faq-group { scroll-margin-top:16px; }
.faq-group-title { display:flex; align-items:center; gap:12px; margin:0 0 16px; padding-left:4px; color:var(--marketing-ink); font:700 22px/1.3 var(--display-font); letter-spacing:-.02em; }
.faq-group-title::before { content:""; flex:none; width:10px; height:10px; border-radius:3px; background:var(--field-teal); transform:rotate(45deg); }
.faq-list { border-radius:24px; background:#fff; box-shadow:0 0 0 1px var(--marketing-line), 0 18px 40px -28px #112f3740; }

.faq-item { scroll-margin-top:16px; }
.faq-item + .faq-item { border-top:1px solid var(--marketing-line); }
.faq-item summary { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:44px; padding:22px 24px; list-style:none; cursor:pointer; border-radius:24px; color:var(--marketing-ink); font-size:17px; font-weight:600; line-height:1.45; transition:background-color .15s ease; -webkit-tap-highlight-color:transparent; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary::marker { content:""; }
.faq-item:not(:first-child) summary { border-top-left-radius:0; border-top-right-radius:0; }
.faq-item:not(:last-child) summary { border-bottom-left-radius:0; border-bottom-right-radius:0; }
.faq-item summary:hover { background:#f3f9f9; }
.faq-item summary:focus-visible { outline-offset:-3px; }
.faq-item[open] summary { padding-bottom:12px; }
.faq-item[open] summary:hover { background:transparent; }

/* + / − indicator drawn with two bars; the vertical bar folds away when open. */
.faq-icon { position:relative; flex:none; width:32px; height:32px; border-radius:50%; box-shadow:inset 0 0 0 1.5px var(--field-teal-light); transition:background-color .2s ease, box-shadow .2s ease; }
.faq-icon::before, .faq-icon::after { content:""; position:absolute; top:50%; left:50%; width:12px; height:2px; margin:-1px 0 0 -6px; border-radius:2px; background:var(--field-teal-deep); transition:transform .25s ease, background-color .2s ease; }
.faq-icon::after { transform:rotate(90deg); }
.faq-item summary:hover .faq-icon { box-shadow:inset 0 0 0 1.5px var(--field-teal); }
.faq-item[open] .faq-icon { background:var(--field-teal-deep); box-shadow:none; }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background:#fff; }
.faq-item[open] .faq-icon::after { transform:rotate(0deg) scaleX(0); }

.faq-nowrap { white-space:nowrap; }
.faq-answer p { max-width:62ch; margin:0; padding:0 76px 24px 24px; color:var(--marketing-muted); font-size:16px; line-height:1.7; }

/* Smooth open/close where the browser can animate to height:auto. */
@supports selector(::details-content) and (interpolate-size:allow-keywords) {
  @media (prefers-reduced-motion:no-preference) {
    .faq-section { interpolate-size:allow-keywords; }
    .faq-item::details-content { height:0; overflow:clip; transition:height .3s cubic-bezier(.2,.7,.2,1), content-visibility .3s allow-discrete; }
    .faq-item[open]::details-content { height:auto; }
    .faq-answer { opacity:0; transition:opacity .2s ease; }
    .faq-item[open] .faq-answer { opacity:1; transition-delay:.06s; }
    @starting-style { .faq-item[open] .faq-answer { opacity:0; } }
  }
}

@media (max-width:1100px) {
  .faq-layout { grid-template-columns:minmax(0,4fr) minmax(0,7fr); gap:48px; }
}

/* One column: heading, topic chips, then the questions. */
@media (max-width:900px) {
  .faq-section { padding-block:80px 88px; }
  .faq-layout { grid-template-columns:minmax(0,1fr); gap:0; }
  .faq-intro { display:contents; }
  .faq-intro h1 { font-size:clamp(40px,11.5vw,56px); }
  .faq-intro h1 span { display:inline; }
  .faq-lede { max-width:520px; margin-top:16px; font-size:17px; }
  .faq-index { display:none; }
  .faq-groups { gap:40px; margin-top:40px; }
}

@media (max-width:520px) {
  .faq-section { padding-block:64px 72px; }
  .faq-group-title { font-size:20px; margin-bottom:12px; }
  .faq-list { border-radius:20px; }
  .faq-item summary { gap:16px; padding:18px 16px 18px 18px; font-size:16px; border-radius:20px; }
  .faq-item[open] summary { padding-bottom:10px; }
  .faq-icon { width:30px; height:30px; }
  .faq-answer p { padding:0 18px 20px; font-size:16px; line-height:1.65; }
}

.faq-answer a { color:var(--field-teal-deep); text-underline-offset:3px; }
