/* /faq/ only. Shared components live in /styles.css, the motion kit in /motion.css.
   The page is one list: a filter on top, then eight topics, each with its name beside its questions.
   js/faq.js drives the filter and the disclosures with transforms (FLIP); with JS off the filter is not drawn
   and the shared .faq styles open the answers. */

.fq-head{ padding-bottom:clamp(40px, 2rem + 2vw, 72px); }
.fq-head .lede{ max-width:52ch; }

/* ---------- the filter: one field, drawn only when faq.js can answer it (html.js) ---------- */
.fq-search{ display:none; }
.js .fq-search{ position:relative; display:flex; align-items:center; max-width:640px; margin-top:40px; }
.fq-search input{
  width:100%; height:60px; margin:0; padding:0 64px 0 56px; border:0; border-radius:999px;
  background:var(--card); color:var(--ink); box-shadow:inset 0 0 0 1px var(--line-2);
  font:500 1.0625rem/1.2 var(--font); letter-spacing:-.012em; -webkit-appearance:none; appearance:none;
  transition:background-color var(--dur-micro) ease, box-shadow var(--dur-micro) ease;
}
.fq-search input::placeholder{ color:var(--ink-3); opacity:1; }
/* A text field shows its focus ring on every click, so the ring is ink here; amber stays with the one primary action. */
.fq-search input:focus-visible{ outline:2px solid var(--ink-2); outline-offset:2px; background:var(--card-2); box-shadow:inset 0 0 0 1px var(--ink-4); }
/* Magnifier, drawn: a ring and a handle. It leans in while the field has focus. */
.fq-glass{ position:absolute; left:24px; top:50%; width:15px; height:15px; margin-top:-9px; border:1.75px solid var(--ink-3); border-radius:50%; pointer-events:none; transition:border-color var(--dur-micro) ease, transform var(--dur-ui) var(--ease-spring-soft); }
.fq-glass::after{ content:""; position:absolute; left:100%; top:100%; width:7px; height:1.75px; margin:-1.5px 0 0 -1.5px; border-radius:1px; background:var(--ink-3); transform:rotate(45deg); transform-origin:left center; transition:background-color var(--dur-micro) ease; }
.fq-search:focus-within .fq-glass{ border-color:var(--ink); transform:scale(1.08) rotate(-8deg); }
.fq-search:focus-within .fq-glass::after{ background:var(--ink); }
/* Clear: a 44px round target at the end of the field; the cross is two hairlines. */
.fq-clear{ position:absolute; right:8px; top:8px; width:44px; height:44px; padding:0; border:0; border-radius:50%; background:rgba(255,255,255,.06); color:var(--ink-2); cursor:pointer; transition:background-color var(--dur-micro) ease, color var(--dur-micro) ease, transform var(--dur-ui) var(--ease-spring-soft); }
.fq-clear::before{ content:""; position:absolute; inset:0; background:linear-gradient(currentColor,currentColor) center / 14px 1.5px no-repeat, linear-gradient(currentColor,currentColor) center / 1.5px 14px no-repeat; transform:rotate(45deg); }
.fq-clear[hidden]{ display:none; }
.fq-clear:active{ transform:scale(.9); transition-duration:var(--dur-micro); transition-timing-function:var(--ease-out); }
.fq-key{ position:absolute; right:22px; top:50%; display:grid; place-items:center; width:26px; height:26px; margin-top:-13px; border-radius:7px; box-shadow:inset 0 0 0 1px var(--line-2); font:500 13px/1 var(--mono); color:var(--ink-3); pointer-events:none; transition:opacity var(--dur-micro) ease; }
.fq-search:focus-within .fq-key, .fq-clear:not([hidden]) ~ .fq-key{ opacity:0; }
@media not ((hover: hover) and (pointer: fine)){ .fq-key{ display:none; } }
@media (prefers-reduced-motion: no-preference){
  .fq-clear:not([hidden]){ animation:fq-pop var(--dur-ui) var(--ease-spring-soft); }
}
@keyframes fq-pop{ from{ opacity:0; transform:scale(.6); } }

.fq-count{ display:none; }
.js .fq-count{ display:block; min-height:1.35em; margin-top:14px; padding-left:24px; font-variant-numeric:tabular-nums; }

/* Topics: plain links to each group. Quiet, so the field stays the one control in the head. */
.fq-topics{ display:flex; flex-wrap:wrap; gap:0 24px; margin-top:28px; }
.js .fq-topics{ margin-top:14px; }
.fq-topics a{ display:inline-block; padding-block:10px; font-size:var(--t-small); font-weight:500; color:var(--ink-2); text-decoration:none; transition:color var(--dur-micro) ease, transform var(--dur-ui) var(--ease-spring-soft); }
.fq-topics a:active{ transform:scale(.97); transition-duration:var(--dur-micro); transition-timing-function:var(--ease-out); }

/* ---------- the list: topic on the left (it stays while its questions scroll), questions on the right ---------- */
.fq{ padding-bottom:var(--section); }
.fq-groups{ position:relative; z-index:0; }
.fq-group{ display:grid; grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr); align-items:start; gap:0 clamp(40px, 6vw, 112px); border-top:1px solid var(--line-2); }
.fq-group[hidden], .fq-empty[hidden]{ display:none; }
.fq-group-head{ position:sticky; top:96px; padding:26px 0 36px; }
.fq-group-h{ font-size:clamp(1.5rem, 1.22rem + 1vw, 2.125rem); font-weight:700; line-height:1.06; letter-spacing:-.04em; word-spacing:.04em; }
.fq-group-lede{ margin-top:14px; max-width:36ch; color:var(--ink-2); }
.fq-group-lede a{ color:var(--ink); }
.fq-group .faq{ position:relative; border-top:0; }
.fq-group .faq details{ scroll-margin-top:8px; } /* on top of the 88px scroll-padding the page already keeps for the nav */
/* The hairline between two questions belongs to the lower one, so it travels with that row when the answer
   above it opens (a line on the bottom edge would jump to its final place at once). */
.fq-group .faq details{ border-bottom:0; border-top:1px solid var(--line); }
.fq-group .faq details:nth-child(1 of :not([hidden], .is-leaving)){ border-top-color:transparent; }

/* A row answers the hand: a soft light under the pointer (--sx/--sy from data-spot), the plus brightens,
   the question gives a little under a press and springs back. */
.fq .faq summary{ position:relative; border-radius:12px; }
.fq .faq summary::before{
  content:""; position:absolute; inset:5px -14px; z-index:-1; border-radius:14px; pointer-events:none; opacity:0;
  background:radial-gradient(260px circle at calc(var(--sx, 50%) + 14px) calc(var(--sy, 50%) - 5px), rgba(255,255,255,.085), rgba(255,255,255,.035) 70%);
  transition:opacity var(--dur-ui) ease;
}
.fq-s{ display:grid; gap:6px; min-width:0; transform-origin:left center; transition:transform var(--dur-ui) var(--ease-spring-soft); }
.fq .faq summary:active .fq-s{ transform:scale(.985); transition-duration:var(--dur-micro); transition-timing-function:var(--ease-out); }
.fq .faq details[open]:not(.is-closing) > summary::after{ color:var(--ink); }
.fq .faq details.is-closing > summary::after{ transform:none; } /* the plus answers the click, not the end of the exit */
/* The line of the answer that matched, when the match is not in the question itself. */
.fq-hit{ max-width:60ch; font-size:var(--t-small); font-weight:400; line-height:1.45; letter-spacing:-.006em; color:var(--ink-3); text-wrap:pretty; }
.fq mark{ border-radius:3px; background:rgba(242,243,245,.16); color:inherit; }
.fq-q mark{ color:var(--ink); }
.fq-hit mark{ color:var(--ink-2); }

/* Arriving by a link to one question (#delete-my-data): its row lights once. */
@media (prefers-reduced-motion: no-preference){
  .fq .faq details:target > summary::before{ animation:fq-target 2s var(--ease-out) .2s backwards; }
}
@keyframes fq-target{ 0%, 45%{ opacity:1; } 100%{ opacity:0; } }

/* faq.js moves the rows itself, so the shared height transition and answer keyframes stand down here. */
@media (prefers-reduced-motion: no-preference){
  .js .fq .faq details{ interpolate-size:numeric-only; }
  .js .fq .faq details::details-content{ transition:none; }
  .js .fq .faq details[open] .answer{ animation:none; }
}

/* A row or a group the filter just dropped: lifted out of the flow where it stood, so it can fade while the
   rest closes up over it (faq.js sets --gt, its old offset, and hides it when the fade ends). */
.fq .is-leaving{ position:absolute; left:0; right:0; top:var(--gt, 0px); z-index:-1; pointer-events:none; }

/* Once the filter has been used, the scroll arrivals are over: a row that comes back must not replay its
   entrance (a restarted animation would hold it invisible for its stagger delay). */
.js .fq.fq-live [data-rise][data-rise], .js .fq.fq-live [data-stagger][data-stagger] > *{ opacity:1; animation-name:none; }

.fq-empty{ display:grid; justify-items:start; gap:14px; padding:clamp(48px, 2rem + 3vw, 88px) 0; border-top:1px solid var(--line-2); }
.fq-empty q{ quotes:"\201C" "\201D"; overflow-wrap:anywhere; }
.fq-empty .btn{ margin-top:10px; }

.fq-more{ border-top:1px solid var(--line); }
.fq-more .lede{ margin-top:24px; max-width:52ch; }
.fq-more .actions{ margin-top:36px; }

@media (max-width: 860px){
  .fq-group{ grid-template-columns:minmax(0,1fr); }
  .fq-group-head{ position:static; padding:32px 0 8px; }
  .fq-group-lede{ max-width:46ch; }
  .fq-topics{ gap:0 20px; }
  .fq-topics a{ padding-block:12px; } /* 44px tap rows */
}
@media (max-width: 560px){
  .js .fq-search{ margin-top:32px; }
  .fq-search input{ height:56px; }
  .fq-clear{ top:6px; right:6px; }
}
@media (hover: hover) and (pointer: fine){
  .fq-search input:hover{ box-shadow:inset 0 0 0 1px var(--ink-4); }
  .fq-clear:hover{ background:rgba(255,255,255,.12); color:var(--ink); }
  .fq-topics a:hover{ color:var(--ink); text-decoration:underline; text-decoration-color:var(--ink-4); }
  .fq .faq summary:hover::before{ opacity:1; }
}
