:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #f0f2f5;
  --ink: #17191d;
  --muted: #626872;
  --line: #d9dde3;
  --line-strong: #bcc3cc;
  --accent: #1d4ed8;
  --accent-hover: #173fae;
  --focus: rgba(29, 78, 216, 0.18);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input, select { font: inherit; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

.shell {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.header-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.github-link {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.github-link:hover { color: var(--ink); }

.intro {
  padding: 62px 0 38px;
  border-bottom: 1px solid var(--line);
}
.kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.intro-copy {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
}
.dataset-line {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.search-section {
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}
.search-control > label,
.filter-grid label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.search-input-wrap { position: relative; }
.search-input-wrap input {
  width: 100%;
  height: 54px;
  padding: 0 94px 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  font-size: 16px;
}
.search-input-wrap input:focus,
.filter-grid select:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
}
.clear-search {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}
.clear-search:hover { color: var(--ink); }
.field-help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr .72fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 20px;
}
.filter-grid select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.filter-reset-wrap { display: flex; }
.secondary-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.secondary-button:hover { background: var(--surface); }

.results-section { padding: 34px 0 44px; }
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}
.results-head h2,
.notes h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}
#resultStatus {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
th {
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
th:nth-child(1) { width: 34%; }
th:nth-child(2) { width: 39%; }
th:nth-child(3) { width: 27%; }
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
.receiver-name {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.cell-primary { margin: 0; }
.cell-secondary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.contact-list {
  display: grid;
  gap: 3px;
}
.contact-list a {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  font-size: 12px;
}
.contact-actions a {
  color: var(--muted);
  text-decoration: none;
}
.contact-actions a:hover { color: var(--accent); }
.row-details { margin-top: 9px; }
.row-details summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}
.row-details summary:hover { color: var(--ink); }
.details-content {
  margin-top: 9px;
  padding: 10px 11px;
  border-left: 2px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
.details-content p { margin: 0 0 6px; }
.details-content p:last-child { margin-bottom: 0; }
.empty-state {
  padding: 34px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}
.empty-state p { margin: 5px 0 0; color: var(--muted); }
.load-more-wrap { margin-top: 16px; text-align: center; }

.notes {
  padding: 34px 0 54px;
  border-top: 1px solid var(--line);
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 20px;
}
.notes-grid h3 {
  margin: 0 0 6px;
  font-size: 13px;
}
.notes-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
  color: var(--muted);
  font-size: 12px;
}
.footer-inner p { margin: 0; }
.noscript {
  margin: 20px;
  padding: 14px;
  border: 1px solid #d97706;
  background: #fff7ed;
}

@media (max-width: 820px) {
  .intro { padding-top: 44px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-reset-wrap { align-self: end; }
  .notes-grid { grid-template-columns: 1fr; gap: 18px; }
  th:nth-child(1) { width: 37%; }
  th:nth-child(2) { width: 35%; }
  th:nth-child(3) { width: 28%; }
}

@media (max-width: 680px) {
  .shell { width: min(calc(100% - 24px), var(--max)); }
  .header-inner { min-height: 52px; }
  .intro { padding: 36px 0 28px; }
  h1 { font-size: 36px; }
  .intro-copy { font-size: 15px; }
  .search-section { padding: 22px 0 24px; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-reset-wrap .secondary-button { width: 100%; }
  .results-section { padding-top: 26px; }
  .table-wrap { overflow: visible; border: 0; border-radius: 0; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody { display: grid; gap: 10px; }
  tbody tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }
  tbody tr:hover { background: #fff; }
  td {
    padding: 12px 13px;
    border-bottom: 1px solid var(--line);
  }
  td:last-child { border-bottom: 0; }
  td::before {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  td:nth-child(1)::before { content: "Receptor"; }
  td:nth-child(2)::before { content: "Adscripción"; }
  td:nth-child(3)::before { content: "Contacto"; }
  .footer-inner { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
