/* Directory
   Toolbar, filter chips, record tables, phone card layout, resource cards. */

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 260px; position: relative; }
.toolbar .search input { padding-left: 34px; }
.toolbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar select { width: auto; min-width: 150px; flex: 0 1 auto; }
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-filter {
  appearance: none; cursor: pointer; font: 500 13px/1 var(--sans);
  padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.chip-filter[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chip-filter .n { font: 500 11px/1 var(--mono); opacity: 0.65; margin-left: 4px; }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
table.dir { width: 100%; border-collapse: collapse; font-size: 14px; }
.dir th {
  text-align: left; font: 600 11.5px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--line-strong);
  position: sticky; top: 0; white-space: nowrap;
}
.dir th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.dir th button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dir th[aria-sort] button::after { content: "↕"; opacity: 0.35; font-size: 11px; }
.dir th[aria-sort="ascending"] button::after { content: "↑"; opacity: 1; }
.dir th[aria-sort="descending"] button::after { content: "↓"; opacity: 1; }
.dir td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dir tr:last-child td { border-bottom: 0; }
.dir tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.dir td.num { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dir td.primary { font-weight: 600; min-width: 150px; }
.dir td.wide { min-width: 200px; max-width: 320px; }
.dir td.act { text-align: right; white-space: nowrap; width: 1%; }
.cell-sub { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.reach { display: inline-flex; gap: 10px; align-items: center; }
.reach a { display: inline-flex; align-items: center; }

@media (max-width: 860px) {
  table.dir, .dir tbody, .dir tr, .dir td { display: block; }
  .dir thead { display: none; }
  .dir tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .dir tr:last-child { border-bottom: 0; }
  .dir td { border: 0; padding: 3px 0; max-width: none !important; min-width: 0 !important; }
  .dir td[data-label]:not(.primary):not(.act)::before { content: attr(data-label); display: inline-block; min-width: 116px; font-size: 12px; color: var(--muted); }
  .dir td.primary { font-size: 15.5px; padding-bottom: 6px; }
  .dir td.act { text-align: left; padding-top: 8px; }
  .dir td:empty { display: none; }
}
@media (max-width: 560px) { .toolbar select { flex: 1 1 140px; } }

/* ---------- Resources ---------- */
.res-groups { display: grid; gap: 26px; }
.res-group h2 { font: 600 20px/1.2 var(--display); margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.res-group h2 .n { font: 500 12px/1 var(--mono); color: var(--muted); }
.res-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.res { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; }
.res-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.res-title { font-weight: 600; font-size: 15px; }
.res p { font-size: 13.5px; color: var(--muted); }
.res-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; font-size: 13px; }
