/* ============================================================
   FAQ page
   ============================================================ */

/* ---------------- Hero + search ---------------- */
.faq-hero { position: relative; overflow: hidden; isolation: isolate; padding-bottom: var(--space-stack); }
.faq-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(60% 80% at 85% 0%, rgba(242, 163, 58, .09) 0%, rgba(242, 163, 58, 0) 60%);
}
.faq-hero__mark {
  position: absolute; z-index: -1; right: -2vw; top: 50%; transform: translateY(-46%);
  font-family: var(--font-display); font-weight: 700; line-height: .8;
  font-size: clamp(16rem, 8rem + 30vw, 46rem);
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .07);
  user-select: none; pointer-events: none;
}
.faq-hero__grid { display: grid; gap: 40px; align-items: end; }
@media (min-width: 1000px) {
  .faq-hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; }
}
.faq-hero__copy .page-hero__title { max-width: 12ch; }

.faq-search {
  display: grid; gap: 14px;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(30, 30, 34, .72), rgba(17, 17, 19, .72));
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-3);
}
.faq-search__label {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-3);
}
.faq-search__box { position: relative; }
.faq-search__icon { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.faq-search__input {
  width: 100%; min-height: 60px; padding: 0 56px 0 50px;
  border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text); font-size: 1.0625rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none; appearance: none;
}
.faq-search__input::placeholder { color: var(--text-3); opacity: 1; }
.faq-search__input::-webkit-search-cancel-button, .faq-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.faq-search__input:hover { border-color: var(--line-3); }
.faq-search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.faq-search__input:focus + .faq-search__kbd, .faq-search__input:not(:placeholder-shown) + .faq-search__kbd { opacity: 0; }
.faq-search__kbd {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 7px; border: 1px solid var(--line-3); color: var(--text-3);
  font: 600 var(--fs-xs) var(--font-ui); pointer-events: none;
  transition: opacity var(--t-fast);
}
@media (pointer: coarse) { .faq-search__kbd { display: none; } }
.faq-search__clear {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: var(--text-2); transition: background var(--t-fast), color var(--t-fast);
}
.faq-search__clear:hover { background: var(--surface-3); color: var(--text); }

.faq-search__suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.faq-search__suggest-label { font-size: var(--fs-sm); color: var(--text-3); margin-right: 2px; }
.faq-chip {
  min-height: 34px; padding: 0 13px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); color: var(--text-2); font-size: var(--fs-sm); font-weight: 500;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.faq-chip:hover { border-color: var(--accent-line); color: var(--text); background: var(--accent-soft); }

.faq-search__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.faq-search__status { font-size: var(--fs-sm); color: var(--text-3); }
.faq-search__toggle {
  flex: none; min-height: 32px; font-size: var(--fs-sm); font-weight: 600; color: var(--text);
  text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 4px;
}
.faq-search__toggle:hover { text-decoration-color: var(--accent); }

/* ---------------- Layout ---------------- */
.faq-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.faq-aside { min-width: 0; }
@media (min-width: 1000px) {
  .faq-layout { grid-template-columns: 260px minmax(0, 1fr); gap: clamp(48px, 6vw, 112px); align-items: start; }
  .faq-aside { position: sticky; top: calc(var(--site-header-h) + 28px); }
}
.faq-groups { min-width: 0; max-width: 960px; }

/* Topic nav */
.faq-nav__title { margin-bottom: 12px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-3); }
.faq-nav__list { margin: 0; border-top: 1px solid var(--line-2); }
.faq-nav__link {
  position: relative;
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 6px;
  min-height: 50px; padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: var(--fs-md);
  transition: color var(--t-fast), opacity var(--t-med);
}
.faq-nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
.faq-nav__link:hover { color: var(--text); }
.faq-nav__link.is-active { color: var(--text); }
.faq-nav__link.is-active::after { transform: scaleX(1); }
.faq-nav__num { font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .08em; color: var(--text-3); }
.faq-nav__link.is-active .faq-nav__num { color: var(--accent); }
.faq-nav__count {
  min-width: 26px; padding: 2px 7px; border-radius: var(--r-pill); text-align: center;
  background: var(--surface-3); color: var(--text-3); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums;
}
.faq-nav__count:empty { display: none; }
.faq-nav__link.is-empty { opacity: .4; }

.faq-aside__help {
  display: grid; gap: 10px; margin-top: 28px; padding: 20px;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface-1);
  font-size: var(--fs-small); color: var(--text-2);
}
.faq-aside__help-title { font-weight: 600; color: var(--text); }
.faq-aside__help .btn { margin-top: 4px; }

@media (max-width: 999px) {
  .faq-nav__title, .faq-aside__help { display: none; }
  .faq-nav__list {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; border: 0;
    margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px;
    scroll-snap-type: x proximity;
  }
  .faq-nav__list::-webkit-scrollbar { display: none; }
  .faq-nav__list li { flex: none; scroll-snap-align: start; }
  .faq-nav__link {
    display: inline-flex; gap: 8px; min-height: 44px; padding: 0 8px 0 14px;
    border: 1px solid var(--line-2); border-radius: var(--r-pill); font-size: var(--fs-sm); white-space: nowrap;
  }
  .faq-nav__link::after { display: none; }
  .faq-nav__num { display: none; }
  .faq-nav__link:hover { border-color: var(--line-3); }
}

/* ---------------- Groups ---------------- */
.faq-group + .faq-group { margin-top: clamp(56px, 6vw, 104px); }
.faq-group__head { display: flex; align-items: flex-start; gap: clamp(14px, 2vw, 24px); margin-bottom: clamp(16px, 2vw, 28px); }
.faq-group__num {
  flex: none; font-family: var(--font-display); font-weight: 700; line-height: .82; letter-spacing: .01em;
  font-size: clamp(2.75rem, 2rem + 2.4vw, 4.25rem);
  color: transparent; -webkit-text-stroke: 1px var(--accent-line);
}
.faq-group__title { font-size: clamp(1.875rem, 1.35rem + 1.8vw, 3rem); line-height: .95; }
.faq-group__text { margin-top: 8px; color: var(--text-3); font-size: var(--fs-small); }

/* Items */
.faq-item { position: relative; }
.faq-item::before {
  content: ""; position: absolute; left: -18px; top: 20px; height: 28px; width: 2px; border-radius: 2px;
  background: var(--accent); opacity: 0; transform: scaleY(.3); transition: opacity var(--t-med), transform var(--t-med) var(--ease-out);
}
.faq-item[open]::before { opacity: 1; transform: none; }
@media (max-width: 1100px) { .faq-item::before { display: none; } }
.faq-item.is-flash > summary { animation: faq-flash 2.2s var(--ease-out); }
@keyframes faq-flash { 0%, 30% { color: var(--accent); } 100% { color: var(--text); } }
.faq-a { max-width: 72ch; }
@media (max-width: 640px) { .faq-a { padding-right: 0; } }
.faq-a > p:first-child { color: var(--text-2); }
.faq-a a { text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.faq-a a:hover { text-decoration-color: currentColor; }

::highlight(faq-hit) { background-color: rgba(242, 163, 58, .34); color: #fff; }

/* Lists inside answers */
.faq-list { padding-left: 1.15em; }
.faq-list li + li { margin-top: .35em; }
.faq-list li::marker { color: var(--accent); }
.faq-steps { padding: 0; list-style: none; counter-reset: faqstep; display: grid; gap: 12px; }
.faq-steps li { position: relative; padding-left: 44px; counter-increment: faqstep; }
.faq-steps li::before {
  content: counter(faqstep); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--accent-line); color: var(--accent);
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
}

/* Tables */
.faq-table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface-1); }
.faq-table { width: 100%; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.faq-table th, .faq-table td { padding: 11px 14px; text-align: left; vertical-align: middle; }
.faq-table thead th {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3);
  background: var(--surface-2); white-space: nowrap;
}
.faq-table tbody tr { border-top: 1px solid var(--line); }
.faq-table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.faq-table tbody th { font-weight: 500; color: var(--text); white-space: nowrap; }
.faq-table td { color: var(--text-2); }
.faq-table .is-num { text-align: right; color: var(--text); font-weight: 600; white-space: nowrap; }
.faq-table--matrix th:not(:first-child), .faq-table--matrix td { text-align: center; }
.faq-table--items tbody th { white-space: normal; }
.faq-table__item { display: block; }
.faq-table__sub { display: block; margin-top: 2px; font-weight: 400; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-3); }
.faq-table-wrap + .faq-table-wrap { margin-top: 12px; }
@media (max-width: 560px) {
  .faq-table th, .faq-table td { padding: 9px 8px; }
  .faq-table th:first-child, .faq-table td:first-child { padding-left: 12px; }
  .faq-table th:last-child, .faq-table td:last-child { padding-right: 12px; }
  .faq-table thead th { white-space: normal; letter-spacing: .03em; line-height: 1.3; }
  .faq-table tbody th { white-space: normal; }
  .faq-fit { min-width: 30px; padding: 2px 6px; }
}
.faq-fit {
  display: inline-grid; place-items: center; min-width: 50px; padding: 3px 8px; border-radius: 8px;
  color: var(--text-2); font-weight: 600; border: 1px solid var(--line-2);
}
.faq-fit--deck { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.faq-fit--no { border-color: transparent; color: var(--text-3); }
.faq-fit--key { min-width: 0; padding: 0 6px; margin-right: 4px; font-size: var(--fs-xs); vertical-align: 1px; }
.faq-table-key, .faq-table-note { margin-top: 10px; font-size: var(--fs-xs); color: var(--text-3); }
.faq-table-label:first-child { margin-top: 0; }
.faq-table-label { margin: 22px 0 10px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-3); }

/* Example builds */
.faq-examples { display: grid; gap: 14px; }
@media (min-width: 680px) { .faq-examples { grid-template-columns: 1fr 1fr; } }
.faq-example {
  display: grid; grid-template-rows: auto 1fr auto; gap: 12px;
  padding: 18px 18px 16px; border-radius: var(--r-lg);
  border: 1px solid var(--line-2); background: var(--surface-1);
}
.faq-example__title { font-size: 1.375rem; font-weight: 600; }
.faq-example__sub { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.faq-example__lines { margin: 0; display: grid; align-content: start; font-size: var(--fs-sm); }
.faq-example__lines li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.faq-example__name { color: var(--text-2); }
.faq-example__price { flex: none; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.faq-example__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 4px; color: var(--text-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.faq-example__total strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--accent); letter-spacing: .01em; font-variant-numeric: tabular-nums; }

/* Vehicles */
.faq-vehicles { display: grid; gap: 14px; margin: 0; }
.faq-vehicles__group { display: grid; gap: 8px; }
.faq-vehicles dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-3); }
.faq-vehicles dd { margin: 0; }
.faq-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.faq-chips li { padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface-1); color: var(--text); font-size: var(--fs-sm); }

/* Bays */
.faq-bays { display: grid; gap: 8px; margin: 0; }
.faq-bays__item {
  display: grid; grid-template-columns: 96px 88px 1fr; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-1);
  font-size: var(--fs-small);
}
.faq-bays__viz { display: flex; gap: 4px; }
.faq-bays__viz span { width: 26px; height: 20px; border-radius: 4px; border: 1px solid var(--accent-line); background: var(--accent-soft); }
.faq-bays__len { font-weight: 600; color: var(--text); }
.faq-bays__n { color: var(--text-2); }
@media (max-width: 420px) { .faq-bays__item { grid-template-columns: 90px 1fr; } .faq-bays__n { grid-column: 2; } .faq-bays__viz { grid-row: span 2; } }

/* Finishes */
.faq-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; }
.faq-swatches li { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-1); color: var(--text); font-size: var(--fs-small); }
.faq-swatches__chip {
  position: relative; flex: none; width: 32px; height: 32px; border-radius: 8px; overflow: hidden;
  background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.faq-swatches__chip.is-textured::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .22) .7px, transparent .8px), radial-gradient(rgba(0, 0, 0, .25) .7px, transparent .8px);
  background-size: 4px 4px, 5px 5px; background-position: 0 0, 2px 1px;
}
.faq-swatches__chip.is-gloss::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 45%);
}

/* Copy link */
.faq-a > .faq-tools { margin-top: 18px; }
.faq-tools__link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 2px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); border-radius: 6px;
  transition: color var(--t-fast);
}
.faq-tools__link:hover { color: var(--text); }
.faq-tools__link.is-done { color: var(--ok); }

/* Empty state */
.faq-empty {
  display: grid; gap: 14px; justify-items: start;
  padding: clamp(24px, 3vw, 40px); border-radius: var(--r-xl);
  border: 1px dashed var(--line-3); background: var(--surface-1);
}
.faq-empty p { color: var(--text-2); }
.faq-empty__icon { color: var(--accent); }
.faq-empty .h3 { font-size: var(--fs-h4); }

/* Still stuck */
.faq-next { display: grid; gap: var(--grid-gap); margin-top: clamp(64px, 7vw, 112px); }
@media (min-width: 760px) { .faq-next { grid-template-columns: 1fr 1fr; } }
.faq-next__card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 14px; align-content: start;
  padding: clamp(24px, 3vw, 40px); border-radius: var(--r-xl);
  border: 1px solid var(--line); background: var(--surface-1);
  color: var(--text); text-decoration: none;
}
.faq-next__card > p { color: var(--text-2); }
.faq-next__card .cluster { margin-top: 6px; --cluster-gap: 12px 24px; }
.faq-next__icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2);
}
.faq-next__icon--accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.faq-next__title { display: block; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.625rem, 1.3rem + 1vw, 2.25rem); line-height: 1; letter-spacing: .02em; text-wrap: balance; }
.faq-next__text { display: block; color: var(--text-2); max-width: 34ch; }
.faq-next__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; }
.faq-next__card--build { min-height: 300px; align-content: end; border-color: var(--line-2); }
.faq-next__bg {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%;
  transition: transform 1.2s var(--ease-out);
}
.faq-next__card--build::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(11, 11, 12, .95) 0%, rgba(11, 11, 12, .65) 50%, rgba(11, 11, 12, .2) 100%);
}
.faq-next__card--build:hover .faq-next__bg { transform: scale(1.04); }
.faq-next__card--build:hover .faq-next__go .icon--nudge { transform: translateX(3px); }
.faq-next__go .icon { transition: transform var(--t-med) var(--ease-out); }
.faq-next__card--build:hover { border-color: var(--accent-line); }
.faq-next__card--build .faq-next__icon { margin-bottom: auto; }

.faq-is-searching .faq-next { display: none; }
