/* Gold Kidney Provider Search: design tokens + components (REQUIREMENTS.md §5)
   Look: Design A "Concierge" (chosen by the business 10/14/2026): warm cream page, white rounded cards, pill search.
   Gold is an accent only: tile icons, 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: #F6EDDF;
  --gk-page: #FBF8F3;          /* warm cream page background */
  --gk-line: #ECE6DC;          /* card borders on cream */
  --gk-line-2: #DDD5C8;        /* control borders */
  --gk-ink-2: #4A5961;         /* softer body text, 7:1 on cream */
  --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-green: #1E6B3A;         /* "Accepting new patients": 5.6:1 on its tint */
  --gk-green-tint: #E3F2E7;
  --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: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(60, 40, 10, 0.04), 0 8px 24px rgba(60, 40, 10, 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 24px 60px rgba(8, 44, 62, 0.20);
  --ease: 160ms cubic-bezier(0.2, 0, 0, 1);
  --header-h: 72px;
}

*, *::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-page); 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; }

.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);
}
.site-header { background: rgba(251, 248, 243, 0.94); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--gk-line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--header-h); }
.logo-link { display: inline-flex; flex: none; border-radius: 4px; }
.logo-link img { height: 40px; width: auto; }
.help-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 var(--s2);
  background: var(--gk-white); border: 1px solid var(--gk-line-2); border-radius: var(--radius-pill);
  color: var(--gk-navy); font-weight: 500; font-size: var(--fs-xs); text-decoration: none; white-space: nowrap;
}
.help-pill:hover { border-color: var(--gk-navy); }

/* ---------- 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-gold { background: var(--gk-gold); color: var(--gk-navy-deep); border-radius: var(--radius-pill); font-weight: 600; }
.btn-gold:hover { background: #DDB679; }
.btn-sm { min-height: 40px; padding: 0 var(--s2); font-size: var(--fs-xs); }

/* ---------- Search bar ---------- */
/* One rounded bar: what (search) | where (city or ZIP) | button. Each field has its own suggestion list. */
.search-bar {
  display: flex; align-items: center; position: relative; color: var(--gk-text);
  background: var(--gk-white); border: 1.5px solid var(--gk-line-2); border-radius: var(--radius-pill);
  padding: 6px; box-shadow: var(--shadow-sm); transition: border-color var(--ease), box-shadow var(--ease);
}
.search-bar:focus-within { border-color: var(--gk-navy); box-shadow: 0 0 0 5px rgba(17, 79, 109, 0.10), var(--shadow-sm); }
.search-field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 16px; min-width: 0; position: relative; }
.search-field.loc { flex: 0 0 220px; border-left: 1px solid var(--gk-line); }
.search-field .icon { color: var(--gk-navy); width: 20px; height: 20px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: var(--fs-lg); padding: 0; min-height: 56px; }
.search-field input::placeholder { color: var(--gk-gray-600); }
.search-field input:focus-visible { outline: none; }   /* the whole bar shows focus */
/* Our own clear (✕) button, shown whenever the box has text; the browser's built-in one is hidden
   because it only exists in some browsers and doesn't reset the results. */
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search-clear {
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: -4px;
  border: 0; border-radius: 50%; background: transparent; color: var(--gk-gray-600); cursor: pointer;
}
.search-clear[hidden] { display: none; }
.search-clear:hover { background: var(--gk-gray-100); color: var(--gk-navy); }
.search-field .search-clear .icon { width: 20px; height: 20px; color: inherit; }
.search-bar .btn-primary { min-height: 56px; padding: 0 var(--s4); border-radius: var(--radius-pill); font-size: var(--fs-lg); font-weight: 600; }
.search-bar .btn-primary .icon { width: 20px; height: 20px; }

/* Results page: the same bar, a little smaller and flatter */
.search-bar.compact { box-shadow: none; }
.search-bar.compact .search-field input { min-height: 48px; font-size: var(--fs-sm); }
.search-bar.compact .search-clear { width: 34px; height: 34px; }
.search-bar.compact .search-clear .icon { width: 18px; height: 18px; }
.search-bar.compact .btn-primary { min-height: 48px; font-size: var(--fs-sm); padding: 0 var(--s3); }

/* Text field with an icon (the A–Z specialty filter) */
.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; }

/* Autocomplete (under the search field, or under the location field) */
.suggestions {
  position: absolute; left: 0; top: calc(100% + 14px); z-index: 50; width: max(100%, 440px); text-align: left;
  background: var(--gk-white); border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--gk-line); padding: var(--s1) 0; max-height: 440px; overflow-y: auto;
}
.search-field.loc .suggestions { left: auto; right: 0; width: min(360px, calc(100vw - 32px)); }
.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 (Design A): welcome, must-haves, care tiles, type of care, call band ---------- */
.welcome { position: relative; text-align: center; padding: var(--s8) 0 var(--s5); }
.welcome::before {   /* soft gold glow behind the question */
  content: ""; position: absolute; inset: -40% -10% auto; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(209, 165, 101, 0.22), transparent 70%);
}
.welcome .hello { font-size: var(--fs-xs); font-weight: 600; color: var(--gk-gold-dark); letter-spacing: 0.16em; text-transform: uppercase; }
.welcome h1 { font-size: 3rem; font-weight: 600; color: var(--gk-navy-deep); letter-spacing: -0.01em; max-width: 780px; margin: 14px auto 12px; }
.welcome .lede { color: var(--gk-ink-2); font-size: var(--fs-lg); max-width: 620px; margin: 0 auto var(--s4); }
.welcome .search-bar { max-width: 860px; margin: 0 auto; }

.musts { margin-top: var(--s3); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.musts > span[data-musts] { display: contents; }
.musts-label { font-size: var(--fs-xs); color: var(--gk-ink-2); margin-right: 4px; }
.must {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 var(--s2);
  border: 1.5px solid var(--gk-line-2); background: var(--gk-white); border-radius: var(--radius-pill);
  font-size: var(--fs-xs); cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.must:hover { border-color: var(--gk-navy); }
.must .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--gk-line-2); display: grid; place-items: center; }
.must .tick .icon { width: 12px; height: 12px; stroke-width: 3; opacity: 0; }
.must[aria-pressed="true"] { background: var(--gk-navy); border-color: var(--gk-navy); color: var(--gk-white); }
.must[aria-pressed="true"] .tick { background: var(--gk-white); border-color: var(--gk-white); color: var(--gk-navy); }
.must[aria-pressed="true"] .tick .icon { opacity: 1; }

.home-clear { font-size: var(--fs-xs); text-decoration: underline; }
.home-clear[hidden] { display: none; }

.chip {   /* "Did you mean" buttons */
  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-line-2); background: var(--gk-white);
  color: var(--gk-navy); font-weight: 500; font-size: var(--fs-xs); cursor: pointer;
}
.chip:hover { border-color: var(--gk-navy); background: var(--gk-navy-tint); }

.section { padding: var(--s3) 0 var(--s8); }
.start-title { text-align: center; font-size: var(--fs-lg); font-weight: 600; color: var(--gk-ink-2); margin: 0 0 20px; }
.start-title:not(:first-child) { margin-top: var(--s6); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.tile {
  display: flex; align-items: center; gap: var(--s2); padding: 22px; text-align: left; cursor: pointer;
  background: var(--gk-white); border: 1px solid var(--gk-line); border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  transition: transform var(--ease), border-color var(--ease);
}
.tile:hover { transform: translateY(-3px); border-color: var(--gk-gold); }
.tile .t-icon, .category-card .c-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--gk-gold-tint); color: var(--gk-gold-dark); display: grid; place-items: center; flex: none; }
.tile .t-icon .icon, .category-card .c-icon .icon { width: 24px; height: 24px; stroke-width: 1.75; }
.tile .t-text strong { display: block; font-size: var(--fs-lg); font-weight: 600; color: var(--gk-navy-deep); }
.tile .t-text span { font-size: var(--fs-xs); color: var(--gk-gray-600); }
.tile .t-count { margin-left: auto; text-align: right; font-size: 0.8rem; color: var(--gk-gray-600); white-space: nowrap; }
.tile .t-count strong { display: block; font-size: 1.3rem; font-weight: 600; color: var(--gk-navy); }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.category-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 22px; cursor: pointer;
  background: var(--gk-white); border: 1px solid var(--gk-line); border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  transition: transform var(--ease), border-color var(--ease);
}
.category-card:hover { transform: translateY(-3px); border-color: var(--gk-gold); }
.category-card h3 { font-size: var(--fs-lg); color: var(--gk-navy-deep); }
.category-card p { color: var(--gk-gray-600); font-size: var(--fs-xs); }
.category-card .c-go { margin-top: auto; padding-top: 4px; 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); }

.reassure {
  margin-top: var(--s6); display: flex; align-items: center; gap: 20px; padding: 26px 30px;
  background: var(--gk-navy-deep); color: var(--gk-white); border-radius: 22px;
}
.reassure .r-icon { width: 54px; height: 54px; border-radius: 50%; background: rgba(209, 165, 101, 0.18); color: var(--gk-gold); display: grid; place-items: center; flex: none; }
.reassure .r-icon .icon { width: 26px; height: 26px; }
.reassure h2 { color: var(--gk-white); font-size: var(--fs-lg); }
.reassure p { color: rgba(255, 255, 255, 0.85); font-size: var(--fs-xs); }
.reassure .btn-gold { margin-left: auto; }
.reassure :focus-visible { outline-color: var(--gk-white); }

/* ---------- Results (Design A): one calm column; filters in a drawer; the map behind "Show map" ---------- */
#view-results { min-height: calc(100vh - var(--header-h)); }
.results-search, .results-layout { max-width: 960px; }
.results-search { display: none; padding-top: var(--s3); }   /* the search bar at the top of the results page */
body.view-results .results-search { display: block; }
.results-layout { padding-top: var(--s3); padding-bottom: var(--s6); }

/* Gray placeholder cards while the data loads */
.skeleton { background: var(--gk-line); border-radius: 8px; }
.skeleton.line { height: 16px; width: 55%; }
.skeleton.line + .skeleton.line { margin-top: 10px; }
.skeleton.short { width: 75%; }
.skeleton.shorter { width: 60%; }

/* "More filters" drawer: slides in from the left (a bottom sheet on phones) */
.filters {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: min(400px, 100%); padding: 20px 24px;
  background: var(--gk-white); box-shadow: var(--shadow-lg); overflow-y: auto; overflow-x: hidden;
  transform: translateX(-100%); visibility: hidden; transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
}
.filters.open { transform: none; visibility: visible; }
.filters-head { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.filters-head h2 { font-size: var(--fs-lg); margin-right: auto; }
.filters .sheet-done { position: sticky; bottom: -20px; margin: var(--s2) -24px -20px; padding: 12px 24px 20px; background: var(--gk-white); border-top: 1px solid var(--gk-line); }
.filters .sheet-done .btn { width: 100%; }
.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; }
.filter-note { margin-top: 10px; font-size: 0.8rem; line-height: 1.4; color: var(--gk-gray-600); }
.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; }
/* overflow-wrap: a long option name wraps instead of widening the panel */
.option { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: var(--fs-sm); line-height: 1.3; overflow-wrap: anywhere; }
.option input { width: 20px; height: 20px; accent-color: var(--gk-navy); margin: 0; flex: none; }
.option .count { margin-left: auto; padding-left: 8px; flex: none; white-space: nowrap; 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; padding: 4px 0; line-height: 1.3; 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; }

/* Title (left) with More filters / Show map (top right); quick filters; then chips, distance, sort, downloads */
.results-head { display: flex; align-items: flex-start; gap: var(--s2); }
.results-head-text { flex: 1; min-width: 0; }
.head-actions { display: flex; gap: 8px; flex: none; padding-top: 4px; }
.head-actions .btn-secondary { border-width: 1.5px; border-color: var(--gk-line-2); border-radius: var(--radius-pill); }
.head-actions .btn-secondary:hover, .head-actions .btn-secondary[aria-pressed="true"] { border-color: var(--gk-navy); }
.results-head h1 { font-size: 1.75rem; font-weight: 600; color: var(--gk-navy-deep); letter-spacing: -0.01em; }
.results-head h1 strong { font-weight: 600; }
.results-sub { color: var(--gk-ink-2); margin-top: 4px; }
.results-sub strong { color: var(--gk-green); font-weight: 600; }
.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; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--gk-line); }
.results-bar[hidden] { display: none; }
.quick-label { font-size: var(--fs-xs); color: var(--gk-ink-2); margin-right: 4px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.results-bar .must { min-height: 40px; padding: 0 14px; }
.results-bar .must .n { font-size: 0.78rem; opacity: 0.75; }
.filter-count { font-weight: 600; }
.results-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin: 14px 0 var(--s2); }
.results-clear { text-decoration: underline; min-height: 34px; }
.results-clear[hidden] { display: none; }
.bar-selects { display: inline-flex; gap: 8px; margin-left: auto; }
.bar-selects .select { width: auto; min-height: 40px; border: 1.5px solid var(--gk-line-2); border-radius: var(--radius-pill); padding: 0 12px; font-size: var(--fs-xs); cursor: pointer; }
.tool-links { display: flex; gap: 2px; }
.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); }

/* Cards: who and where | Call, See details, Directions */
.result-list { display: flex; flex-direction: column; gap: 14px; }
.card {
  background: var(--gk-white); border: 1px solid var(--gk-line); border-radius: 22px; padding: 22px 24px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: start;
  transition: border-color var(--ease);
}
.card.is-hover, .card:hover { border-color: var(--gk-gold); }
.avatar { width: 56px; height: 56px; 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: 16px; background: var(--gk-gold-tint); color: var(--gk-gold-dark); }
.avatar .icon { width: 24px; height: 24px; stroke-width: 1.75; }
.card h3 { font-size: 1.2rem; color: var(--gk-navy-deep); }
.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; white-space: nowrap; margin-left: 4px; }
.card-meta { font-size: var(--fs-xs); color: var(--gk-ink-2); margin-top: 2px; }
.card-meta .more, .card-meta .group { color: var(--gk-gray-600); }
.card .address { display: flex; align-items: flex-start; gap: 6px; font-size: var(--fs-xs); margin-top: 10px; }
.card .address .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--gk-gray-600); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badges:empty { display: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 500; background: var(--gk-navy-tint); color: var(--gk-navy); white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; stroke-width: 2.5; }
.badge.outline { background: var(--gk-white); border: 1px solid var(--gk-gold); color: var(--gk-gold-dark); }
.badge.neutral { background: var(--gk-page); color: var(--gk-text); border: 1px solid var(--gk-line); }
.badge.success { background: var(--gk-green-tint); color: var(--gk-green); }
.card-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 180px; }
.card-actions .btn { border-radius: var(--radius-pill); font-weight: 600; font-size: var(--fs-xs); padding: 0 var(--s2); }
.card-actions .btn-secondary { border-width: 1.5px; }
.card-actions .link-btn { justify-content: center; min-height: 36px; }
.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; }

.load-more { display: flex; justify-content: center; margin-top: 22px; }
.load-more[hidden] { display: none; }
.load-more .btn { border-radius: var(--radius-pill); border-width: 1.5px; font-weight: 600; }

.empty-state { background: var(--gk-white); border: 1px solid var(--gk-line); border-radius: 22px; 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); }
.dym-label { margin-bottom: var(--s1); }
.empty-actions.dym { margin-bottom: var(--s3); }

/* "Show map": the map takes the list's place */
.map-col { display: none; position: relative; }
body.show-map .map-col { display: block; }
body.show-map .result-list, body.show-map .load-more { display: none; }
.map { height: 70vh; min-height: 420px; border-radius: 22px; overflow: hidden; border: 1px solid var(--gk-line); 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-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; }
/* Design A details panel: navy header, three Yes/No tiles, Call + Directions, small map, then the details */
.panel-hero { background: linear-gradient(135deg, var(--gk-navy-deep), var(--gk-navy)); color: var(--gk-white); padding: 22px var(--s3) 22px; margin-top: -56px; }
.panel-hero .avatar { width: 56px; height: 56px; font-size: var(--fs-sm); background: rgba(255, 255, 255, 0.14); color: var(--gk-white); border: 2px solid var(--gk-gold); border-radius: 50%; }
.panel-hero h2 { color: var(--gk-white); font-size: 1.45rem; font-weight: 600; margin: 12px 0 2px; }
.panel-hero p { color: rgba(255, 255, 255, 0.85); }
.panel-hero .badges { margin-top: 10px; }
.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.14); border-radius: 10px; }
.panel-head .btn-ghost:hover { background: rgba(255, 255, 255, 0.26); }
.panel-body { padding: 20px var(--s3) var(--s4); display: flex; flex-direction: column; gap: 20px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.facts.two { grid-template-columns: 1fr 2fr; }
.fact { display: flex; gap: 8px; align-items: flex-start; background: var(--gk-navy-tint); border-radius: 12px; padding: 10px 12px; font-size: 0.75rem; color: var(--gk-gray-600); }
.fact .icon { color: var(--gk-navy); width: 16px; height: 16px; margin-top: 2px; }
.fact strong { display: block; color: var(--gk-navy-deep); font-size: 0.92rem; font-weight: 600; }
.facts-note { font-size: 0.8rem; color: var(--gk-gray-600); margin-top: -12px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-actions .btn { flex: 1 1 160px; min-width: 0; padding: 0 var(--s2); border-radius: var(--radius-pill); font-weight: 600; }
.panel-actions .btn-secondary { border-width: 1.5px; }
.panel-actions .link-btn { flex-basis: 100%; justify-content: center; }
.minimap { height: 170px; border-radius: 14px; overflow: hidden; border: 1px solid var(--gk-line); }
.map-credit { font-size: 0.7rem; color: var(--gk-gray-600); text-align: right; margin: 4px 0 10px; }
.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-line); border-radius: 14px; padding: 12px var(--s2); display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--fs-sm); }
/* A location = the map button on top + phone and Yes/No facts underneath, in one box */
.loc-entry { border: 1px solid var(--gk-line); border-radius: 14px; overflow: hidden; }
.loc-entry > .loc-item { border: 0; border-radius: 0; }
.loc-facts { padding: 0 var(--s2) 12px; display: flex; flex-direction: column; gap: 6px; }
.loc-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--fs-sm); color: var(--gk-navy); text-decoration: none; align-self: flex-start; }
.loc-phone:hover { text-decoration: underline; }
.loc-phone .icon { width: 16px; height: 16px; }
.loc-phone.muted { font-weight: 400; font-size: var(--fs-xs); color: var(--gk-gray-600); }
.kv.kv-sm { font-size: var(--fs-xs); gap: 2px var(--s2); }
.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: 1023px) {
  .category-grid, .tiles { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@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; }
  .help-pill .help-number { display: none; }   /* "Need help?" still calls */
  .welcome { padding: var(--s5) 0 var(--s4); }
  .welcome h1 { font-size: 2rem; }
  /* Search bar stacks: what, then where, then the button */
  .search-bar { flex-wrap: wrap; border-radius: 22px; }
  .search-field, .search-field.loc { flex: 1 1 100%; }
  .search-field.loc { border-left: 0; border-top: 1px solid var(--gk-line); }
  .search-bar .btn-primary { flex: 1 1 100%; margin-top: 4px; }
  .suggestions, .search-field.loc .suggestions { left: 0; right: auto; width: 100%; }
  .section { padding: var(--s2) 0 var(--s6); }
  .tiles, .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; }
  .reassure { flex-direction: column; text-align: center; }
  .reassure .btn-gold { margin: 0 auto; white-space: normal; }
  /* Results: filters as a bottom sheet; cards stack with the buttons underneath */
  .filters { top: auto; right: 0; width: auto; max-height: 85vh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
  .results-head { flex-direction: column; }
  .results-head h1 { font-size: 1.4rem; }
  .bar-selects { flex: 1 1 100%; }
  .bar-selects label { flex: 1; }
  .bar-selects .select { width: 100%; }
  .card { grid-template-columns: 1fr; padding: var(--s2); gap: 12px; }
  .card .avatar { display: none; }
  .card-actions { min-width: 0; flex-direction: row; flex-wrap: wrap; }
  .card-actions .btn { flex: 1 1 140px; }
  .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, .help-pill, .results-search, .suggestions, .toast, .scrim, .panel { display: none !important; }
  .welcome::before { display: none; }
}
