/*
 * Go-rendered listing detail page. Same visual language already approved
 * for the WordPress reskin (dark gradient hero, light card body) - carried
 * over rather than redesigned, since it was already validated against a
 * real listing (Pisanchyn Law Firm) before this Go rewrite started.
 */
:root {
  --ip-accent: #1f8f86;
  --ip-accent-bright: #34d3c9;
  --ip-accent-tint: rgba(31,143,134,0.08);
  --ip-accent-tint-strong: rgba(31,143,134,0.16);
  --ip-ink: #142027;
  --ip-ink-dim: #5c6c73;
  --ip-card-bg: #f6f9f9;
  --ip-border: #e2e9e8;
  /* Site-chrome (nav/footer) tokens - matches internal/web/static/v2-map.css's
     dark theme exactly so the header/footer look identical to /v2's homepage. */
  --v2-bg: #0b1220;
  --v2-panel-bg: #101a2e;
  --v2-accent: #34d3c9;
  --v2-text: #e7edf5;
  --v2-text-dim: #93a1b8;
  --v2-border: #22304a;
}
* { box-sizing: border-box; }
body {
  background: #ffffff;
  color: var(--ip-ink);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}
a { color: var(--ip-accent); }
.lp-page { max-width: 980px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 60px; }

/* ---- Site nav (shared look with /v2's homepage) ---- */
#v2-nav {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  background: var(--v2-panel-bg);
  border-bottom: 1px solid var(--v2-border);
}
.v2-nav-brand { font-size: 18px; font-weight: 700; color: var(--v2-text); text-decoration: none; flex-shrink: 0; }
.v2-nav-brand span { color: var(--v2-accent); }
#v2-nav-links { display: flex; gap: 22px; flex: 1; }
#v2-nav-links a { color: var(--v2-text-dim); text-decoration: none; font-size: 14px; }
#v2-nav-links a:hover { color: var(--v2-text); }
.v2-nav-cta {
  flex-shrink: 0;
  background: var(--v2-accent);
  color: #06231f;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
}
.v2-nav-cta:hover { background: #4fe3d9; }
@media (max-width: 700px) { #v2-nav-links { display: none; } }

/* ---- Site footer (shared look with /v2's homepage) ---- */
#v2-footer { background: var(--v2-panel-bg); border-top: 1px solid var(--v2-border); padding: 40px 24px 20px; margin-top: 40px; }
.v2-footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.v2-footer-col p { color: var(--v2-text-dim); font-size: 13.5px; line-height: 1.6; margin: 10px 0 0; }
.v2-footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--v2-text-dim); margin: 0 0 12px; }
.v2-footer-col a { display: block; color: var(--v2-text); text-decoration: none; font-size: 13.5px; margin-bottom: 9px; }
.v2-footer-col a:hover { color: var(--v2-accent); }
.v2-footer-bottom { max-width: 1100px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid var(--v2-border); color: var(--v2-text-dim); font-size: 12.5px; }
@media (max-width: 700px) { .v2-footer-inner { grid-template-columns: 1fr 1fr; } }

/* ---- Prominent header map + Street View toggle - ported from WordPress's
   #directory-main-bar / #map-streetview-toggle (Templates/header.php,
   Templates/snippets/map-single-javascript.php). Full-bleed and undecorated
   on purpose - WordPress's own version is edge-to-edge with plain, un-tinted
   OSM tiles and zero border/radius, sitting flush under the nav. That's what
   reads as a "hero", as opposed to the smaller, dark-tinted, bordered
   #lp-map card under "Location" further down the page (a separate element -
   WP has both too, see .item-map vs #directory-main-bar). Deliberately NOT
   given the dark-tint filter the rest of this site's maps use, to match. ---- */
.lp-header-map-wrap { position: relative; width: 100%; }
#lp-header-map { height: 460px; width: 100%; }
#lp-streetview-hero { width: 100%; height: 460px; background: #0f2a27; }
#lp-streetview-hero iframe { display: block; width: 100%; height: 100%; border: 0; }
.lp-sv-toggle { position: absolute; top: 16px; left: 16px; z-index: 500; display: flex; gap: 8px; }
.lp-sv-btn { padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.6); background: rgba(20,32,39,0.6); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; backdrop-filter: blur(2px); }
.lp-sv-btn.active { background: var(--ip-accent); border-color: var(--ip-accent); }
@media (max-width: 700px) {
  #lp-header-map, #lp-streetview-hero { height: 280px; }
}

/* Header-map marker popup: logo + firm name, matching WordPress's own
   #directory-main-bar popup which always shows the firm's thumbnail. */
.lp-map-popup { display: flex; align-items: center; gap: 10px; padding: 2px; }
.lp-map-popup img { width: 36px; height: 36px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--ip-border); flex-shrink: 0; }
.lp-map-popup span { font-weight: 600; font-size: 13.5px; color: var(--ip-ink); }

/* ---- Hero ---- */
.lp-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #0f2a27 0%, #143530 55%, #1a4a43 100%);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.lp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(52,211,201,0.25), transparent 55%);
  pointer-events: none;
}
.lp-hero-logo {
  width: 110px; height: 110px; flex-shrink: 0;
  border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  position: relative; z-index: 1; overflow: hidden; padding: 8px;
}
.lp-hero-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lp-hero-body { position: relative; z-index: 1; min-width: 0; }
.lp-hero-eyebrow { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #7fe0d6; font-weight: 600; margin-bottom: 8px; }
.lp-hero h1 { font-size: 28px; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
/* Fractional-fill star bar (precise mean, e.g. 4.8/5 shows a 96%-filled
   star) rather than WordPress's own integer-rounded star icons - the
   filled layer is clipped to --pct via a background-gradient-on-text trick
   (dimmed background stars underneath, gold stars filled up to the exact
   percentage on top of the same glyphs). */
.lp-hero-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lp-stars { display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 1px; }
.lp-stars::before {
  content: "\2605\2605\2605\2605\2605";
  background: linear-gradient(90deg, #ffc247 var(--pct), rgba(255,255,255,0.28) var(--pct));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-hero-rating-value { font-weight: 700; font-size: 13.5px; color: #fff; }
.lp-hero-rating-count { font-size: 12.5px; color: rgba(255,255,255,0.7); }
.lp-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lp-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.24); }
.lp-hero-crumb { font-size: 13px; color: rgba(255,255,255,0.7); }
.lp-hero-crumb a { color: rgba(255,255,255,0.85); text-decoration: none; }
.lp-hero-crumb a:hover { color: #fff; }
.lp-sep { margin: 0 6px; opacity: 0.5; }

/* ---- Layout ---- */
/* minmax(0, 1fr), not 1fr: a plain 1fr cannot shrink below its content, so one wide image in a bio stretched the whole column past the screen. */
.lp-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.lp-layout > * { min-width: 0; }
@media (max-width: 700px) { .lp-layout { grid-template-columns: minmax(0, 1fr); } .lp-hero { flex-direction: column; text-align: center; } }

.lp-card { background: #fff; border: 1px solid var(--ip-border); border-radius: 12px; padding: 20px; box-shadow: 0 4px 14px rgba(15,42,39,0.06); }
.lp-card + .lp-card { margin-top: 16px; }
.lp-card-label { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ip-ink-dim); font-weight: 600; margin: 12px 0 3px; }
.lp-card-label:first-child { margin-top: 0; }
.lp-card-value { font-size: 14px; margin-bottom: 4px; line-height: 1.5; }
.lp-card-value a { text-decoration: none; font-weight: 600; }
.lp-card-value a:hover { text-decoration: underline; }

.lp-cta-row { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.lp-btn { display: block; width: 100%; text-align: center; padding: 12px 16px; border-radius: 8px; font-weight: 600; font-size: 13.5px; text-decoration: none; border: none; cursor: pointer; font-family: inherit; }
.lp-btn-primary { background: var(--ip-accent); color: #fff; }
.lp-btn-primary:hover { background: #17726b; }
.lp-btn-secondary { background: #fff; color: var(--ip-accent); border: 1px solid var(--ip-accent); }
.lp-btn-secondary:hover { background: var(--ip-accent-tint); }

.lp-social-row { display: flex; gap: 8px; margin-top: 16px; }
.lp-social-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--ip-accent-tint); color: var(--ip-accent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; text-decoration: none; }

.lp-review-row { display: flex; align-items: center; gap: 8px; font-size: 13px; text-decoration: none; color: var(--ip-ink); padding: 8px 0; border-top: 1px solid var(--ip-border); }
.lp-review-row:first-of-type { border-top: none; padding-top: 0; }
.lp-review-source { font-weight: 700; }
.lp-review-stars { color: var(--ip-accent-bright); font-weight: 700; }
.lp-review-count { color: var(--ip-ink-dim); margin-left: auto; }

/* ---- Related Attorneys - ported from the WordPress mu-plugin
   (Kaam/ait-related-attorneys.php), same visual language as the rest of
   this page's tokens instead of that plugin's own hardcoded hex colors. ---- */
.lp-related-list { display: flex; flex-direction: column; }
.lp-related-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--ip-border);
  text-decoration: none; color: inherit; transition: background 0.15s ease;
}
.lp-related-item:last-child { border-bottom: none; }
.lp-related-item:hover { background: var(--ip-card-bg); }
.lp-related-avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--ip-card-bg); display: flex; align-items: center; justify-content: center;
}
.lp-related-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lp-related-info { flex: 1; min-width: 0; }
.lp-related-name { font-weight: 600; font-size: 13.5px; color: var(--ip-ink); display: inline-flex; align-items: center; gap: 5px; }
.lp-related-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; background: var(--ip-accent);
  color: #fff; font-size: 9px; flex-shrink: 0;
}
.lp-related-rating { font-size: 12.5px; color: #ff9c00; }
.lp-related-rating.lp-no-rating { font-size: 11.5px; color: var(--ip-ink-dim); font-style: italic; }
.lp-related-location, .lp-related-distance {
  font-size: 11.5px; color: var(--ip-ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lp-related-distance { color: var(--ip-accent); font-weight: 600; }

/* ---- Main column ---- */
.lp-section-title { font-size: 18px; font-weight: 700; margin: 28px 0 14px; letter-spacing: -0.01em; }
.lp-layout main > .lp-section-title:first-child { margin-top: 0; }
.lp-tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-tag { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--ip-accent-tint); color: var(--ip-accent); font-size: 12.5px; font-weight: 600; text-decoration: none; transition: background 0.15s ease, color 0.15s ease; }
.lp-tag:hover { background: var(--ip-accent); color: #fff; }

.lp-bio { font-size: 14.5px; line-height: 1.75; color: var(--ip-ink); }
.lp-bio p { margin: 0 0 14px; }

/* Column shortcode -> div mapping from internal/db/contentformat.go
   (expandColumnShortcodes) - a real bio's own multi-column layout
   (e.g. a 4-column list of practice areas), not this page's own grid. */
.lp-col { display: inline-block; vertical-align: top; box-sizing: border-box; padding-right: 20px; margin-bottom: 14px; }
.lp-col-one-half, .lp-col-one-half-last { width: 50%; }
.lp-col-one-third, .lp-col-one-third-last { width: 33.333%; }
.lp-col-two-third, .lp-col-two-third-last { width: 66.666%; }
.lp-col-one-fourth, .lp-col-one-fourth-last { width: 25%; }
.lp-col-three-fourth, .lp-col-three-fourth-last { width: 75%; }
@media (max-width: 700px) {
  .lp-col { width: 100% !important; padding-right: 0; }
}

.lp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.lp-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }

.lp-team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 700px) { .lp-team-grid { grid-template-columns: repeat(2, 1fr); } }
.lp-team-card { text-align: center; background: var(--ip-card-bg); border: 1px solid var(--ip-border); border-radius: 12px; padding: 18px 12px; }
.lp-team-avatar, .lp-team-avatar-placeholder { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; object-fit: cover; }
.lp-team-avatar-placeholder { background: var(--ip-accent-tint-strong); color: var(--ip-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.lp-team-name { font-weight: 700; font-size: 13.5px; }
.lp-team-role { font-size: 11.5px; color: var(--ip-accent); font-weight: 600; margin-top: 2px; }
.lp-team-bio { font-size: 11.5px; color: var(--ip-ink-dim); margin-top: 8px; line-height: 1.5; }

.lp-firm-guides { margin-top: 28px; padding: 20px 24px; border-radius: 12px; background: var(--ip-accent-tint); border: 1px solid var(--ip-accent-tint-strong); }
.lp-guide-link { display: block; padding: 8px 0; border-bottom: 1px solid var(--ip-accent-tint-strong); font-weight: 600; text-decoration: none; }
.lp-guide-link:last-child { border-bottom: none; }
.lp-guide-link:hover { text-decoration: underline; }

#lp-map { height: 320px; border-radius: 12px; overflow: hidden; border: 1px solid var(--ip-border); }
#lp-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9); }

/* ---- Contact/claim modals ---- */
.lp-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(10,15,18,0.6); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.lp-modal-overlay.lp-open { display: flex; }
.lp-modal { background: #fff; border-radius: 14px; padding: 28px; width: 100%; max-width: 420px; position: relative; }
.lp-modal h3 { margin: 0 0 16px; }
.lp-modal input, .lp-modal textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--ip-border); margin-bottom: 10px; font-family: inherit; font-size: 13.5px; }
.lp-modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ip-ink-dim); }
.lp-modal-status { margin-top: 10px; font-size: 13px; color: var(--ip-ink-dim); }
.lp-modal-status.lp-success { color: var(--ip-accent); }
.lp-modal-status.lp-error { color: #c0392b; }

/* ---- "Write a Review" star-click input (lp-rate-modal) ---- */
.lp-rate-star-input { display: flex; gap: 6px; font-size: 30px; line-height: 1; margin-bottom: 16px; cursor: pointer; user-select: none; }
.lp-rate-star { color: #d8dedd; transition: color 0.1s ease, transform 0.1s ease; }
.lp-rate-star.active { color: #ffb400; }
.lp-rate-star:hover { transform: scale(1.08); }

/* Recovered (unclaimed) listing - colours from the approved handover design */
.lp-recovered-pill { display: inline-block; margin-bottom: 10px; padding: 4px 11px; border-radius: 999px; background: #f5effc; color: #7c3aed; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; }
.lp-recovered-banner { margin: 0 0 20px; padding: 16px 18px; background: #faf7ff; border: 1px solid #e6d9fb; border-radius: 10px; font-size: 13.5px; line-height: 1.6; color: #4c1d95; }
.lp-recovered-banner a { color: #5b21b6; font-weight: 700; text-decoration: underline; }

/* ---- Written client reviews ---- */
.lp-hero-rating-count a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lp-reviews { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.lp-review-item { background: #fff; border: 1px solid var(--ip-border); border-radius: 12px; padding: 16px 18px; }
.lp-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; }
.lp-review-item .lp-stars::before { background: linear-gradient(90deg, #e0a530 var(--pct), #d6dcdb var(--pct)); -webkit-background-clip: text; background-clip: text; }
.lp-review-by { font-weight: 700; font-size: 14px; color: var(--ip-ink); }
.lp-review-date { font-size: 12.5px; color: #6b7b78; }
.lp-review-text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ip-ink); white-space: pre-line; overflow-wrap: anywhere; }

/* recovered press releases (unclaimed listings) */
.lp-firm-press { margin-top: 24px; }
.lp-press { padding: 14px 0; border-bottom: 1px solid var(--ip-accent-tint-strong); }
.lp-press:last-child { border-bottom: none; }
.lp-press h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.3; }
.lp-press-date { font-size: 12.5px; opacity: .7; margin-bottom: 6px; }
.lp-press p { margin: 0 0 6px; font-size: 14.5px; opacity: .85; }
.lp-press a { font-size: 13.5px; font-weight: 600; }

/* articles by this firm: title, original date, opening lines */
.lp-guide-item { padding: 12px 0; border-bottom: 1px solid var(--ip-accent-tint-strong); }
.lp-guide-item:last-child { border-bottom: none; }
.lp-guide-item .lp-guide-link { border-bottom: none; padding: 0; font-size: 16px; }
.lp-guide-date { font-size: 12.5px; opacity: .7; margin: 3px 0 4px; }
.lp-guide-summary { margin: 0; font-size: 14.5px; opacity: .85; }

/* ---- The firm's own bio (pasted-in HTML, see internal/db/biotidy.go) ---- */
.lp-bio { overflow-wrap: anywhere; }
.lp-bio img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin: 6px 0 18px; }
.lp-bio h2 { font-size: 20px; line-height: 1.3; margin: 26px 0 10px; letter-spacing: -0.01em; }
.lp-bio h3 { font-size: 16.5px; line-height: 1.35; margin: 20px 0 8px; }
.lp-bio h4, .lp-bio h5, .lp-bio h6 { font-size: 14.5px; margin: 16px 0 6px; }
.lp-bio > :first-child { margin-top: 0; }
.lp-bio ul, .lp-bio ol { margin: 0 0 14px; padding-left: 22px; }
.lp-bio li { margin-bottom: 4px; }
.lp-bio a { color: var(--ip-accent); }
.lp-bio iframe, .lp-bio video, .lp-bio embed, .lp-bio object { max-width: 100%; }
.lp-bio table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.lp-bio blockquote { margin: 0 0 14px; padding: 4px 0 4px 16px; border-left: 3px solid var(--ip-border); color: var(--ip-ink); }

/* Practice areas past the first few sit behind one button instead of filling the page with chips. */
.lp-more { margin-top: 10px; }
.lp-more > summary { display: inline-block; cursor: pointer; list-style: none; padding: 6px 14px; border-radius: 999px; border: 1px dashed var(--ip-accent); color: var(--ip-accent); font-size: 12.5px; font-weight: 600; }
.lp-more > summary::-webkit-details-marker { display: none; }
.lp-more[open] > summary { margin-bottom: 10px; }
.lp-more > summary:focus-visible { outline: 2px solid var(--ip-accent); outline-offset: 2px; }

/* ================= Header: the map stays on top, the firm's card overlaps its lower edge ================= */
.lp-header-map-wrap { isolation: isolate; }
#lp-header-map, #lp-streetview-hero { height: 300px; }
.lp-header-map-wrap.lp-map-big #lp-header-map, .lp-header-map-wrap.lp-map-big #lp-streetview-hero { height: 72vh; min-height: 420px; }
.lp-map-chips { position: absolute; top: 12px; right: 14px; z-index: 500; display: flex; gap: 8px; }
.lp-map-chip { background: #fff; color: var(--ip-ink); font-family: inherit; font-weight: 700; font-size: 12.5px; line-height: 1; padding: 9px 13px; border-radius: 999px; border: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.22); text-decoration: none; cursor: pointer; }
.lp-map-chip:hover, .lp-map-chip:focus-visible { background: var(--ip-accent); color: #fff; }
.lp-page.lp-has-map { padding-top: 0; }
.lp-page.lp-has-map .lp-hero { margin-top: -64px; z-index: 2; box-shadow: 0 14px 36px rgba(8,20,24,0.28); }
@media (max-width: 700px) {
  #lp-header-map, #lp-streetview-hero { height: 210px; }
  .lp-header-map-wrap.lp-map-big #lp-header-map, .lp-header-map-wrap.lp-map-big #lp-streetview-hero { height: 60vh; min-height: 320px; }
  .lp-page.lp-has-map .lp-hero { margin-top: -44px; }
  /* on the small phone map the buttons sit low (above the header card) and the zoom buttons go: pinch to zoom */
  .lp-map-chips { top: auto; bottom: 54px; right: 10px; }
  .lp-header-map-wrap .leaflet-control-zoom { display: none; }
  .lp-hero { padding: 22px 18px; gap: 16px; }
  .lp-hero h1 { font-size: 22px; line-height: 1.25; }
  .lp-hero-crumb { display: none; }
}

/* Call / Message / Website, inside the header card so they are on the first screen */
.lp-hero-body { flex: 1 1 auto; }
.lp-hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; flex: 0 1 330px; }
.lp-hbtn { font-family: inherit; font-weight: 700; font-size: 14px; border-radius: 10px; padding: 12px 16px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid transparent; flex: 1 1 auto; }
.lp-hbtn-primary { background: var(--ip-accent-bright); color: #04201e; flex-basis: 100%; }
.lp-hbtn-primary:hover { background: #5fe3da; }
.lp-hbtn-ghost { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.35); }
.lp-hbtn-ghost:hover { background: rgba(255,255,255,0.24); }
.lp-hbtn:focus-visible, .lp-bar-btn:focus-visible, .lp-map-chip:focus-visible { outline: 3px solid var(--ip-accent-bright); outline-offset: 2px; }
@media (max-width: 860px) { .lp-hero { flex-wrap: wrap; } .lp-hero-actions { flex-basis: 100%; } }
@media (max-width: 700px) { .lp-hero-actions { flex-direction: column; } .lp-hbtn { width: 100%; flex: none; } }

/* The contact card (with hours) follows the reader on a tall enough desktop screen */
.lp-layout > aside { align-self: stretch; }
.lp-sticky { display: grid; gap: 16px; align-content: start; }
.lp-sticky .lp-card + .lp-card { margin-top: 0; }
@media (min-width: 701px) and (min-height: 760px) { .lp-sticky { position: sticky; top: 64px; } } /* clears the sticky jump bar */

/* Nearby attorneys: a row at the bottom instead of a long sidebar card */
.lp-nearby { margin-top: 44px; }
.lp-nearby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.lp-nearby-grid .lp-related-item, .lp-nearby-grid .lp-related-item:last-child { border: 1px solid var(--ip-border); border-radius: 12px; padding: 12px; background: #fff; }
.lp-nearby-grid .lp-related-item:hover { border-color: var(--ip-accent); background: var(--ip-card-bg); }

/* Phone: Call / Message / Directions stay at the bottom of the screen */
.lp-bar { display: none; }
@media (max-width: 700px) {
  .lp-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--ip-border); box-shadow: 0 -8px 24px rgba(20,32,39,0.12); }
  .lp-bar-btn { flex: 1; min-height: 46px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; background: #fff; color: var(--ip-accent); border: 1.5px solid var(--ip-accent); cursor: pointer; }
  .lp-bar-primary { background: var(--ip-accent); color: #fff; }
  #v2-footer { padding-bottom: 92px; }
}
@media (prefers-reduced-motion: reduce) { .lp-map-chip { transition: none; } }

/* ================= The rest of the redesign: claim strip, at a glance, jump bar, reviews, long bios ================= */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.lp-sec { scroll-margin-top: 64px; }
.lp-subtitle { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ip-ink-dim); font-weight: 700; margin: 22px 0 8px; }

/* Recovered profile: a strip above the map with a real button */
.lp-claim-strip { background: #f4eefc; color: #3b2268; border-bottom: 1px solid #d9c7f3; }
.lp-claim-strip-in { max-width: 980px; margin: 0 auto; padding: 14px 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between; font-size: 14px; line-height: 1.5; }
.lp-claim-cta { flex: none; background: #5b34a8; color: #fff; font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 10px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.lp-claim-cta:hover { background: #4a2890; }
.lp-claim-cta:focus-visible { outline: 3px solid #5b34a8; outline-offset: 2px; }
@media (max-width: 700px) { .lp-claim-strip-in { flex-direction: column; align-items: stretch; } .lp-claim-cta { justify-content: center; } }

/* At a glance */
.lp-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 16px; border: 1px solid var(--ip-border); border-radius: 12px; background: #fff; overflow: hidden; }
.lp-glance > div { padding: 13px 18px; border-right: 1px solid var(--ip-border); min-width: 0; }
.lp-glance > div:last-child { border-right: 0; }
.lp-glance small { display: block; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ip-ink-dim); font-weight: 700; }
.lp-glance strong { display: block; margin-top: 3px; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.lp-glance .lp-good { color: var(--ip-accent); }
@media (max-width: 700px) { .lp-glance > div { border-right: 0; border-bottom: 1px solid var(--ip-border); } .lp-glance > div:last-child { border-bottom: 0; } }

/* Jump bar: stays at the top of the screen while reading */
.lp-jump { position: sticky; top: 0; z-index: 50; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; background: #fff; border-bottom: 1px solid var(--ip-border); margin-top: 16px; }
.lp-jump::-webkit-scrollbar { display: none; }
.lp-jump a { flex: none; padding: 13px 14px; font-size: 13.5px; font-weight: 700; color: var(--ip-ink-dim); text-decoration: none; border-bottom: 3px solid transparent; }
.lp-jump a:hover { color: var(--ip-ink); }
.lp-jump a.lp-on { color: var(--ip-accent); border-bottom-color: var(--ip-accent); }
.lp-jump a:focus-visible { outline: 3px solid var(--ip-accent); outline-offset: -3px; }
.lp-layout { margin-top: 22px; }

/* Long bios fold behind "Read more" (added by listing-page.js only when the bio is tall) */
.lp-bio.lp-clamped { max-height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.lp-bio-more { background: none; border: 0; color: var(--ip-accent); font-family: inherit; font-weight: 700; font-size: 14px; padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lp-bio-more:focus-visible { outline: 3px solid var(--ip-accent); outline-offset: 2px; }

/* Reviews: score and the 5-to-1 breakdown above the written reviews */
.lp-rv-top { display: grid; gap: 18px; align-items: center; margin-bottom: 14px; }
@media (min-width: 701px) { .lp-rv-top { grid-template-columns: auto minmax(0, 1fr); gap: 36px; } }
.lp-rv-score { display: flex; align-items: center; gap: 14px; }
.lp-rv-score > strong { font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lp-rv-score .lp-stars { font-size: 18px; }
.lp-rv-count { font-size: 13px; color: var(--ip-ink-dim); margin-top: 3px; }
.lp-rv-bars { display: grid; gap: 5px; font-size: 12px; color: var(--ip-ink-dim); font-variant-numeric: tabular-nums; max-width: 420px; }
.lp-rv-bars > div { display: grid; grid-template-columns: 14px 1fr 34px; gap: 8px; align-items: center; }
.lp-rv-bars i { display: block; height: 7px; border-radius: 4px; background: var(--ip-border); position: relative; overflow: hidden; }
.lp-rv-bars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: #f0b429; border-radius: 4px; }
.lp-rv-empty { border: 1px dashed var(--ip-border); border-radius: 12px; padding: 14px 16px; background: var(--ip-card-bg); display: grid; gap: 4px; font-size: 14px; color: var(--ip-ink-dim); margin-bottom: 12px; }
.lp-rv-empty strong { color: var(--ip-ink); }
.lp-rv-write { width: auto; display: inline-block; margin-top: 12px; padding-inline: 22px; }

/* Premium firm: a gold-tinted badge so it reads as a paid upgrade, not a verification */
.lp-badge-premium { background: #fbf1dc; color: #8a5a00; border-color: #ecd49b; }
@media (prefers-color-scheme: dark) { .lp-badge-premium { background: #2b2210; color: #f0c36a; border-color: #5a4515; } }
