/* Repeated patterns that are not single utilities. Colours/sizes come from tokens.css. */

/* Base */
html { -webkit-text-size-adjust: 100%; tab-size: 4; font-family: var(--font-dm-sans), system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
body { margin: 0; line-height: inherit; background-color: #fff; color: rgb(var(--color-ink)); font-family: var(--font-dm-sans), system-ui, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, iframe:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-offset-width: 2px;
  --tw-ring-color: rgb(var(--color-lovett-blue));
  box-shadow: 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color, #fff), 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
}

/* Page container: fluid side padding (--page-pad = 5vw) at every breakpoint, like Intown. Full width; cap a block with max-w-* + the auto margins. */
.container-site { width: 100%; margin-left: auto; margin-right: auto; padding-left: var(--page-pad); padding-right: var(--page-pad); }

/* Small caps label with a leading rule */
.eyebrow { display: inline-flex; align-items: center; gap: 1rem; font-size: 11px; font-weight: 500; letter-spacing: var(--ls-eyebrow); }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--plain::before { display: none; }   /* eyebrow without the short rule on its left (e.g. the Sales Team label) */

/* Section heading */
.section-title { font-family: var(--font-playfair), Georgia, serif; font-size: 36px; font-weight: 400; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; }
@media (min-width: 768px) { .section-title { font-size: 48px; } }
@media (min-width: 1280px) { .section-title { font-size: 54px; } }

/* Placeholder copy awaiting client text (tooltip on hover) */
.ph { cursor: help; border-bottom: 1px dashed #d97706; position: relative; }
.ph:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 70; padding: 6px 8px; border-radius: 2px; background: #1b2b33; color: #fff; font: normal 500 11px/1.3 var(--font-dm-sans), system-ui, sans-serif; letter-spacing: 0; white-space: nowrap; pointer-events: none; }

/* Site plan hotspots + lots */
.lot { cursor: pointer; outline: none; }
.lot:hover rect, .lot:focus-visible rect { stroke: rgb(var(--color-charcoal)); stroke-width: 3px; }
.lot:focus-visible rect { stroke: #1e6a7a; stroke-width: 4px; }
.site-hotspot { fill: rgb(var(--color-lovett) / .36); stroke: none; transition: fill .2s; animation: 2.4s ease-in-out infinite site-hotspot-pulse; }
@keyframes site-hotspot-pulse { 50% { fill-opacity: .54; } }
:is(figure:has([data-tab-target]:hover) .site-hotspot, figure:has([data-tab-target]:focus-visible) .site-hotspot) { fill: rgb(var(--color-lovett) / .62); }
@media (prefers-reduced-motion: reduce) { .site-hotspot { animation: none; } }

/* Page shell / hero entrance */
.lpg-page[hidden] { display: none !important; }
@keyframes lpgFadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-fade { animation: lpgFadeUp .8s ease-out .3s both; }
@media (prefers-reduced-motion: reduce) { .hero-fade { animation: none; } }

/* Photo frame: a thin copper outline offset behind the image */
.framed { position: relative; }
.framed::before { content: ""; pointer-events: none; position: absolute; inset: 24px -24px -24px 24px; border: 1px solid rgb(var(--color-copper) / .45); }
@media (max-width: 767px) { .framed::before { inset: 12px -12px -12px 12px; } }
/* same frame in light copper, for photos on the navy section */
.framed-lt::before { border-color: rgb(var(--color-copper-lt) / .5); }

/* Big serif number on the "pillars" cards (data-n) */
.pillar-num::before { content: attr(data-n); }

/* "Coming soon." tooltip on disabled buttons (Download Broker Packet on Find Your Home) */
.soon-tip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 0; z-index: 30; padding: 6px 10px; border-radius: 2px; background: rgb(var(--color-ink)); color: #fff; font-size: 12px; font-weight: 500; letter-spacing: 0; white-space: nowrap; pointer-events: none; }
.soon:hover .soon-tip, .soon:focus-within .soon-tip { display: block; }

/* SMOOTH SCROLL (Lenis, js/smooth-scroll.js) — rules from lenis.css */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* SECTION REVEAL (js/scroll-reveal.js) — items fade in and rise as their section enters the viewport. */
.reveal-hidden { opacity: 0; translate: 0 var(--reveal-distance); }
.reveal-hidden.reveal-fade-only { translate: none; }   /* images: fade only, no rise */
.reveal-anim { transition: opacity var(--reveal-duration) ease-out, translate var(--reveal-duration) ease-out !important; }

/* MOBILE MENU (phones, js/mobile-menu.js) — full-screen overlay like Intown's. Bar height, logo height and close-button box are copied from the visible header by the script, so nothing moves when it opens. */
.lpg-menu { position: fixed; inset: 0; z-index: 600; display: flex; flex-direction: column; overflow-y: auto; padding: 0 var(--page-pad); background: rgb(var(--color-lovett)); color: #fff; }
.lpg-menu__bar { display: flex; flex: none; align-items: center; justify-content: space-between; height: var(--menu-bar-h, 72px); margin-bottom: 24px; }
.lpg-menu__logo { display: block; color: #fff; }
.lpg-menu__logo svg { display: block; width: auto; height: var(--menu-logo-h, 34px); }
.lpg-menu__close { display: inline-flex; align-items: center; justify-content: center; width: var(--menu-btn-w, var(--size-md)); height: var(--menu-btn-h, var(--size-md)); border: 0; background: transparent; color: #fff; cursor: pointer; }
.lpg-menu__link { display: block; padding: 16px 0; border-bottom: 1px solid rgb(255 255 255 / .12); font-family: var(--font-playfair), Georgia, serif; font-size: 28px; line-height: 1.2; color: #fff; text-decoration: none; }
.lpg-menu__link[aria-current="page"] { color: rgb(var(--color-copper-lt)); }
/* narrow phones: smaller links so "THE LOVETT DIFFERENCE" stays on one line (sizes on the 4px scale) */
@media (max-width: 399px) { .lpg-menu__link { font-size: 24px; line-height: 32px; } }
@media (max-width: 349px) { .lpg-menu__link { font-size: 20px; line-height: 28px; } }
/* CTA pinned to the bottom while the links scroll; equal 24px above and below the buttons */
.lpg-menu__cta { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 12px; margin: auto calc(var(--page-pad) * -1) 0; padding: 24px var(--page-pad) calc(24px + env(safe-area-inset-bottom, 0px)); background: rgb(var(--color-lovett)); }
.lpg-menu__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid #fff; border-radius: 2px; font-size: 12px; font-weight: 500; letter-spacing: var(--ls-eyebrow); text-decoration: none; }
.lpg-menu__btn--filled { background: #fff; color: rgb(var(--color-lovett)); }
.lpg-menu__btn--outline { color: #fff; font-size: 14px; letter-spacing: .04em; }
.lpg-menu__logo g:last-child { fill: rgb(var(--color-copper-lt)); } /* the "GREEN" line, same as the footer logo */
.lpg-menu__btn svg { color: rgb(var(--color-copper-lt)); }

/* HERO SCRIM — flat dark layer over the hero photos; darker on phones so the headline reads. (lg: adds a radial gradient on top.) */
.hero-scrim { background-color: rgb(var(--color-scrim) / var(--hero-scrim)); }
@media (max-width: 767px) { .hero-scrim { background-color: rgb(var(--color-scrim) / var(--hero-scrim-phone)); } }

/* FOOTER (same as Intown): side gutter = the other sections (5vw) below 1280, 48px from 1280; content centred in max-w-6xl */
.footer-pad { padding-left: var(--page-pad); padding-right: var(--page-pad); }
@media (min-width: 1280px) { .footer-pad { padding-left: var(--footer-pad-xl); padding-right: var(--footer-pad-xl); } }
.footer-link { position: relative; }
.footer-link::after { content: ''; position: absolute; left: 0; bottom: -3px; width: 0; height: 1px; background: currentColor; transition: width 250ms ease; }
.footer-link:hover::after { width: 100%; }

/* HEADER (Home, Find Your Home): one header that turns from transparent over the hero into the solid sticky bar
   when the visitor scrolls (js/nav.js adds .is-solid). Same 72px height in both states, only colours change. */
.lpg-hdr { border-bottom: 1px solid transparent; transition: background-color var(--header-duration) var(--header-ease), border-color var(--header-duration) var(--header-ease), backdrop-filter var(--header-duration) var(--header-ease); }
.lpg-hdr svg[role="img"] g, .lpg-hdr [data-endorse], .lpg-hdr [data-endorse] span, .lpg-hdr nav[aria-label="Primary"] a, .lpg-hdr a[href^="tel:"], .lpg-hdr a[href^="tel:"] svg, .lpg-hdr [data-hdr-cta], .lpg-hdr button[aria-controls="mobile-nav"] {
  transition: color var(--header-duration) var(--header-ease), fill var(--header-duration) var(--header-ease), border-color var(--header-duration) var(--header-ease), background-color var(--header-duration) var(--header-ease);
}
.lpg-hdr [data-endorse] img { transition: filter var(--header-duration) var(--header-ease); }
.lpg-hdr.is-solid { background-color: rgb(var(--color-white) / 0.95); border-bottom-color: rgb(var(--color-ink) / 0.1); backdrop-filter: blur(12px); }
.lpg-hdr.is-solid svg[role="img"] g { fill: rgb(var(--color-lovett)); }
.lpg-hdr.is-solid [data-endorse] { border-color: rgb(var(--color-ink) / 0.15); }
.lpg-hdr.is-solid [data-endorse] span { color: rgb(var(--color-muted)); }
.lpg-hdr.is-solid [data-endorse] img { filter: none; }
.lpg-hdr.is-solid nav[aria-label="Primary"] a { color: rgb(var(--color-ink) / 0.7); }
.lpg-hdr.is-solid nav[aria-label="Primary"] a:hover, .lpg-hdr.is-solid nav[aria-label="Primary"] a[aria-current="page"] { color: rgb(var(--color-ink)); }
.lpg-hdr.is-solid nav[aria-label="Primary"] a::after { background-color: rgb(var(--color-copper)); }
.lpg-hdr.is-solid a[href^="tel:"] { color: rgb(var(--color-ink)); }
.lpg-hdr.is-solid a[href^="tel:"] svg { color: rgb(var(--color-copper)); }
.lpg-hdr.is-solid [data-hdr-cta] { border-color: rgb(var(--color-lovett)); background-color: rgb(var(--color-lovett)); }
.lpg-hdr.is-solid [data-hdr-cta]:hover { border-color: rgb(var(--color-lovett-blue)); background-color: rgb(var(--color-lovett-blue)); color: rgb(var(--color-white)); }
.lpg-hdr.is-solid button[aria-controls="mobile-nav"] { color: rgb(var(--color-ink)); }
@media (prefers-reduced-motion: reduce) { .lpg-hdr, .lpg-hdr * { transition: none !important; } }

/* Tab rows (Find Your Home): swipe sideways on small screens, but never draw a scrollbar. The active tab's -1px bottom
   margin used to make the row 1px taller than its box, which showed a stray vertical scrollbar on Windows. */
.lpg-tabs-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lpg-tabs-scroll::-webkit-scrollbar { display: none; }
.lpg-hdr:not(.lpg-hdr-ready), .lpg-hdr:not(.lpg-hdr-ready) * { transition: none !important; }

/* Every mention of Lovett / Lovett Homes links to lovetthomes.com. Keeps the surrounding text style; a light underline
   shows it is a link and turns solid on hover. */
.lpg-lovett-link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color 0.2s ease; }
.lpg-lovett-link:hover { text-decoration-color: currentColor; }

/* HEADER HOVERS (every page): menu links and the phone number fade their colour and draw the underline smoothly.
   The underline grows from the centre; the phone number gets the same line as the menu links. */
header nav[aria-label="Primary"] a { transition: color 0.3s var(--header-ease); }
header nav[aria-label="Primary"] a::after { transition: transform 0.3s var(--header-ease), background-color var(--header-duration) var(--header-ease); }
header > div a[href^="tel:"] { position: relative; transition: color 0.3s var(--header-ease); }
header > div a[href^="tel:"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background-color: rgb(var(--color-copper)); transform: scaleX(0); transition: transform 0.3s var(--header-ease), background-color var(--header-duration) var(--header-ease); }
header > div a[href^="tel:"]:hover::after { transform: scaleX(1); }
.lpg-hdr:not(.is-solid) > div a[href^="tel:"]::after { background-color: rgb(var(--color-copper-lt)); }
header > div [data-hdr-cta], header > div a[href="/contact/"].min-h-\[42px\] { transition: color 0.3s var(--header-ease), background-color 0.3s var(--header-ease), border-color 0.3s var(--header-ease); }

/* FOOTER SALES CONTACTS: the phone number uses the same underline as the footer menu links (.footer-link): a 1px line in the text colour that grows from the left in 250ms. It sits under the number only, not the icon. */
.footer-phone span { position: relative; }
.footer-phone span::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1px; background: currentColor; transition: width 250ms ease; }
.footer-phone:hover span::after, .footer-phone:focus-visible span::after { width: 100%; }

/* TABS (floor plans, site plans, contact, gallery filters): the underline draws in from the centre and the label colour fades, on hover and on click.
   The old instant border-colour swap is replaced by an ::after line, so selecting a tab animates instead of jumping. */
[role="tab"], #gallery [role="group"] > button { --tab-line: 2px; position: relative; border-bottom-color: transparent !important; transition: color 0.3s var(--header-ease); }
#gallery [role="group"] > button { --tab-line: 1px; }
[role="tab"]::after, #gallery [role="group"] > button::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(var(--tab-line) * -1); height: var(--tab-line); background-color: rgb(var(--color-copper)); opacity: 0.45; transform: scaleX(0); transition: transform 0.35s var(--header-ease), opacity 0.3s var(--header-ease); pointer-events: none; }
[role="tab"]:hover::after, #gallery [role="group"] > button:hover::after { transform: scaleX(1); }
[role="tab"][aria-selected="true"]::after, #gallery [role="group"] > button[aria-pressed="true"]::after { transform: scaleX(1); opacity: 1; }
/* panels and gallery grid fade in when switched (only after the first interaction, never on page load) */
@keyframes lpg-tab-in { from { opacity: 0; } to { opacity: 1; } }
.lpg-tab-used [role="tabpanel"]:not([hidden]) { animation: lpg-tab-in 0.3s var(--header-ease); }
.lpg-fade { animation: lpg-tab-in 0.3s var(--header-ease); }
@media (prefers-reduced-motion: reduce) { [role="tab"], [role="tab"]::after, #gallery [role="group"] > button, #gallery [role="group"] > button::after { transition: none; } .lpg-tab-used [role="tabpanel"]:not([hidden]), .lpg-fade { animation: none; } }

/* DRIVE-TIMES MAP (Find Your Home, js/map-places.js): the list rows are buttons that switch the map beside them. */
.lpg-place { transition: background-color 0.3s var(--header-ease), box-shadow 0.3s var(--header-ease); }
.lpg-place:hover { background-color: rgb(var(--color-cream)); }
.lpg-place.is-active { background-color: rgb(var(--color-cream)); box-shadow: inset 2px 0 0 rgb(var(--color-copper)); }
.lpg-place dd { transition: color 0.3s var(--header-ease); }
.lpg-place.is-active dd { color: rgb(var(--color-copper)); }
.lpg-place-btn { cursor: pointer; transition: color 0.3s var(--header-ease); }
.lpg-place.is-active .lpg-place-btn { font-weight: 600; }
.lpg-place-btn:focus-visible { outline: none; }
.lpg-place:has(.lpg-place-btn:focus-visible) { outline: 2px solid rgb(var(--color-lovett-blue)); outline-offset: -2px; }
.lpg-map iframe { transition: opacity 0.35s var(--header-ease); }
.lpg-map.is-loading iframe { opacity: 0.35; }
.lpg-map-cap { position: absolute; left: 12px; top: 12px; z-index: 2; display: none; max-width: calc(100% - 24px); align-items: center; gap: 12px; padding: 8px 12px; background: rgb(var(--color-stone) / 0.96); box-shadow: 0 2px 12px rgb(var(--color-ink) / 0.18); font-size: 13px; color: rgb(var(--color-ink)); }
.lpg-map-cap.is-on { display: flex; }
.lpg-map-cap-reset { flex-shrink: 0; font-size: 12px; font-weight: 500; color: rgb(var(--color-lovett-blue)); text-decoration: underline; text-underline-offset: 0.2em; }
.lpg-map-cap-reset:hover { color: rgb(var(--color-ink)); }
@media (prefers-reduced-motion: reduce) { .lpg-place, .lpg-place dd, .lpg-place-btn, .lpg-map iframe { transition: none; } }

/* NAV-STYLE LINKS (sales cards on Find Your Home): ink at 70% like the header menu, full ink on hover, and the text gets the same
   copper underline that draws in from the centre. Icons and arrows stay copper. */
.lpg-navlink { color: rgb(var(--color-ink) / 0.7); transition: color 0.3s var(--header-ease); }
.lpg-navlink:hover, .lpg-navlink:focus-visible { color: rgb(var(--color-ink)); }
.lpg-navlink-t { position: relative; }
.lpg-navlink-t::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background-color: rgb(var(--color-copper)); transform: scaleX(0); transition: transform 0.3s var(--header-ease); }
.lpg-navlink:hover .lpg-navlink-t::after, .lpg-navlink:focus-visible .lpg-navlink-t::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .lpg-navlink, .lpg-navlink-t::after { transition: none; } }

/* FORM CONTROLS (all forms): inputs, selects and textareas fade their border on hover and focus and get a soft blue halo, instead of the
   hard white-gap focus ring used for links and buttons. An invalid field keeps its red border and gets a red halo. */
input:not([type="radio"]):not([type="checkbox"]), select, textarea { transition: border-color 0.25s var(--header-ease), box-shadow 0.25s var(--header-ease); }
input:not([type="radio"]):not([type="checkbox"]):focus, input:not([type="radio"]):not([type="checkbox"]):focus-visible,
select:focus, select:focus-visible, textarea:focus, textarea:focus-visible {
  outline: none;
  border-color: rgb(var(--color-lovett-blue));
  box-shadow: 0 0 0 3px rgb(var(--color-lovett-blue) / 0.18);
}
input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]):focus, input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]):focus-visible { box-shadow: 0 0 0 3px rgb(180 35 24 / 0.18); }
/* radios and chips keep the standard ring, but sit closer to the control */
input[type="radio"]:focus-visible, input[type="checkbox"]:focus-visible { outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { input, select, textarea { transition: none; } }

/* GALLERY "MORE" MENU (js/gallery.js): below 1280px only the first two filters show; the rest sit in a dropdown. From 1280px all filters show. */
.lpg-more { position: relative; display: none; }
@media (max-width: 1279px) { .lpg-more { display: block; } .lpg-gal-extra { display: none !important; } }
.lpg-more-btn { position: relative; display: inline-flex; min-height: 44px; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: rgb(var(--color-muted)); transition: color 0.3s var(--header-ease); }
.lpg-more-btn:hover, .lpg-more-btn[aria-pressed="true"], .lpg-more-btn[aria-expanded="true"] { color: rgb(var(--color-ink)); }
.lpg-more-btn svg { transition: transform 0.3s var(--header-ease); }
.lpg-more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.lpg-more-btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background-color: rgb(var(--color-copper)); opacity: 0.45; transform: scaleX(0); transition: transform 0.35s var(--header-ease), opacity 0.3s var(--header-ease); pointer-events: none; }
.lpg-more-btn:hover::after { transform: scaleX(1); }
.lpg-more-btn[aria-pressed="true"]::after { transform: scaleX(1); opacity: 1; }
.lpg-more-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; padding: 4px; background: rgb(var(--color-white)); border: 1px solid rgb(var(--color-line)); box-shadow: 0 6px 20px rgb(var(--color-ink) / 0.14); }
.lpg-more-menu:not([hidden]) { animation: lpg-tab-in 0.2s var(--header-ease); }
.lpg-more-menu button { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 0 14px; text-align: left; font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: rgb(var(--color-muted)); transition: color 0.25s var(--header-ease), background-color 0.25s var(--header-ease); }
.lpg-more-menu button:hover { background-color: rgb(var(--color-cream)); color: rgb(var(--color-ink)); }
.lpg-more-menu button[aria-pressed="true"] { color: rgb(var(--color-ink)); box-shadow: inset 2px 0 0 rgb(var(--color-copper)); }
@media (prefers-reduced-motion: reduce) { .lpg-more-btn, .lpg-more-btn svg, .lpg-more-btn::after, .lpg-more-menu button { transition: none; } .lpg-more-menu:not([hidden]) { animation: none; } }

/* GALLERY TABS below 1280px: the tab row fills the container (tabs share the width equally, hairline under the row, the active tab's line spans its cell).
   The "More" menu opens from the right edge so it never leaves the screen. From 1280px the tabs are left-aligned text again. */
@media (max-width: 1279px) {
  .lpg-gal-tabs { width: 100%; flex-wrap: nowrap; border-bottom: 1px solid rgb(var(--color-line)); }
  .lpg-gal-tabs > button:not(.lpg-gal-extra), .lpg-gal-tabs > .lpg-more { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; }
  .lpg-gal-tabs .lpg-more-btn { width: 100%; justify-content: center; }
  .lpg-gal-tabs .lpg-more-menu { left: auto; right: 0; }
}

/* =====================================================================================================================
   CHAT ASSISTANT  (js/chatbot.js builds the markup, this file styles it; every class starts with .lpg-chat__)

   The DOM, from the outside in:
     .lpg-chat                  fixed container in the bottom-right corner. z-index 55: above the header (40) and the
                                lightbox (50), below the full-screen phone menu (600).
       .lpg-chat__panel         the chat window. data-view="home" or "room" is set by the script.
         .lpg-chat__home          HOME view: .lpg-chat__hero (photo, title) + .lpg-chat__cards (the question list)
         .lpg-chat__head          title bar of the ROOM view (back arrow, avatar, name, close)
         .lpg-chat__scrim / __sheet   the email request: a bottom sheet over the home view
         .lpg-chat__log           ROOM view: the conversation (.lpg-chat__row groups, typing dots, suggestion card)
         .lpg-chat__form          ROOM view: message box and send button
       .lpg-chat__teaser        the hook bubble above the button
       .lpg-chat__launcher      the round gold button

   Rules of thumb: sizes sit on the 4px scale, colours are only tokens from css/tokens.css, and animation is switched off
   in the reduced-motion block at the end of this section. Below 1280px the panel is full screen (see the last block).
   Some classes are built by the script from a variable: .lpg-chat__row--bot / --me and .lpg-chat__msg--bot / --me.
   ===================================================================================================================== */

/* The [hidden] attribute is how the script shows and hides views. These classes set their own display, so say it explicitly
   (do not rely on Tailwind's preflight, which only happens to win because it is injected last). */
.lpg-chat__panel[hidden], .lpg-chat__home[hidden], .lpg-chat__head[hidden], .lpg-chat__log[hidden], .lpg-chat__form[hidden],
.lpg-chat__scrim[hidden], .lpg-chat__sheet[hidden], .lpg-chat__teaser[hidden] { display: none; }

/* ---- Container and round button ---- */
/* --btn is the button size; the icon, the hook bubble position and the pulse ring all follow it (it grows at 1440px, see below).
   The container fades in once so the button does not pop in after the data has loaded. */
.lpg-chat { --btn: 56px; position: fixed; right: 16px; bottom: 16px; z-index: 55; font-size: 14px; line-height: 20px; color: rgb(var(--color-ink)); animation: lpg-chat-fade .4s ease-out both; }
.lpg-chat__launcher { position: relative; display: block; margin-left: auto; width: var(--btn); height: var(--btn); border: 0; border-radius: calc(var(--btn) / 2); background: rgb(var(--color-copper)); color: rgb(var(--color-white)); cursor: pointer; box-shadow: 0 8px 24px rgb(var(--color-copper) / .35); transition: background-color .2s, transform .2s; }
/* hover = the same gold, darker. Browsers without color-mix() fall back to brightness(); the white icon is brightened back. */
.lpg-chat__launcher:hover { background: rgb(var(--color-copper)); filter: brightness(.82); transform: translateY(-2px); }
.lpg-chat__launcher:hover .lpg-chat__ic { filter: brightness(1.22); }
@supports (background: color-mix(in srgb, red, blue)) {
  .lpg-chat__launcher:hover { background: color-mix(in srgb, rgb(var(--color-copper)) 76%, black); filter: none; }
  .lpg-chat__launcher:hover .lpg-chat__ic { filter: none; }
}
/* two icons are stacked in the button: the support icon (closed) and an X (open); opening cross-fades and rotates them */
.lpg-chat__ic { position: absolute; left: calc((var(--btn) - 24px) / 2); top: calc((var(--btn) - 24px) / 2); width: 24px; height: 24px; transition: opacity .2s, transform .2s; }
.lpg-chat__ic--chat { color: rgb(var(--color-white)); }
.lpg-chat__ic--x { opacity: 0; transform: rotate(-45deg); }
.lpg-chat[data-open="true"] .lpg-chat__launcher .lpg-chat__ic--chat { opacity: 0; transform: rotate(45deg); }
.lpg-chat[data-open="true"] .lpg-chat__launcher .lpg-chat__ic--x { opacity: 1; transform: none; }
/* gold ring that pulses three times around the button while the hook bubble is showing (.has-teaser is set by the script) */
.lpg-chat__launcher::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgb(var(--color-copper)); opacity: 0; pointer-events: none; }
.lpg-chat.has-teaser .lpg-chat__launcher::before { animation: lpg-chat-ring 2.2s ease-out 1s 3; }

/* ---- Panel (the window) ---- */
/* position: relative lets the email sheet and its scrim sit inside the panel. Room view: fixed height. */
.lpg-chat__panel { position: relative; display: flex; flex-direction: column; width: 392px; max-width: calc(100vw - 32px); height: min(600px, calc(100dvh - 120px)); margin-bottom: 16px; background: rgb(var(--color-white)); border: 1px solid rgb(var(--color-line)); border-radius: 16px; box-shadow: 0 16px 48px rgb(var(--color-lovett) / .2); overflow: hidden; }
/* Home view: the window is only as tall as its content (no empty area under the question card). */
.lpg-chat__panel[data-view="home"] { height: auto; max-height: min(600px, calc(100dvh - 120px)); }

/* avatar: navy disc with copper initials, same look as the sales team cards. Initials come from the assistant's name. */
.lpg-chat__avatar { display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgb(var(--color-lovett)); color: rgb(var(--color-copper-lt)); font-family: var(--font-playfair), serif; font-size: 12px; line-height: 16px; letter-spacing: .04em; }
/* the larger avatar on the navy title bar: a translucent disc with a copper ring */
.lpg-chat__avatar--lg { flex-basis: 40px; width: 40px; height: 40px; font-size: 16px; line-height: 24px; background: rgb(var(--color-white) / .1); box-shadow: inset 0 0 0 1px rgb(var(--color-copper-lt) / .6); }

/* round icon buttons on navy: close (X) and back arrow. Their <svg> uses .lpg-chat__close-ic. */
.lpg-chat__close, .lpg-chat__back { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.lpg-chat__close:hover, .lpg-chat__back:hover { background: rgb(var(--color-white) / .12); }
.lpg-chat__close-ic { width: 20px; height: 20px; }
/* little round chevron used at the end of the question rows and the suggestion rows */
.lpg-chat__chev { flex: 0 0 20px; width: 20px; height: 20px; color: rgb(var(--color-muted)); }

/* ---- HOME view: a photo header, then the question list overlapping its bottom edge ---- */
.lpg-chat__home { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow-y: auto; background: rgb(var(--color-stone)); }
/* The photo grows to fill any spare height, which pushes the title to its bottom and keeps the question card at the bottom of the window. */
.lpg-chat__hero { display: flex; flex: 1 0 auto; flex-direction: column; padding: 20px 20px 56px; color: rgb(var(--color-white)); background: linear-gradient(rgb(var(--color-lovett) / .66), rgb(var(--color-lovett) / .92)), url(/images/photos/gallery-streetscape-porches.webp) center / cover rgb(var(--color-lovett)); }
.lpg-chat__hero-top { display: flex; align-items: center; justify-content: flex-end; margin: 0 -8px auto 0; }   /* the close button, top right; margin-bottom: auto pushes the title down */
.lpg-chat__hero-title { margin-top: 24px; font-family: var(--font-playfair), serif; font-size: 32px; line-height: 40px; font-weight: 400; }
.lpg-chat__hero-sub { margin-top: 8px; font-size: 16px; line-height: 24px; color: rgb(var(--color-white) / .9); }
.lpg-chat__cards { position: relative; display: flex; flex-direction: column; gap: 12px; margin-top: -32px; padding: 0 16px 24px; }   /* -32px: the card overlaps the photo */
.lpg-chat__home:focus, .lpg-chat__home:focus-visible { outline: none; box-shadow: none; }   /* the home screen takes focus when it opens; the ring belongs on the rows, not the screen */
.lpg-chat__links { margin: 0; padding: 4px 16px; list-style: none; background: rgb(var(--color-white)); border: 1px solid rgb(var(--color-line)); border-radius: 16px; }
.lpg-chat__links li + li { border-top: 1px solid rgb(var(--color-line)); }
.lpg-chat__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 12px 0; border: 0; background: none; font: inherit; font-size: 14px; line-height: 20px; text-align: left; color: rgb(var(--color-ink)); cursor: pointer; transition: color .2s; }
.lpg-chat__link:hover { color: rgb(var(--color-lovett-blue)); }

/* ---- ROOM view: title bar ---- */
.lpg-chat__head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 8px; background: rgb(var(--color-lovett)); color: rgb(var(--color-white)); }
.lpg-chat__who { flex: 1 1 auto; min-width: 0; }
.lpg-chat__title { font-size: 16px; line-height: 24px; font-weight: 500; }
.lpg-chat__sub { font-size: 12px; line-height: 16px; color: rgb(var(--color-copper-lt)); }
.lpg-chat.is-typing .lpg-chat__sub { animation: lpg-chat-pulse 1.2s ease-in-out infinite; }   /* the subtitle reads "typing…" and pulses while the assistant types */

/* ---- ROOM view: the conversation ---- */
.lpg-chat__log { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 20px 16px; overflow-y: auto; background: rgb(var(--color-stone)); overscroll-behavior: contain; }   /* 16px between the agent's group and yours */
/* a centred date label, a line on each side */
.lpg-chat__date { display: flex; align-items: center; gap: 16px; }
.lpg-chat__date::before, .lpg-chat__date::after { content: ""; flex: 1 1 0; height: 1px; background: rgb(var(--color-line)); }
.lpg-chat__date span { font-size: 12px; line-height: 16px; color: rgb(var(--color-muted)); white-space: nowrap; }
/* a "row" is one group of bubbles from the same sender (consecutive bubbles share it). The agent's row starts with the avatar;
   its first line is .lpg-chat__meta (name and time) above the first bubble, and the avatar lines up with that bubble. */
.lpg-chat__row { display: flex; align-items: flex-start; gap: 8px; max-width: 100%; }
.lpg-chat__row--me { justify-content: flex-end; }
.lpg-chat__row--bot > .lpg-chat__avatar { flex-basis: 40px; width: 40px; height: 40px; margin-top: 20px; font-size: 14px; line-height: 20px; }   /* margin-top = the meta line (16px) + 4px */
.lpg-chat__stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 82%; }   /* 8px between bubbles of one group */
.lpg-chat__row--me .lpg-chat__stack { align-items: flex-end; }
.lpg-chat__meta { display: flex; align-items: center; gap: 4px; margin-bottom: -4px; font-size: 12px; line-height: 16px; color: rgb(var(--color-muted)); }   /* -4px cancels half of the stack gap, so the name sits snug on its bubble */
.lpg-chat__meta strong { font-weight: 500; }
.lpg-chat__row--me .lpg-chat__meta { justify-content: flex-end; }
.lpg-chat__ticks { width: 14px; height: 14px; margin-left: 2px; color: rgb(var(--color-copper)); }   /* the double tick after the visitor's time */
/* bubbles: the first one of a group has a small corner on the avatar side, the others are fully round */
.lpg-chat__msg { width: fit-content; max-width: 100%; padding: 12px 16px; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; animation: lpg-chat-in .24s ease-out both; }
.lpg-chat__msg--bot { background: rgb(var(--color-white)); border: 1px solid rgb(var(--color-line)); border-radius: 4px 16px 16px 16px; }
.lpg-chat__msg--bot ~ .lpg-chat__msg--bot { border-radius: 16px; }
.lpg-chat__msg--me { background: rgb(var(--color-lovett)); color: rgb(var(--color-white)); border-radius: 16px 4px 16px 16px; white-space: pre-wrap; }   /* pre-wrap keeps the visitor's own line breaks */
.lpg-chat__msg--me ~ .lpg-chat__msg--me { border-radius: 16px; }
.lpg-chat__msg a { text-decoration: underline; text-underline-offset: 2px; color: rgb(var(--color-lovett-blue)); }
.lpg-chat__msg--me a { color: inherit; }
/* typing indicator: three dots inside a bubble that is later filled with the real text */
.lpg-chat__msg.is-typing { padding: 16px; }
.lpg-chat__typing { display: inline-flex; gap: 4px; align-items: center; height: 8px; }
.lpg-chat__typing i { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--color-muted)); animation: lpg-chat-dot 1.1s ease-in-out infinite; }
.lpg-chat__typing i:nth-child(2) { animation-delay: .16s; }
.lpg-chat__typing i:nth-child(3) { animation-delay: .32s; }
/* suggested questions: a white card of rows under the agent's bubbles (indented past the avatar: 40px avatar + 8px gap) */
.lpg-chat__chips { display: flex; flex-direction: column; width: min(calc(100% - 48px), 320px); margin-left: 48px; padding: 4px 16px; background: rgb(var(--color-white)); border: 1px solid rgb(var(--color-line)); border-radius: 4px 16px 16px 16px; animation: lpg-chat-in .24s ease-out both; }
.lpg-chat__chips-label { padding: 12px 0 4px; font-size: 12px; line-height: 16px; font-weight: 500; color: rgb(var(--color-muted)); }
.lpg-chat__chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 10px 0; border: 0; background: none; color: rgb(var(--color-ink)); font: inherit; font-size: 14px; line-height: 20px; text-align: left; cursor: pointer; transition: color .2s; }
.lpg-chat__chip + .lpg-chat__chip { border-top: 1px solid rgb(var(--color-line)); }
.lpg-chat__chip:hover { color: rgb(var(--color-lovett-blue)); }

/* ---- ROOM view: message box. The textarea grows downwards up to 142px (5 lines); the window keeps its height and the
   messages above give up the space. The send button stays at the bottom edge. ---- */
.lpg-chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 16px; border-top: 1px solid rgb(var(--color-line)); background: rgb(var(--color-white)); }
.lpg-chat__input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 16px; border: 1px solid rgb(var(--color-line)); border-radius: 24px; background: rgb(var(--color-stone)); font: inherit; font-size: 16px; color: rgb(var(--color-ink)); }   /* 16px so iOS does not zoom in on focus */
.lpg-chat__input[aria-invalid="true"] { border-color: rgb(var(--color-danger)); }
.lpg-chat__textarea { height: 44px; min-height: 44px; max-height: 142px; padding: 9px 16px; border-radius: 22px; line-height: 24px; resize: none; overflow-y: hidden; }
.lpg-chat__send { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(var(--color-lovett)); color: rgb(var(--color-white)); cursor: pointer; transition: background-color .2s; }
.lpg-chat__send:hover { background: rgb(var(--color-lovett-blue)); }
.lpg-chat__send svg { width: 20px; height: 20px; }

/* ---- Email request: a bottom sheet over the home view (Continue or Skip). The scrim dims what is behind it. ---- */
.lpg-chat__scrim { position: absolute; inset: 0; z-index: 2; background: rgb(var(--color-lovett) / .5); animation: lpg-chat-fade .2s ease-out both; }
.lpg-chat__sheet { position: absolute; right: 0; bottom: 0; left: 0; z-index: 3; display: flex; flex-direction: column; gap: 8px; padding: 12px 20px 20px; background: rgb(var(--color-white)); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 32px rgb(var(--color-lovett) / .22); animation: lpg-chat-sheet .26s ease-out both; }
.lpg-chat__grip { align-self: center; width: 40px; height: 4px; margin-bottom: 8px; border-radius: 2px; background: rgb(var(--color-line)); }
.lpg-chat__sheet-text { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }   /* the request text: a serif lead line, then a quieter note */
.lpg-chat__sheet-lead { font-family: var(--font-playfair), serif; font-size: 20px; line-height: 28px; color: rgb(var(--color-ink)); }
.lpg-chat__sheet-note { font-size: 14px; line-height: 20px; color: rgb(var(--color-muted)); }
.lpg-chat__sheet-label { font-size: 14px; line-height: 20px; font-weight: 500; }
.lpg-chat__sheet .lpg-chat__input { flex: 0 0 auto; height: 44px; border-radius: 2px; background: rgb(var(--color-white)); }   /* squarer, to match the site's fields */
.lpg-chat__sheet-err { font-size: 12px; line-height: 16px; color: rgb(var(--color-danger)); }
.lpg-chat__sheet-btn { flex: 0 0 auto; width: 100%; height: 44px; margin-top: 4px; padding: 0 20px; border: 0; border-radius: 2px; background: rgb(var(--color-lovett)); color: rgb(var(--color-white)); font: inherit; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: background-color .2s; }
.lpg-chat__sheet-btn:hover { background: rgb(var(--color-lovett-blue)); }
.lpg-chat__sheet-skip { align-self: center; min-height: 40px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; line-height: 20px; color: rgb(var(--color-muted)); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.lpg-chat__sheet-skip:hover { color: rgb(var(--color-ink)); }

/* ---- Hook bubble: a card with one short message above the button (js/chatbot.js decides when). ----
   It appears 3 seconds after the page has finished loading, stays 6 seconds (or until the x is pressed or the chat is opened),
   and is not shown again to the same visitor. The card is only as wide as its message (max 320px, 380px on wide screens). */
.lpg-chat__teaser { position: absolute; right: 0; bottom: calc(var(--btn) + 16px); width: max-content; max-width: min(320px, calc(100vw - 32px)); transform-origin: 85% 100%; animation: lpg-chat-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.lpg-chat__teaser.is-leaving { animation: lpg-chat-out .3s ease-in both; }   /* the script adds .is-leaving, then hides the card when the fade is over */
.lpg-chat__teaser-open { position: relative; display: block; width: 100%; padding: 20px; border: 1px solid rgb(var(--color-copper-lt)); border-radius: 16px; background: rgb(var(--color-cream)); box-shadow: 0 16px 40px rgb(var(--color-copper) / .32); color: rgb(var(--color-ink)); font: inherit; text-align: left; cursor: pointer; }
.lpg-chat__teaser-open::after { content: ""; position: absolute; right: 32px; bottom: -8px; width: 14px; height: 14px; background: rgb(var(--color-cream)); border-right: 1px solid rgb(var(--color-copper-lt)); border-bottom: 1px solid rgb(var(--color-copper-lt)); transform: rotate(45deg); border-radius: 0 0 3px 0; }   /* the tail that points at the button */
.lpg-chat__teaser-text { display: block; padding-right: 28px; font-size: 15px; line-height: 24px; }   /* padding-right keeps the text clear of the x */
.lpg-chat__teaser-x { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgb(var(--color-copper)); cursor: pointer; transition: background-color .2s; }
.lpg-chat__teaser-x:hover { background: rgb(var(--color-copper) / .14); }
.lpg-chat__teaser-x .lpg-chat__close-ic { width: 16px; height: 16px; }

/* ---- Wide screens (1440px and up): a bigger button, icon and hook bubble ---- */
@media (min-width: 1440px) {
  .lpg-chat { --btn: 72px; right: 32px; bottom: 32px; }
  .lpg-chat__ic { width: 32px; height: 32px; left: calc((var(--btn) - 32px) / 2); top: calc((var(--btn) - 32px) / 2); }
  .lpg-chat__launcher { box-shadow: 0 12px 32px rgb(var(--color-copper) / .38); }
  .lpg-chat__teaser { max-width: 380px; }
  .lpg-chat__teaser-open { padding: 24px; border-radius: 20px; }
  .lpg-chat__teaser-text { padding-right: 36px; font-size: 17px; line-height: 28px; }
  .lpg-chat__teaser-x { top: 16px; right: 16px; width: 32px; height: 32px; }
}

/* ---- Tablets and phones (below 1280px): opening the chat takes the whole screen ----
   The page behind is locked from scrolling by the script. The hero, title bar and sheet respect the notch / home indicator
   (env(safe-area-inset-*)), and on wide tablets the content keeps a readable 720px column while the photo and bars stay full width. */
@media (max-width: 1279px) {
  .lpg-chat[data-open="true"] .lpg-chat__launcher { display: none; }
  .lpg-chat__panel,
  .lpg-chat__panel[data-view="home"] { position: fixed; inset: 0; top: var(--lpg-vv-top, 0px); z-index: 1; width: 100%; max-width: none; height: 100vh; height: 100dvh; height: var(--lpg-vv-h, 100dvh); max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .lpg-chat__hero { position: relative; padding-top: max(64px, calc(env(safe-area-inset-top) + 52px)); padding-inline: max(20px, calc((100% - 720px) / 2)); }
  .lpg-chat__hero-top { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; margin: 0; }   /* the close button stays in the screen's corner */
  .lpg-chat__hero-title { margin-top: auto; }
  .lpg-chat__cards { padding-inline: max(16px, calc((100% - 720px) / 2)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .lpg-chat__head { padding-top: max(12px, env(safe-area-inset-top)); }
  .lpg-chat__log { padding-inline: max(16px, calc((100% - 720px) / 2)); }
  .lpg-chat__form { padding-inline: max(16px, calc((100% - 720px) / 2)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .lpg-chat__sheet { max-width: 560px; margin-inline: auto; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

/* ---- Chat keyframes ---- */
@keyframes lpg-chat-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lpg-chat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }       /* a bubble or card arriving */
@keyframes lpg-chat-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes lpg-chat-dot { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-4px); } }
@keyframes lpg-chat-pulse { 50% { opacity: .5; } }
@keyframes lpg-chat-ring { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes lpg-chat-pop { 0% { opacity: 0; transform: translateY(12px) scale(.6); } 100% { opacity: 1; transform: none; } }   /* the hook bubble popping up */
@keyframes lpg-chat-out { to { opacity: 0; transform: translateY(8px) scale(.96); } }

/* Reduced motion: no transitions or animations in the chat (the script also shortens its typing pauses). */
@media (prefers-reduced-motion: reduce) {
  .lpg-chat, .lpg-chat__msg, .lpg-chat__chips, .lpg-chat__sheet, .lpg-chat__scrim, .lpg-chat__teaser, .lpg-chat__teaser.is-leaving { animation: none; }
  .lpg-chat__launcher, .lpg-chat__ic, .lpg-chat__chip, .lpg-chat__link { transition: none; }
  .lpg-chat__typing i, .lpg-chat.is-typing .lpg-chat__sub { animation: none; opacity: 1; }
  .lpg-chat.has-teaser .lpg-chat__launcher::before { animation: none; }
}

/* =====================================================================================================================
   PAGE LOAD  (js/page-ready.js)
   Until the Tailwind CDN has built its stylesheet and the fonts are in, the page is held back (html.lpg-wait hides the body)
   on a calm background, then it fades in. Home and Find Your Home wait on a blurred copy of their hero photo instead of a
   flat colour, so the same colours are on screen from the first frame to the last and the photo only sharpens.
   ===================================================================================================================== */
html { background-color: rgb(var(--color-stone)); }
body { transition: opacity .35s ease-out; }
html.lpg-wait body { opacity: 0; transition: none; }   /* set by page-ready.js while waiting; removed once styles and fonts are ready */

/* Blurred copies of the two hero photos (about 1.3 KB each, 40px wide, as data URIs). The scrim is the same dark layer the
   real hero puts over its photo (--hero-scrim, a darker one on phones), so the blur and the sharp photo match in brightness.
   To regenerate them after changing a hero photo, see "Chat assistant and page load" in CLAUDE.md. */
:root {
  --lqip-scrim: var(--hero-scrim);
  --lqip-home: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAAXACgDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAUEBgL/xAAgEAABBAEFAQEAAAAAAAAAAAABAAIDBBEFEiExQRMG/8QAGAEAAwEBAAAAAAAAAAAAAAAAAgMEBQH/xAAcEQADAAIDAQAAAAAAAAAAAAAAAQIRIQMTMTL/2gAMAwEAAhEDEQA/AIbqj5a4cPPFLtCWtIPm0hw5XXQ2KrAImDLj0FL1ihKQ+TGD2sntaewrlNaMMX6ewyB0Nhu5uPVDlsRWJicdlebbiMtIOVhiieZNwVH0stiOvDKhj+IDmDIJRaKbDJEd/iI5eg/Ds6+jkXI5GuGMq7PXheHCTnjHSIs7key6IWcnJax+dZakJgcGqZDoPxkDZHA8oidF1g7fFPpVm0pkFN7xgghERNi3gl5Esn//2Q==");
  --lqip-find: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAAXACgDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAAAAQFBgP/xAAhEAABBAIDAAMBAAAAAAAAAAABAAIDBBESBSExFCIyQf/EABgBAAMBAQAAAAAAAAAAAAAAAAECAwQA/8QAGxEAAgIDAQAAAAAAAAAAAAAAAAECAxESITH/2gAMAwEAAhEDEQA/AL9laN91lgM6B7wtPGKz4shzeh2shHe+LI9jvyVApW5rFuUtsFsefMoV3OAtsFJmk5m/DBFrCRsVRQSbOxJjLvV15GSrHWa5zt3Z9VXOdhG9pPZwmna5voIVqPhrqVeuxjJCWggeIs3PelqmGI5cHopbMrqdOXrB7C9h7KhUoWRnV4/XpCIsN7ey6CXpJ5TiHCuJIJNme4KqnX5mNbEYm/X+5RFSDaljJxMsvE4rSHrU9oiLRkJ//9k=");
}
@media (max-width: 767px) { :root { --lqip-scrim: var(--hero-scrim-phone); } }
/* behind the real hero photo (data-lqip="home" | "find" is on the hero <section>); the position matches each photo's object-position */
section[data-lqip="home"] { background: linear-gradient(rgb(var(--color-scrim) / var(--lqip-scrim)), rgb(var(--color-scrim) / var(--lqip-scrim))), var(--lqip-home) 50% 90% / cover; }
section[data-lqip="find"] { background: linear-gradient(rgb(var(--color-scrim) / var(--lqip-scrim)), rgb(var(--color-scrim) / var(--lqip-scrim))), var(--lqip-find) 50% 50% / cover; }
/* behind the whole page while it waits (page-ready.js adds .lpg-bg-home / .lpg-bg-find to <html>; fixed so it is viewport-sized) */
html.lpg-bg-home, html.lpg-bg-find { background-repeat: no-repeat; background-size: cover; background-attachment: fixed; }
html.lpg-bg-home { background-image: linear-gradient(rgb(var(--color-scrim) / var(--lqip-scrim)), rgb(var(--color-scrim) / var(--lqip-scrim))), var(--lqip-home); background-position: 50% 90%; }
html.lpg-bg-find { background-image: linear-gradient(rgb(var(--color-scrim) / var(--lqip-scrim)), rgb(var(--color-scrim) / var(--lqip-scrim))), var(--lqip-find); background-position: 50% 50%; }
/* the first hero photo fades in as soon as it is ready instead of popping over the blur
   ("backwards" fill only, so the carousel keeps control of the slide opacity afterwards) */
[data-carousel] > [data-slide]:first-child { animation: lpg-hero-in .6s ease-out backwards; }
@keyframes lpg-hero-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  [data-carousel] > [data-slide]:first-child { animation: none; }
}

/* =====================================================================================================================
   TOOLTIP for icon buttons (used on the admin page)
   <button class="lpg-tip" data-tip="Remove">. The tip sits below the button, right-aligned, with a small arrow under the
   button's centre. It shows on hover and keyboard focus; add .is-tip to keep it showing (used for "Email copied").
   ===================================================================================================================== */
.lpg-tip { position: relative; }
.lpg-tip::after { content: attr(data-tip); position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; padding: 6px 10px; border-radius: 2px; background: rgb(var(--color-ink)); color: rgb(var(--color-white)); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0; white-space: nowrap; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.lpg-tip::before { content: ""; position: absolute; top: calc(100% + 4px); right: calc(50% - 5px); z-index: 40; width: 0; height: 0; border-style: solid; border-width: 0 5px 6px; border-color: transparent transparent rgb(var(--color-ink)); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.lpg-tip:hover::after, .lpg-tip:focus-visible::after, .lpg-tip.is-tip::after,
.lpg-tip:hover::before, .lpg-tip:focus-visible::before, .lpg-tip.is-tip::before { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lpg-tip::after, .lpg-tip::before { transition: none; } }

/* =====================================================================================================================
   REGISTER CLIENT MODAL  (js/register-client.js builds the markup; the form fields use Tailwind utilities in the markup)
   .lpg-modal__actions = the button row (NEXT, or BACK + REGISTER); pinned to the bottom edge on phones.

     .lpg-modal            fixed full-screen layer, z-index 70: above the chat (55), below the phone menu (600)
       .lpg-modal__scrim     dark backdrop; clicking it closes the dialog
       .lpg-modal__dialog    the card, centred, scrolls inside itself when the window is short; full screen below 768px
         .lpg-modal__close     round x button, top right
   ===================================================================================================================== */
.lpg-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lpg-modal[hidden] { display: none; }
.lpg-modal__scrim { position: absolute; inset: 0; background: rgb(var(--color-scrim) / .6); animation: lpg-modal-fade .25s ease both; }
.lpg-modal__dialog { position: relative; width: 100%; max-width: 640px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 16px; border-radius: 2px; background: rgb(var(--color-stone)); box-shadow: 0 24px 64px rgb(var(--color-scrim) / .35); animation: lpg-modal-in .3s var(--header-ease) both; }
.lpg-modal__close { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: var(--size-md); height: var(--size-md); border: 0; border-radius: 50%; background: transparent; color: rgb(var(--color-ink)); cursor: pointer; transition: background-color .2s; }
.lpg-modal__close:hover { background: rgb(var(--color-cream)); }
/* phones (below 768px): the form fills the whole screen, edge to edge; it scrolls inside when the content is taller */
@media (max-width: 767px) {
  .lpg-modal { padding: 0; }
  .lpg-modal__dialog { max-width: none; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; padding-bottom: 0; }
  /* The dialog is a column: header, then the form fills the rest, so NEXT / REGISTER sit at the bottom edge even when the
     content is short, and stay pinned there while longer content scrolls above them. margin-top:auto pushes the row down;
     the element before it keeps a 24px gap so the row never touches the content. (Selector is long to beat the Tailwind spacing utilities.) */
  .lpg-modal__dialog { display: flex; flex-direction: column; }
  .lpg-modal__dialog form { display: flex; flex: 1 1 auto; flex-direction: column; }
  .lpg-modal__dialog [data-step]:not([hidden]) { display: flex; flex: 1 1 auto; flex-direction: column; }
  .lpg-modal .lpg-modal__dialog [data-step] > .lpg-modal__actions { margin-top: auto; }
  .lpg-modal__dialog [data-step] > :has(+ .lpg-modal__actions) { margin-bottom: 24px; }
  .lpg-modal__actions { position: sticky; bottom: 0; z-index: 1; margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgb(var(--color-line)); background: rgb(var(--color-stone)); }
}
@keyframes lpg-modal-fade { from { opacity: 0; } }
@keyframes lpg-modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .lpg-modal__scrim, .lpg-modal__dialog { animation: none; } }
