:root {
  --ink: #0d1635;
  --body: #334155;
  --muted: #4a5673;
  --disabled: #8a93a8;
  --accent: #005467;
  --accent-hover: #003b45;
  --cream: #f5efdf;
  --cream-line: #e6dcc4;
  --line: #e0e5f1;
  --line-soft: #edf0f6;
  --rule: #e2e8f0;
  --btn-line: #cfc7b2;
  --chip-line: #d9d2bf;
  --focus: #e6b450;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #ffffff; color: var(--ink); font-family: var(--sans); line-height: 1.55; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: clamp(20px, 4vw, 40px); padding-right: clamp(20px, 4vw, 40px); }
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 15px; height: 15px; stroke-width: 2.4; }

/* Header */
.site-header { border-bottom: 1px solid rgba(13, 22, 53, .08); }
.site-header .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 14px; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 28px; height: 28px; border-radius: 4px; background: var(--accent); color: var(--cream); display: flex; align-items: center; justify-content: center; }
.brand__mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.header-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; text-decoration: none; }

/* Hero */
.dir-hero { background: var(--cream); }
.dir-hero .wrap { padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 24px; }
.dir-hero h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 5vw, 48px); line-height: 1.05; letter-spacing: -.025em; }
.dir-hero__intro-block { margin: 10px 0 0; max-width: 620px; display: flex; flex-direction: column; gap: 8px; }
.dir-hero__intro { margin: 0; font-size: 18px; color: var(--body); }

.search { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.search label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.search__row { display: flex; gap: 10px; }
.search__field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 10px; background: #ffffff; border: 1.5px solid var(--btn-line); color: var(--muted); }
.search__field:focus-within { border-color: var(--accent); }
.search__field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 400 16px var(--sans); color: var(--ink); }
.search__btn { height: 52px; padding: 0 24px; flex-shrink: 0; border: 0; border-radius: 10px; background: var(--accent); color: #ffffff; font: 700 15px var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.search__btn:hover { background: var(--accent-hover); }
.search__btn .icon { display: none; }

/* Category navigation (placeholder until categories ship) */
.cat-nav { display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: thin; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: #ffffff; border: 1px solid var(--chip-line); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip:hover { color: var(--ink); border-color: var(--accent); }
.chip.is-current { background: var(--accent); border-color: var(--accent); color: #ffffff; }

/* Results */
.results .wrap { padding-top: 32px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.results__count { margin: 0; font-size: 14.5px; color: var(--muted); }
.results__count strong { color: var(--ink); }
.member-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.member-grid > li { display: flex; min-width: 0; }

.member-card { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 24px 24px 12px; background: #ffffff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s ease, box-shadow .15s ease; }
.member-card:hover { border-color: #c9d2e3; box-shadow: 0 6px 20px rgba(0, 84, 103, .07); }
.member-card__head { display: flex; gap: 16px; align-items: center; min-width: 0; }
.member-card__logo { width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; object-fit: contain; background: #ffffff; display: block; }
.member-card__logo--initials { display: flex; align-items: center; justify-content: center; background: var(--cream); border: 1px solid var(--cream-line); font-family: var(--display); font-size: 19px; letter-spacing: -.02em; color: var(--accent); }
.member-card__id { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.member-card__name { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; overflow-wrap: anywhere; }
.member-card__name a { color: var(--ink); text-decoration: none; }
.member-card__name a:hover { color: var(--accent); text-decoration: underline; }
.member-card__meta { margin: 0; font-size: 13.5px; color: var(--muted); }
.member-card__desc { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.member-card__links { margin-top: auto; padding-top: 4px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-card__profile, .member-card__site { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; }
.member-card__profile { font-size: 14.5px; font-weight: 700; }
.member-card__site { font-size: 14px; font-weight: 600; color: var(--muted); }
.member-card__site:hover { color: var(--accent); }

.empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.empty h2 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.empty p { margin: 0; }

/* Pagination */
.pager { padding-top: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pager__step { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #cfd6e4; color: var(--ink); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.pager__step:hover { color: var(--ink); border-color: var(--accent); }
.pager__step[aria-disabled="true"] { border-color: var(--line); color: var(--disabled); pointer-events: none; }
.pager__step--prev { margin-right: 10px; }
.pager__step--next { margin-left: 10px; }
.pager__pages { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.pager__num { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 10px; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.pager__num:hover { background: #f3f5f8; color: var(--ink); }
.pager__num[aria-current="page"] { background: var(--accent); color: #ffffff; font-weight: 700; }
.pager__gap { width: 32px; text-align: center; color: var(--muted); }
.pager__status { display: none; font-size: 14px; font-weight: 600; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap { padding-top: 24px; padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; font-size: 13px; color: var(--muted); }
.ksb-footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.ksb-footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.ksb-footer-social a:hover,
.ksb-footer-social a:focus-visible { color: var(--accent); }
.ksb-footer-social__icon { width: 20px; height: 20px; flex-shrink: 0; }

@media (max-width: 768px) {
  .site-header .wrap { height: 64px; }
  .brand { font-size: 12.5px; }
  .dir-hero .wrap { padding-top: 32px; padding-bottom: 28px; gap: 20px; }
  .dir-hero__intro { font-size: 16px; }
  .search__btn { width: 52px; padding: 0; }
  .search__btn .icon { display: block; }
  .search__btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .results .wrap { padding-top: 24px; padding-bottom: 40px; gap: 20px; }
  .member-grid { gap: 16px; }
  .pager { justify-content: space-between; padding-top: 8px; }
  .pager__pages { display: none; }
  .pager__status { display: inline; }
  .pager__step--prev, .pager__step--next { margin: 0; padding: 0 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .member-card { transition: none; } }
.dir-feature--off { display: none !important; }
.member-grid.is-loading { min-height: 120px; opacity: 0.5; }
