/* ============================================================
   FAQ — page-only styles
   Search hero, topic rail, question cards, search results and
   the empty state. Loaded only by faq.html, after custom.css.
   Palette: navy, orange, white.
   ============================================================ */

/* ---------- Search ---------- */

.fq-search {
  margin: 2.5rem auto 0;
  max-width: 40rem;
}

.fq-field {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 1rem;
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 28px 60px -24px rgba(0, 0, 0, 0.7);
  transition: box-shadow 0.2s ease;
}

.fq-field:focus-within {
  box-shadow: 0 0 0 3px rgba(254, 93, 1, 0.55),
    0 28px 60px -24px rgba(0, 0, 0, 0.7);
}

.fq-field > svg {
  position: absolute;
  left: 1.15rem;
  width: 1.375rem;
  height: 1.375rem;
  color: #C24600;
  pointer-events: none;
}

.fq-field input {
  flex: 1;
  min-width: 0;
  height: 3.75rem;
  padding: 0 0.75rem 0 3.25rem;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  font-size: 1.0625rem;
  color: #0f172a;
  outline: none;
}

.fq-field input::placeholder {
  color: #64748b;
}

.fq-field input::-webkit-search-cancel-button,
.fq-field input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.fq-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.75rem;
  border-radius: 9999px;
  color: #475569;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.fq-clear:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.fq-clear:focus-visible {
  outline: 2px solid #FE5D01;
  outline-offset: 2px;
}

.fq-clear svg {
  width: 1.1rem;
  height: 1.1rem;
}

.fq-kbd {
  margin-right: 1rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 0.375rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  color: #64748b;
}

.fq-search.has-value .fq-kbd {
  display: none;
}

@media (hover: none) {
  .fq-kbd {
    display: none;
  }
}

.fq-suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.fq-suggest-label {
  margin-right: 0.25rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #94a3b8;
}

.fq-suggest button {
  padding: 0.4rem 0.9rem;
  border: 1px solid #334155;
  border-radius: 9999px;
  background-color: rgba(15, 23, 42, 0.6);
  font-size: 0.875rem;
  font-weight: 500;
  color: #e2e8f0;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.fq-suggest button:hover,
.fq-suggest button[aria-pressed="true"] {
  border-color: rgba(254, 93, 1, 0.7);
  background-color: rgba(254, 93, 1, 0.12);
  color: #ffffff;
}

.fq-suggest button:focus-visible {
  outline: 2px solid #FE5D01;
  outline-offset: 2px;
}

/* ---------- Topic rail ---------- */

.fq-side {
  min-width: 0;
}

.fq-side-label {
  margin: 0 0 0.75rem 0.75rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
}

.fq-topics {
  display: grid;
  gap: 0.125rem;
}

.fq-topic {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #475569;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.fq-topic::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 3px;
  border-radius: 3px;
  background-color: #FE5D01;
  transform: scaleY(0);
  transition: transform 0.25s ease;
}

.fq-topic:hover {
  background-color: #ffffff;
  color: #0f172a;
}

.fq-topic:focus-visible {
  outline: 2px solid #FE5D01;
  outline-offset: 2px;
}

.fq-topic.is-active {
  background-color: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 20px -14px rgba(15, 23, 42, 0.35);
}

.fq-topic.is-active::before {
  transform: scaleY(1);
}

.fq-num {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  color: #C24600;
}

.fq-count {
  margin-left: auto;
  min-width: 1.6rem;
  padding: 0.05rem 0.4rem;
  border-radius: 9999px;
  background-color: #e2e8f0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  text-align: center;
  color: #475569;
}

.fq-topic.is-active .fq-count,
.fq-topic.has-hits .fq-count {
  background-color: #FE5D01;
  color: #ffffff;
}

.fq-topic.is-empty {
  opacity: 0.45;
}

.fq-help {
  margin-top: 1.75rem;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  background-color: #ffffff;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #475569;
}

.fq-help-title {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: #0f172a;
}

.fq-help a:not(.fq-help-btn) {
  font-weight: 500;
  color: #C24600;
  text-decoration: underline;
  text-decoration-color: rgba(194, 70, 0, 0.35);
  text-underline-offset: 3px;
}

.fq-help-btn {
  display: inline-flex;
  margin-top: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: #0f172a;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  transition: background-color 0.2s ease;
}

.fq-help-btn:hover {
  background-color: #C24600;
}

.fq-help-btn:focus-visible {
  outline: 2px solid #FE5D01;
  outline-offset: 3px;
}

/* Below 1024px the rail becomes a swipeable chip row; the help card is
   left to the closing band at the bottom of the page. */
@media (max-width: 1023.98px) {
  .fq-side-label,
  .fq-help {
    display: none;
  }

  .fq-topics {
    display: flex;
    gap: 0.5rem;
    margin: 0 -1rem;
    padding: 0.125rem 1rem 0.375rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .fq-topics::-webkit-scrollbar {
    display: none;
  }

  .fq-topic {
    flex-shrink: 0;
    padding: 0.5rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    background-color: #ffffff;
    font-size: 0.875rem;
    white-space: nowrap;
  }

  .fq-topic::before {
    display: none;
  }

  .fq-topic.is-active {
    border-color: #FE5D01;
  }
}

/* ---------- Status line ---------- */

.fq-status {
  margin-bottom: 1.25rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.fq-status strong {
  font-weight: 600;
  color: #C24600;
}

/* ---------- Topic headings inside the list ---------- */

.fq-list {
  display: flex;
  flex-direction: column;
}

.fq-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 3rem 0 0.5rem;
  scroll-margin-top: 7rem;
}

.fq-head:first-child {
  margin-top: 0;
}

.fq-head-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background-color: #0f172a;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  color: #FE5D01;
}

.fq-head-title {
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  color: #0f172a;
}

.fq-head-desc {
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  color: #64748b;
}

.fq-list.is-searching .fq-head {
  display: none;
}

/* ---------- Question cards ---------- */

.fq-item {
  margin-top: 0.625rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  background-color: #ffffff;
  scroll-margin-top: 7rem;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.fq-item:hover {
  border-color: #FFD5A9;
}

.fq-item[open] {
  border-color: #FFB672;
  box-shadow: inset 3px 0 0 #FE5D01, 0 1px 2px rgba(15, 23, 42, 0.05),
    0 18px 40px -26px rgba(15, 23, 42, 0.35);
}

.fq-item summary {
  align-items: center;
  padding: 1rem 1.1rem 1rem 1.35rem;
  border-radius: 0.875rem;
}

.fq-item summary:hover {
  color: #0f172a;
}

.fq-item summary:hover .fq-q-text {
  color: #C24600;
}

.fq-item summary svg {
  width: 1.875rem;
  height: 1.875rem;
  margin-top: 0;
  padding: 0.45rem;
  border-radius: 9999px;
  background-color: #FFF7ED;
  color: #C24600;
  transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.fq-item[open] summary svg {
  background-color: #FE5D01;
  color: #ffffff;
}

.fq-q {
  display: block;
}

.fq-q-text {
  transition: color 0.2s ease;
}

.fq-tag {
  display: none;
  margin-bottom: 0.2rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C24600;
}

.fq-list.is-searching .fq-tag {
  display: block;
}

.fq-item .faq-body {
  padding: 0 3.6rem 1.25rem 1.35rem;
}

.fq-item[open] .faq-body {
  animation: fq-open 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fq-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@media (max-width: 639.98px) {
  .fq-item .faq-body {
    padding-right: 1.1rem;
  }
}

/* Search hits */
.fq-mark {
  padding: 0 0.1em;
  border-radius: 0.2rem;
  background-color: rgba(254, 93, 1, 0.16);
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.fq-list.is-searching .fq-item {
  animation: fq-hit 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fq-hit {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- Empty state ---------- */

.fq-empty {
  padding: 2.5rem 1.5rem;
  border: 1px dashed #FFB672;
  border-radius: 1rem;
  background-color: #ffffff;
  text-align: center;
}

.fq-empty > svg {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto;
  padding: 0.55rem;
  border-radius: 9999px;
  background-color: #FFF7ED;
  color: #C24600;
}

.fq-empty-title {
  margin-top: 1rem;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.fq-empty-text {
  max-width: 28rem;
  margin: 0.6rem auto 0;
  color: #475569;
}

.fq-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .fq-item[open] .faq-body,
  .fq-list.is-searching .fq-item {
    animation: none;
  }

  .fq-topic,
  .fq-topic::before,
  .fq-item,
  .fq-item summary svg {
    transition: none;
  }
}
