:root {
  color-scheme: light;
  --ink: #12233e;
  --muted: #50617b;
  --line: #dbe4f0;
  --blue: #2452c6;
  --pale: #f2f6fe;
  --white: #fff;
  font-family: Poppins, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-size: .875rem; line-height: 1.6; }
#directory { flex: 1; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button, input[type=checkbox] { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -.025em; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #6394ec; outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.045em; text-decoration: none; }
.header-link { color: var(--muted); font-size: .8rem; text-decoration: none; }
.hero { padding: clamp(32px, 6vw, 68px) 0 clamp(24px, 4vw, 45px); border-bottom: 1px solid var(--line); background: linear-gradient(110deg,#eaf1ff,#f6f9ff 74%,#eef4ff); }
.hero h1 { font-size: clamp(1.8rem,5vw,3.15rem); }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero p { color: var(--muted); margin-top: 14px; }
.searchbar { display: grid; grid-template-columns: 1.5fr 1fr auto; gap: 13px; background: white; border: 1px solid var(--line); border-radius: 15px; padding: 12px; margin-top: 25px; align-items: end; box-shadow: 0 8px 26px #142e610b; }
.searchbar label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; min-width: 0; }
.searchbar input { width: 100%; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: .875rem; font-weight: 400; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--line); background: var(--white); font-weight: 600; font-size: .81rem; text-align: center; text-decoration: none; }
.button:hover { border-color: #7294d7; }
.primary { background: var(--blue); border-color: var(--blue); color: white; }
.primary:hover { background: #1944ac; }
.results { padding: 31px 0 46px; scroll-margin-top: 12px; }
.results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
h2 { font-size: clamp(1.1rem,2.4vw,1.4rem); font-weight: 600; }
.muted { color: var(--muted); font-size: .79rem; }
.filters { margin: 16px 0 19px; display: flex; gap: 12px 18px; align-items: center; flex-wrap: wrap; }
.categories { display: flex; gap: 6px; flex-wrap: wrap; }
.categories .button { padding: 5px 12px; min-height: 36px; border-radius: 99px; font-size: .78rem; }
.categories .button[aria-pressed=true] { background: var(--ink); color: white; border-color: var(--ink); }
.online-filter { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.online-filter input { width: 16px; height: 16px; accent-color: var(--blue); }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; box-shadow: 0 3px 12px #132d5909; }
.cover { display: block; background: var(--pale); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.card .cover { aspect-ratio: 2.25; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 15px; min-width: 0; }
.card-identity { display: flex; align-items: center; gap: 12px; width: 100%; }
.card-identity-text { min-width: 0; overflow-wrap: anywhere; }
.card-logo {
  width: 64px; height: 64px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 13px; overflow: hidden;
  background: var(--pale); color: var(--blue); font-size: 1.05rem; font-weight: 700;
}
.card-logo-image { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.card h3 { margin: 4px 0; font-size: 1.1rem; font-weight: 600; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.business-type { color: var(--blue); font-size: .73rem; font-weight: 600; }
.location { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.card .location { font-size: .8rem; }
.card-services { margin-top: 10px; color: var(--ink); font-size: .81rem; overflow-wrap: anywhere; }
.card-actions { border-top: 1px solid var(--line); width: 100%; padding-top: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.card-fill { flex: 1; min-height: 12px; }
.card-actions .button { font-size: .78rem; }
.is-business-profile {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, rgba(var(--profile-theme-rgb), .09), transparent 82%),
    rgba(var(--profile-theme-rgb), .055);
}
.is-business-profile .wrap { width: min(1180px, calc(100% - 48px)); }
.is-business-profile .site-header { border: 0; }
.is-business-profile .header-inner { border-bottom: 1px solid var(--line); }
.is-business-profile .header-link { border-inline-start: 1px solid var(--line); padding-inline-start: 17px; }
.profile { --profile-detail-font-size: .83rem; padding-top: 19px; padding-bottom: 42px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 11px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: .8rem; font-weight: 500; text-decoration: none; }
.back:hover { background: var(--pale); border-color: #b9cbed; color: var(--blue); }
.back-to-results::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; transform: rotate(45deg); }
.profile .back { padding-inline: 14px; border-radius: 12px; background: #e9effc; box-shadow: 0 2px 4px #12233e14; }
.profile-header {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  background: rgba(255,255,255,.68);
  border-radius: 24px;
  box-shadow: 0 8px 24px #142e6110;
}
.profile-title {
  --profile-logo-size: clamp(72px, 9.2vw, 132px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  align-items: start;
  gap: 15px clamp(10px, 1.7vw, 24px);
  min-width: 0;
  padding: clamp(16px, 2.3vw, 33px);
}
.profile-title.has-profile-logo { grid-template-columns: var(--profile-logo-size) minmax(0,1fr); }
.profile-identity { min-width: 0; }
.profile-logo {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: var(--profile-logo-size);
  height: var(--profile-logo-size);
  object-fit: contain;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: clamp(13px, 2vw, 23px);
  background: var(--white);
  box-shadow: 0 4px 13px #12233e17;
}
.profile-title.has-profile-logo .profile-identity,
.profile-title.has-profile-logo .profile-actions { grid-column: 2; }
.profile-identity .business-type {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  background: #e8efff;
}
.profile-title h1 { font-size: clamp(1.45rem, 3.2vw, 2.5rem); font-weight: 700; margin-top: 6px; }
.profile-identity .location { display: flex; align-items: flex-start; gap: 7px; margin-top: 6px; }
.profile-header .cover { position: relative; min-height: 244px; border-radius: 24px; }
.profile-header .cover img { position: absolute; inset: 0; }
.cover-caption { position: absolute; right: 12px; bottom: 12px; border-radius: 999px; padding: 4px 8px; background: #12233ed9; color: white; font-size: .7rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-actions .button { gap: 6px; flex: 1 1 0; min-width: 5.4rem; max-width: 11rem; padding-inline: 8px; border-radius: 12px; }
.profile-actions .primary { background: linear-gradient(135deg, #2d60e1, #1946bd); }
.profile-actions .primary:hover { background: #1944ac; }
.profile-actions .button:not(.primary) { border-color: #b5c9f4; background: rgba(255,255,255,.55); }
.profile-icon { width: 1.17rem; height: 1.17rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.profile-identity .profile-icon, .contact-line .profile-icon, .map-link .profile-icon { margin-top: 1px; width: 1.05rem; height: 1.05rem; }
.profile-content { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 16px; margin-top: 20px; }
.panel {
  border: 1px solid var(--line);
  padding: clamp(15px, 2vw, 24px);
  border-radius: 21px;
  min-width: 0;
  scroll-margin-top: 10px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 5px 17px #142e6110;
}
.profile-section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.profile-section-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: #e8efff; color: var(--blue); }
.profile-section-icon .profile-icon { width: 20px; height: 20px; }
@media (min-width: 761px) {
  .profile-content-split {
    grid-template-columns: minmax(0,1.22fr) minmax(0,1fr);
    grid-template-rows: auto 1fr;
  }
  .profile-content-split .profile-services { grid-column: 1; grid-row: 1 / span 2; }
  .profile-content-split .profile-about { grid-column: 2; grid-row: 1; }
  .profile-content-split .profile-contact { grid-column: 2; grid-row: 2; }
  .profile-content-split .profile-services:first-child + .profile-contact { grid-row: 1 / span 2; }
}
.description { font-size: var(--profile-detail-font-size); white-space: pre-line; overflow-wrap: anywhere; }
.service-list { list-style: none; padding: 0; margin: 0; }
.service { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.service[hidden] { display: none; }
.service + .service { border-top: 1px solid var(--line); }
.service-name { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; padding: 6px 2px; text-align: left; line-height: 1.3; font-size: var(--profile-detail-font-size); font-weight: 400; overflow-wrap: anywhere; }
.service-name:hover { color: var(--blue); text-decoration: underline; }
.service-book { flex: 0 0 auto; min-height: 32px; min-width: 64px; margin-block: 3px; padding: 4px 10px; color: var(--blue); border-color: transparent; border-radius: 10px; background: #e8efff; font-size: .75rem; font-weight: 500; }
.service-book:hover { background: #dbe7ff; }
.service-more { margin-top: 10px; width: 100%; gap: 8px; border-color: transparent; border-radius: 12px; background: #e8efff; }
.service-more::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.service-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.service-dialog { width: min(440px,calc(100% - 32px)); max-height: calc(100dvh - 32px); color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 24px 60px #12233e30; }
.service-dialog::backdrop { background: #12233e82; }
.service-dialog h2 { padding-right: 70px; margin-bottom: 14px; font-size: 1.12rem; }
.service-dialog-close { position: absolute; top: 12px; right: 12px; min-height: 40px; padding-inline: 9px; font-size: .77rem; }
.service-dialog-content > * + * { margin-top: 14px; }
.service-facts { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 6px 14px; margin-bottom: 0; }
.service-facts dt { color: var(--muted); }
.service-facts dd { margin: 0; font-weight: 500; }

.contact-line + .contact-line { margin-top: 9px; }
.contact-line { display: flex; align-items: flex-start; gap: 7px; overflow-wrap: anywhere; }
.map-link { gap: 7px; color: var(--blue); }
.contact-map { margin-top: 14px; }
.contact-map iframe { display: block; width: 100%; height: 210px; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }
.landing-footer .site-logo { justify-self: start; text-decoration: none; }
.landing-footer .site-brand-lockup { display: flex; align-items: center; gap: 9px; font-size: 1.4rem; letter-spacing: -.045em; }
.page-status { padding-block: 40px; color: var(--muted); }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 21px; color: var(--muted); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) {
  .profile-header { grid-template-columns: minmax(0,1fr); gap: 13px; border-radius: 0; background: none; box-shadow: none; }
  .profile-header .cover { grid-row: 1; min-height: 0; aspect-ratio: 2.15; }
  .profile-title {
    --profile-logo-size: clamp(66px, 18vw, 96px);
    padding: clamp(14px, 3vw, 20px);
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--white);
    box-shadow: 0 5px 17px #142e6115;
  }
  .profile-logo { grid-row: 1; }
  .profile-title .profile-actions, .profile-title.has-profile-logo .profile-actions { grid-column: 1 / -1; justify-content: center; }
  .profile-actions .button { max-width: none; }
  .profile-content { margin-top: 14px; gap: 13px; }
}
@media (max-width: 610px) {
  .wrap, .is-business-profile .wrap { width: calc(100% - 30px); }
  .header-inner { min-height: 55px; gap: 12px; }
  .is-business-profile .header-link { padding-inline-start: 12px; }
  .searchbar { grid-template-columns: 1fr; gap: 9px; margin-top: 17px; }
  .grid { grid-template-columns: 1fr; }
  .results { padding-top: 22px; }
  .profile { padding-top: 13px; }
  .profile-actions .button { min-width: 4.5rem; }
  .profile-actions .profile-icon { width: .94rem; height: .94rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .profile-header, .profile-content .panel, .hero, .results {
    animation: directory-appear 320ms ease-out both;
  }
  .profile-content .panel { animation-delay: 60ms; }
  .profile-services, .results { animation-delay: 110ms; }
  .service-dialog[open] { animation: directory-appear 200ms ease-out both; }
}

@keyframes directory-appear {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
