/* Gold Kidney Provider Search: design tokens + components (REQUIREMENTS.md §5)
   Gold is an accent only: hero rule, distance text, hover borders, selected pin. */

:root {
  --gk-navy: #114F6D;
  --gk-navy-dark: #0B3A51;
  --gk-navy-deep: #082C3E;
  --gk-navy-tint: #E8F0F4;
  --gk-gold: #D1A565;          /* never text on white */
  --gk-gold-dark: #7A5C28;     /* accessible gold text */
  --gk-gold-tint: #F1E4D0;
  --gk-gray-100: #E6E7E7;
  --gk-gray-50: #F3F4F4;
  --gk-gray-300: #C9CBCC;
  --gk-gray-600: #5A6064;      /* secondary text, 6.4:1 on white */
  --gk-text: #333333;
  --gk-white: #FFFFFF;

  --fs-h1: 2.25rem;
  --fs-h2: 1.75rem;
  --fs-h3: 1.375rem;
  --fs-lg: 1.125rem;
  --fs-sm: 1rem;
  --fs-xs: 0.875rem;

  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s5: 2.5rem; --s6: 3rem; --s8: 4rem; --s10: 5rem;

  --radius-btn: 8px;
  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(8, 44, 62, 0.06), 0 1px 3px rgba(8, 44, 62, 0.06);
  --shadow-md: 0 6px 16px rgba(8, 44, 62, 0.10), 0 2px 4px rgba(8, 44, 62, 0.06);
  --shadow-lg: 0 20px 48px rgba(8, 44, 62, 0.22);
  --ease: 160ms cubic-bezier(0.2, 0, 0, 1);
  --header-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5; color: var(--gk-text); background: var(--gk-white); overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; color: var(--gk-navy); line-height: 1.2; }
h1 { font-size: var(--fs-h1); font-weight: 500; }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
p { margin: 0; }
a { color: var(--gk-navy); }
button, input, select { font: inherit; color: inherit; }
img, svg { display: block; }

:focus-visible { outline: 3px solid var(--gk-navy); outline-offset: 2px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--gk-white); }

.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; }
.skip-link { position: absolute; left: var(--s2); top: -100px; z-index: 100; background: var(--gk-navy); color: var(--gk-white); padding: var(--s1) var(--s2); border-radius: var(--radius-btn); text-decoration: none; }
.skip-link:focus { top: var(--s1); }

.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--s3); }

/* ---------- Top bars ---------- */
.preview-banner {
  background: var(--gk-gold-tint); color: var(--gk-gold-dark);
  font-size: 0.8rem; font-weight: 500; text-align: center; padding: 5px var(--s2);
}
.utility-bar { background: var(--gk-navy-deep); color: var(--gk-white); font-size: var(--fs-xs); }
.utility-bar .container { display: flex; justify-content: flex-end; align-items: center; min-height: 36px; gap: var(--s3); }
.utility-bar a { color: var(--gk-white); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.utility-bar a:hover { text-decoration: underline; }
.utility-bar .lang-slot { display: none; } /* Phase 2 */

.site-header { background: var(--gk-white); position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 0 var(--gk-gray-100); }
.site-header .container { display: flex; align-items: center; gap: var(--s4); min-height: var(--header-h); }
.logo-link { display: inline-flex; flex: none; border-radius: 4px; }
.logo-link img { height: 48px; width: auto; }
.header-search { flex: 1; display: none; max-width: 720px; margin-left: auto; }
body.view-results .header-search { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 44px; padding: 0 var(--s3); border-radius: var(--radius-btn); border: 2px solid transparent;
  font-weight: 500; font-size: var(--fs-sm); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.btn-primary { background: var(--gk-navy); color: var(--gk-white); }
.btn-primary:hover { background: var(--gk-navy-dark); }
.btn-secondary { background: var(--gk-white); color: var(--gk-navy); border-color: var(--gk-navy); }
.btn-secondary:hover { background: var(--gk-navy-tint); }
.btn-ghost { background: transparent; color: var(--gk-navy); padding: 0 var(--s1); }
.btn-ghost:hover { background: var(--gk-navy-tint); }
.btn-sm { min-height: 40px; padding: 0 var(--s2); font-size: var(--fs-xs); }

/* ---------- Search bar ---------- */
.search-bar {
  display: flex; align-items: stretch; position: relative; color: var(--gk-text); /* never inherit the hero's white */
  background: var(--gk-white); border: 2px solid var(--gk-gray-300); border-radius: 14px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search-bar:focus-within { border-color: var(--gk-navy); box-shadow: 0 0 0 4px rgba(17, 79, 109, 0.14); }
.hero .search-bar { border-color: transparent; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25); }
.hero .search-bar:focus-within { border-color: var(--gk-gold); box-shadow: 0 0 0 4px rgba(209, 165, 101, 0.45), 0 18px 40px rgba(0, 0, 0, 0.25); }
.search-field { flex: 1; display: flex; align-items: center; gap: 12px; padding-left: 20px; min-width: 0; }
.search-field .icon { color: var(--gk-navy); width: 22px; height: 22px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: var(--fs-lg); padding: var(--s2) 0; min-height: 64px; }
.search-field input::placeholder { color: var(--gk-gray-600); }
.location-pill {
  display: flex; align-items: center; gap: 6px; margin: 10px 0; padding: 0 var(--s2);
  border: 0; border-left: 1px solid var(--gk-gray-100); background: transparent;
  color: var(--gk-navy); font-weight: 500; cursor: pointer; white-space: nowrap;
}
.location-pill:hover span { text-decoration: underline; }
.is-locating .location-pill { background: var(--gk-navy-tint); border-radius: 8px; }

/* Location picker: its own pop-up under the "Near ..." pill */
.loc-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 55; width: min(400px, calc(100vw - 32px));
  background: var(--gk-white); color: var(--gk-text); border: 1px solid var(--gk-gray-100);
  border-radius: var(--radius-card); box-shadow: var(--shadow-lg); padding: var(--s2); text-align: left;
}
.loc-pop-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gk-gray-600); margin-bottom: var(--s1); }
.loc-field { display: flex; align-items: center; gap: 10px; border: 2px solid var(--gk-navy); border-radius: 10px; padding: 0 12px; }
.loc-field .icon { color: var(--gk-navy); width: 20px; height: 20px; }
.loc-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: var(--fs-lg); min-height: 48px; }
.loc-list { margin: var(--s1) calc(-1 * var(--s2)) calc(-1 * var(--s1)); }
.loc-list .suggest-item { padding-left: var(--s2); padding-right: var(--s2); }
.loc-list .suggest-group-label { padding-left: var(--s2); }
.location-pill .icon { width: 20px; height: 20px; }
.search-bar .btn-primary { margin: 7px; min-height: auto; padding: 0 var(--s4); border-radius: 10px; font-size: var(--fs-lg); }

.search-bar.compact { border-radius: 12px; }
.search-bar.compact .search-field { padding-left: var(--s2); }
.search-bar.compact .search-field input { min-height: 48px; padding: var(--s1) 0; font-size: var(--fs-sm); }
.search-bar.compact .btn-primary { font-size: var(--fs-sm); padding: 0 var(--s3); margin: 5px; }

/* Autocomplete */
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50; text-align: left;
  background: var(--gk-white); border-radius: var(--radius-card); box-shadow: var(--shadow-lg);
  border: 1px solid var(--gk-gray-100); padding: var(--s1) 0; max-height: 440px; overflow-y: auto;
}
.suggestions[hidden] { display: none; }
.suggest-group-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gk-gray-600); padding: 10px 20px 4px; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 10px 20px; cursor: pointer; }
.suggest-item[aria-selected="true"], .suggest-item:hover { background: var(--gk-navy-tint); }
.suggest-item .s-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--gk-navy-tint); color: var(--gk-navy); display: grid; place-items: center; flex: none; }
.suggest-item[aria-selected="true"] .s-icon, .suggest-item:hover .s-icon { background: var(--gk-white); }
.suggest-item .s-icon .icon { width: 18px; height: 18px; }
.suggest-item .s-main { font-weight: 500; color: var(--gk-navy); }
.suggest-item .s-sub { font-size: var(--fs-xs); color: var(--gk-gray-600); }
.suggest-item mark { background: none; color: inherit; font-weight: 700; }

/* ---------- Home: hero ---------- */
.hero {
  /* Clip the decorative ring at the top and sides, but let the suggestion and
     location drop-downs extend below the hero. */
  position: relative; color: var(--gk-white); clip-path: inset(0 0 -100vh 0);
  background:
    radial-gradient(900px 420px at 92% 0%, rgba(209, 165, 101, 0.28), transparent 62%),
    radial-gradient(700px 380px at 0% 100%, rgba(255, 255, 255, 0.07), transparent 60%),
    linear-gradient(160deg, var(--gk-navy) 0%, var(--gk-navy-dark) 100%);
  padding: var(--s10) 0 var(--s8);
}
/* soft concentric rings echo the GK crest without being literal */
.hero::after {
  content: ""; position: absolute; right: -140px; top: -140px; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(209, 165, 101, 0.35);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.025), 0 0 0 120px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .search-wrap { max-width: 900px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); margin-bottom: var(--s2); }
.eyebrow::before { content: ""; width: 40px; height: 3px; border-radius: 2px; background: var(--gk-gold); }
.hero h1 { color: var(--gk-white); font-size: 2.75rem; font-weight: 600; letter-spacing: -0.01em; max-width: 780px; }
.hero .lede { color: rgba(255, 255, 255, 0.85); font-size: var(--fs-lg); margin: var(--s2) 0 var(--s4); max-width: 640px; }

.popular { margin-top: var(--s3); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.popular-label { font-size: var(--fs-xs); font-weight: 500; color: rgba(255, 255, 255, 0.8); margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s2);
  border-radius: var(--radius-pill); border: 1px solid var(--gk-gray-300); background: var(--gk-white);
  color: var(--gk-navy); font-weight: 500; font-size: var(--fs-xs); cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}
.chip:hover { border-color: var(--gk-navy); background: var(--gk-navy-tint); }
.chip .icon { width: 16px; height: 16px; }
.hero .chip { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.35); color: var(--gk-white); }
.hero .chip:hover { background: rgba(255, 255, 255, 0.16); border-color: var(--gk-gold); }

/* ---------- Home: sections ---------- */
.section { padding: var(--s8) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.section-head p { color: var(--gk-gray-600); margin-top: 6px; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.category-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left;
  background: var(--gk-white); border: 1px solid var(--gk-gray-100); border-radius: var(--radius-card);
  padding: var(--s3); cursor: pointer; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.category-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gk-gold); transform: scaleX(0); transform-origin: left; transition: transform 200ms ease; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gk-gray-300); }
.category-card:hover::before { transform: scaleX(1); }
.category-card .c-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--gk-navy-tint); color: var(--gk-navy); display: grid; place-items: center; flex: none; }
.category-card .c-icon .icon { width: 26px; height: 26px; stroke-width: 1.75; }
.category-card h3 { font-size: var(--fs-lg); }
.category-card p { color: var(--gk-gray-600); font-size: var(--fs-xs); }
.category-card .c-go { margin-top: auto; padding-top: var(--s1); display: inline-flex; align-items: center; gap: 6px; color: var(--gk-navy); font-weight: 500; font-size: var(--fs-xs); }
.category-card .c-go .icon { width: 16px; height: 16px; transition: transform var(--ease); }
.category-card:hover .c-go .icon { transform: translateX(3px); }

.kidney-band { background: var(--gk-gray-50); }
.kidney-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s6); align-items: center; }
.kidney-grid h2 { margin-bottom: var(--s2); }
.kidney-grid > div > p { color: var(--gk-gray-600); margin-bottom: var(--s3); }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-link {
  display: flex; align-items: center; gap: 12px; padding: 14px var(--s2); min-height: 64px; text-align: left;
  background: var(--gk-white); border: 1px solid var(--gk-gray-100); border-radius: var(--radius-card);
  cursor: pointer; transition: border-color var(--ease), box-shadow var(--ease);
}
.quick-link:hover { border-color: var(--gk-navy); box-shadow: var(--shadow-sm); }
.quick-link .q-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--gk-navy); color: var(--gk-white); display: grid; place-items: center; flex: none; }
.quick-link .q-icon .icon { width: 20px; height: 20px; }
.quick-link strong { display: block; color: var(--gk-navy); font-weight: 600; font-size: var(--fs-sm); }
.quick-link span span { font-size: var(--fs-xs); color: var(--gk-gray-600); }
.help-card { display: flex; gap: var(--s2); align-items: center; padding: var(--s3); border-radius: var(--radius-card); background: var(--gk-white); border-left: 4px solid var(--gk-gold); box-shadow: var(--shadow-sm); }
.help-card .h-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--gk-navy-tint); color: var(--gk-navy); display: grid; place-items: center; flex: none; }
.help-card a { font-weight: 600; font-size: var(--fs-lg); text-decoration: none; }

/* ---------- Results ---------- */
#view-results { background: var(--gk-gray-50); min-height: calc(100vh - var(--header-h)); }
.results-layout { display: grid; grid-template-columns: 264px minmax(0, 1.25fr) minmax(0, 0.85fr); gap: var(--s3); padding-top: var(--s3); padding-bottom: var(--s6); align-items: start; }

.filters {
  background: var(--gk-white); border: 1px solid var(--gk-gray-100); border-radius: var(--radius-card); padding: 20px;
  position: sticky; top: calc(var(--header-h) + var(--s3)); max-height: calc(100vh - var(--header-h) - var(--s6)); overflow-y: auto;
}
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.filters-head h2 { font-size: var(--fs-lg); }
.filter-group { padding: var(--s2) 0; border-top: 1px solid var(--gk-gray-100); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.filter-group { border-top: 1px solid var(--gk-gray-100); padding: var(--s2) 0; }
.filters-head + .filter-group { border-top: 0; padding-top: 0; }
.filter-group legend { float: left; width: 100%; }
.filter-group legend + * { clear: both; }
.filter-group legend, .filter-label { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gk-gray-600); margin-bottom: 10px; padding: 0; }
.radius-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.radius-chips button { min-height: 36px; min-width: 44px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid var(--gk-gray-300); background: var(--gk-white); font-size: var(--fs-xs); cursor: pointer; }
.radius-chips button:hover { border-color: var(--gk-navy); }
.radius-chips button[aria-pressed="true"] { background: var(--gk-navy); border-color: var(--gk-navy); color: var(--gk-white); font-weight: 500; }
.option { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: var(--fs-sm); }
.option input { width: 20px; height: 20px; accent-color: var(--gk-navy); margin: 0; flex: none; }
.option .count { margin-left: auto; color: var(--gk-gray-600); font-size: var(--fs-xs); }
.select { width: 100%; min-height: 44px; border: 1px solid var(--gk-gray-300); border-radius: var(--radius-btn); padding: 0 var(--s1); background: var(--gk-white); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 44px; cursor: pointer; font-size: var(--fs-sm); }
.toggle input { position: absolute; opacity: 0; }
.toggle .track { width: 46px; height: 26px; border-radius: 13px; background: var(--gk-gray-300); position: relative; flex: none; transition: background var(--ease); }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--gk-white); box-shadow: var(--shadow-sm); transition: transform var(--ease); }
.toggle input:checked + .track { background: var(--gk-navy); }
.toggle input:checked + .track::after { transform: translateX(20px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--gk-navy); outline-offset: 2px; }

.results-main { min-width: 0; }
.results-head { margin-bottom: var(--s2); }
.results-head h1 { font-size: 1.25rem; font-weight: 500; color: var(--gk-text); }
.results-head h1 strong { color: var(--gk-navy); font-weight: 700; font-size: 1.5rem; margin-right: 2px; }
.results-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1); margin-top: 12px; }
.active-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.active-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 6px 0 12px; border-radius: var(--radius-pill); background: var(--gk-navy); border: 0; color: var(--gk-white); font-size: var(--fs-xs); font-weight: 500; cursor: pointer; }
.active-chip .icon { width: 16px; height: 16px; opacity: 0.85; }
.active-chip:hover { background: var(--gk-navy-dark); }
.sort { display: flex; align-items: center; gap: var(--s1); font-size: var(--fs-xs); color: var(--gk-gray-600); }
.sort .select { width: auto; min-height: 38px; font-size: var(--fs-xs); }
.sample-note { display: inline-block; font-size: 0.8rem; color: var(--gk-gold-dark); background: var(--gk-gold-tint); border-radius: var(--radius-pill); padding: 2px 10px; margin-top: 6px; }

.mobile-bar { display: none; gap: var(--s1); margin-bottom: 12px; }

.result-list { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--gk-white); border-radius: var(--radius-card); padding: 18px 20px;
  border: 1px solid var(--gk-gray-100); display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s2);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.card.is-hover, .card:hover { border-color: var(--gk-gold); box-shadow: var(--shadow-md); }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--gk-navy-tint); color: var(--gk-navy); display: grid; place-items: center; font-weight: 600; font-size: var(--fs-sm); }
.avatar.org { border-radius: 12px; }
.avatar .icon { width: 24px; height: 24px; stroke-width: 1.75; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.card h3 { font-size: 1.15rem; }
.card h3 button { all: unset; cursor: pointer; }
.card h3 button:hover { text-decoration: underline; text-underline-offset: 3px; }
.card h3 button:focus-visible { outline: 3px solid var(--gk-navy); outline-offset: 2px; border-radius: 4px; }
.distance { color: var(--gk-gold-dark); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; }
.card-meta { font-size: var(--fs-sm); margin-top: 2px; }
.card-meta .specialty { font-weight: 500; }
.card-meta .more { color: var(--gk-gray-600); font-size: var(--fs-xs); }
.card-meta .group { color: var(--gk-gray-600); }
.card .address { display: flex; align-items: flex-start; gap: 6px; font-size: var(--fs-xs); color: var(--gk-text); margin-top: 6px; }
.card .address .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--gk-gray-600); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1); margin-top: 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 500; background: var(--gk-navy-tint); color: var(--gk-navy); }
.badge .icon { width: 14px; height: 14px; }
.badge.outline { background: var(--gk-white); border: 1px solid var(--gk-gold); color: var(--gk-gold-dark); }
.badge.neutral { background: var(--gk-gray-100); color: var(--gk-text); }
.card-actions { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: var(--radius-btn); border: 0; background: transparent; color: var(--gk-navy); font-weight: 500; font-size: var(--fs-xs); text-decoration: none; cursor: pointer; }
.link-btn:hover { background: var(--gk-navy-tint); }
.link-btn .icon { width: 16px; height: 16px; }

.list-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1); margin-top: var(--s2); }
.load-more { display: flex; justify-content: center; margin-top: var(--s2); }
.load-more[hidden] { display: none; }

.empty-state { background: var(--gk-white); border: 1px solid var(--gk-gray-100); border-radius: var(--radius-card); padding: var(--s5) var(--s3); text-align: center; }
.empty-state .e-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--gk-navy-tint); color: var(--gk-navy); display: grid; place-items: center; margin: 0 auto var(--s2); }
.empty-state .e-icon .icon { width: 34px; height: 34px; stroke-width: 1.75; }
.empty-state h2 { font-size: var(--fs-h3); }
.empty-state p { color: var(--gk-gray-600); max-width: 460px; margin: var(--s1) auto var(--s3); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1); }

.map-col { position: sticky; top: calc(var(--header-h) + var(--s3)); }
.map { height: calc(100vh - var(--header-h) - var(--s6)); min-height: 420px; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--gk-gray-100); background: var(--gk-gray-50); }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--gk-navy); border: 3px solid var(--gk-white); box-shadow: var(--shadow-md); transition: background var(--ease), transform var(--ease); }
.pin.is-active { background: var(--gk-gold); border-color: var(--gk-navy); transform: rotate(-45deg) scale(1.25); }
.leaflet-container { font-family: inherit; }
.map-col { position: sticky; }
.map-search-area { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 500; box-shadow: var(--shadow-md); }
.map-search-area[hidden] { display: none; }
/* Clustered pins: navy circles with a count; gold ring when it holds the hovered card */
.gk-cluster {
  display: grid; place-items: center; border-radius: 50%; color: var(--gk-white); font-weight: 600; font-size: 0.85rem;
  background: var(--gk-navy); border: 3px solid rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 4px rgba(17, 79, 109, 0.25), var(--shadow-md);
  transition: transform var(--ease), background var(--ease);
}
.gk-cluster.is-active { background: var(--gk-gold); color: var(--gk-navy-deep); border-color: var(--gk-navy); transform: scale(1.15); }
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { transition: transform 0.25s ease-out, opacity 0.25s ease-in; }
button.loc-item { width: 100%; text-align: left; background: var(--gk-white); color: var(--gk-text); font: inherit; font-size: var(--fs-sm); }
.loc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.loc-map { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--gk-navy); font-weight: 500; }
.loc-map .icon { width: 14px; height: 14px; }
.loc-item[data-locate] { cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.loc-item[data-locate]:hover { border-color: var(--gk-navy); background: var(--gk-navy-tint); }
.browse-link { margin-top: 6px; padding-left: 4px; }

/* Browse specialties panel */
.browse-panel { display: flex; flex-direction: column; }
.browse-head { position: sticky; top: 0; background: var(--gk-white); border-bottom: 1px solid var(--gk-gray-100); padding: var(--s2) var(--s3); z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.browse-title-row { display: flex; justify-content: space-between; align-items: center; }
.browse-title-row h2 { font-size: var(--fs-h3); }
.letter-bar { display: flex; flex-wrap: wrap; gap: 2px; }
.letter-bar button { min-width: 28px; min-height: 32px; border: 0; background: none; border-radius: 6px; color: var(--gk-navy); font-weight: 600; font-size: var(--fs-xs); cursor: pointer; }
.letter-bar button:hover { background: var(--gk-navy-tint); }
.letter-bar button:disabled { color: var(--gk-gray-300); cursor: default; background: none; }
.browse-body { padding: var(--s1) var(--s3) var(--s4); overflow-y: auto; }
.browse-letter { font-size: var(--fs-lg); color: var(--gk-gold-dark); font-weight: 600; margin: var(--s2) 0 4px; scroll-margin-top: 170px; }
.browse-item { display: block; width: 100%; text-align: left; border: 0; background: none; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.browse-item:hover, .browse-item:focus-visible { background: var(--gk-navy-tint); }
.browse-item strong { color: var(--gk-navy); font-weight: 600; }
.browse-item .count { color: var(--gk-gray-600); font-size: var(--fs-xs); margin-left: 6px; }
.browse-item p { font-size: var(--fs-xs); color: var(--gk-gray-600); }
.browse-empty { color: var(--gk-gray-600); padding: var(--s3) 0; }
/* Calm the free OpenStreetMap tiles so the navy pins carry the map */
.leaflet-tile-pane { filter: grayscale(1) brightness(1.1) contrast(0.78); opacity: 0.85; }

/* ---------- Detail panel ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8, 44, 62, 0.4); z-index: 60; opacity: 0; pointer-events: none; transition: opacity var(--ease); }
.scrim.open { opacity: 1; pointer-events: auto; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); z-index: 70; background: var(--gk-white); box-shadow: var(--shadow-lg); overflow-y: auto; transform: translateX(100%); transition: transform 200ms cubic-bezier(0.2, 0, 0, 1); visibility: hidden; }
.panel.open { transform: none; visibility: visible; }
.panel-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: 12px var(--s2) 0; }
.panel-hero { background: var(--gk-navy); color: var(--gk-white); padding: var(--s5) var(--s3) var(--s3); margin-top: -56px; display: flex; gap: var(--s2); align-items: center; }
.panel-hero .avatar { width: 64px; height: 64px; font-size: var(--fs-lg); background: rgba(255, 255, 255, 0.12); color: var(--gk-white); border: 2px solid var(--gk-gold); }
.panel-hero h2 { color: var(--gk-white); font-size: var(--fs-h3); }
.panel-hero p { color: rgba(255, 255, 255, 0.85); }
.panel-hero .badges .badge { background: rgba(255, 255, 255, 0.14); color: var(--gk-white); }
.panel-head .btn-ghost { color: var(--gk-white); background: rgba(255, 255, 255, 0.12); }
.panel-head .btn-ghost:hover { background: rgba(255, 255, 255, 0.24); }
.panel-body { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.panel-actions { display: flex; flex-wrap: wrap; gap: var(--s1); }
.panel-actions .btn { flex: 1 1 140px; min-width: 0; padding: 0 var(--s2); }
.panel-section h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gk-gray-600); margin-bottom: 10px; }
.panel-section ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.loc-item { border: 1px solid var(--gk-gray-100); border-radius: 10px; padding: 12px var(--s2); display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--fs-sm); }
.spec-item strong { color: var(--gk-navy); font-weight: 600; }
.spec-item p { font-size: var(--fs-xs); color: var(--gk-gray-600); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s2); font-size: var(--fs-sm); margin: 0; }
.kv dt { color: var(--gk-gray-600); }
.kv dd { margin: 0; }
.kv a { display: inline-flex; align-items: center; gap: 4px; }
.kv a .icon { width: 16px; height: 16px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: var(--s3); transform: translate(-50%, 20px); z-index: 80; background: var(--gk-navy-deep); color: var(--gk-white); padding: 12px var(--s3); border-radius: var(--radius-btn); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity var(--ease), transform var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
.site-footer { background: var(--gk-navy-deep); color: var(--gk-white); padding: var(--s6) 0 var(--s4); font-size: var(--fs-xs); border-top: 4px solid var(--gk-gold); }
.site-footer a { color: var(--gk-white); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s4); }
.footer-grid h2 { color: var(--gk-white); font-size: var(--fs-sm); margin-bottom: var(--s1); }
.footer-grid .big-phone { font-size: 1.6rem; font-weight: 600; text-decoration: none; display: inline-block; margin: 2px 0 4px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-grid p, .footer-grid li { color: rgba(255, 255, 255, 0.85); }
.footer-info { margin-top: var(--s4); border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: var(--s2); }
.footer-info summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: var(--s1); }
.footer-info p { color: rgba(255, 255, 255, 0.85); margin-top: var(--s1); max-width: 900px; }
.footer-legal { margin-top: var(--s3); color: rgba(255, 255, 255, 0.7); }

[data-view][hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .results-layout { grid-template-columns: 248px minmax(0, 1.3fr) minmax(0, 0.8fr); }
}

@media (max-width: 1023px) {
  .results-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 70; max-height: 85vh; border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); transform: translateY(100%); transition: transform 200ms cubic-bezier(0.2, 0, 0, 1); visibility: hidden; }
  .filters.open { transform: none; visibility: visible; }
  .filters .sheet-done { display: flex; }
  .mobile-bar { display: flex; }
  .map-col { display: none; position: static; }
  body.show-map .map-col { display: block; }
  body.show-map .result-list, body.show-map .load-more, body.show-map .list-footer { display: none; }
  .map { height: 70vh; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .kidney-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.filters .sheet-done { display: none; margin-top: var(--s2); }
.filters .sheet-done .btn { width: 100%; }

@media (max-width: 639px) {
  :root { --fs-h1: 1.75rem; --fs-h2: 1.5rem; --fs-h3: 1.25rem; --header-h: 64px; }
  .container { padding: 0 var(--s2); }
  .logo-link img { height: 32px; }
  .utility-bar .container { justify-content: center; }
  .site-header .container { flex-wrap: wrap; gap: var(--s1); padding-top: 10px; padding-bottom: 10px; }
  body.view-results .header-search { flex-basis: 100%; }
  .hero { padding: var(--s6) 0 var(--s5); }
  .hero h1 { font-size: 2rem; }
  .hero::after { width: 320px; height: 320px; right: -160px; top: -120px; }
  .search-bar { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; padding-right: var(--s2); }
  .location-pill { flex: 1; border-left: 0; border-top: 1px solid var(--gk-gray-100); margin: 0; padding: 12px 20px; min-height: 48px; }
  .search-bar:not(.compact) .btn-primary { flex-basis: calc(100% - 14px); min-height: 50px; }
  .search-bar.compact .search-field { flex-basis: auto; flex: 1; }
  .search-bar.compact .location-pill { flex: none; border-top: 0; border-left: 1px solid var(--gk-gray-100); margin: 8px 0; padding: 0 10px; min-height: 0; }
  .search-bar.compact .location-pill > span, .search-bar.compact .location-pill .icon:last-child { display: none; }
  .loc-pop { left: 0; right: 0; width: auto; }
  .section { padding: var(--s6) 0; }
  .section-head { display: block; }
  .category-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-card { display: grid; grid-template-columns: 52px 1fr; column-gap: var(--s2); row-gap: 2px; padding: var(--s2); }
  .category-card .c-icon { grid-row: span 2; }
  .category-card .c-go { display: none; }
  .quick-links { grid-template-columns: 1fr; }
  .card { grid-template-columns: 1fr; padding: var(--s2); }
  .card .avatar { display: none; }
  .card-actions { margin-left: 0; width: 100%; justify-content: space-between; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---------- Print ---------- */
.print-sheet { display: none; }
@media print {
  @page { margin: 12mm; }
  html { font-size: 10pt; }
  body { background: #fff; }
  /* Results page: print only the compact list built by buildPrintSheet() */
  body.has-print-sheet > *:not(.print-sheet) { display: none !important; }
  body.has-print-sheet .print-sheet { display: block; }
  .print-head { display: flex; gap: 16px; align-items: flex-start; border-bottom: 2px solid #114F6D; padding-bottom: 8px; margin-bottom: 10px; }
  .print-head img { height: 32px; width: auto; }
  .print-head h1 { font-size: 13pt; font-weight: 600; color: #114F6D; margin-bottom: 2px; }
  .print-head p { font-size: 8.5pt; color: #444; }
  .print-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
  .print-table th { text-align: left; border-bottom: 1px solid #114F6D; padding: 4px 6px; color: #114F6D; }
  .print-table td { border-bottom: 1px solid #ddd; padding: 5px 6px; vertical-align: top; }
  .print-table tr { break-inside: avoid; }
  .print-table td:last-child { white-space: nowrap; }
  /* Any other page: drop chrome that makes no sense on paper */
  .preview-banner, .utility-bar, .header-search, .suggestions, .toast, .scrim, .panel { display: none !important; }
  .hero { background: none !important; color: #000; padding: 0; }
}
