/* Expat Resources Directory (/expat-resources/, generated by scripts/build-expat-resources.mjs).
   Builds on site.css tokens and the shared tool components (.hero, .col-banner, .bm-hero, .bm-section, .col-search,
   .col-note, .col-disclaimer). Only the directory's own pieces are styled here. No inline styles anywhere (CSP). */

.er-intro { max-width: 760px; }

/* ---------- Search + category links ---------- */
.er-tools { padding-top: 36px; }
.er-searchrow { display: flex; align-items: center; justify-content: center; gap: 10px; }
.er-search { flex: 1; margin: 0; }
button.er-clear {
  flex: none; min-height: 44px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
button.er-clear:hover { color: var(--ink); border-color: rgba(234, 242, 230, 0.35); }
button.er-clear:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
button.er-clear[hidden] { display: none; }
.er-count { margin: 12px 0 0; text-align: center; font-variant-numeric: tabular-nums; }
.er-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.er-jump a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; color: var(--ink); font-size: 14px;
  font-weight: 700; line-height: 1.2; text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; transition: border-color .15s ease;
}
.er-jump a:hover { border-color: rgba(198, 239, 60, 0.65); }
.er-jump a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.er-jump a span { color: var(--lime); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.er-jump a[hidden] { display: none; }

/* ---------- Listings ---------- */
.er-cat { scroll-margin-top: 90px; }
.er-cat[hidden] { display: none; }
.er-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.er-card {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "logo head" "logo desc"; align-content: start;
  gap: 6px 16px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  transition: border-color .15s ease;
}
.er-card:hover, .er-card:focus-within { border-color: rgba(198, 239, 60, 0.65); }
.er-card[hidden] { display: none; }
/* Every logo sits on the same white tile, so dark and transparent marks stay readable on the dark card. */
.er-logo {
  grid-area: logo; box-sizing: border-box; width: 48px; height: 48px; padding: 6px; background: #fff; border-radius: 12px;
  object-fit: contain;
}
.er-logo--letter {
  display: flex; align-items: center; justify-content: center; padding: 0; color: var(--lime); font-size: 22px; font-weight: 900;
  line-height: 1; background: var(--forest); border: 1px solid var(--line);
}
.er-head { grid-area: head; min-width: 0; }
.er-name { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.2px; line-height: 1.3; }
.er-name a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(198, 239, 60, 0.55); text-underline-offset: 3px; overflow-wrap: anywhere; }
.er-name a:hover { color: var(--lime); }
.er-name a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
.er-domain { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.er-desc { grid-area: desc; margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.er-empty { margin: 36px 0 0; padding: 22px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }
.er-empty[hidden] { display: none; }
.er-disclaimer { margin-bottom: 56px; }

@media (max-width: 900px) {
  .er-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .er-tools { padding-top: 28px; }
  .er-jump { justify-content: flex-start; }
  /* Logo and name on one row, the description under both. */
  .er-card { grid-template-areas: "logo head" "desc desc"; align-items: center; gap: 12px 14px; padding: 16px; }
  .er-head { align-self: center; }
}
