/* faq.css: the FAQ page's own placing (plan.md, "FAQ"). Every component and token comes from components.css and
   system.css; this file places the header, the search, the topic chips, the groups and the side card. */

/* ---------- #top: the still café photo under an ivory wash on the left, the words, the search and the chips ------- */
.fq-top { position: relative; display: grid; align-items: center; min-height: clamp(520px, 64vh, 640px); overflow: clip; isolation: isolate; }
.fq-top__pic { position: absolute; inset: 0; z-index: -2; }
.fq-top__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 34%; }
.fq-top::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--c-paper) 0%, rgb(248 243 234 / 0.96) 30%, rgb(248 243 234 / 0.72) 44%, rgb(248 243 234 / 0) 60%); }
.fq-top__in { display: grid; gap: var(--space-4); justify-items: start; padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); }
.fq-top h1 { font-size: var(--fs-h1); max-width: 13ch; }
.fq-top__line { font-size: var(--fs-lead); color: var(--c-ink-soft); max-width: 30rem; }
.fq-search { position: relative; width: min(100%, 31rem); margin: 0.25rem 0 0; }
.fq-search__icon { position: absolute; left: 1.05rem; top: 50%; translate: 0 -50%; width: 22px; height: 22px; color: var(--c-ink-soft); pointer-events: none; }
.fq-search__icon svg { width: 22px; height: 22px; }
.fq-search input { width: 100%; height: 58px; padding: 0 1.2rem 0 3.1rem; border: 1px solid var(--c-line); border-radius: var(--radius-pill); background: var(--c-card); box-shadow: var(--shadow-m); font: 500 1.05rem/1 var(--font-ui); color: var(--c-ink); }
.fq-search input::placeholder { color: color-mix(in srgb, var(--c-ink-soft) 80%, transparent); }
.fq-search input:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-color: var(--c-brand); }
.fq-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 36rem; }
.fq-chip { min-height: 40px; padding: 0 1rem; border: 0; border-radius: var(--radius-pill); background: var(--c-card); box-shadow: inset 0 0 0 1px var(--c-line); font: 600 0.95rem/1 var(--font-ui); color: var(--c-ink); cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast); }
.fq-chip:hover { box-shadow: inset 0 0 0 1.5px var(--c-ink-soft); }
.fq-chip[aria-pressed="true"] { background: var(--c-brand); color: var(--c-on-brand); box-shadow: none; }

/* ---------- #questions: the groups, the side card sticky beside them ---------- */
.fq-q__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: start; }
.fq-q__list { display: grid; gap: clamp(2.5rem, 2rem + 1.5vw, 3.5rem); }
.fq-group { display: grid; gap: var(--space-4); }
.fq-group[hidden] { display: none; }
.fq-group__name { font-size: var(--fs-h3); }
.fq-group .faq { max-width: none; }
.fq-group details[hidden] { display: none; }
.fq-none { margin: 0; padding: 1.25rem 1.35rem; border-radius: var(--radius-m); background: var(--c-paper-alt); color: var(--c-ink-soft); }
.fq-side { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 0.85rem; justify-items: start; margin-top: 28px; padding: 2.5rem 1.5rem 1.5rem; }
.fq-side__face { position: absolute; top: -28px; left: 1.5rem; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--c-card), 0 0 0 4.5px var(--c-accent), var(--shadow-s); }
.fq-side__h { font: 650 1.35rem/1.25 var(--font-display); }
.fq-side__line { color: var(--c-ink-soft); }
.fq-side__book { width: 100%; }
.fq-side__mail, .fq-side__reply { margin: 0; }
.fq-side__reply { font-size: var(--fs-small); color: var(--c-ink-soft); }

@media (max-width: 900px) {
  .fq-q__grid { grid-template-columns: 1fr; }
  .fq-side { position: relative; top: auto; }
}
@media (max-width: 760px) {
  /* the photo on top, the words, the search and the chips under it on the ivory */
  .fq-top { display: block; min-height: 0; }
  .fq-top__pic { position: relative; inset: auto; z-index: auto; height: 260px; }
  .fq-top__pic img { object-position: 66% 30%; }
  .fq-top::before { display: none; }
  .fq-top__in { padding-block: 1.75rem 0.5rem; }
}
