:root {
  /* Compliance lexicon: `#6b7280` `16px`. Below: 2-3 lines description `14px`. Bottom-left: category chips. Bottom-right: number `20px` Inter's neutral precision makes ideal workhorse — readable small sizes (Google Interaction Pattern:** Interaction:** Interactive elements — International Style** filtered through strictly minimalist lens — imagine interior Dieter Rams-designed cabinet that has been digitized into living web document. evokes quiet authority office: ordered `#5c6370` (Steel only (`#6b7280` small sizes evokes technical documentation indexing systems. with `1px` borders Mist */
  --snow: #f6f7f9;
  --white: #ffffff;
  --silver: #c8ccd0;
  --frost: #eef0f2;
  --charcoal: #2d3136;
  --graphite: #4a4f56;
  --slate: #6b7280;
  --signal: #3b82f6;
  --deep-signal: #2563eb;
  --ice: #f0f5ff;
  --steel: #5c6370;
  --pale-chip: #f0f2f5;
  --ash: #9ca3af;
  --rule: #dde0e3;
  --line-focus: #d4d8dc;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--graphite);
  font-family: "Inter", sans-serif;
  background-color: var(--snow);
  background-image:
    repeating-linear-gradient(to right, rgba(238, 240, 242, 0.3) 0, rgba(238, 240, 242, 0.3) 1px, transparent 1px, transparent calc(100% / 3)),
    repeating-linear-gradient(to bottom, rgba(238, 240, 242, 0.3) 0, rgba(238, 240, 242, 0.3) 1px, transparent 1px, transparent 72px);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--silver);
  background: rgba(246, 247, 249, 0.88);
}

.wordmark {
  color: var(--charcoal);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.search-input {
  width: 280px;
  height: 38px;
  border: 1px solid var(--silver);
  border-radius: 4px;
  background: var(--white);
  color: var(--charcoal);
  font: 400 14px/1.4 "Inter", sans-serif;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.search-input:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.directory-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.directory-section {
  position: relative;
  margin-top: 48px;
}

.directory-section:first-child {
  margin-top: 0;
}

.section-rule {
  height: 1px;
  width: 100%;
  background: var(--rule);
  margin-bottom: 16px;
}

.section-label {
  margin: 0 0 16px;
  color: var(--slate);
  font: 500 11px/1.5 "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.directory-card {
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--silver);
  border-radius: 4px;
  background: var(--white);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s ease, background-color 0.25s ease, opacity 0.3s ease, filter 0.3s ease;
}

.directory-card::before,
.directory-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
  background: var(--line-focus);
  transition: opacity 0.25s ease;
}

.directory-card::before {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

.directory-card::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.directory-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  border-color: var(--signal);
  background: var(--ice);
}

.directory-card:hover::before,
.directory-card:hover::after {
  opacity: 1;
}

.card-topline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.directory-card h3 {
  margin: 0;
  color: var(--charcoal);
  font: 600 16px/1.35 "Inter", sans-serif;
  letter-spacing: 0.01em;
}

.directory-card time {
  color: var(--ash);
  font: 400 12px/1.5 "Inter", sans-serif;
  white-space: nowrap;
  text-align: right;
}

.directory-card p {
  margin: 14px 0 18px;
  color: var(--graphite);
  font: 400 14px/1.6 "Inter", sans-serif;
  letter-spacing: 0.005em;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--silver);
  border-radius: 999px;
  color: var(--slate);
  background: var(--white);
  font: 500 11px/1.5 "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--silver);
  flex: 0 0 auto;
}

code {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--pale-chip);
  color: var(--steel);
  font: 400 12px/1.5 "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.directory-card.is-muted {
  opacity: 0.3;
  filter: grayscale(0.5);
}

.directory-card.is-match {
  animation: matchPulse 0.32s var(--ease);
}

.directory-section.is-empty .card-grid {
  display: none;
}

.empty-state {
  display: none;
  margin: 48px 0 0;
  text-align: center;
  color: var(--slate);
  font: 400 14px/1.6 "Inter", sans-serif;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--silver);
  color: var(--slate);
  font: 400 13px/1.5 "Inter", sans-serif;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--deep-signal);
}

.return-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--silver);
  border-radius: 4px;
  background: var(--white);
  color: var(--charcoal);
  font: 600 18px/1 "Inter", sans-serif;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.3s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

.return-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.return-top:hover {
  border-color: var(--signal);
  color: var(--signal);
  transform: translateY(-2px);
}

@keyframes matchPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

@media (max-width: 760px) {
  .site-header {
    height: auto;
    min-height: 72px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .search-input {
    width: 100%;
  }

  .directory-shell {
    width: min(100% - 32px, 1120px);
    padding-top: 32px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --snow: #1a1d21;
    --white: #22262b;
    --charcoal: #e5e7eb;
    --signal: #60a5fa;
    --deep-signal: #60a5fa;
    --graphite: #c8ccd0;
    --slate: #c8ccd0;
    --pale-chip: #1a1d21;
    --ice: #22262b;
    --frost: #4a4f56;
    --rule: #4a4f56;
    --line-focus: #6b7280;
  }

  .site-header {
    background: rgba(26, 29, 33, 0.88);
  }

  body {
    background-image:
      repeating-linear-gradient(to right, rgba(74, 79, 86, 0.28) 0, rgba(74, 79, 86, 0.28) 1px, transparent 1px, transparent calc(100% / 3)),
      repeating-linear-gradient(to bottom, rgba(74, 79, 86, 0.28) 0, rgba(74, 79, 86, 0.28) 1px, transparent 1px, transparent 72px);
  }
}

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

  .directory-card:hover,
  .return-top:hover {
    transform: none;
  }

  .directory-card.is-match {
    animation: none;
  }
}
