:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--text, #132a41);
  background: var(--canvas, #f7f9fa);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent, #14558a); text-underline-offset: .22em; }
button, input { font: inherit; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.masthead { background: var(--surface, white); border-bottom: 1px solid var(--line, #dbe2e6); }
.masthead .wrap, nav, .section-heading, .brand-info { display: flex; align-items: center; }
.masthead .wrap { justify-content: space-between; min-height: 66px; gap: 1rem; }
.wordmark { font-size: 1.45rem; font-weight: 800; letter-spacing: -.07em; color: var(--text, #102f50); text-decoration: none; }
.wordmark span { color: var(--accent, #1268ac); }
nav { gap: clamp(.65rem, 3vw, 2rem); font-size: .9rem; font-weight: 650; }
nav a { color: var(--subtext, #41546a); text-decoration: none; }
nav [aria-current] { color: var(--accent, #0a4978); text-decoration: underline; text-underline-offset: 6px; }
.intro { padding: clamp(32px, 5vw, 66px) 0 26px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.45rem); line-height: 1.14; letter-spacing: -.055em; overflow-wrap: anywhere; }
.intro-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
.intro p { margin-top: 12px; color: var(--subtext, #4b6173); line-height: 1.6; }
.controls { padding: clamp(14px, 2vw, 24px); background: var(--tint, #eaf1f6); border: 1px solid var(--line, #d6e2ea); border-radius: 16px; }
.search { display: flex; align-items: center; gap: 12px; background: var(--surface, white); border: 1px solid var(--line, #bacbd8); border-radius: 9px; padding: 0 16px; }
.search:focus-within { outline: 2px solid var(--focus, #236eaa); outline-offset: 1px; }
.search svg { width: 21px; height: 21px; flex-shrink: 0; fill: none; stroke: var(--accent, #41617d); stroke-width: 1.8; }
.search input { border: 0; background: transparent; min-width: 0; flex: 1; outline: none; height: 50px; color: inherit; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.filters button, .reset { border: 1px solid var(--line, #c6d3dd); background: var(--surface, white); border-radius: 22px; min-height: 38px; padding: 7px 17px; font-size: .9rem; font-weight: 600; color: var(--text, #324f66); cursor: pointer; }
.filters [aria-pressed=true] { background: var(--active, #123f63); border-color: var(--active, #123f63); color: white; }
.section-heading { margin: 34px 0 16px; justify-content: space-between; gap: 14px; }
h2 { font-size: 1.25rem; }
#totalCount { font-size: .9rem; color: var(--subtext, #415d73); font-variant-numeric: tabular-nums; }
.directory { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.brand { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--line, #dbe3e9); background: var(--surface, white); overflow: hidden; }
.brand-logo { background: white; height: clamp(90px, 9vw, 124px); display: grid; place-items: center; }
.brand-logo img { display: block; width: min(72%, 155px); height: 80%; object-fit: contain; }
.brand-info { flex: 1; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-inline: 14px; border-top: 1px solid var(--line, #edf1f4); padding: 12px 0; }
.brand-name { font-size: .95rem; font-weight: 650; overflow-wrap: anywhere; }
.brand-category { font-size: .8rem; color: var(--subtext, #536879); }
.directory .ad-space { grid-column: 1 / -1; margin: 4px 0 !important; }
.empty { text-align: center; padding: 48px 12px; }
.empty p { margin-bottom: 14px; }
footer { margin-top: 36px; padding: 25px 0 48px; border-top: 1px solid var(--line, #d9e1e6); font-size: .9rem; color: var(--subtext, #435d70); line-height: 1.6; }
footer p { margin: 10px 0; }
summary { cursor: pointer; font-weight: 650; }
@media (max-width: 850px) { .directory { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .directory { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .masthead .wrap { min-height: 58px; }
  nav { font-size: .84rem; }
  .filters { gap: 6px; }
  .filters button { padding: 6px 9px; }
  .brand-info { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px; margin-inline: 12px; }
  .intro { padding-bottom: 20px; }
}
