/* Common Questions page (common-questions.html). questions.js renders the chips and the list
   from questions-data.js. The closing band reuses .tour-final from styles.css.
   --------------------------------------------------------------------------------------------- */

.cq-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Hero ---- */

.cq-hero {
  padding: clamp(64px, 6vw + 20px, 104px) 0 clamp(36px, 3vw + 16px, 56px);
}

.cq-hero-inner {
  max-width: 860px;
}

.cq-hero h1 {
  margin: 16px 0 20px;
  color: #10324b;
  font-size: clamp(38px, 4.4vw + 6px, 66px);
  line-height: 1.06;
  letter-spacing: -.034em;
}

.cq-hero-lead {
  margin: 0;
  color: #34536b;
  font-size: clamp(18px, .5vw + 15px, 21px);
  line-height: 1.55;
}

.cq-hero-sub {
  max-width: 34em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.cq-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 30px;
}

.cq-hero-note {
  color: var(--muted);
  font-size: 14px;
}

/* ---- Tools: search, chips, count ---- */

.cq-section {
  padding: 0 0 clamp(72px, 6vw + 24px, 112px);
}

.cq-shell {
  max-width: 920px;
}

.cq-tools {
  position: relative;
  padding: 20px;
  border: 1px solid #dfe8ef;
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 1px 2px rgba(16, 46, 73, .04), 0 18px 40px -26px rgba(16, 46, 73, .3);
}

.cq-search {
  position: relative;
  display: flex;
  align-items: center;
}

.cq-search-icon {
  position: absolute;
  left: 16px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #5e7a90;
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}

.cq-search input {
  width: 100%;
  min-height: 52px;
  padding: 12px 48px 12px 46px;
  border: 1px solid #d3e0ea;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  box-shadow: inset 0 1px 2px rgba(16, 46, 73, .05);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

.cq-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.cq-search input::-webkit-search-cancel-button {
  display: none;
}

.cq-search input:focus-visible {
  outline-offset: 2px;
  border-color: #7fb3da;
}

.cq-clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5e7a90;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cq-clear[hidden] {
  display: none;
}

.cq-clear:hover {
  background: #eef4f9;
}

.cq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cq-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px 7px 14px;
  border: 1px solid #d7e3ec;
  border-radius: 999px;
  background: #fff;
  color: #2c4a62;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}

.cq-chip:hover {
  border-color: #b9d1e3;
  background: #f5f9fc;
}

.cq-chip[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.cq-chip-count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #edf3f8;
  color: #57728a;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

.cq-chip[aria-pressed="true"] .cq-chip-count {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.cq-status {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---- Groups and accordions ---- */

.cq-list {
  margin-top: 40px;
}

.cq-group + .cq-group,
.cq-nudge + .cq-group {
  margin-top: 44px;
}

.cq-group h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #10324b;
  font-size: clamp(22px, 1.2vw + 14px, 28px);
  letter-spacing: -.025em;
}

.cq-group-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f1f8;
  color: #3d6788;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.cq-items {
  display: grid;
  gap: 10px;
}

.cq-item {
  border: 1px solid #e0e9f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 46, 73, .04);
  scroll-margin-top: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.cq-item:hover {
  border-color: #cbdcea;
}

.cq-item[open] {
  border-color: #c7dbeb;
  box-shadow: 0 1px 2px rgba(16, 46, 73, .04), 0 16px 34px -24px rgba(16, 46, 73, .35);
}

.cq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px 17px 20px;
  border-radius: 16px;
  color: #12324d;
  font-size: 16.5px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -.01em;
  list-style: none;
  cursor: pointer;
}

.cq-q {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* In search results each question shows its category. */
.cq-tag {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
}

.cq-item summary::-webkit-details-marker {
  display: none;
}

.cq-toggle {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef4f9;
  transition: background-color .2s, transform .25s var(--ease);
}

.cq-toggle::before,
.cq-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 1.8px;
  border-radius: 2px;
  background: #2f6b98;
  transform: translate(-50%, -50%);
}

.cq-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform .25s var(--ease);
}

.cq-item[open] .cq-toggle {
  background: #e3eef8;
}

.cq-item[open] .cq-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.cq-a {
  padding: 0 64px 20px 20px;
}

.cq-a p {
  margin: 0;
  max-width: 62ch;
  color: #3f5a70;
  font-size: 15.5px;
  line-height: 1.7;
}

.cq-item.is-target {
  border-color: #7fb3da;
  box-shadow: 0 0 0 4px rgba(23, 109, 182, .12), 0 16px 34px -24px rgba(16, 46, 73, .35);
}

@media (prefers-reduced-motion: no-preference) {
  .cq-item[open]:not(.is-kept) .cq-a {
    animation: cq-open .28s var(--ease) both;
  }

  .cq-item.is-target {
    animation: cq-target 2.4s ease-out both;
  }
}

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

@keyframes cq-target {
  0%, 60% { box-shadow: 0 0 0 4px rgba(23, 109, 182, .16), 0 16px 34px -24px rgba(16, 46, 73, .35); }
  100% { box-shadow: 0 0 0 0 rgba(23, 109, 182, 0), 0 16px 34px -24px rgba(16, 46, 73, .35); }
}

/* ---- Reminders and empty state ---- */

.cq-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 44px;
  padding: 22px 24px;
  border: 1px solid #cfe2f1;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 60% 120% at 0% 0%, rgba(36, 126, 198, .1), transparent 70%),
    #f4f9fd;
}

.cq-items > .cq-nudge {
  margin: 14px 0;
}

.cq-nudge strong {
  display: block;
  color: #10324b;
  font-size: 17px;
  letter-spacing: -.015em;
}

.cq-nudge p {
  margin: 4px 0 0;
  color: #4f6a80;
  font-size: 14.5px;
}

.cq-nudge .button {
  flex: none;
}

.cq-empty {
  overflow-wrap: break-word;
  padding: 30px 24px;
  border: 1px dashed #c9d9e6;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.cq-empty strong {
  color: #10324b;
  font-size: 18px;
}

.cq-empty p {
  margin: 8px auto 18px;
  max-width: 34em;
  color: #57728a;
  font-size: 15px;
}

.cq-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.cq-disclaimer {
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.cq-final {
  margin-top: 0;
}

/* ---- Phones ---- */

@media (max-width: 720px) {
  .cq-hero h1 {
    font-size: clamp(34px, 9vw, 44px);
  }

  .cq-hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .cq-tools {
    padding: 14px;
    border-radius: 18px;
  }

  /* Category chips scroll sideways in one row instead of stacking six rows deep. */
  .cq-chips {
    flex-wrap: nowrap;
    margin: 8px -14px 0;
    padding: 6px 14px;
    overflow-x: auto;
    scroll-padding-inline: 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .cq-chips::-webkit-scrollbar {
    display: none;
  }

  .cq-chip {
    flex: none;
    scroll-snap-align: start;
  }

  .cq-item summary {
    padding: 15px 14px 15px 16px;
    font-size: 15.5px;
  }

  .cq-a {
    padding: 0 16px 18px;
  }

  .cq-a p {
    font-size: 15px;
  }

  .cq-nudge {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }

  .cq-nudge .button {
    justify-content: center;
  }
}
