/* Column widths depend on the viewport, never on the current page of names. */
@media (min-width: 951px) {
  .results-panel table { table-layout: fixed; width: 100%; }
  .results-panel th:nth-child(2), .results-panel th:nth-child(3) { width: 168px; }
  .results-panel th:nth-child(4) { width: 174px; }
  .results-panel th:nth-child(5) { width: 156px; }
  .results-panel td:first-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .results-panel td:nth-child(2), .results-panel td:nth-child(3) { font-variant-numeric: tabular-nums; }
}

/* Center dates and grave locations beneath their matching table headings. */
@media (min-width: 951px) {
  .results-panel th:nth-child(2), .results-panel th:nth-child(3), .results-panel th:nth-child(4),
  .results-panel td:nth-child(2), .results-panel td:nth-child(3), .results-panel td:nth-child(4) { text-align: center; }
}


/* Align the mobile action with the left edge of the death-date column. */
@media (max-width: 950px) {
  .results-panel #results > tr > td:last-child { justify-content: flex-start; }
}

/* Two symmetric axes on phones and touch tablets; desktop tables stay intact. */
@media (max-width: 950px), (min-width: 951px) and (max-width: 1400px) and (pointer: coarse) {
  .results-panel .table-wrap { overflow: visible; }
  .results-panel table { display: block; min-width: 0; white-space: normal; }
  .results-panel thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .results-panel #results { display: grid; gap: 14px; }
  .results-panel #results > tr, .results-panel #results > tr:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 18px; border: 1px solid #c5c5cb; border-radius: 10px; background: #fff; }
  .results-panel #results > tr:nth-child(even) { background: #f1f1f3; }
  .results-panel #results > tr > td, .results-panel #results > tr > td:last-child { display: block; min-width: 0; padding: 0; border: 0; font-size: 18px; text-align: center; }
  .results-panel #results > tr > td:first-child { grid-column: 1 / -1; width: 100%; font-size: 21px; font-weight: 600; text-align: left; overflow-wrap: anywhere; }
  .results-panel #results > tr > td:not(:first-child) { width: min(100%, 237px); }
  .results-panel #results > tr > td:nth-child(2), .results-panel #results > tr > td:nth-child(4) { grid-column: 1; justify-self: end; }
  .results-panel #results > tr > td:nth-child(3), .results-panel #results > tr > td:nth-child(5) { grid-column: 2; justify-self: start; }
  .results-panel #results > tr > td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: 14px; }
  .results-panel #results > tr > td:last-child { display: flex; align-items: center; justify-content: center; }
  .results-panel #results > tr > td .location-tag { font-size: 18px; padding: 4px 0; }
  .results-panel #results > tr > td button { max-width: 100%; min-height: 48px; padding: 10px 12px; gap: 10px; font-size: 16px; }
}
@media (max-width: 360px) {
  .results-panel #results > tr > td[data-label]::before { font-size: 13px; }
  .results-panel #results > tr > td button { padding-inline: 6px; gap: 5px; font-size: 14px; }
}


/* A quiet row highlight for the desktop mouse view. */
@media (min-width: 951px) and (hover: hover) and (pointer: fine) {
  .results-panel #results > tr { transition: background-color .14s ease; }
  .results-panel #results > tr:hover { background-color: #e8e8ed; }
}
@media (prefers-reduced-motion: reduce) {
  .results-panel #results > tr { transition: none; }
}
