/* the coverage list: the authorities in the dataset with their facts, searchable and sortable, then state totals.
   On a phone each authority is a two-line card and the state totals stack; nothing scrolls sideways. */
.registry { padding-top: var(--sp-block); }
.rg-tools { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .6fr) auto; gap: 12px 20px; align-items: end; }
.rg-search input { width: 100%; height: 46px; border: 1px solid var(--grey-2); background: var(--paper); padding: 0 14px; font-size: 1rem; color: var(--ink); border-radius: 0; }
.rg-search input:focus, .rg-sel select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-3); }
.rg-sel { display: grid; gap: 6px; min-width: 0; }
.rg-sel span { font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; font-weight: var(--label-weight); color: var(--label-color); }
.rg-sel select { width: 100%; height: 46px; border: 1px solid var(--grey-2); background: var(--paper); padding: 0 12px; font-size: .95rem; color: var(--ink); border-radius: 0; }
.rg-sort { display: none; }
.rg-since { height: 46px; white-space: nowrap; }
.rg-since .fig { margin-left: 6px; font-weight: 600; }
.rg-count { margin: 18px 0 10px; min-height: 1.3em; font-size: var(--cap-size); color: var(--cap-color); }
.rg-wrap { border-top: 1px solid var(--ink); }
.rg-table { width: 100%; border-collapse: collapse; font-size: var(--s-small); }
.rg-table th, .rg-table td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--grey-2); vertical-align: top; }
.rg-table thead th { font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; font-weight: var(--label-weight); color: var(--label-color); padding-top: 12px; vertical-align: bottom; }
.rg-table thead th button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.rg-table thead th.num button { text-align: right; }
.rg-table thead th button::after { content: ""; flex: none; width: 0; height: 0; border: 4px solid transparent; opacity: .35; }
.rg-table thead th[aria-sort="ascending"] button::after { border-bottom-color: var(--blue); margin-top: -4px; opacity: 1; }
.rg-table thead th[aria-sort="descending"] button::after { border-top-color: var(--blue); margin-top: 4px; opacity: 1; }
.rg-table thead th[aria-sort="none"] button::after { border-top-color: var(--ink-3); margin-top: 4px; }
.rg-table .num { text-align: right; font-feature-settings: "kern" 1, "tnum" 1; white-space: nowrap; }
.rg-table .u { display: none; }
.rg-list tbody th { font-weight: 400; width: 38%; }
.rg-list .rg-years, .rg-list .rg-new { white-space: nowrap; color: var(--ink-2); }
.rg-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rg-name { text-align: left; color: var(--ink); font-weight: 500; font-size: .95rem; line-height: 1.35; }
.rg-name:hover { color: var(--blue); text-decoration: underline; text-underline-offset: .2em; }
.rg-sub { display: block; color: var(--ink-3); font-size: .8rem; margin-top: 3px; line-height: 1.35; overflow-wrap: anywhere; }
.rg-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.rg-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; font-size: .72rem; font-weight: 500; line-height: 1; color: var(--blue); background: var(--blue-3); white-space: nowrap; }
button.rg-tag { cursor: pointer; }
button.rg-tag:hover { background: var(--blue); color: var(--on-blue); }
.rg-empty { color: var(--ink-3); padding: 24px 0 !important; }
.rg-more { margin-top: 18px; }
.rg-states { margin-top: var(--sp-section); }
.rg-h3 { margin: 0 0 14px; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.015em; }
.rg-st tbody th { font-weight: 500; }

@media (max-width: 1100px) { .rg-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .rg-search { grid-column: 1 / -1; } .rg-since { justify-self: start; } }

/* phone: a card per authority. Line one: the place and its tags, with HUD's name under it; line two: the facts. */
@media (max-width: 720px) {
  .rg-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 12px; }
  .rg-sort { display: grid; }
  .rg-since { grid-column: 1 / -1; }
  .rg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rg-table, .rg-table tbody, .rg-table tr, .rg-table th, .rg-table td { display: block; width: auto; }
  .rg-table .u { display: inline; }
  .rg-list tbody tr { padding: 14px 0; border-bottom: 1px solid var(--grey-2); }
  .rg-list tbody th, .rg-list tbody td { padding: 0; border: 0; text-align: left; }
  .rg-list tbody th { width: auto; margin-bottom: 6px; }
  .rg-list .rg-state-c { display: none; }
  .rg-list tbody td:not(.rg-state-c):not(:empty) { display: inline; color: var(--ink-2); font-size: .85rem; white-space: nowrap; }
  .rg-list tbody td.num { font-feature-settings: "kern" 1, "tnum" 1; }
  /* a middle dot after each fact that has another after it, so a line never starts with one */
  .rg-list tbody td:not(.rg-state-c):not(:empty):has(~ td:not(.rg-state-c):not(:empty))::after { content: "\00a0·"; color: var(--ink-3); }
  .rg-list tbody td:empty { display: none; }
  .rg-list tbody tr.rg-none td { display: block; white-space: normal; }
  .rg-st tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--grey-2); }
  .rg-st tbody th { grid-column: 1 / -1; padding: 0; border: 0; }
  .rg-st tbody td, .rg-st tbody td.num { padding: 0; border: 0; text-align: left; color: var(--ink-2); white-space: normal; }
  .rg-st tbody td.zero { display: none; }
  .rg-st tbody td::after { content: " " attr(data-u); color: var(--ink-3); }
}
