/* Native dialog supplies focus containment, Escape, and background inertness. */
.quick-answer-trigger[hidden] { display: none !important; }
.quick-answer-dialog {
  box-sizing: border-box;
  border: 1px solid #cbd6dc;
  border-radius: 1.25rem 0 0 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  width: min(35rem, calc(100% - 1rem));
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  color: #18323d;
  background: #f8faf9;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: -1rem 0 4rem #122b3b30;
  line-height: 1.55;
  font-size: 1rem;
}
.quick-answer-dialog::backdrop { background: #112c42a8; }
.quick-answer-dialog h2 { margin: 0; font-size: clamp(1.4rem, 4vw, 1.8rem); line-height: 1.2; }
.quick-answer-dialog h3 { margin: 0 0 .6rem; font-size: 1.2rem; line-height: 1.35; }
.quick-answer-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.quick-answer-header .button { flex-shrink: 0; width: auto; min-height: 44px; min-width: 44px; }
.quick-answer-topics { display: grid; gap: .5rem; margin: 1.25rem 0; }
.quick-answer-topic {
  font: inherit;
  text-align: left;
  min-height: 44px;
  padding: .8rem 1rem;
  border: 1px solid #c0ccd1;
  border-radius: .6rem;
  background: #fff;
  color: #16333e;
  cursor: pointer;
}
.quick-answer-topic:hover { background: #edf5f2; }
.quick-answer-topic[aria-pressed="true"] { border-color: #145e4b; background: #e1f1e9; }
.quick-answer-content { padding: 1rem; border: 1px solid #c5d5ce; border-radius: .75rem; background: #fff; }
.quick-answer-content p { margin-top: 0; }
.quick-answer-content p:last-child { margin: 0; }
.quick-answer-dialog a { color: #15543f; text-underline-offset: .2em; }
.quick-answer-dialog a.button.primary { color: #fff; }
.quick-answer-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.quick-answer-actions > * { min-height: 44px; }
.quick-answer-boundary, .quick-answer-reviewed { font-size: .9rem; color: #4c6069; }
.quick-answer-dialog :focus-visible { outline: 3px solid #96580f; outline-offset: 3px; }
@media (max-width: 420px) {
  .quick-answer-dialog { width: 100%; border-radius: 0; }
  .quick-answer-header { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .quick-answer-dialog, .quick-answer-dialog * { scroll-behavior: auto; transition: none; animation: none; }
}
