/* faq.css: the FAQ page (plan.md, FAQ), placed with the tokens of system.css. The header: the café owner at her
   counter, still, an even charcoal tint on the words' side (right) whose lower left corner steps in three squares; the
   search and the topics under the words. The answers by topic, a sticky list of the topics beside them on a computer.
   The close: the split band, the chat on a laptop's screen at the right. Never a gradient. */

/* ---- hero ---- */
.faq-hero { --s: 56px; position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center;
  min-height: clamp(560px, calc(100svh - 72px), 760px); background: var(--c-charcoal); color: var(--c-on-ink); }
.faq-hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.faq-hero__media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 30% 30%; }
.faq-hero__tint { position: absolute; inset: 0 0 0 auto; z-index: -1; width: 52%; background: color-mix(in srgb, var(--c-charcoal) 90%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, calc(var(--s) * 3) 100%, calc(var(--s) * 3) calc(100% - var(--s)), calc(var(--s) * 2) calc(100% - var(--s)),
    calc(var(--s) * 2) calc(100% - var(--s) * 2), var(--s) calc(100% - var(--s) * 2), var(--s) calc(100% - var(--s) * 3), 0 calc(100% - var(--s) * 3)); }
.faq-hero__in { display: grid; justify-items: end; }
.faq-hero__words { box-sizing: border-box; display: grid; gap: 20px; justify-items: start; width: min(560px, calc(52vw - 2 * var(--gutter) - 24px)); padding-block: 56px; }
.faq-hero__line { margin: 0; font-size: var(--fs-lead); line-height: 1.5; color: var(--c-on-navy-soft); }
.faq-search { position: relative; width: 100%; margin-top: 6px; }
.faq-search__icon { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--c-ink-soft); pointer-events: none; }
.faq-search input { box-sizing: border-box; width: 100%; min-height: 56px; padding: 0 16px 0 48px; border: 0; border-radius: var(--radius-s); background: var(--c-paper);
  color: var(--c-ink); font: 500 var(--fs-body)/1.2 var(--font-ui); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .6); }
.faq-search input::placeholder { color: var(--c-ink-soft); }
.faq-search input:focus { outline: 3px solid var(--c-electric); outline-offset: 2px; }
.faq-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.faq-topics__link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--c-on-ink); text-decoration: none;
  background: color-mix(in srgb, var(--c-on-ink) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-on-ink) 20%, transparent);
  font: 600 var(--fs-small)/1 var(--font-ui); transition: background-color var(--dur-fast); }
.faq-topics__link:hover { background: color-mix(in srgb, var(--c-on-ink) 18%, transparent); }
.faq-topics__link:focus-visible { outline: 3px solid var(--c-electric); outline-offset: 2px; }

/* ---- the answers ---- */
.faq-all__in { display: grid; grid-template-columns: minmax(0, 0.3fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.faq-side { position: sticky; top: 104px; display: grid; gap: 2px; }
.faq-side__title { margin: 0 0 8px 12px; font: 700 13px/1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink-soft); }
.faq-side__link { display: block; padding: 9px 12px; border-radius: 10px; color: var(--c-ink); font: 600 var(--fs-small)/1.3 var(--font-ui); text-decoration: none; }
.faq-side__link:hover { background: var(--c-paper-alt); }
.faq-all__list { display: grid; gap: clamp(36px, 4vw, 56px); max-width: 820px; }
.faq-topic { display: grid; gap: 16px; scroll-margin-top: 104px; }
.faq-topic[hidden], .faq-item[hidden] { display: none; }
.faq-topic__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.faq-item__answer a { color: var(--c-brand-text); font-weight: 700; }
.faq-none { margin: 0; padding: 18px 20px; border-radius: var(--radius-m); background: var(--c-paper-alt); font: 600 var(--fs-body)/1.45 var(--font-ui); }
.faq-none a { color: var(--c-brand-text); }

/* ---- close: the split band, the chat on a laptop's screen ---- */
.page-faq #close { --tint-w: 50%; }
.faq-close .band__media { left: 50%; background: var(--c-charcoal);
  clip-path: polygon(calc(var(--s) * 3) 0, 100% 0, 100% 100%, 0 100%, 0 calc(var(--s) * 3), var(--s) calc(var(--s) * 3), var(--s) calc(var(--s) * 2),
    calc(var(--s) * 2) calc(var(--s) * 2), calc(var(--s) * 2) var(--s), calc(var(--s) * 3) var(--s)); }
.faq-close__shot { position: absolute; inset: 0; margin: 0; }
.faq-close__shot > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 55%; }
@media (min-width: 901px) { .faq-close .band__words > .band__title { max-width: min(560px, calc(50% - 64px)); } }
.faq-close__more { color: var(--c-brand-on-ink); }
/* the chat on the screen (320 x 198 in its own pixels, so its words keep 13 px or more on a phone) */
.fc { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--c-paper); color: var(--c-ink); font-family: var(--font-ui); }
.fc-top { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px; border-bottom: 1px solid var(--c-line); font: 700 15px/1.2 var(--font-ui); }
.fc-top i { width: 9px; height: 9px; border-radius: 2.5px; background: var(--c-accent); }
.fc-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; padding: 10px 14px 12px; overflow: hidden; }
.fc-msg { margin: 0; --i: var(--kit-in, 1); opacity: var(--i); transform: translateY(calc((1 - var(--i)) * 8px)); }
.fc-chat [data-kit-msg]:not(:first-child) { opacity: calc(var(--i) * (1 - var(--kit-out, 0))); }
.fc-q { align-self: flex-start; max-width: 94%; padding: 7px 11px; border-radius: 11px 11px 11px 3px; background: var(--c-paper-alt); font: 600 16px/1.3 var(--font-ui); }
.fc-picks { display: flex; gap: 6px; }
.fc-picks span { min-width: 40px; padding: 6px 9px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--c-line); font: 700 16px/1 var(--font-ui); text-align: center; }
.fc-picks span[data-kit-on] { background: var(--c-brand); color: var(--c-on-brand); box-shadow: none; }
.fc-me { align-self: flex-end; padding: 7px 11px; border-radius: 11px 11px 3px 11px; background: var(--c-brand); color: var(--c-on-brand); font: 600 16px/1.2 var(--font-ui); }

/* ---- under 900: the photo on top, the words under it ---- */
@media (max-width: 899px) {
  .faq-hero { display: block; min-height: 0; }
  .faq-hero__media { position: relative; inset: auto; z-index: 0; height: clamp(260px, 60vw, 440px); }
  .faq-hero__media img { object-position: 28% 25%; }
  .faq-hero__tint { display: none; }
  .faq-hero__in { display: block; }
  .faq-hero__words { width: auto; padding-block: 32px 48px; }
  .faq-all__in { grid-template-columns: minmax(0, 1fr); }
  .faq-side { display: none; }
}
@media (max-width: 900px) {
  .faq-close .band__media { left: auto; clip-path: none; aspect-ratio: auto; height: clamp(440px, 70vw, 560px); max-height: none; }
}
