/* faq.css: /faq/ (SPEC 5 P7). One porcelain band. A page head with the H1 set large on the left and, bottom-right,
   the count line and a quiet search set on a single hairline. Below a drawn rule: the numbered group rail (sticky,
   columns 1 to 3) beside the groups (columns 5 to 12), each a numbered heading over hairline accordions. Only the first
   answer of the first group is open at load. Phones: the rail is a scrolling strip of group links above the answers.
   Group numerals come from a CSS counter (decorative, empty alternative), so a hidden group drops out of the count. */

.aj-site .faq-page { padding-block: clamp(32px, 1rem + 4vw, 88px) clamp(96px, 3rem + 7vw, 176px); }

/* ---------- head ---------- */
.faq-head { position: relative; display: grid; gap: clamp(28px, 3vw, 40px); padding-bottom: clamp(40px, 1.5rem + 3vw, 88px); }
.faq-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); transform-origin: left; }
.aj-site .faq-title { margin: 0; max-width: 11ch; }
.faq-title .w { display: inline-block; overflow: clip; vertical-align: top; padding: 0.06em 0 0.14em; margin: -0.06em 0 -0.14em; }
.faq-title .w > span { display: inline-block; }
.faq-head-side { display: grid; gap: clamp(20px, 2vw, 28px); align-content: end; min-width: 0; }
.aj-site .faq-lede { margin: 0; max-width: 30ch; font-size: var(--fs-lede); line-height: 1.45; color: var(--text-2); text-wrap: balance; }

/* the search: a single hairline that turns ink on hover and focus */
.faq-search { position: relative; }
.aj-site .faq-search .input-wrap > i[data-icon], .aj-site .faq-search .input-wrap > .icon { left: 0; color: var(--text); }
.aj-site .faq-search .input {
  width: 100%; height: 64px; padding: 0 8px 0 36px; background: transparent; border: 0; border-bottom: 1px solid var(--field-line); border-radius: 0;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); font-weight: 500; letter-spacing: -0.01em;
}
.aj-site .faq-search .input::placeholder { color: var(--text-2); font-weight: 400; }
.aj-site .faq-search .input:hover { border-color: var(--text); }
.aj-site .faq-search .input:focus-visible { border-color: var(--text); outline: 2px solid var(--focus); outline-offset: 4px; }
.faq-search .input::-webkit-search-cancel-button { cursor: pointer; }

/* ---------- body ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 48px); padding-top: clamp(32px, 1.5rem + 3vw, 96px); counter-reset: faq-l; }
.faq-rail { min-width: 0; }
.faq-body { display: grid; gap: clamp(56px, 2.5rem + 2.4vw, 96px); min-width: 0; counter-reset: faq-g; }

/* the rail: numbered group links */
.faq-links { display: flex; gap: 0 24px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); border-bottom: 1px solid var(--line); }
.faq-links::-webkit-scrollbar { display: none; }
.faq-links a {
  position: relative; flex: none; display: inline-flex; align-items: baseline; gap: 8px; min-height: 48px; padding: 14px 0 12px;
  font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--text-2); text-decoration: none; white-space: nowrap;
  counter-increment: faq-l; transition: color var(--dur-hover) var(--ease-out);
}
.faq-links a::before { content: counter(faq-l, decimal-leading-zero) / ""; font-size: var(--fs-meta); font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.faq-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--line-strong); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-hover) var(--ease-out); }
.faq-links a:is(:hover, :focus-visible), .faq-links a[aria-current] { color: var(--text); }
.faq-links a:is(:hover, :focus-visible)::after, .faq-links a[aria-current]::after { transform: scaleX(1); }
.faq-links a[aria-current]::before { color: var(--text); }
.faq-links a[hidden] { display: none; }
.faq-link-t { transition: translate var(--dur-hover) var(--ease-out); }

/* a group: numeral, title, the accordions */
.faq-count { margin: 0; font-size: var(--fs-small); font-weight: 500; color: var(--text-2); }
.faq-group { min-width: 0; counter-increment: faq-g; scroll-margin-top: calc(var(--frame-top, 88px) + 32px); }
.faq-group[hidden] { display: none; }
.aj-site .faq-group-title {
  display: grid; gap: 12px; margin: 0 0 clamp(16px, 1.6vw, 24px); max-width: 20ch;
  font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.5rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.035em; color: var(--heading); text-wrap: balance;
}
.faq-group-title::before { content: counter(faq-g, decimal-leading-zero) / ""; font-size: var(--fs-small); font-weight: 500; letter-spacing: 0; line-height: 1; color: var(--text-2); font-variant-numeric: tabular-nums; }
.faq-group details { scroll-margin-top: calc(var(--frame-top, 88px) + 32px); }
.faq-group details[hidden] { display: none; }
.aj-site .faq-group .qa summary { min-height: 64px; padding-block: 20px; }
.aj-site .faq-group .qa details > p { padding-bottom: 32px; font-size: var(--fs-body); line-height: 1.65; }
.aj-site .faq-group .qa details[open] > summary { color: var(--heading); }

/* the empty state */
.faq-none { display: grid; gap: 12px; justify-items: start; padding: 8px 0 24px; border-top: 1px solid var(--line-strong); padding-top: 40px; }
.aj-site .faq-none .empty-arch { width: 56px; height: 72px; margin: 0 0 8px; background: var(--celadon); }
.aj-site .faq-none .empty-title { margin: 0; font-size: var(--fs-statement); font-weight: 400; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
.aj-site .faq-none .empty-text { margin: 0; color: var(--text-2); }
.faq-none .btn-row { display: flex; flex-wrap: wrap; margin-top: 16px; }

/* ---------- phones and tablets: one rule under the head, the group strip right under it ---------- */
@media (max-width: 1023px) {
  .faq-head { padding-bottom: 32px; }
  .faq-head::after { display: none; }
  .faq-grid { padding-top: 0; }
  .faq-links { border-top: 1px solid var(--line); }
}

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  .faq-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
  .faq-title { grid-column: 1 / span 7; }
  .faq-head-side { grid-column: 8 / -1; padding-bottom: 0.4em; }
  .faq-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
  .faq-rail { grid-column: 1 / span 3; position: sticky; top: calc(var(--frame-top, 88px) + 32px); }
  .faq-body { grid-column: 5 / -1; max-width: 880px; }
  .faq-links { display: block; overflow: visible; margin: 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 0; }
  .faq-links a { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px; min-height: 44px; padding: 11px 0; border-bottom: 1px solid var(--line); white-space: normal; }
  .faq-links a:is(:hover, :focus-visible) .faq-link-t { translate: 6px 0; }
  .aj-site .faq-group-title { display: block; position: relative; }
  .faq-group-title::before { position: absolute; right: calc(100% + 28px); top: 0.6em; }
}
@media (min-width: 1024px) and (max-height: 800px) {
  .faq-links a { min-height: 40px; padding: 9px 0; font-size: 14px; }
}

/* ---------- load: the H1's words rise, the side fades up, the rule draws (CSS only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .faq-title .w > span { animation: mh-word var(--dur-reveal) var(--ease-out) both; animation-delay: calc(120ms + var(--i, 0) * 70ms); }
  .faq-head-side { animation: mh-up 900ms var(--ease-out) 480ms both; }
  .faq-head::after { animation: faq-draw 1400ms var(--ease-out) 300ms both; }
  .faq-links a .faq-link-t { transition: translate var(--dur-hover) var(--ease-out); }
}
@keyframes faq-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
