/* V3 Questions: a dark search hero with the topic index beside it, the answers by topic on chalk (the home's
   .faq-grid, one sticky head per topic), sticky topic chips on phones, and a photo close.
   Candidates for v3.css: .f-search (pill search field on dark), .f-index (numbered topic rows with counts),
   .f-chips (sticky chip bar on chalk, with a scroller that fades at the edges it can scroll past). */

/* ---------- 1. Hero ---------- */
.f-hero{padding-bottom:clamp(64px,6.5vw,104px)}
.f-hero .ph-grid{align-items:end}
.f-hero .ph-copy{gap:24px}
.f-search{position:relative;width:100%;max-width:560px;margin-top:8px}
.f-search svg{position:absolute;left:20px;top:50%;width:18px;height:18px;margin-top:-9px;color:var(--silver);pointer-events:none}
.f-search .input{height:58px;padding:0 20px 0 50px;border-radius:999px;background:rgba(240,243,241,.06)}
.f-search .input::-webkit-search-cancel-button{-webkit-appearance:none;width:18px;height:18px;margin:0 -4px 0 10px;cursor:pointer;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5 5 8 8M13 5l-8 8' stroke='%23b7c1c1' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat}
/* the topic index: jump to a topic; while searching, each count shows how many answers match */
.f-index{display:flex;flex-direction:column}
.f-index-k{margin-bottom:14px;font-family:var(--mono);font-weight:500;font-size:var(--fs-12);letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
.f-index a{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:baseline;gap:12px;padding:19px 0;border-top:1px solid var(--line);color:var(--pearl);text-decoration:none;transition:opacity .3s var(--ease-out)}
.f-index a:last-child{border-bottom:1px solid var(--line)}
.fi-n{font-family:var(--mono);font-weight:500;font-size:var(--fs-12);letter-spacing:.12em;color:var(--jade)}
.fi-t{font-size:var(--fs-lead);font-weight:300;letter-spacing:-.02em;line-height:1.3;transition:color .2s}
.fi-c{font-family:var(--mono);font-weight:500;font-size:var(--fs-12);letter-spacing:.08em;color:var(--dim);font-variant-numeric:tabular-nums}
.f-index a:hover .fi-t{color:var(--jade)}
.f-index a.none{opacity:.35;pointer-events:none}
@media (max-width:960px){.f-hero .ph-grid{align-items:start}.f-index{max-width:560px}}

/* ---------- 2. The answers ---------- */
/* the search hides topics, answers and chips with [hidden]; the home's display rules would otherwise win over it */
.f-body [hidden]{display:none!important}
.f-body{padding-top:clamp(64px,7vw,112px)}
.f-group{scroll-margin-top:100px}
.f-topics{display:flex;flex-direction:column;gap:clamp(72px,8vw,120px)}
/* a filtered list still ends on a rule */
.f-group .qa details:not([hidden]):not(:has(~ details:not([hidden]))){border-bottom:1px solid var(--rule)}
.f-group .faq-head{gap:16px}
.f-q{scroll-margin-top:96px}
.f-q summary h3{margin:0;font:inherit;letter-spacing:inherit;color:inherit}
.f-q summary:hover h3{color:var(--emerald)}
.f-a{padding:0 40px 26px 0;font-size:var(--fs-17);line-height:1.6;color:var(--ash);max-width:40em;text-wrap:pretty}
.f-q[open] .f-a{animation:fIn .35s var(--ease-out) both}
@keyframes fIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.f-a ul{list-style:disc;margin:.6em 0 .8em;padding-left:1.25em}
.f-a li{margin:.3em 0;padding-left:.2em}
.f-a li::marker{color:var(--emerald)}
.f-a b{font-weight:500;color:var(--ink)}
.f-a a{color:var(--ink);text-underline-offset:3px}
.f-empty{max-width:40em;padding:8px 0 24px;font-size:var(--fs-lead);line-height:1.5;color:var(--ash)}
.f-empty a{color:var(--ink);text-underline-offset:4px}
.f-chips{display:none}
@media (max-width:860px){
  .f-chips{position:sticky;top:calc(68px + env(safe-area-inset-top,0px));z-index:6;display:block;margin:0 calc(-1 * var(--gutter)) 40px;background:rgba(240,242,240,.92);-webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%);border-bottom:1px solid rgba(37,42,43,.1)}
  /* the pills keep the page gutter; the next pill peeks and fades at the edge, so the row reads as scrollable */
  .f-chips-in{--fl:0px;--fr:56px;position:relative;display:flex;gap:8px;overflow-x:auto;padding:12px 0 12px var(--gutter);scroll-padding-inline:var(--gutter);scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%)}
  .f-chips-in::-webkit-scrollbar{display:none}
  .f-chips-in::after{content:"";flex:0 0 calc(var(--gutter) - 8px)} /* the end gutter (padding at a scroll end is unreliable across browsers) */
  .f-chips-in.is-scrolled{--fl:32px}
  .f-chips-in.at-end{--fr:0px}
  .f-chips a{flex:none;display:inline-flex;align-items:center;height:44px;padding:0 18px;border-radius:999px;border:1px solid var(--rule);background:var(--paper);font-size:var(--fs-15);color:var(--ink);text-decoration:none;white-space:nowrap;transition:background .2s,color .2s,border-color .2s}
  .f-chips a.on{background:var(--obsidian);border-color:var(--obsidian);color:var(--pearl)}
  .f-body{padding-top:40px}
  .f-group{scroll-margin-top:136px}
  .f-q{scroll-margin-top:150px}
  .f-group .faq-head{gap:10px;margin-bottom:8px}
  .f-a{padding-right:12px}
}
@media (max-width:860px){.f-index{display:none}}

/* ---------- 3. Close ---------- */
.f-close .photo-bg img{object-position:62% 34%}
.f-close .photo-shade{background:linear-gradient(90deg,rgba(14,18,21,.74) 0%,rgba(14,18,21,.42) 40%,rgba(14,18,21,0) 66%),linear-gradient(0deg,rgba(14,18,21,.62) 0%,rgba(14,18,21,0) 46%)}
.f-close .photo-copy{gap:22px}
.f-close .close-lead{color:var(--pearl);max-width:24em;text-wrap:balance}
.f-close .close-note a{color:inherit;text-underline-offset:3px}
@media (max-width:1100px) and (min-width:761px){.f-close .photo-bg img{object-position:70% 34%}.f-close .photo-shade{background:linear-gradient(90deg,rgba(14,18,21,.8) 0%,rgba(14,18,21,.5) 50%,rgba(14,18,21,.1) 80%),linear-gradient(0deg,rgba(14,18,21,.7) 0%,rgba(14,18,21,0) 55%)}}
@media (max-width:760px){
  /* phones: the words sit low on a dark safe area, and the face (the top 40% of the crop) stays clear above them */
  .f-close{min-height:max(840px,92svh)}
  .f-close .photo-in{padding-bottom:calc(40px + env(safe-area-inset-bottom,0px))}
  .f-close .photo-bg img{object-position:50% 0}
  .f-close .photo-shade{background:linear-gradient(0deg,rgba(12,16,18,.97) 0%,rgba(12,16,18,.93) 48%,rgba(12,16,18,.6) 55%,rgba(12,16,18,.2) 60%,rgba(12,16,18,0) 66%)}
  .f-close .close-lead{font-size:var(--fs-17)}
}
/* the photo scales with the section: small phones need the height to keep the words below the face */
@media (max-width:360px){.f-close{min-height:900px}}
