/* FOXES – FAQ styles
 * Brand: Foxes Finance & Legal
 * Typography: Geist (sans-serif only)
 * Palette: red (#D05050) / ink (#0C0C0C) / cream (#FAF6EE) / rule (#E8DECC)
 *
 * v3 (brand update):
 *   - Replaced DM Sans + DM Serif Display with Geist
 *   - Replaced blue / slate scale with --fx-* brand tokens
 *   - Radii aligned: 10px (inputs/buttons), 16px (cards), 20px (hero), 999px (pills)
 *   - Hero now uses brand dark feature-card gradient instead of blue
 *
 * All rules scoped under #foxes-faq-mount.
 */

#foxes-faq-mount {
  /* Brand palette */
  --fx-red:        #D05050;
  --fx-red-dark:   #C04545;
  --fx-red-soft:   #F7E0E0;
  --fx-ink:        #0C0C0C;
  --fx-ink-soft:   #1F1F1F;
  --fx-cream:      #FAF6EE;
  --fx-white:      #FFFFFF;
  --fx-rule:       #E8DECC;
  --fx-gold:       #C8A24A;

  /* Derived text shades (opacity-based, kept brand-strict) */
  --fx-ink-65:     rgba(12, 12, 12, 0.65);
  --fx-ink-55:     rgba(12, 12, 12, 0.55);
  --fx-white-82:   rgba(255, 255, 255, 0.82);

  /* Radii (per brand spec) */
  --radius-hero:   20px;
  --radius-card:   16px;
  --radius-input:  10px;
  --radius-pill:   999px;

  /* Shadows (ink-based) */
  --shadow-sm:     0 2px 8px rgba(12, 12, 12, 0.06);
  --shadow-md:     0 8px 24px rgba(12, 12, 12, 0.09);
  --shadow-lg:     0 16px 40px rgba(12, 12, 12, 0.12);

  font-family: 'Geist', sans-serif;
  color: var(--fx-ink);
  background: transparent;
  padding: 0;
  box-sizing: border-box;
}

#foxes-faq-mount * { box-sizing: border-box; }

#foxes-faq-mount .f-wrap { max-width: 1160px; margin: 0 auto; }

/* ── Hero (brand dark feature card) ── */
#foxes-faq-mount .f-hero {
  background: linear-gradient(155deg, var(--fx-ink) 0%, var(--fx-ink-soft) 100%);
  border-radius: var(--radius-hero);
  padding: 40px 36px 36px;
  margin-bottom: 28px;
  position: relative;
}

#foxes-faq-mount .f-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

#foxes-faq-mount .f-hero-content { position: relative; z-index: 2; }

#foxes-faq-mount .f-hero h2 {
  font-family: 'Geist', sans-serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fx-white);
  margin: 0 0 10px;
}

#foxes-faq-mount .f-hero p {
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--fx-white-82) !important;
  margin: 0 0 28px !important;
  max-width: 680px;
  font-weight: 400 !important;
}

/* ── Unified search + topic control ── */
#foxes-faq-mount .f-control {
  background: var(--fx-white);
  border-radius: var(--radius-card);
  display: flex;
  align-items: stretch;
  box-shadow: var(--shadow-lg);
  overflow: visible;
  position: relative;
}

#foxes-faq-mount .f-topic-select-wrap {
  position: relative;
  flex-shrink: 0;
  border-right: 1px solid var(--fx-rule);
}

#foxes-faq-mount .f-topic-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fx-red);
  font-size: 13px;
  pointer-events: none;
}

#foxes-faq-mount .f-topic-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  padding: 0 38px 0 18px;
  height: 100%;
  min-height: 56px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--fx-red);
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  min-width: 150px;
}

#foxes-faq-mount .f-topic-select:focus-visible {
  outline: 2px solid var(--fx-red);
  outline-offset: -2px;
  border-radius: var(--radius-card) 0 0 var(--radius-card);
}

#foxes-faq-mount .f-control-divider {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--fx-ink-65);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
  background: var(--fx-cream);
  border-right: 1px solid var(--fx-rule);
  user-select: none;
}

#foxes-faq-mount .f-search-wrap {
  flex: 1;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
}

#foxes-faq-mount .f-search-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0 52px 0 18px;
  height: 56px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--fx-ink);
  outline: none;
}

#foxes-faq-mount .f-search-input::placeholder { color: var(--fx-ink-55); }

#foxes-faq-mount .f-search-input:focus-visible {
  outline: 2px solid var(--fx-red);
  outline-offset: -2px;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

#foxes-faq-mount .f-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  border: none;
  background: var(--fx-rule);
  color: var(--fx-ink);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  transition: background 150ms ease, color 150ms ease;
}

#foxes-faq-mount .f-search-clear:hover { background: var(--fx-ink); color: var(--fx-white); }
#foxes-faq-mount .f-search-clear.visible { display: flex; }

/* ── Suggestions dropdown ── */
#foxes-faq-mount .f-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--fx-white);
  border: 1px solid var(--fx-rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1000;
}

#foxes-faq-mount .f-suggestions.active { display: block; }

#foxes-faq-mount .f-sug-header {
  padding: 10px 14px 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fx-ink-65);
  background: var(--fx-cream);
  border-bottom: 1px solid var(--fx-rule);
}

#foxes-faq-mount .f-sug-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 1px solid var(--fx-rule);
  transition: background 120ms ease;
  outline: none;
}

#foxes-faq-mount .f-sug-item:last-child { border-bottom: none; }
#foxes-faq-mount .f-sug-item:hover,
#foxes-faq-mount .f-sug-item:focus,
#foxes-faq-mount .f-sug-item[aria-selected="true"] {
  background: var(--fx-red-soft);
}

#foxes-faq-mount .f-sug-cat {
  flex-shrink: 0;
  background: var(--fx-red-soft);
  color: var(--fx-red-dark);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

#foxes-faq-mount .f-sug-q {
  font-size: 13px;
  font-weight: 500;
  color: var(--fx-ink);
  line-height: 1.35;
}

/* ── Reset button (in hero) ── */
#foxes-faq-mount .f-reset-btn {
  margin-top: 12px;
  display: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 150ms ease;
}

#foxes-faq-mount .f-reset-btn:hover { color: var(--fx-white); }
#foxes-faq-mount .f-reset-btn.visible { display: inline-block; }

/* ── Active filter pills ── */
#foxes-faq-mount .f-active-filters {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

#foxes-faq-mount .f-active-filters.visible { display: flex; }

#foxes-faq-mount .f-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fx-white);
  border: 1px solid var(--fx-rule);
  color: var(--fx-ink);
  border-radius: var(--radius-pill);
  padding: 5px 10px 5px 12px;
  font-size: 13px;
  font-weight: 500;
  animation: foxesPillIn 180ms ease;
}

@keyframes foxesPillIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

#foxes-faq-mount .f-filter-pill button {
  border: none;
  background: transparent;
  color: var(--fx-ink-65);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 150ms ease;
}

#foxes-faq-mount .f-filter-pill button:hover { color: var(--fx-red); }

/* ── Pinned card bar ── */
#foxes-faq-mount .f-pinned-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  background: var(--fx-red-soft);
  border: 1px solid rgba(208, 80, 80, 0.2);
  border-radius: var(--radius-card);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--fx-red-dark);
  font-weight: 500;
}

#foxes-faq-mount .f-pinned-bar.visible { display: flex; }

#foxes-faq-mount .f-pinned-bar-back {
  border: none;
  background: transparent;
  color: var(--fx-red-dark);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-shrink: 0;
  transition: color 150ms ease;
}

#foxes-faq-mount .f-pinned-bar-back:hover { color: var(--fx-ink); }

/* ── Results meta ── */
#foxes-faq-mount .f-meta {
  font-size: 13px;
  color: var(--fx-ink-65);
  font-weight: 400;
  margin: 18px 0 16px;
}

/* ── Popular cards ── */
#foxes-faq-mount .f-popular-section { margin-bottom: 28px; }

#foxes-faq-mount .f-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fx-ink-65);
  margin: 0 0 12px;
}

#foxes-faq-mount .f-popular-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

#foxes-faq-mount .f-popular-card {
  background: var(--fx-white);
  border: 1px solid var(--fx-rule);
  border-radius: var(--radius-card);
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow: var(--shadow-sm);
}

#foxes-faq-mount .f-popular-card:hover,
#foxes-faq-mount .f-popular-card:focus-visible {
  border-color: var(--fx-red);
  box-shadow: 0 8px 20px rgba(208, 80, 80, 0.14);
  transform: translateY(-2px);
  outline: none;
}

#foxes-faq-mount .f-popular-cat {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fx-red-dark);
}

#foxes-faq-mount .f-popular-q {
  font-size: 13px;
  font-weight: 500;
  color: var(--fx-ink);
  line-height: 1.4;
}

/* ── FAQ grid ── */
#foxes-faq-mount .f-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

#foxes-faq-mount .f-faq-card {
  background: var(--fx-white);
  border: 1px solid var(--fx-rule);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex !important;
  flex-direction: column !important;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

#foxes-faq-mount .f-faq-card.open {
  border-color: var(--fx-red);
  box-shadow: 0 12px 28px rgba(208, 80, 80, 0.12);
}

#foxes-faq-mount .f-faq-cat {
  display: inline-flex;
  align-self: flex-start;
  background: var(--fx-red-soft);
  color: var(--fx-red-dark);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  line-height: 1.4;
}

#foxes-faq-mount .f-faq-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.3;
  color: var(--fx-ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

#foxes-faq-mount .f-faq-preview {
  margin: 0 0 14px;
  color: var(--fx-ink-65);
  line-height: 1.6;
  font-size: 14px;
}

/* Read / Close button: brand secondary (ghost-ink) → filled-ink when open */
#foxes-faq-mount .f-read-btn {
  display: inline-block !important;
  margin-top: auto;
  width: fit-content;
  border: 1.5px solid var(--fx-ink);
  background: transparent;
  color: var(--fx-ink);
  font-weight: 600;
  border-radius: var(--radius-input);
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: background 160ms ease, color 160ms ease;
}

#foxes-faq-mount .f-read-btn:hover {
  background: var(--fx-ink);
  color: var(--fx-white);
}

#foxes-faq-mount .f-faq-card.open .f-read-btn {
  background: var(--fx-ink);
  color: var(--fx-white);
}

#foxes-faq-mount .f-read-btn:focus-visible {
  outline: 2px solid var(--fx-red);
  outline-offset: 3px;
}

#foxes-faq-mount .f-faq-answer {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--fx-rule);
}

#foxes-faq-mount .f-faq-card.open .f-faq-answer { display: block; }

#foxes-faq-mount .f-faq-answer p {
  margin: 0 0 14px;
  color: var(--fx-ink);
  line-height: 1.7;
  font-size: 14px;
}

/* ── CTA box (inside expanded answer) ── */
#foxes-faq-mount .f-cta {
  background: var(--fx-red-soft);
  border: 1px solid rgba(208, 80, 80, 0.22);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-top: 10px;
}

#foxes-faq-mount .f-cta-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fx-ink);
  margin: 0 0 4px;
}

#foxes-faq-mount .f-cta-text {
  font-size: 13px;
  color: var(--fx-ink-65);
  margin: 0 0 10px;
  line-height: 1.55;
}

/* Brand primary button, scaled down for in-card use */
#foxes-faq-mount .f-cta-link {
  display: inline-flex;
  align-items: center;
  background: var(--fx-red);
  color: var(--fx-white);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-input);
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(12, 12, 12, 0.12);
  transition: background 200ms ease, box-shadow 200ms ease;
}

#foxes-faq-mount .f-cta-link:hover {
  background: var(--fx-red-dark);
  box-shadow: 0 4px 12px rgba(12, 12, 12, 0.18);
}

/* ── Show more (brand secondary ghost-ink) ── */
#foxes-faq-mount .f-show-more-wrap {
  display: none;
  justify-content: center;
  margin: 24px 0 6px;
}

#foxes-faq-mount .f-show-more-btn {
  border: 1.5px solid var(--fx-ink);
  background: transparent;
  color: var(--fx-ink);
  font-weight: 600;
  border-radius: var(--radius-input);
  padding: 12px 22px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease;
}

#foxes-faq-mount .f-show-more-btn:hover {
  background: var(--fx-ink);
  color: var(--fx-white);
}

/* ── No results ── */
#foxes-faq-mount .f-no-results {
  display: none;
  background: var(--fx-white);
  border: 1.5px dashed var(--fx-rule);
  border-radius: var(--radius-card);
  padding: 36px 24px;
  text-align: center;
  color: var(--fx-ink-65);
  font-size: 15px;
  font-weight: 400;
  margin-top: 14px;
}

/* ── Disclaimer ── */
#foxes-faq-mount .f-disclaimer {
  margin-top: 24px;
  background: var(--fx-white);
  border: 1px solid var(--fx-rule);
  color: var(--fx-ink-55);
  font-size: 12px;
  line-height: 1.6;
  padding: 14px 16px;
  border-radius: var(--radius-card);
}

/* ── Selection & focus (page-wide brand convention) ── */
#foxes-faq-mount ::selection { background: var(--fx-red-soft); color: var(--fx-ink); }

/* ── Responsive ── */
@media (max-width: 980px) {
  #foxes-faq-mount .f-popular-grid { grid-template-columns: repeat(2, 1fr); }
  #foxes-faq-mount .f-faq-grid     { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  #foxes-faq-mount .f-hero { padding: 28px 20px 24px; }
  #foxes-faq-mount .f-control {
    flex-direction: column;
    border-radius: var(--radius-card);
  }
  #foxes-faq-mount .f-topic-select-wrap {
    border-right: none;
    border-bottom: 1px solid var(--fx-rule);
  }
  #foxes-faq-mount .f-topic-select {
    width: 100%;
    min-height: 48px;
    padding: 0 38px 0 16px;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }
  #foxes-faq-mount .f-topic-select:focus-visible {
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }
  #foxes-faq-mount .f-control-divider { display: none; }
  #foxes-faq-mount .f-search-input {
    height: 48px;
    padding: 0 44px 0 16px;
  }
  #foxes-faq-mount .f-search-input:focus-visible {
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }
  #foxes-faq-mount .f-popular-grid { grid-template-columns: 1fr 1fr; }
  #foxes-faq-mount .f-suggestions {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    max-height: 55vh;
    overflow-y: auto;
  }
}

/* ── FAQ accordion (v2 — native <details> based) ───────────────────────── */
/* The script.js renders Q&As as <details> elements rather than the older
 * .f-faq-card divs. These rules style the <details> markup. The older
 * .f-faq-card rules above remain in place but no longer match any rendered
 * element. */

#foxes-faq-mount .f-faq {
  background: var(--fx-white);
  border: 1px solid var(--fx-rule);
  border-radius: var(--radius-card);
  padding: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

#foxes-faq-mount .f-faq[open] {
  border-color: var(--fx-red);
  box-shadow: 0 12px 28px rgba(208, 80, 80, 0.12);
}

#foxes-faq-mount .f-faq-summary {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

/* Suppress default browser disclosure triangle */
#foxes-faq-mount .f-faq-summary::-webkit-details-marker { display: none; }
#foxes-faq-mount .f-faq-summary::marker { content: ''; }
#foxes-faq-mount .f-faq-summary { -webkit-tap-highlight-color: transparent; }

#foxes-faq-mount .f-faq-summary .f-faq-cat {
  margin-bottom: 0;
  flex-shrink: 0;
  align-self: center;
}

#foxes-faq-mount .f-faq-q {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--fx-ink);
  letter-spacing: -0.005em;
  align-self: center;
}

#foxes-faq-mount .f-faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fx-cream);
  border-radius: var(--radius-pill);
  color: var(--fx-red-dark);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  transition: background 200ms ease, transform 200ms ease, color 200ms ease;
  align-self: center;
}

#foxes-faq-mount .f-faq[open] .f-faq-icon {
  background: var(--fx-red);
  color: var(--fx-white);
  transform: rotate(45deg);
}

#foxes-faq-mount .f-faq-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--fx-rule);
}

#foxes-faq-mount .f-faq[open] .f-faq-body {
  padding-top: 14px;
}

#foxes-faq-mount .f-faq-short {
  margin: 0 0 10px;
  color: var(--fx-ink);
  line-height: 1.6;
  font-size: 14px;
  font-weight: 500;
}

#foxes-faq-mount .f-faq-full {
  margin: 0 0 12px;
  color: var(--fx-ink);
  line-height: 1.7;
  font-size: 14px;
}

#foxes-faq-mount .f-faq:focus-within {
  border-color: var(--fx-red);
}

#foxes-faq-mount .f-faq-summary:focus-visible {
  outline: 2px solid var(--fx-red);
  outline-offset: -2px;
}

/* 1.10.2: link from each answer to the guide that covers it */
#foxes-faq-mount .f-faq-more {
  margin: -4px 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fx-ink);
}
#foxes-faq-mount .f-faq-more a {
  color: var(--fx-red-dark);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
