/* FAQ: the searchable question index. Builds on /c/css/a.css tokens and /c/css/plates.css (.paper). */
section { scroll-margin-top: var(--hd); }

/* ---------- HERO + SIGNATURE ---------- */
.fq-hero { position: relative; isolation: isolate; padding-bottom: clamp(88px, 13vh, 150px); background: var(--ink-0); }
/* the perforated wall with one magenta cell: one answer in a wall of openings */
.fq-plate { position: absolute; inset: 0 0 auto; height: min(100svh, 860px); z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--ink-0) 0%, oklch(0.135 0.006 358 / .86) 34%, oklch(0.135 0.006 358 / .2) 70%, oklch(0.135 0.006 358 / .05) 100%),
    linear-gradient(0deg, var(--ink-0) 0%, oklch(0.135 0.006 358 / 0) 42%),
    url("/shared/plates/plate-04-2400.webp") 64% 40% / cover no-repeat; }
.fq-top { position: relative; padding-top: calc(var(--hd) + clamp(56px, 11vh, 120px)); }
.fq-h1 { font: 900 clamp(3rem, 7.4vw, 7.25rem)/.92 var(--f-display); letter-spacing: -0.04em; max-width: 11ch; text-wrap: balance; }
.fq-intro { color: var(--fg-2); max-width: 44ch; margin-top: 24px; font-size: var(--t-s); }
@media (prefers-reduced-motion: no-preference) {
  .fq-top > * { animation: fq-rise 1.2s var(--ease) both; }
  .fq-top > :nth-child(2) { animation-delay: .08s; }
  .fq-top > :nth-child(3) { animation-delay: .16s; }
}
@keyframes fq-rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }

.fq-grid { position: relative; display: grid; gap: 40px 72px; margin-top: clamp(48px, 9vh, 96px); align-items: start; }
@media (min-width: 1024px) { .fq-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* the search panel stays in reach while the answers scroll */
.fq-side { display: grid; gap: 36px; }
@media (min-width: 1024px) { .fq-side { position: sticky; top: calc(var(--hd) + 28px); } }
.fq-label { display: flex; align-items: center; gap: 12px; font: 400 var(--t-xs)/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.fq-label::before { content: ""; width: 7px; height: 7px; background: var(--accent); }
.fq-field { position: relative; display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 10px 0 14px; border-bottom: 2px solid var(--rule); transition: border-color .4s var(--ease); }
.fq-field:focus-within { border-color: var(--accent); }
.fq-glyph { flex: none; position: relative; width: 22px; height: 22px; border: 2px solid var(--fg-2); }
.fq-glyph::after { content: ""; position: absolute; right: -8px; bottom: -8px; width: 8px; height: 8px; background: var(--accent); }
.fq-input { flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 6px 0; color: var(--fg);
  font: 700 clamp(1.35rem, 1.75vw, 1.75rem)/1.15 var(--f-display); letter-spacing: -0.02em; outline: none; }
.fq-input::placeholder { color: var(--fg-3); opacity: 1; }
.fq-input::-webkit-search-cancel-button { display: none; }
.fq-input:focus-visible { outline: none; }
.fq-field:focus-within .fq-glyph { border-color: var(--fg); }
.fq-clear { flex: none; position: relative; width: 44px; height: 44px; border: 1px solid var(--rule); background: none; cursor: pointer; transition: border-color .3s var(--ease); }
.fq-clear::before, .fq-clear::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; margin: -1px 0 0 -8px; background: var(--fg); transform: rotate(45deg); }
.fq-clear::after { transform: rotate(-45deg); }
.fq-clear:hover { border-color: var(--accent); }
.fq-clear[hidden] { display: none; }

.fq-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.fq-try-l { font: 400 var(--t-xs)/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); margin-right: 6px; }
.fq-try button { min-height: 40px; padding: 0 14px; border: 1px solid var(--rule); background: var(--ink-0); color: var(--fg); cursor: pointer; font: 500 .9375rem/1 var(--f-body);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease); }
.fq-try button:hover, .fq-try button[aria-pressed="true"] { border-color: var(--accent); }
.fq-try button[aria-pressed="true"] { background: var(--accent); color: oklch(0.99 0 0); }

/* the index: one square per question, lit when it matches */
.fq-index { padding-top: 26px; border-top: 1px solid var(--rule-soft); }
.fq-count { font: 400 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.fq-cells { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin-top: 18px; max-width: 420px; }
.fq-cell { aspect-ratio: 1; min-height: 32px; border: 0; padding: 0; cursor: pointer; background: var(--ink-2); position: relative;
  transition: background-color .25s steps(2, end), opacity .4s var(--ease), transform .5s var(--ease); }
.fq-cell::after { content: ""; position: absolute; inset: 30%; background: var(--fg-3); opacity: .5; transition: opacity .3s var(--ease); }
.fq-cell.hit { background: var(--accent); }
.fq-cell.hit::after { background: oklch(0.99 0 0); opacity: .9; }
.fq-cell.miss { opacity: .28; }
.fq-cell.open::after { inset: 18%; }
.fq-cell:hover { transform: translateY(-3px); }
.fq-peek { margin-top: 14px; min-height: 2.8em; color: var(--fg-2); font: 500 var(--t-s)/1.4 var(--f-display); max-width: 34ch; }

/* the accordion */
.fq-items { border-top: 1px solid var(--rule); }
.fq-item { border-bottom: 1px solid var(--rule-soft); transition: opacity .4s var(--ease); }
.fq-item[hidden] { display: none; }
.fq-qh { margin: 0; font-size: inherit; }
.fq-btn { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; min-height: 76px; padding: 20px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: 700 clamp(1.25rem, 1.9vw, 1.75rem)/1.2 var(--f-display); letter-spacing: -0.015em; color: var(--fg); }
.fq-btn:focus-visible { outline-offset: 2px; }
.fq-mk { width: 9px; height: 9px; background: var(--rule); transition: background-color .3s steps(2, end), transform .5s var(--ease); }
.fq-btn:hover .fq-mk, .fq-btn[aria-expanded="true"] .fq-mk { background: var(--accent); }
.fq-btn[aria-expanded="true"] .fq-mk { transform: scale(1.3); }
.fq-pm { position: relative; width: 14px; height: 14px; }
.fq-pm::before, .fq-pm::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: var(--fg); transition: transform .5s var(--ease); }
.fq-pm::after { transform: rotate(90deg); }
.fq-btn[aria-expanded="true"] .fq-pm::after { transform: rotate(0deg); }
.fq-qt { transition: color .3s var(--ease); }
.fq-btn:hover .fq-qt { color: var(--fg); }

/* answers open on grid rows, not height */
.fq-a { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .6s var(--ease), visibility 0s linear .6s; }
.fq-a-in { min-height: 0; overflow: hidden; }
.fq-a p { color: var(--fg-2); max-width: 60ch; padding: 0 0 28px 29px; font-size: var(--t-s); opacity: 0; transform: translate3d(0, -6px, 0); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.fq-item.open .fq-a { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .6s var(--ease), visibility 0s; }
.fq-item.open .fq-a p { opacity: 1; transform: none; transition-delay: .08s; }
.still .fq-a, .still .fq-a p { transition: none; }

mark { background: none; color: var(--fg); box-shadow: inset 0 -0.36em 0 oklch(0.6 0.244 358.6 / .55); padding: 0 1px; }
.fq-btn mark { color: var(--fg); }

/* nothing matches */
.fq-empty { padding: 36px 0 8px; border-top: 1px solid var(--rule); }
.fq-empty[hidden] { display: none; }
.fq-empty-h { font: 700 var(--t-xl)/1.05 var(--f-display); letter-spacing: -0.025em; }
.fq-empty-b { color: var(--fg-2); margin: 14px 0 28px; max-width: 46ch; }

/* ---------- WHAT HAPPENS NEXT (paper) ---------- */
.fq-next { padding-block: clamp(88px, 13vh, 150px); }
.fq-next-grid { display: grid; gap: 48px 72px; align-items: center; }
@media (min-width: 1000px) { .fq-next-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.fq-next-img { margin: 0; aspect-ratio: 4 / 5; max-height: 720px; width: 100%; background: url("/shared/plates/plate-12-1280.webp") 50% 60% / cover no-repeat; }
.fq-steps { position: relative; margin-top: clamp(28px, 5vh, 44px); padding-left: 30px; }
.fq-steps::before { content: ""; position: absolute; left: 4px; top: 30px; bottom: 30px; width: 1px; background: var(--rule); }
.fq-steps li { position: relative; padding: 16px 0; font: 500 var(--t-l)/1.22 var(--f-display); letter-spacing: -0.015em; }
.fq-steps li::before { content: ""; position: absolute; left: -30px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; background: var(--fg-2); }
.fq-steps li:last-child::before { background: var(--accent); }
.fq-small { color: var(--fg-2); font-size: var(--t-xs); margin-top: 24px; max-width: 46ch; }

/* ---------- CLOSING ---------- */
.fq-end { padding-block: clamp(88px, 13vh, 150px); border-top: 1px solid var(--rule-soft); }
.fq-end-grid { display: grid; gap: 48px 64px; align-items: end; }
@media (min-width: 900px) { .fq-end-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.fq-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-line { background: none; box-shadow: inset 0 0 0 1px var(--rule); }
.btn-line:hover { background: none; box-shadow: inset 0 0 0 1px var(--fg); }
.fq-other { margin-top: 22px; font-size: .9375rem; }
.fq-other a { color: var(--fg-2); margin-right: 20px; text-underline-offset: 4px; }
.fq-other a:hover { color: var(--fg); }
.fq-k { display: flex; align-items: center; gap: 10px; font: 400 var(--t-xs)/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.fq-k::before { content: ""; width: 7px; height: 7px; background: var(--fg-3); }
.fq-onward { display: grid; gap: 14px; padding: 26px 0 28px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-decoration: none; }
.fq-onward-v { display: flex; justify-content: space-between; align-items: center; gap: 20px; font: 700 var(--t-l)/1.1 var(--f-display); letter-spacing: -0.015em; color: var(--fg); }
.fq-onward-v::after { content: ""; flex: none; width: 11px; height: 11px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); transition: transform .5s var(--ease); }
.fq-onward:hover .fq-onward-v::after { transform: translateX(6px) rotate(45deg); }

.paper .btn { color: oklch(0.99 0 0); }

@media (max-width: 767px) {
  .fq-plate { height: 62svh;
    background: linear-gradient(0deg, var(--ink-0) 0%, oklch(0.135 0.006 358 / .78) 45%, oklch(0.135 0.006 358 / .35) 100%),
                url("/shared/plates/plate-04-1280.webp") 70% 40% / cover no-repeat; }
  .fq-top { padding-top: calc(var(--hd) + 40px); }
  .fq-h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
  .fq-grid { margin-top: 40px; }
  .fq-side { gap: 26px; }
  .fq-input { font-size: 1.0625rem; }
  .fq-cells { gap: 5px; }
  .fq-cell { min-height: 0; }
  .fq-peek { display: none; }
  .fq-btn { gap: 14px; min-height: 64px; font-size: 1.15rem; }
  .fq-a p { padding-left: 23px; }
  .fq-next-img { aspect-ratio: 16 / 11; }
  .fq-steps li { font-size: 1.3rem; }
}
@media (min-width: 1024px) { .fq-list { min-height: min(660px, 72vh); } }

/* 11 Nov 2026: the questions as their own section. The page now opens with the shared hero, so the wall photo that sat
   behind the old headline ended up behind the answers and made them hard to read: it goes. The section gets its own
   head, the grey squares (a puzzle more than an index) give way to a plain count, and the side column ends with a way
   to ask what is not here. Backup: _backups/faq-questions-2026-11-11. */
.fq-plate { display: none; }
.fq-hero { padding-bottom: clamp(88px, 13vh, 150px); border-top: 1px solid var(--rule-soft); }
.fq-top { padding-top: clamp(88px, 13vh, 150px); }
.fq-top .eyebrow { margin-bottom: 18px; }
.fq-top > * { animation: none; }
.fq-grid { margin-top: clamp(40px, 7vh, 72px); gap: 48px clamp(48px, 7vw, 120px); }
@media (min-width: 1024px) { .fq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
.fq-side { gap: 28px; }
.fq-input { font-size: clamp(1.15rem, 1.4vw, 1.4rem); }
.fq-try button { min-height: 38px; padding: 0 14px; border-radius: 999px; background: transparent; color: var(--fg-2); font-size: .875rem; }
.fq-try button:hover { color: var(--fg); }
.fq-index { padding-top: 22px; }
.fq-cells, .fq-peek { display: none; }
.fq-ask { display: grid; gap: 10px; justify-items: start; padding: 26px; border: 1px solid var(--rule-soft); background: var(--ink-1); }
.fq-ask-h { font: 700 1.35rem/1.1 var(--f-display); letter-spacing: -0.015em; }
.fq-ask-b { color: var(--fg-2); font-size: .95rem; max-width: 34ch; margin-bottom: 8px; }
.fq-ask .btn { min-height: 46px; padding: 0 20px; font-size: .95rem; }
/* the questions: a calmer size, the answer lined up under the question's words */
.fq-btn { font-size: clamp(1.15rem, 1.5vw, 1.45rem); min-height: 72px; }
.fq-a p { color: var(--fg-2); max-width: 62ch; }
/* below desktop the side column dissolves into the grid, so the ask card can come after the questions */
@media (max-width: 1023px) { .fq-side { display: contents; } .fq-grid { row-gap: 28px; } .fq-list { margin-top: 12px; } .fq-ask { order: 3; margin-top: 20px; } }
@media (max-width: 767px) { .fq-top { padding-top: 72px; } .fq-ask { padding: 22px; } }

/* 11 Nov 2026: What Happens Next pins while the three steps fill with pink, one by one, as you scroll (page.js). The steps
   start grey; a lit step's square turns pink and its words go full ink; the line fills from the first lit to the last.
   Backup: _backups/faq-steps-pin-2026-11-11. */
.fq-steps li { color: var(--fg-3); transition: color .5s var(--ease); }
.fq-steps li::before, .fq-steps li:last-child::before { background: var(--rule); transition: background-color .35s var(--ease), transform .5s var(--ease); }
.fq-steps li.is-lit { color: var(--fg); }
.fq-steps li.is-lit::before { background: var(--accent); transform: scale(1.35); }
.fq-steps::after { content: ""; position: absolute; left: 4px; top: 30px; bottom: 30px; width: 1px; background: var(--accent);
  transform: scaleY(var(--p, 0)); transform-origin: top; transition: transform .6s var(--ease); }
/* the pin: the section is three screens tall and its content sticks through them */
.fq-next.is-pin { height: 300svh; padding-block: 0; }
.fq-next.is-pin .fq-next-grid { position: sticky; top: 0; height: 100svh; align-content: center; padding-block: 48px 32px; }
.fq-next.is-pin .fq-next-img { height: min(720px, calc(100svh - 120px)); width: auto; max-width: 100%; justify-self: start; }
.fq-next.is-still .fq-steps li, .fq-next.is-still .fq-steps li::before, .fq-next.is-still .fq-steps::after { transition: none; }
