/* Tool explainers: the readable "what this tool is" section on every /tools page.
   One stylesheet so every explainer looks the same and no Tailwind rebuild is needed.
   Markup pattern and writing rules: docs/tool-explainers.md. Checked by scripts/check-tool-pages.mjs. */
.pda-explain {
  box-sizing: border-box;
  max-width: 46rem;
  margin: 2.5rem auto 0;
  padding: 1.5rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  color: #0f172a;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-align: left;
  overflow-wrap: break-word;
}
@media (min-width: 640px) { .pda-explain { padding: 2rem 2.25rem; } }
.pda-explain * { box-sizing: border-box; }
.pda-explain h2,
.pda-explain h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 700; color: #001a3d; line-height: 1.25; }
.pda-explain h2 { font-size: 1.5rem; margin: 0 0 .75rem; }
.pda-explain h3 { font-size: 1.2rem; margin: 1.75rem 0 .5rem; }
.pda-explain p { margin: 0 0 .9rem; }
.pda-explain ul,
.pda-explain ol { margin: 0 0 1rem 1.25rem; padding: 0; }
.pda-explain ul { list-style: disc; }
.pda-explain ol { list-style: decimal; }
.pda-explain li { margin: .3rem 0; }
.pda-explain a { color: #0f766e; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pda-explain a:hover { color: #115e59; }
.pda-explain a:focus-visible,
.pda-explain summary:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: .25rem; }

/* Sample questions and common questions: tap to open, readable by search engines either way. */
.pda-explain details { margin: .5rem 0; padding: 0 .9rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .75rem; }
.pda-explain summary { display: block; min-height: 44px; padding: .65rem 1.5rem .65rem 0; position: relative; cursor: pointer; font-weight: 600; list-style: none; }
.pda-explain summary::-webkit-details-marker { display: none; }
.pda-explain summary::after { content: '+'; position: absolute; right: 0; top: .55rem; font-size: 1.25rem; line-height: 1; color: #0f766e; }
.pda-explain details[open] > summary::after { content: '\2212'; }
.pda-explain details > :last-child { margin-bottom: .9rem; }

/* Tables scroll inside their own box, never the page. */
.pda-explain .pda-explain-table { overflow-x: auto; margin: .5rem 0 1rem; }
.pda-explain table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.pda-explain th,
.pda-explain td { padding: .5rem .6rem; border: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.pda-explain th { background: #f1f5f9; font-weight: 700; }
.pda-explain caption { caption-side: top; padding: 0 0 .4rem; text-align: left; font-size: .875rem; color: #475569; }

/* "What to do next": real links as large tap targets. */
.pda-explain .pda-explain-next { display: flex; flex-wrap: wrap; gap: .6rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.pda-explain .pda-explain-next li { margin: 0; }
.pda-explain .pda-explain-next a { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem 1rem; border: 1px solid #0d9488; border-radius: 9999px; text-decoration: none; }
.pda-explain .pda-explain-next a.is-primary { background: #f59e0b; border-color: #f59e0b; color: #001a3d; }
.pda-explain .pda-explain-note { font-size: .875rem; color: #475569; }
.pda-explain .pda-explain-next + .pda-explain-note { margin-top: 1rem; }

@media print { .pda-explain { border: 0; padding: 0; margin-top: 1rem; } }
