:root {
  --gold: #d4af37;
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-soft: #f9f7f0;
  --text: #121212;
  --muted: #616161;
  --border: #e9e9e9;
  --chip-border: #d0d0d0;
  --z-header: 200;
  --z-toolbar: 300;
  --z-overlay: 500;
  --z-modal: 1000;
  --z-fab: 1200;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}


a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */

header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: #ffffff;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem 0.6rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.brand img {
  height: 28px;
}

.brand b {
  color: var(--gold);
}

.nav {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  color: var(--gold);
}

/* Toolbar */

.toolbar {
  position: sticky;
  top: 85px;
  z-index: var(--z-toolbar);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding-top: 0.4rem;
  padding-bottom: 0.5rem;
}

.search-block {
  padding: 0.4rem 0 0.5rem;
}

.search-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-field {
  flex: 1;
}

#searchInput {
  width: 100%;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #000;
  background: #141414;
  color: #ffffff;
  font-size: 0.85rem;
}

#searchInput::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.filter-panel {
  padding-bottom: 0.35rem;
}

.filter-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.view-tabs {
  display: flex;
  gap: 0.55rem;
}

.tab-button {
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: #ffffff;
  color: #000000;
  font-size: 0.78rem;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
}

.tab-button.active {
  border-color: var(--gold);
  background: rgba(249, 225, 139, 0.18);
  color: var(--gold);
}

.btn,
#fabFilters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: #ffffff;
  color: #000;
  font-size: 0.78rem;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.08s ease;
}

.btn:hover,
#fabFilters:hover {
  background: #fff9e6;
}

.btn.active,
#fabFilters.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.9);
}

/* Filter overlay */

#filters {
  display: none;
  margin-top: 0.45rem;
}

#filters.active {
  display: block;
}

#filters .inner {
  background: var(--bg-elevated);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.9);
  padding: 0.6rem 0.75rem 0.75rem;
}

#filters .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.category-row {
  align-items: flex-start;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}


.topic-row {
  margin-top: 0.4rem;
  align-items: flex-start;
}

.filter-label {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-right: 0.4rem;
  margin-top: 0.1rem;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}


.related-row {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.filter-chip.related-chip {
  font-size: 0.7rem;
  border-color: var(--gold);
  background: transparent;
}
.filter-chip {
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--chip-border);
  background: var(--chip);
  font-size: 0.75rem;
  cursor: pointer;
  color: #000;
}

.filter-chip:hover {
  border-color: var(--gold);
}

.filter-chip.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #121212;
}

/* Main layout */

main {
  padding-top: 0.6rem;
  padding-bottom: 2.5rem;
}

.iod-section {
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #fffaf0, #ffffff);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.iod-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.lists-wrapper {
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 0.9rem 1rem 1.1rem;
  background: var(--bg-elevated);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

#count {
  font-size: 0.8rem;
  color: var(--muted);
}

.results-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.results-right h2 {
  margin: 0;
  font-size: 0.95rem;
}

.list-actions {
  display: flex;
  gap: 0.55rem;
}

.btn-clear {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  display: none;
}

.btn-clear:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Grid & cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.insight-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 0.75rem 0.9rem;
  padding-right: 3.2rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.insight-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
}


.card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.45rem;
}

.card-open-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: #fffaf0;
  color: #000;
  font-size: 0.75rem;
  cursor: pointer;
}

.card-open-indicator .icon {
  font-size: 0.95rem;
  color: var(--gold);
}

.insight-card:hover .card-open-indicator {
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.3);
}


.insight-question {
  font-size: 0.9rem;
  font-weight: 600;
  color: #000000;
}

.insight-preview {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: #f3f3f3;
}



.badge.featured {
  border-color: var(--gold);
  color: var(--gold);
}


.favorite-indicator {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--gold);
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
}

.modal-dialog {
  position: relative;
  max-width: 720px;
  width: 100%;
  margin: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(249, 225, 139, 0.7);
  background: var(--bg-soft);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  z-index: calc(var(--z-modal) + 1);
}

.modal-content {
  padding: 1rem 1.1rem 1.2rem;
  overflow-y: auto;
  max-height: calc(100vh - 2rem);
}

.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  width: 1.9rem;
  height: 1.9rem;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.modal h2 {
  margin-top: 0.2rem;
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
}

.modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.favorite-btn {
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  padding: 0.25rem 0.7rem;
  background: #ffffff;
  color: var(--text);
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.favorite-btn.active {
  border-color: var(--gold);
  color: #000;
  background: var(--gold);
}

.modal-section {
  margin-top: 0.6rem;
}

.modal-section h3 {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  color: var(--gold);
}

.modal-section p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}


.modal-answer {
  margin-top: 0.8rem;
}

.modal-callout {
  margin-top: 0.7rem;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  background: var(--bg-soft);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.modal-callout h3 {
  margin-bottom: 0.25rem;
}

.modal-praxis {
  border-left: 3px solid #3b82f6;
}

.modal-error {
  border-left: 3px solid #ef4444;
}

.modal-bestpractice {
  border-left: 3px solid var(--gold);
}

.active-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0.5rem;
  font-size: 0.78rem;
}

.active-search.hidden {
  display: none;
}

.active-search .label {
  opacity: 0.8;
}

#activeSearchChip {
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: #fffaf0;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.btn-clear-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: #ffffff;
  font-size: 0.75rem;
  cursor: pointer;
  color: #000000;
  opacity: 1;
}

.btn-clear-search:hover {
  background: #fff9e6;
}
/* FAB */

.fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.9);
  border: 1px solid var(--gold);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.55);
  cursor: pointer;
  font-size: 0.75rem;
  color: #000;
}

.pill.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.8);
}

.circle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #050509;
  border: 1px solid rgba(249, 225, 139, 0.9);
  color: var(--gold);
display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(249, 225, 139, 0.6);
  cursor: pointer;
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0 1.4rem;
  margin-top: 1.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--gold);
}

/* Responsive */

@media (max-width: 720px) {
  .header-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .nav {
    font-size: 0.78rem;
  }

  .filter-row-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    margin: 0.6rem;
    max-height: calc(100vh - 1.2rem);
  }

  .modal-content {
    padding: 0.8rem 0.85rem 1rem;
  }
}

#backToTopBtn {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: var(--z-fab);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.9);
  background: radial-gradient(circle at 30% 0%, rgba(249,225,139,0.4), #ffffff);
  color: #000;
  cursor: pointer;
  font-size: 1.1rem;
  display: none;
  align-items: center;
  justify-content: center;
}
#backToTopBtn.visible {
  display: flex;
}
@media (max-width: 640px) {
  #backToTopBtn {
    bottom: 4.5rem;
  }
}

.iod-card .insight-question {
  font-size: 1rem;
  font-weight: 600;
}

.iod-card {
  border-width: 1px;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(212,175,55,0.25);
}

mark.highlight { background: var(--gold); color: #000; padding: 0 0.05em; border-radius: 2px; }

.favorite-btn .star-icon,
.card-fav-button .star-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-right: 0.3rem;
  background: #ffffff;
  color: #000;
  font-size: 0.9rem;
}

.favorite-btn.active .star-icon,
.card-fav-button.active .star-icon {
  border-color: var(--gold);
  background: var(--gold);
  color: #000;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.card-fav-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.card-fav-button .star-icon {
  margin-right: 0;
}

.card-actions {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

body.modal-open header { display: none; }

.modal-content > h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  padding-right: 3.4rem;
  word-break: break-word;
}


/* Floating filter button */
.fab {
  align-items: flex-end;
}

#fabFilters.faq-float-filter,
#fabFilters.faq-float-filter.active,
#fabFilters.faq-float-filter.has-active,
#fabFilters.faq-float-filter.is-open {
  position: relative !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
  line-height: 1 !important;
  background: #111 !important;
  color: #fffaf0 !important;
  border: 1px solid #d2a72c !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.24), 0 10px 20px rgba(0,0,0,.16) !important;
  overflow: visible !important;
}

#fabFilters.faq-float-filter:hover {
  transform: none !important;
  background: #111 !important;
}

#fabFilters.faq-float-filter.is-open,
#fabFilters.faq-float-filter.active.is-open {
  background: #fff7d7 !important;
  color: #111 !important;
  border-color: #b78912 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 10px 22px rgba(183,137,18,.20) !important;
}

#fabFilters.faq-float-filter .faq-filter-icon {
  width: 19px !important;
  height: 19px !important;
  display: inline-block;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

#fabFilters.faq-float-filter .faq-filter-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d2a72c;
  color: #111;
  border: 1px solid #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 .68rem/1 "Open Sans", Arial, sans-serif;
  box-shadow: 0 3px 8px rgba(0,0,0,.22);
}

#fabFilters.faq-float-filter[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  #fabFilters.faq-float-filter,
  #fabFilters.faq-float-filter.active,
  #fabFilters.faq-float-filter.has-active,
  #fabFilters.faq-float-filter.is-open {
    width: 39px !important;
    height: 39px !important;
    min-width: 39px !important;
    min-height: 39px !important;
    max-width: 39px !important;
  }

  #fabFilters.faq-float-filter .faq-filter-icon {
    width: 18px !important;
    height: 18px !important;
  }
}


/* Focus mode and related questions */
.modal-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.focus-mode-btn.active {
  border-color: var(--gold);
  background: #111111;
  color: #fffaf0;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.24);
}

.modal.focus-mode .modal-backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.modal.focus-mode .modal-dialog {
  max-width: 820px;
  border-color: rgba(212, 175, 55, 0.72);
  background: #ffffff;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.92);
}

.modal.focus-mode .modal-content {
  padding: 1.65rem 1.85rem 1.9rem;
}

.modal.focus-mode .modal-content > h2 {
  font-size: 1.48rem;
  line-height: 1.28;
  margin-bottom: 0.65rem;
}

.modal.focus-mode .modal-meta {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.24);
}

.modal.focus-mode #modalCategories,
.modal.focus-mode #relatedTagsSection {
  display: none !important;
}

.modal.focus-mode .modal-section h3 {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.modal.focus-mode .modal-section p {
  font-size: 0.92rem;
  line-height: 1.68;
}

.modal.focus-mode .modal-callout {
  background: #fffaf0;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  border-right: 1px solid rgba(212, 175, 55, 0.18);
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.related-question-list {
  display: grid;
  gap: 0.45rem;
}

.related-question-btn {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.34);
  background: #ffffff;
  color: #111111;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.35;
}

.related-question-btn:hover {
  border-color: var(--gold);
  background: #fffaf0;
}

.related-question-title {
  display: block;
  font-weight: 600;
}

.modal.focus-mode .related-question-list {
  margin-top: 0.2rem;
}

@media (max-width: 720px) {
  .modal-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .modal.focus-mode .modal-dialog {
    margin: 0;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal.focus-mode .modal-content {
    max-height: 100vh;
    padding: 1.15rem 1rem 1.35rem;
  }

  .modal.focus-mode .modal-content > h2 {
    font-size: 1.2rem;
    padding-right: 2.6rem;
  }

  .modal.focus-mode .modal-section p {
    font-size: 0.88rem;
    line-height: 1.62;
  }
}


/* Focus mode refinements */
.focus-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.focus-btn-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.focus-mode-btn.active {
  background: linear-gradient(180deg, #111111 0%, #1d1d1d 100%);
  color: #fffaf0;
  border-color: rgba(212, 175, 55, 0.88);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.18), 0 10px 24px rgba(0,0,0,0.22);
}

.modal.focus-mode .modal-backdrop {
  background: rgba(0, 0, 0, 0.93);
  backdrop-filter: blur(10px) saturate(0.9);
}

.modal.focus-mode .modal-dialog {
  width: min(980px, calc(100vw - 1.75rem));
  max-width: 980px;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.72);
  background: linear-gradient(180deg, #fffdf7 0%, #f7f3e7 100%);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 175, 55, 0.14) inset;
}

.modal.focus-mode .modal-content {
  padding: 1.75rem 1.95rem 2rem;
}

.modal.focus-mode .modal-content > h2 {
  font-size: 1.62rem;
  line-height: 1.24;
  margin-bottom: 0.85rem;
  max-width: 85%;
}

.modal.focus-mode .modal-meta {
  align-items: center;
  padding-bottom: 0.85rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

.modal.focus-mode #modalCategories,
.modal.focus-mode #relatedTagsSection,
.modal.focus-mode #relatedQuestionsSection {
  display: none !important;
}

.modal.focus-mode .modal-section {
  margin-top: 1rem;
}

.modal.focus-mode .modal-section h3 {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.4rem;
}

.modal.focus-mode .modal-section p {
  font-size: 1rem;
  line-height: 1.78;
}

.modal.focus-mode .modal-callout {
  border-width: 1px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.modal.focus-mode .modal-answer {
  padding: 1.1rem 1.15rem 0.2rem;
  background: rgba(255,255,255,0.55);
  border-radius: 16px;
  border: 1px solid rgba(212,175,55,0.18);
}

.related-question-list {
  display: grid;
  gap: 0.7rem;
}

.related-question-btn {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
  color: #111111;
  padding: 0.85rem 0.95rem 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(17,17,17,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.related-question-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.78);
  background: linear-gradient(180deg, #fffdf8 0%, #fff5da 100%);
  box-shadow: 0 12px 26px rgba(17,17,17,0.10);
}

.related-question-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.related-question-title {
  display: block;
  font-size: 0.98rem;
  line-height: 1.42;
  font-weight: 700;
}

.related-question-arrow {
  flex: 0 0 auto;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--gold);
  margin-top: 0.1rem;
}

.related-question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.related-question-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.56rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: #444;
  font-size: 0.72rem;
  line-height: 1.2;
}

@media (max-width: 720px) {
  .modal.focus-mode .modal-dialog {
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
    border-radius: 0;
  }

  .modal.focus-mode .modal-content {
    padding: 1.2rem 1rem 1.45rem;
  }

  .modal.focus-mode .modal-content > h2 {
    max-width: calc(100% - 2.6rem);
    font-size: 1.28rem;
  }

  .modal.focus-mode .modal-section p {
    font-size: 0.94rem;
    line-height: 1.68;
  }

  .related-question-btn {
    padding: 0.78rem 0.82rem 0.82rem;
  }

  .related-question-title {
    font-size: 0.92rem;
  }
}


/* Focus mode icon states */
.focus-btn-icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
}

.focus-btn-icon path,
.focus-btn-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.focus-mode-btn span:last-child {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .focus-mode-btn span:last-child {
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


#relatedTagsSection {
  margin-top: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.36);
  background: linear-gradient(180deg, #fffdf8 0%, #fff7df 100%);
  padding: 0.72rem 0.78rem 0.82rem;
  box-shadow: 0 8px 22px rgba(17,17,17,0.055);
}

#relatedTagsSection h3 {
  color: #b98e12;
  margin-bottom: 0.45rem;
}

#relatedTagsSection .badge-row {
  gap: 0.48rem;
}

#relatedTagsSection .filter-chip.related-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(183, 137, 18, 0.82);
  background: #111111;
  color: #fffaf0;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.38rem 0.78rem;
  box-shadow: 0 8px 18px rgba(17,17,17,0.13);
}

#relatedTagsSection .filter-chip.related-chip::after {
  content: "→";
  color: #d4af37;
  font-weight: 800;
  line-height: 1;
  margin-left: 0.1rem;
}

#relatedTagsSection .filter-chip.related-chip:hover {
  border-color: var(--gold);
  background: #1c1c1c;
  transform: translateY(-1px);
  text-decoration: none;
}

#relatedQuestionsSection {
  margin-top: 0.85rem;
}

#relatedQuestionsSection h3 {
  color: #b98e12;
  opacity: 0.94;
}

.related-question-list {
  gap: 0.52rem;
}

.related-question-btn {
  border-radius: 14px;
  background: #ffffff;
  padding: 0.7rem 0.78rem 0.74rem;
  box-shadow: 0 5px 14px rgba(17,17,17,0.045);
}

.related-question-title {
  font-size: 0.9rem;
  line-height: 1.36;
}

.related-question-meta {
  margin-top: 0.52rem;
}

.related-question-badge {
  font-size: 0.68rem;
  opacity: 0.9;
}

@media (max-width: 720px) {
  #relatedTagsSection {
    padding: 0.68rem 0.68rem 0.76rem;
  }

  #relatedTagsSection .filter-chip.related-chip {
    width: 100%;
    justify-content: space-between;
    min-height: 34px;
    font-size: 0.75rem;
  }

  .related-question-btn {
    padding: 0.68rem 0.72rem 0.72rem;
  }
}


/* Layout, sticky toolbar and filter base */
:root {
  --r4x-header-height: 76px;
  --r4x-toolbar-height: 128px;
}

.faq-plus-accent {
  color: var(--gold);
}

/* Hero lives in the normal document flow and scrolls away */
.faq-hero-wrap {
  position: relative;
  z-index: 1;
  background: #ffffff;
  padding-top: 0.35rem;
}

.faq-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffefb 0%, #fff9ea 100%);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.05);
}

.faq-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.faq-hero-icon {
  width: 2.3rem;
  height: 2.3rem;
  flex: 0 0 auto;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.28);
  font-size: 1.18rem;
  line-height: 1;
}

.faq-hero-copy h1 {
  margin: 0 0 0.18rem;
  font-size: 1.65rem;
  line-height: 1.15;
  color: #111111;
}

.faq-hero-copy p {
  margin: 0;
  max-width: 48rem;
  color: #4a3a1e;
  font-size: 0.96rem;
  line-height: 1.45;
}

.faq-hero-stats {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.faq-stat-box {
  min-width: 108px;
  padding: 0.7rem 0.86rem 0.62rem;
  border-radius: 15px;
  border: 1px solid rgba(212, 175, 55, 0.38);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.045);
}

.faq-stat-box strong {
  display: block;
  color: #111111;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 800;
  margin-bottom: 0.24rem;
}

.faq-stat-box span {
  display: block;
  color: #6b5730;
  font-size: 0.78rem;
  line-height: 1.2;
}

/* Search + view tabs + filter trigger are one sticky toolbar under the header */
.toolbar {
  position: sticky !important;
  top: var(--r4x-header-height) !important;
  z-index: 360 !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08) !important;
  padding: 0 !important;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

.toolbar .container {
  padding-top: 0.45rem;
  padding-bottom: 0.62rem;
}

.sticky-search-shell {
  position: relative !important;
  top: auto !important;
  z-index: auto !important;
  background: transparent !important;
  padding: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.sticky-search-shell .search-block {
  position: static !important;
  top: auto !important;
  background: transparent !important;
  border-bottom: 0 !important;
  padding: 0 0 0.48rem !important;
  margin-bottom: 0 !important;
}

.sticky-search-shell .filter-panel {
  position: relative;
  z-index: 2;
  background: transparent;
  padding-bottom: 0;
  margin-bottom: 0;
}

main.container {
  padding-top: 0.72rem !important;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tab-button {
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.85);
  background: #ffffff;
  color: #111111;
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.04);
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tab-button:hover {
  background: #fff9e6;
  transform: translateY(-1px);
}

.tab-button.active {
  background: linear-gradient(180deg, #fff8dc 0%, #fff0bd 100%);
  color: #111111;
  border-color: rgba(212, 175, 55, 0.95);
  box-shadow: 0 8px 18px rgba(212, 175, 55, 0.18);
  font-weight: 700;
}

.filter-main-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  min-height: 42px;
  padding: 0.45rem 0.92rem 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.9);
  background: #ffffff;
  color: #111111;
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.05);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.filter-main-btn:hover {
  transform: translateY(-1px);
  background: #fff9e6;
  box-shadow: 0 10px 22px rgba(17, 17, 17, 0.08);
}

.filter-main-btn .filter-main-icon-wrap {
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111111;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.18);
}

.filter-main-btn .faq-filter-icon {
  width: 0.98rem;
  height: 0.98rem;
}

.filter-main-btn .faq-filter-icon path,
.filter-main-btn .faq-filter-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter-main-btn .filter-main-text {
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.1;
  white-space: nowrap;
  color: inherit;
}

.filter-main-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.34rem;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.filter-main-btn.has-active,
.filter-main-btn.active {
  background: linear-gradient(180deg, #fff8dc 0%, #fff0bd 100%);
  color: #111111;
  border-color: rgba(212, 175, 55, 0.95);
  box-shadow: 0 8px 18px rgba(212, 175, 55, 0.18);
}

.filter-main-btn.has-active .filter-main-icon-wrap,
.filter-main-btn.active .filter-main-icon-wrap,
.filter-main-btn.has-active .filter-main-badge,
.filter-main-btn.active .filter-main-badge {
  background: #111111;
  color: #ffffff;
}

/* Filter is closed by default */
#filters {
  display: none;
  margin: 0;
}

/* Desktop and wider screens: Glossar-style centered card */
#filters.active {
  position: fixed;
  left: 50%;
  top: calc(var(--r4x-header-height) + var(--r4x-toolbar-height) + 0.65rem);
  transform: translateX(-50%);
  z-index: 1240;
  display: block;
  width: min(820px, calc(100vw - 2rem));
  max-height: calc(100dvh - var(--r4x-header-height) - var(--r4x-toolbar-height) - 1.3rem);
  background: transparent;
  overflow: visible;
}

#filters.active .inner {
  width: 100%;
  max-height: calc(100dvh - var(--r4x-header-height) - var(--r4x-toolbar-height) - 1.3rem);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
  box-shadow: 0 24px 54px rgba(17, 17, 17, 0.24), 0 0 0 1px rgba(212, 175, 55, 0.14) inset;
  padding: 0 0.9rem 1rem;
}

.filter-sheet-head {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -0.9rem 0.82rem;
  padding: 0.9rem 0.9rem 0.78rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,250,240,0.98) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 22px 22px 0 0;
  backdrop-filter: blur(8px);
}

.filter-sheet-kicker {
  font-size: 0.78rem;
  color: #8f6f16;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  margin: 0;
}

.filter-sheet-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.filter-sheet-reset,
.filter-sheet-close {
  min-height: 40px;
  height: auto;
  padding: 0.62rem 1.05rem;
  border-radius: 999px;
  font-size: 0.86rem;
  line-height: 1.05;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0;
  cursor: pointer;
}

.filter-sheet-reset {
  border: 1px solid rgba(212, 175, 55, 0.95);
  background: linear-gradient(180deg, #fff8dc 0%, #fff0bd 100%);
  color: #111111;
  box-shadow: 0 7px 18px rgba(212, 175, 55, 0.16);
}

.filter-sheet-reset:disabled,
.filter-sheet-reset[aria-disabled="true"] {
  background: #f3f0e8;
  color: #b3aa98;
  border-color: rgba(160, 150, 130, 0.38);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.filter-sheet-close {
  min-width: 118px;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.95);
  background: #111111;
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(17,17,17,0.16);
}

#filters.active .row {
  align-items: flex-start;
  width: 100%;
}

#filters.active .filter-label {
  display: block;
  width: 100%;
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #6b5730;
  opacity: 1;
}

#filters.active .category-chips,
#filters.active .topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

#filters.active .topic-row {
  margin-top: 0.92rem;
}

#filters.active .filter-chip {
  min-height: 32px;
  padding: 0.35rem 0.82rem;
  background: #ffffff;
  border-color: rgba(17, 17, 17, 0.18);
  color: #111111;
}

#filters.active .filter-chip:hover {
  border-color: rgba(212, 175, 55, 0.9);
  background: #fff9e6;
}

#filters.active .filter-chip.active {
  background: #111111;
  border-color: rgba(212, 175, 55, 0.95);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(17,17,17,0.18), 0 0 0 1px rgba(212,175,55,0.2) inset;
}

/* Mobile filter modal */
@media (max-width: 900px) {
  body.faq-filters-open {
    overflow: hidden;
    height: 100dvh;
    touch-action: none;
  }

  #filters.active {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1350 !important;
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    background: rgba(255, 250, 240, 0.98) !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #filters.active .inner {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 1rem calc(1.25rem + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%) !important;
    box-shadow: none !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .filter-sheet-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 6 !important;
    margin: 0 -1rem 0.95rem !important;
    padding: 1rem 1rem 0.9rem !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,250,240,0.98) 100%) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    align-items: stretch !important;
  }

  .filter-sheet-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.72rem !important;
  }

  .filter-sheet-reset,
  .filter-sheet-close {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 46px !important;
    padding: 0.72rem 0.75rem !important;
    font-size: 0.9rem !important;
    line-height: 1.08 !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .filter-sheet-reset {
    white-space: normal !important;
  }

  #filters.active .filter-chip {
    min-height: 32px !important;
    padding: 0.34rem 0.78rem !important;
  }

  #filters.active .topic-row {
    margin-bottom: 5.5rem !important;
  }

  .faq-hero-wrap,
  .toolbar,
  main.container {
    position: relative;
  }
}

@media (max-width: 960px) {
  .faq-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .faq-hero-stats {
    width: 100%;
  }

  .faq-stat-box {
    min-width: 0;
    flex: 1 1 0;
  }
}

@media (max-width: 720px) {
  .faq-hero-wrap {
    padding-top: 0.25rem;
  }

  .faq-hero {
    padding: 0.88rem 0.82rem;
    margin-bottom: 0.62rem;
    border-radius: 16px;
  }

  .faq-hero-copy h1 {
    font-size: 1.34rem;
  }

  .faq-hero-copy p {
    font-size: 0.88rem;
  }

  .faq-hero-icon {
    width: 2.05rem;
    height: 2.05rem;
    border-radius: 12px;
    font-size: 1.02rem;
  }

  .toolbar .container {
    padding-top: 0.38rem;
    padding-bottom: 0.52rem;
  }

  .sticky-search-shell .search-block {
    padding-bottom: 0.42rem !important;
  }

  .sticky-search-shell .filter-row-main {
    gap: 0.65rem;
  }

  .sticky-search-shell .view-tabs {
    width: 100%;
  }

  .sticky-search-shell .filter-main-btn {
    width: 100%;
    justify-content: center;
  }

  main.container {
    padding-top: 0.55rem !important;
  }
}


/* Floating button layering */
.fab { z-index: 1400 !important; }


/* Mobile filter header buttons */
@media (max-width: 900px) {
  .filter-sheet-head {
    display: block !important;
    box-sizing: border-box !important;
    margin: 0 -1rem 0.9rem !important;
    padding: 0.82rem 0.9rem 0.78rem !important;
  }

  .filter-sheet-head-left {
    margin-bottom: 0.55rem !important;
  }

  .filter-sheet-kicker {
    font-size: 0.76rem !important;
    line-height: 1 !important;
    letter-spacing: 0.12em !important;
  }

  .filter-sheet-actions {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    box-sizing: border-box !important;
  }

  .filter-sheet-reset,
  .filter-sheet-close {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0.58rem 0.55rem !important;
    font-size: 0.82rem !important;
    line-height: 1.08 !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .filter-sheet-close {
    font-weight: 700 !important;
  }
}


/* Floating buttons while filter is open */
body.faq-filters-open #toTop {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.faq-filters-open #fabFilters {
  display: inline-flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* Empty states */
.faq-empty-state {
  grid-column: 1 / -1;
  width: 100%;
  border: 1px solid rgba(212, 175, 55, 0.36);
  border-radius: 20px;
  background: linear-gradient(180deg, #fffefb 0%, #fff8e8 100%);
  box-shadow: 0 14px 34px rgba(17, 17, 17, 0.06);
  padding: 1.2rem 1.15rem 1.15rem;
  color: #111111;
}

.faq-empty-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #ffffff;
  color: #8f6f16;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.faq-empty-state h3 {
  margin: 0;
  max-width: 46rem;
  font-size: 1.08rem;
  line-height: 1.28;
  font-weight: 800;
  color: #111111;
}

.faq-empty-state p {
  margin: 0.48rem 0 0;
  max-width: 48rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #5f5542;
}

.faq-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.95rem;
}

.faq-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.52rem 0.88rem;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.faq-empty-btn:hover {
  transform: translateY(-1px);
}

.faq-empty-btn-primary {
  border: 1px solid rgba(212, 175, 55, 0.92);
  background: #111111;
  color: #fffaf0;
  box-shadow: 0 8px 18px rgba(17,17,17,0.14);
}

.faq-empty-btn-secondary {
  border: 1px solid rgba(212, 175, 55, 0.82);
  background: #ffffff;
  color: #111111;
  box-shadow: 0 5px 12px rgba(17,17,17,0.04);
}

.faq-empty-btn-secondary:hover {
  background: #fff8df;
}

@media (max-width: 720px) {
  .faq-empty-state {
    padding: 1rem 0.9rem 1rem;
    border-radius: 18px;
  }

  .faq-empty-state h3 {
    font-size: 0.98rem;
  }

  .faq-empty-state p {
    font-size: 0.82rem;
  }

  .faq-empty-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .faq-empty-btn {
    width: 100%;
  }
}

/* Typography */
:root {
  --r4x-font-main: "Open Sans", "Segoe UI", Arial, sans-serif;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--r4x-font-main) !important;
  font-synthesis: none !important;
}

html,
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

strong,
b {
  font-weight: 700;
}

.modal-section h3,
#relatedTagsSection h3,
#relatedQuestionsSection h3,
.faq-empty-state h3 {
  font-weight: 700 !important;
}

.modal-section p,
.insight-preview,
.faq-empty-state p {
  font-weight: 400 !important;
}


/* Final card design */
.grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 0.75rem !important;
}

.insight-card {
  position: relative !important;
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  padding: 0.75rem 0.9rem !important;
  padding-right: 3.2rem !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.55rem !important;
  cursor: pointer !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
  min-height: unset !important;
}

.insight-card:hover {
  border-color: var(--gold) !important;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25) !important;
}

.card-footer {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 0.45rem !important;
  padding-top: 0 !important;
}

.card-open-indicator {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  padding: 0.2rem 0.75rem !important;
  min-height: unset !important;
  border-radius: 999px !important;
  border: 1px solid var(--gold) !important;
  background: #fffaf0 !important;
  color: #000 !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.card-open-indicator .icon {
  font-size: 0.95rem !important;
  color: var(--gold) !important;
}

.insight-card:hover .card-open-indicator {
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.3) !important;
}

.insight-question {
  max-width: none !important;
  font-size: 0.9rem !important;
  line-height: normal !important;
  font-weight: 600 !important;
  color: #000000 !important;
  letter-spacing: 0 !important;
  margin-bottom: 0 !important;
}

.insight-preview {
  max-width: none !important;
  font-size: 0.78rem !important;
  color: var(--muted) !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  overflow: visible !important;
  margin-top: 0 !important;
}

.badge-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.3rem !important;
  margin-top: 0.25rem !important;
  row-gap: 0.3rem !important;
}

.badge {
  font-size: 0.65rem !important;
  line-height: normal !important;
  font-weight: 600 !important;
  padding: 0.15rem 0.5rem !important;
  border-radius: 999px !important;
  border: 1px solid var(--chip-border) !important;
  background: #f3f3f3 !important;
  color: inherit !important;
  box-shadow: none !important;
  max-width: none !important;
}

.badge.featured {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}


.favorite-indicator {
  margin-left: auto !important;
  font-size: 0.9rem !important;
  color: var(--gold) !important;
}

.star-icon,
.card-fav-button .star-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.35rem !important;
  height: 1.35rem !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  margin-right: 0 !important;
  background: #ffffff !important;
  color: #000 !important;
  font-size: 0.9rem !important;
  box-shadow: none !important;
}

.favorite-btn.active .star-icon,
.card-fav-button.active .star-icon {
  border-color: var(--gold) !important;
  background: var(--gold) !important;
  color: #000 !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5) !important;
}

.card-fav-button {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  cursor: pointer !important;
}

.card-actions {
  position: absolute !important;
  top: 0.4rem !important;
  right: 0.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.25rem !important;
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr !important;
  }
}
