/* Questions & answers page (/questions) and the teaser on the home page.
   Uses the same variables as styles.css so the admin Design tab still applies. */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav a.is-current { color: var(--red); border-bottom-color: var(--red); }

/* ---------- Page hero ---------- */
.qa-hero { padding: clamp(2.4rem, 6vw, 4.2rem) 0 clamp(1.4rem, 3vw, 2.2rem); }
.qa-hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 0.9rem; }
.qa-hero__sub { max-width: 62ch; color: var(--muted); font-size: 1.12rem; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.1rem; }
.crumbs a { color: var(--navy); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 0.35rem; }

/* ---------- Search + chips ---------- */
.qa-main { padding-top: clamp(1.2rem, 3vw, 2rem); }
.qa-wrap { max-width: 1180px; }
.qa-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(1.6rem, 3vw, 2.8rem); align-items: start; }
.qa-content { max-width: 820px; min-width: 0; }
.qa-group, .qa-item { scroll-margin-top: calc(var(--qa-head, 100px) + 1rem); }

/* ---------- Sidebar ---------- */
.qa-side {
  position: sticky;
  top: calc(var(--qa-head, 100px) + 1rem);
  max-height: calc(100vh - var(--qa-head, 100px) - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 0.8rem 0.9rem;
}
.qa-side__title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem 0.6rem; }
.qa-side__group[hidden], .qa-side li[hidden] { display: none; }
.qa-side__topic {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--navy); text-decoration: none;
  padding: 0.5rem 0.6rem; border-radius: 9px;
  transition: background 0.15s ease, color 0.15s ease;
}
.qa-side__topic b { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; background: var(--sand); color: var(--navy); border-radius: 999px; padding: 0.05rem 0.55rem; }
.qa-side__topic:hover { background: var(--sand); }
.qa-side__group.is-active .qa-side__topic { background: var(--navy); color: var(--white); }
.qa-side__group.is-active .qa-side__topic b { background: rgba(255,255,255,0.18); color: var(--white); }
.qa-side ul { display: none; list-style: none; margin: 0.25rem 0 0.5rem 1.1rem; padding: 0 0 0 0.5rem; border-left: 2px solid var(--line); }
.qa-side__group.is-active ul { display: block; }
.qa-side ul a { display: block; padding: 0.38rem 0.6rem; font-size: 0.93rem; line-height: 1.3; color: var(--ink); text-decoration: none; border-radius: 7px; }
.qa-side ul a:hover { color: var(--red); background: var(--paper); }
.qa-side ul a.is-current { color: var(--red); font-weight: 600; background: rgba(159,21,43,0.07); }
.qa-side a:focus-visible { outline: 3px solid rgba(0,0,102,0.25); outline-offset: 1px; }
.qa-side__ask { display: block; margin: 0.7rem 0.4rem 0; padding-top: 0.8rem; border-top: 1px solid var(--line); font-weight: 600; font-size: 0.95rem; color: var(--red); text-decoration: none; }
.qa-side__ask:hover { text-decoration: underline; }
@media (min-width: 1001px) { .qa-tools .qa-chips { display: none; } }
@media (max-width: 1000px) {
  .qa-layout { grid-template-columns: 1fr; }
  .qa-side { display: none; }
}
.qa-tools { display: grid; gap: 0.9rem; margin-bottom: 1.8rem; }
.qa-search {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.qa-search:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,0,102,0.12); }
.qa-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.qa-chip {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.qa-chip:hover { border-color: var(--navy); }
.qa-chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---------- Accordion ---------- */
.qa-group { margin-bottom: 2.2rem; }
.qa-group[hidden] { display: none; }
.qa-group h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 0.8rem; }
.qa-item {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.7rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.qa-item[hidden] { display: none; }
.qa-item[open] { border-color: var(--navy); box-shadow: var(--shadow); }
.qa-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 1.08rem;
  line-height: 1.35;
}
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary::after {
  content: "";
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background:
    linear-gradient(var(--red), var(--red)) center / 10px 2px no-repeat,
    linear-gradient(var(--red), var(--red)) center / 2px 10px no-repeat;
  box-shadow: inset 0 0 0 1.5px var(--red);
  transition: transform 0.2s ease;
}
.qa-item[open] summary::after {
  transform: rotate(45deg);
}
.qa-item summary:focus-visible { outline: 3px solid rgba(0,0,102,0.25); outline-offset: 2px; border-radius: var(--radius); }
.qa-answer { padding: 0 1.2rem 1.2rem; color: var(--ink); max-width: 68ch; }
.qa-answer p { margin: 0 0 0.85rem; }
.qa-answer p:last-child, .qa-answer ol:last-child, .qa-answer ul:last-child { margin-bottom: 0; }
.qa-answer ol, .qa-answer ul { margin: 0 0 0.9rem; padding-left: 1.4rem; }
.qa-answer li { margin: 0 0 0.45rem; padding-left: 0.2rem; }
.qa-answer ol li::marker { color: var(--red); font-weight: 700; }
.qa-answer ul li::marker { color: var(--red); }
.qa-figure { margin: 0 0 1rem; max-width: 520px; }
.qa-figure img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: cover; border-radius: 12px; background: var(--sand, #f1ede4); }
.qa-item:target { border-color: var(--red); }

.qa-empty, .qa-none { color: var(--muted); padding: 1.4rem 0; font-size: 1.05rem; }

/* ---------- Ask form ---------- */
.qa-ask { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: start; }
.qa-ask__alt { color: var(--muted); }
.qa-ask__alt a { color: var(--navy); font-weight: 600; }
@media (max-width: 820px) { .qa-ask { grid-template-columns: 1fr; } }

/* ---------- Home page teaser ---------- */
.qa-teaser__list { display: grid; gap: 0.7rem; max-width: 760px; margin-bottom: 1.6rem; }
.qa-teaser__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1.2rem;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.qa-teaser__list a:hover { border-color: var(--navy); transform: translateX(3px); }
.qa-teaser__list a::after { content: "\2192"; color: var(--red); font-weight: 700; }
