:root {
  --ink: #0c1b2a;
  --muted: #5a6a7d;
  --line: #d5deea;
  --bg: #f3f6fb;
  --card: #ffffff;
  --accent: #1a4f8c;
  --accent-ink: #0f3a6b;
  --accent-2: #1565a8;
  --accent-soft: #e7f0fa;
  --header: #0c2744;
  --header-2: #123a5f;
  --warn-bg: #fff8e8;
  --warn-line: #e4d09a;
  --warn-ink: #5a4510;
  --featured-bg: #f4f0ff;
  --featured-line: #c9bff0;
  --featured-ink: #3d2f7a;
  --ok: #0a6b4a;
  --ok-soft: #e6f3ed;
  --shadow: 0 1px 2px rgba(12, 39, 68, 0.06), 0 10px 28px rgba(12, 39, 68, 0.07);
  --radius: 8px;
  --radius-sm: 5px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header {
  background: linear-gradient(180deg, var(--header) 0%, var(--header-2) 100%);
  color: #fff;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(12, 39, 68, 0.25);
}
.site-header a { color: #fff; text-decoration: none; }
.topbar { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.wordmark { font-weight: 800; letter-spacing: -0.02em; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.wordmark .mark {
  width: 28px; height: 28px; border-radius: 5px; background: #fff;
  color: var(--header); font-size: 11px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}
.site-nav { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.site-nav a { opacity: 0.92; padding: 6px 0; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; opacity: 1; }

/* Photo hero */
.hero-photo {
  position: relative;
  color: #fff;
  background: var(--header) center/cover no-repeat;
  min-height: 420px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero-photo::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(8, 28, 52, 0.92) 0%, rgba(12, 39, 68, 0.78) 48%, rgba(12, 39, 68, 0.45) 100%);
}
.hero-photo .wrap { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 40px; width: 100%; }
.hero-photo-grid {
  display: grid; gap: 24px; align-items: end;
}
@media (min-width: 900px) {
  .hero-photo-grid { grid-template-columns: 1.25fr 0.95fr; }
}
.hero-photo .eyebrow { color: #9ec5ef; }
.hero-photo h1 { color: #fff; margin-bottom: 12px; }
.hero-photo .intro { color: #d7e6f7; max-width: 52ch; }
.hero-photo .intro a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hero-photo .btn { background: #fff; color: var(--accent-ink); }
.hero-photo .btn:hover { background: #e7f0fa; color: var(--accent-ink); }
.hero-photo .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.hero-photo .btn-secondary:hover { background: rgba(255,255,255,0.12); color: #fff; }
.photo-credit {
  position: absolute; right: 14px; bottom: 8px; z-index: 2;
  font-size: 11px; color: rgba(255,255,255,0.7);
}
.photo-credit a { color: inherit; }

.hero { padding: 28px 0 8px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.07em; font-size: 11px;
  color: var(--accent); font-weight: 800; margin: 0 0 8px;
}
h1 { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.12; margin: 0 0 12px; letter-spacing: -0.03em; }
h2 { font-size: 1.3rem; margin: 28px 0 12px; letter-spacing: -0.02em; }
.intro { font-size: 17px; color: var(--muted); max-width: 62ch; margin: 0; }

.notice {
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 16px 0;
}
.rebate-box, .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 16px 0; box-shadow: var(--shadow);
}
.rebate-box {
  border-left: 4px solid var(--accent);
  background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
}
.rebate-box h2, .panel h2 { margin: 0 0 8px; font-size: 17px; }
.rebate-box ul { margin: 8px 0 0; padding-left: 1.15em; }
.rebate-box .checked, .panel .checked { font-size: 13px; color: var(--muted); margin-top: 10px; }

.search-panel {
  background: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); color: var(--ink);
}
.search-panel label {
  display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.search-row { display: flex; gap: 8px; flex-wrap: wrap; }
.search-row input[type="search"], .search-row select, .filter-bar select, .filter-bar input {
  flex: 1 1 160px; min-width: 0; padding: 12px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--ink);
}
.search-row button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.search-row button:hover, .btn:hover { background: var(--accent-ink); color: #fff; }
.btn-secondary {
  background: #fff; color: var(--accent-ink); border-color: var(--line);
}
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

/* Trust chips — rectangular only */
.trust-row {
  display: grid; gap: 10px; margin: 18px 0 8px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.trust-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px; font-size: 13px; box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}
.trust-item strong { display: block; font-size: 14px; margin-bottom: 4px; color: var(--accent-ink); }

.featured-slot {
  background: var(--featured-bg); border: 1px dashed var(--featured-line);
  border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; color: var(--featured-ink);
}
.featured-slot .label {
  display: inline-block; background: var(--featured-ink); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px; margin-bottom: 8px;
}
.featured-slot p { margin: 0 0 8px; font-size: 14px; }

.claim-cta {
  display: grid; gap: 12px; align-items: center;
  background: var(--accent-soft); border: 1px solid #b7cce4; border-radius: var(--radius);
  padding: 16px 18px; margin: 22px 0;
}
@media (min-width: 720px) { .claim-cta { grid-template-columns: 1fr auto; } }
.claim-cta h2 { margin: 0 0 4px; font-size: 17px; }
.claim-cta p { margin: 0; font-size: 14px; color: var(--muted); }

/* Stats strip */
.stats-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 18px 0; box-shadow: var(--shadow);
}
.stats-strip .stat {
  background: var(--card); padding: 16px 14px; text-align: center;
}
.stats-strip .stat b { display: block; font-size: 24px; letter-spacing: -0.03em; color: var(--accent-ink); }
.stats-strip .stat span { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* Map */
.map-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 18px 0; box-shadow: var(--shadow);
  display: grid; gap: 18px;
}
@media (min-width: 860px) {
  .map-panel { grid-template-columns: 1.2fr 0.8fr; align-items: center; }
}
.map-panel h2 { margin: 0 0 6px; }
.map-frame {
  background: #f4f7fb; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px;
}
.map-frame svg, .map-frame object, .map-frame img { width: 100%; height: auto; }
.county-legend { display: grid; gap: 8px; }
.county-legend a {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  text-decoration: none; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
}
.county-legend a:hover { border-color: var(--accent); background: var(--accent-soft); }
.county-legend .n { font-weight: 800; color: var(--accent-ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 14px 0 24px; }
.grid-list { display: grid; gap: 14px; margin: 14px 0 24px; }

/* Listing cards — logo left, content, CTA */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.card-list {
  flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 14px;
  padding: 16px;
}
.firm-logo {
  flex: 0 0 72px; width: 72px; height: 72px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.firm-logo img {
  width: 100%; height: 100%; object-fit: contain; padding: 6px;
}
.firm-logo .initials {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #e7f0fa, #d5e4f5);
  color: var(--accent-ink); font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
}
.card-list .card-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card-list .card-side {
  flex: 0 0 150px; display: flex; flex-direction: column; gap: 8px;
  align-items: stretch; justify-content: center;
}
.card h3 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { color: var(--accent-2); }
.meta { font-size: 13px; color: var(--muted); margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; align-items: center; }
.chip, .badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 4px;
  border: 1px solid #c5d7ec;
}
.badge-icon {
  width: 18px; height: 18px; border-radius: 3px; flex: 0 0 18px;
}
.badge.unknown, .chip.muted { background: #eef1f6; color: var(--muted); border-color: var(--line); }
.badge.rank { background: #e8eef8; color: var(--accent-2); border-color: #c9d7ec; }
.badge.license { background: #eef6ff; color: #1a4f8c; border-color: #c9d7ec; }
.badge.hpin { background: var(--ok-soft); color: var(--ok); border-color: #b9ddcc; }
.badge.elite { background: #f0eaf7; color: #5b4578; border-color: #d4c6e8; }
.badge.featured { background: var(--featured-ink); color: #fff; border-color: var(--featured-ink); }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: end;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin: 12px 0; box-shadow: var(--shadow);
}
.filter-bar .field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; }
.filter-bar .field span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.card[hidden] { display: none !important; }

/* Profile hero */
.profile-hero {
  display: grid; gap: 18px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 12px 0 18px; box-shadow: var(--shadow);
}
@media (min-width: 720px) {
  .profile-hero { grid-template-columns: 120px 1fr auto; }
}
.profile-hero .firm-logo { width: 120px; height: 120px; flex-basis: 120px; }
.profile-hero .firm-logo .initials { font-size: 36px; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fact-tile {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.fact-tile img { width: 36px; height: 36px; border-radius: 5px; }

table.enrich { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14px; border-radius: var(--radius); overflow: hidden; }
table.enrich th, table.enrich td { border: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
table.enrich th { background: #eef2f8; width: 38%; }
.quote { font-size: 12px; color: var(--muted); margin-top: 4px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; margin: 8px 0;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 2px; color: var(--muted); font-size: 14px; }
.criteria { list-style: none; padding: 0; margin: 0; }
.criteria li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 8px 0;
}
.criteria li strong { display: block; margin-bottom: 2px; }
footer {
  margin-top: 48px; padding: 24px 0 40px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted); background: #e8eef6;
}
footer .wrap { display: grid; gap: 8px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin: 16px 0 8px; }
.breadcrumbs a { color: var(--muted); }
.phone-link { font-weight: 700; text-decoration: none; color: var(--accent-ink); }
.section-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.section-head h2 { margin: 0; }

@media (max-width: 640px) {
  .site-nav { width: 100%; }
  .card-list { flex-wrap: wrap; }
  .card-list .firm-logo { width: 56px; height: 56px; flex-basis: 56px; }
  .card-list .card-side { flex-basis: 100%; flex-direction: row; }
  .card-list .card-side .btn { flex: 1; }
  .hero-photo { min-height: 520px; }
  .profile-actions { min-width: 0; }
}


/* v2 iteration: denser cards + county photo band */
.county-hero-band {
  position: relative; color: #fff; overflow: hidden;
  background: var(--header) center/cover no-repeat;
  min-height: 220px; display: flex; align-items: flex-end;
  margin: 0 0 8px;
}
.county-hero-band::before {
  content:""; position:absolute; inset:0;
  background: linear-gradient(100deg, rgba(8,28,52,.9) 0%, rgba(12,39,68,.55) 100%);
}
.county-hero-band .wrap { position:relative; z-index:1; padding: 28px 18px 24px; width:100%; }
.county-hero-band .eyebrow { color:#9ec5ef; }
.county-hero-band h1 { color:#fff; }
.county-hero-band .intro { color:#d7e6f7; }
.county-hero-band .intro a { color:#fff; }

.card-list {
  border-left: 4px solid var(--accent);
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}
.firm-logo {
  flex: 0 0 88px; width: 88px; height: 88px;
  box-shadow: inset 0 0 0 1px rgba(12,39,68,.06);
}
.card-list .card-side { flex: 0 0 168px; }
.badge-icon { width: 20px; height: 20px; border-radius: 4px; }
.chips { gap: 7px; }
.card h3 { font-size: 18px; }
.listing-photo-rail {
  display:grid; grid-template-columns: repeat(3, 1fr); gap:10px; margin: 14px 0 6px;
}
.listing-photo-rail figure {
  margin:0; background:#fff; border:1px solid var(--line); border-radius:6px; overflow:hidden;
  box-shadow: var(--shadow);
}
.listing-photo-rail img { width:100%; height:110px; object-fit:cover; }
.listing-photo-rail figcaption { font-size:11px; color:var(--muted); padding:6px 8px; }

@media (max-width: 640px) {
  .listing-photo-rail { grid-template-columns: 1fr; }
  .listing-photo-rail img { height:140px; }
  .card-list .firm-logo { width:64px; height:64px; flex-basis:64px; }
}


/* Google Places rating (official API only; never invent) */
/* Google Places UI Kit widget (profile pages only). Do not restyle or cover Google's attribution. */
.google-place-panel { max-width: 560px; }
.google-place-widget gmp-place-details-compact { width: 100%; max-width: 500px; min-width: 250px; display: block; }

/* Quote request form */
.quote-form-panel { max-width: 560px; }
.quote-form {
  display: grid;
  gap: 14px;
}
.quote-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.quote-form input,
.quote-form select,
.quote-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}
.quote-form textarea { resize: vertical; min-height: 96px; }
.quote-form button.btn { justify-self: start; margin-top: 4px; border: 0; cursor: pointer; }
/* Honeypot: off-screen for people, still in the DOM for bots */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.quote-thanks-panel { max-width: 640px; }
.quote-thanks-panel ul { margin: 8px 0 14px; padding-left: 20px; }
.quote-errors { border-left: 4px solid #b42318; background: #fef3f2; padding: 12px 16px; margin: 0 0 16px; }
.quote-errors ul { margin: 6px 0 0; padding-left: 20px; }

/* Nov 9 sprint: linked credential badges, own-site claim chips, no-upscale logos, inline quote form */
a.badge { text-decoration: none; }
a.badge:hover, a.badge:focus-visible { text-decoration: underline; }
.badge.cred.energize_ct_hpin, .badge.cred.energize_ct_hpln { background: var(--ok-soft); color: var(--ok); border-color: #b9ddcc; }
.badge.cred.ct_license { background: #eef6ff; color: #1a4f8c; border-color: #c9d7ec; }
.badge.claim { background: #fff; color: var(--muted); border: 1px dashed #c5d0de; font-weight: 600; }
/* Logos: shown at native size or smaller, never scaled up; square tile with rounded corners. */
/* Padding sits on the tile, not the img, so a small logo (e.g. jennings, 56 px) is never drawn larger than its file. */
.firm-logo:not(.monogram) { padding: 6px; box-sizing: border-box; }
.firm-logo img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; padding: 0; }
.firm-logo.monogram { border-radius: 6px; }
.quote-inline { max-width: 640px; margin: 22px 0; }
.quote-inline h2 { margin-top: 0; }
.quote-form-inline { gap: 12px; }
.quote-to { margin: 0; }
.quote-form label.consent-row { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.quote-form label.consent-row input { margin-top: 3px; padding: 0; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 3px; }
.placeholder-copy { background: #fff4c2; outline: 2px dashed #b88a00; outline-offset: 1px; padding: 0 4px; color: #5c4400; font-weight: 600; }
/* Long unbroken evidence tokens (API URLs, "services=1106") wrap instead of widening the table on phones (cisco-heating at 390 px). */
table.enrich td, table.enrich td .quote, table.enrich td a { overflow-wrap: anywhere; word-break: break-word; }
