/* Global Directory Catalogs — Research Center.
   Consumes design tokens from petrohrys.css only. Every selector is prefixed
   dc- (or scoped under one), so this file cannot restyle any other page or
   collection. Loaded only by pages under /research/directory-catalogs/. */

.dc-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.dc-main > * + * { margin-top: var(--s-6); }
.dc-main .breadcrumb + .dc-hero { margin-top: var(--s-5); }
.dc-hero .eyebrow { margin-bottom: var(--s-2); }

.dc-section h2 { font-size: var(--fs-xl); margin-bottom: var(--s-3); }
.dc-section h3 { font-size: var(--fs-md); margin: var(--s-4) 0 var(--s-2); }
.dc-section p + p { margin-top: var(--s-3); }
.dc-section ul:not([class]),
.dc-section ol:not([class]) { padding-left: var(--s-4); }
.dc-section ul:not([class]) li + li,
.dc-section ol:not([class]) li + li { margin-top: var(--s-1); }

.dc-muted { color: var(--text-3); font-size: var(--fs-sm); }
.dc-empty {
  color: var(--text-2);
  background: var(--surface-blue);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--s-1);
  padding: var(--s-3);
}
.dc-notice {
  background: var(--surface-green);
  border: var(--rule-w) solid var(--rule);
  border-left: 3px solid var(--green);
  border-radius: var(--s-1);
  padding: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-top: var(--s-3);
}

/* ── section navigation ── */
.dc-subnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}
.dc-subnav a {
  display: inline-block;
  padding: var(--s-1) var(--s-2);
  border: var(--rule-w) solid var(--rule);
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  text-decoration: none;
  background: var(--surface);
}
.dc-subnav a:hover { background: var(--hover-tint); color: var(--blue-strong); }
.dc-subnav a[aria-current="page"] {
  background: var(--blue-strong);
  border-color: var(--blue-strong);
  color: var(--surface);
}

/* ── stats ── */
.dc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--s-2);
  margin: 0;
}
.dc-stats > div {
  background: var(--surface);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--s-1);
  padding: var(--s-3);
}
.dc-stats dt { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.dc-stats dd { margin: var(--s-0) 0 0; font-size: var(--fs-xl); font-family: var(--ff-mono); color: var(--text); }

/* ── facts (definition lists) ── */
.dc-facts { margin: 0; display: grid; gap: var(--s-1); }
.dc-facts > div {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: var(--s-3);
  padding: var(--s-1) 0;
  border-bottom: var(--rule-w) solid var(--rule);
}
.dc-facts dt { color: var(--text-3); font-size: var(--fs-sm); }
.dc-facts dd { margin: 0; }
@media (max-width: 640px) {
  .dc-facts > div { grid-template-columns: 1fr; gap: 0; }
}
.dc-unverified {
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--text-3);
  border: var(--rule-w) dashed var(--text-3);
  border-radius: var(--s-0);
  padding: 0 var(--s-1);
}

/* ── badges ── */
.dc-badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.6;
  padding: 0 var(--s-1);
  border-radius: var(--s-0);
  border: var(--rule-w) solid var(--rule);
  background: var(--surface-blue);
  color: var(--text);
}
.dc-badge--free { background: var(--surface-green); border-color: var(--green); color: var(--green); }
.dc-badge--mixed { background: var(--surface-blue); border-color: var(--blue); color: var(--blue-strong); }
.dc-badge--paid { background: var(--surface); border-color: var(--text-2); color: var(--text); }
.dc-badge--editorial { background: var(--surface); border-color: var(--cyan); color: var(--text); }
.dc-badge--unknown,
.dc-badge--closed { background: var(--surface); border-style: dashed; border-color: var(--text-3); color: var(--text-2); }
.dc-provisional {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-3);
}

/* ── cards ── */
.dc-cards {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: var(--s-3);
}
.dc-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  background: var(--surface);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--s-2);
  padding: var(--s-3);
  min-width: 0;
}
.dc-card[hidden] { display: none; }
.dc-card:hover { box-shadow: var(--shadow-soft); }
.dc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-2); }
.dc-card-title { font-size: var(--fs-md); margin: 0; line-height: 1.3; overflow-wrap: break-word; min-width: 0; }
.dc-card-title a { color: var(--text); text-decoration: none; }
.dc-card-title a:hover { color: var(--blue-strong); text-decoration: underline; }
.dc-card-score { margin: 0; font-family: var(--ff-mono); white-space: nowrap; color: var(--text-2); text-align: right; flex: none; }
.dc-card-score strong { font-size: var(--fs-lg); color: var(--text); }
.dc-card-domain { margin: 0; font-family: var(--ff-mono); font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
.dc-card-facts { margin: var(--s-1) 0 0; display: grid; gap: var(--s-0); font-size: var(--fs-sm); }
.dc-card-facts > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--s-2); }
.dc-card-facts dt { color: var(--text-3); }
.dc-card-facts dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.dc-card-links { margin-top: auto; padding-top: var(--s-2); font-size: var(--fs-sm); border-top: var(--rule-w) solid var(--rule); }

/* ── explorer controls ── */
.dc-controls {
  background: var(--surface);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--s-2);
  padding: var(--s-3);
  margin-top: var(--s-3);
}
.dc-controls[hidden] { display: none; }
.dc-search label,
.dc-control label { display: block; font-size: var(--fs-xs); color: var(--text-2); margin-bottom: var(--s-0); font-weight: 600; }
.dc-search input,
.dc-control select {
  width: 100%;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--surface);
  border: var(--rule-w) solid var(--text-3);
  border-radius: var(--s-1);
  padding: var(--s-1) var(--s-2);
  min-height: 2.5rem;
}
.dc-search input { font-size: 1rem; }
.dc-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.dc-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
}
.dc-checks label { display: inline-flex; align-items: center; gap: var(--s-1); cursor: pointer; }
.dc-checks input { width: 1.1rem; height: 1.1rem; }
.dc-reset,
.dc-linkbutton {
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--blue-strong);
  background: none;
  border: var(--rule-w) solid var(--blue-strong);
  border-radius: var(--s-1);
  padding: var(--s-1) var(--s-2);
  min-height: 2.5rem;
  cursor: pointer;
}
.dc-linkbutton { border: 0; padding: 0; min-height: 0; text-decoration: underline; }
.dc-reset:hover { background: var(--hover-tint); }
.dc-more { margin-top: var(--s-3); border-top: var(--rule-w) solid var(--rule); padding-top: var(--s-2); }
.dc-more > summary {
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--blue-strong);
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}
.dc-more > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dc-count { margin: var(--s-3) 0 0; font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; }

.dc-search input:focus-visible,
.dc-control select:focus-visible,
.dc-checks input:focus-visible,
.dc-reset:focus-visible,
.dc-linkbutton:focus-visible,
.dc-subnav a:focus-visible,
.dc-card a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ── tables ── */
.dc-table-wrap { overflow-x: auto; }
.dc-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dc-table caption { text-align: left; color: var(--text-3); font-size: var(--fs-xs); padding-bottom: var(--s-1); }
.dc-table th,
.dc-table td { text-align: left; vertical-align: top; padding: var(--s-1) var(--s-2); border-bottom: var(--rule-w) solid var(--rule); }
.dc-table thead th { color: var(--text-2); font-weight: 600; border-bottom-width: 2px; }
.dc-table tbody th { font-weight: 600; }
.dc-table .dc-total th,
.dc-table .dc-total td { font-weight: 700; border-top: 2px solid var(--rule); }

/* ── lists ── */
.dc-ranklist { padding-left: var(--s-5); }
.dc-ranklist li + li { margin-top: var(--s-1); }
.dc-inline-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.dc-sources { padding-left: var(--s-4); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.dc-back { font-size: var(--fs-sm); }

/* ── wide screens: let the explorer and tables use the room ──
   main keeps its 720px reading measure; only the results area widens, centred
   on the same axis, as the Business Directories stylesheet does for its tables. */
@media (min-width: 60rem) {
  .dc-controls,
  .dc-cards,
  .dc-table-wrap {
    width: min(94vw, 1280px);
    max-width: none;
    margin-left: calc(50% - min(47vw, 640px));
  }
}

/* ── discovery register ── */
.dc-register tbody th a { overflow-wrap: anywhere; }
.dc-register td, .dc-register th { min-width: 6rem; }
.dc-register tbody th { min-width: 12rem; }
.dc-register tr[hidden] { display: none; }
.dc-register .dc-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .dc-register thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dc-register, .dc-register caption, .dc-register tbody, .dc-register tr, .dc-register th, .dc-register td { display: block; width: 100%; min-width: 0; }
  .dc-register tr { padding: var(--s-2) 0; border-bottom: var(--rule-w) solid var(--rule); }
  .dc-register tbody th, .dc-register td { border: 0; padding: var(--s-0) 0; }
  .dc-register td::before { content: attr(data-label) " · "; color: var(--text-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
  .dc-register tr[hidden] { display: none; }
}
