:root {
  --ink: #111318;
  --paper: #f7f7f4;
  --white: #ffffff;
  --muted: #626771;
  --line: #111318;
  --blue: #155eef;
  --blue-dark: #0b3ba7;
  --blue-soft: #eaf0ff;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --shadow: 5px 5px 0 var(--line);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, Arial, sans-serif; line-height: 1.55; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }

.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 100; padding: .75rem 1rem; background: var(--blue); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: .75rem 1rem; background: var(--white); border-bottom: 3px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-size: .8rem; font-weight: 800; line-height: 1.15; text-decoration: none; text-transform: uppercase; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; color: white; background: var(--blue); border: 2px solid var(--line); }
.menu-toggle { display: flex; gap: 1rem; align-items: center; padding: .65rem .8rem; background: var(--white); border: 2px solid var(--line); font-weight: 700; }
.site-nav { position: absolute; inset: 76px 0 auto; display: none; background: var(--white); border-bottom: 3px solid var(--line); }
.site-nav.open { display: grid; }
.site-nav a { padding: 1rem; border-top: 1px solid var(--line); font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: white; background: var(--blue); }

.intro, .directory, .about { padding: var(--space-6) 1rem; }
.eyebrow { margin: 0 0 var(--space-3); color: var(--blue); font-size: .73rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 12ch; margin-bottom: var(--space-5); font-size: clamp(2.6rem, 10vw, 6.3rem); line-height: .94; letter-spacing: -.065em; }
h2 { max-width: 14ch; margin-bottom: 0; font-size: clamp(2rem, 6vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.intro { background: var(--white); border-bottom: 3px solid var(--line); }
.intro-meta { padding-top: var(--space-3); border-top: 3px solid var(--line); }
.intro-meta > p { max-width: 38rem; color: var(--muted); font-size: 1.05rem; }
.count-block { display: flex; align-items: baseline; gap: .75rem; margin-top: var(--space-5); }
.count-block strong { color: var(--blue); font-size: clamp(2.8rem, 12vw, 5rem); line-height: 1; letter-spacing: -.06em; }
.count-block span { max-width: 6rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; }

.directory { max-width: 1500px; margin: auto; }
.section-heading { display: flex; flex-direction: column; gap: 1rem; margin-bottom: var(--space-5); }
.result-count { margin: 0; font-weight: 700; }
.controls { display: grid; gap: 1rem; margin-bottom: var(--space-5); padding: 1rem; background: var(--blue-soft); border: 3px solid var(--line); box-shadow: var(--shadow); }
.controls label { display: grid; gap: .5rem; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
input, select { width: 100%; min-height: 50px; padding: .75rem; color: var(--ink); background: var(--white); border: 2px solid var(--line); border-radius: 0; outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,94,239,.2); }
.button { min-height: 48px; padding: .7rem 1rem; color: var(--white); background: var(--blue); border: 2px solid var(--line); font-weight: 800; box-shadow: 3px 3px 0 var(--line); transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease; }
.button:hover { background: var(--blue-dark); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.button:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.button-secondary { color: var(--ink); background: var(--white); }
.button-secondary:hover { color: white; background: var(--ink); }

.listing-grid { display: grid; gap: 1rem; }
.listing-card { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 3px solid var(--line); box-shadow: 4px 4px 0 var(--line); }
.card-index { display: inline-block; align-self: flex-start; padding: .45rem .65rem; color: var(--white); background: var(--blue); border-right: 3px solid var(--line); border-bottom: 3px solid var(--line); font-size: .72rem; font-weight: 800; }
.card-body { display: grid; gap: 1rem; padding: 1rem; }
.listing-card h3 { margin: 0; font-size: 1.25rem; line-height: 1.15; letter-spacing: -.03em; overflow-wrap: anywhere; }
.contact-list { display: grid; gap: .75rem; margin: 0; }
.contact-list div { padding-top: .6rem; border-top: 1px solid #c3c5ca; }
.contact-list dt { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contact-list dd { margin: .18rem 0 0; overflow-wrap: anywhere; }
.contact-list a { color: var(--blue); font-weight: 600; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: auto; padding: 1rem; border-top: 3px solid var(--line); }
.card-actions a { display: grid; place-items: center; min-height: 44px; padding: .55rem; border: 2px solid var(--line); font-size: .76rem; font-weight: 800; text-align: center; text-decoration: none; }
.card-actions a:first-child { color: white; background: var(--blue); }
.card-actions a:hover, .card-actions a:focus-visible { color: white; background: var(--ink); }
.social-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.social-links a { padding: .3rem .45rem; color: var(--ink); background: var(--blue-soft); border: 1px solid var(--line); font-size: .72rem; text-decoration: none; }
.social-links a:hover { color: white; background: var(--blue); }
.empty-state { padding: var(--space-6) 1rem; background: var(--white); border: 3px solid var(--line); text-align: center; }
.empty-state h3 { font-size: 1.5rem; }
.pagination { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: center; margin-top: var(--space-5); }
.pagination p { margin: 0; font-weight: 800; text-align: center; }

.about { background: var(--ink); color: white; border-top: 3px solid var(--line); }
.about p:last-child { max-width: 54rem; margin-top: 2rem; color: #c9cbd0; font-size: 1.05rem; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem 1rem; background: var(--blue); color: white; border-top: 3px solid var(--line); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.site-footer p { margin: 0; }

@media (min-width: 640px) {
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pagination { grid-template-columns: 1fr auto 1fr; }
  .pagination .button:last-child { justify-self: stretch; }
  .section-heading { flex-direction: row; align-items: end; justify-content: space-between; }
}

@media (min-width: 900px) {
  .site-header { padding-inline: 2rem; }
  .menu-toggle { display: none; }
  .site-nav { position: static; display: flex; border: 0; }
  .site-nav a { padding: .75rem 1rem; border: 0; }
  .intro, .about { padding: 5rem 2rem; }
  .intro-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 5rem; align-items: end; }
  .intro-meta { padding: 2rem 0 0 2rem; border-top: 0; border-left: 3px solid var(--line); }
  .directory { padding: 5rem 2rem; }
  .controls { grid-template-columns: minmax(0, 2fr) minmax(220px, .8fr) auto; align-items: end; padding: 1.25rem; }
  .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .site-footer { padding-inline: 2rem; }
}

@media (min-width: 1300px) { .listing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
