/* v146 phone fit: keeps hero words, labels and buttons inside their boxes on small phones (320-480px). Loaded last on every public page. */
@media (max-width: 1024px) {
  /* the hero card's single column can never grow wider than the card */
  html body [data-r="herocard"] { grid-template-columns: minmax(0, 1fr) !important; box-sizing: border-box; max-width: 100% !important; }
  html body [data-r="herocard"] > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
  html body [data-r="hero"] > div, html body [data-r="hero"] > div > * { min-width: 0; max-width: 100%; }
  html body [data-r="hero"] a[style*="border-radius: 100px"], html body [data-r="hero"] a[style*="borderRadius: 100px"] { box-sizing: border-box; max-width: 100%; }
  html body section div[style*="grid"] > a, html body section div[style*="grid"] > div { box-sizing: border-box; min-width: 0; }
}
@media (max-width: 560px) {
  /* hero label: let it wrap onto two balanced lines instead of running past the card */
  html body [data-r="herocard"] span[style*="nowrap"] { white-space: normal !important; text-wrap: balance; min-width: 0; line-height: 1.6; }
  html body [data-r="herocard"] > div:first-child { max-width: 100%; }
  html body [data-r="herocard"] span[style*="width: 30px"] { flex: 0 0 18px; width: 18px !important; }
  html body [data-r="herocard"] > div:first-child { gap: 10px !important; }
  html body [data-r="hero"]:has([data-r="herocard"]) { padding-left: 16px !important; padding-right: 16px !important; }
  html body [data-r="herocard"] { padding: 34px 20px 30px !important; }
  html body [data-r="hero"] a[style*="padding: 17px 28px"] { padding: 16px 20px !important; font-size: 15.5px !important; }
}
@media (max-width: 420px) {
  /* header: logo + Menu fit on one row on the smallest phones */
  html body header > div { padding-left: 16px !important; padding-right: 16px !important; gap: 12px !important; }
  html body header > div > a:first-child img { height: auto !important; max-height: 62px; width: min(214px, calc(100vw - 132px)) !important; }
  html body header button[data-r="burger"] { flex: 0 0 auto; padding: 11px 16px !important; }
}
html body .rv-nobr { white-space: nowrap !important; }
@media (max-width: 560px) {
  /* Join Our Team: the "choose your path" rows stack (title, note, then button/badge) so nothing runs past the card */
  html body [data-r="heroimg"] > div:has(> a[data-role]) { padding: 22px 18px !important; }
  html body [data-r="heroimg"] > div:has(> a[data-role]) > span { text-align: center !important; }
  html body [data-r="heroimg"] > div > a[data-role], html body [data-r="heroimg"] > div > div[aria-disabled] { flex-direction: column !important; align-items: center !important; justify-content: center !important; text-align: center !important; gap: 12px !important; padding: 20px 18px !important; }
  html body [data-r="heroimg"] > div > a[data-role] > span, html body [data-r="heroimg"] > div > div[aria-disabled] > span { min-width: 0; max-width: 100%; }
}
html body .rv-btxt { text-wrap: balance; }
@media (max-width: 420px) {
  /* smallest phones: drop the two short rules beside the hero label so the label gets the full width */
  html body [data-r="herocard"] span[style*="width: 30px"] { display: none !important; }
  html body [data-r="herocard"] span[style*="nowrap"] { letter-spacing: .1em !important; }
}
@media (min-width: 370px) and (max-width: 560px) {
  html body [data-r="herocard"] h1 em { white-space: nowrap; }
}
/* v147 desktop header: Client Login + Pay my bill share one pill, split by a diagonal (light blue | cream) */
html body .rv-split { display: inline-flex; align-items: stretch; flex: 0 0 auto; border-radius: 100px; overflow: hidden; border: 1.5px solid #7CC0E8; background: #FBF8F4; box-sizing: border-box; isolation: isolate; }
html body .rv-split > a { display: inline-flex; align-items: center; font-size: 14.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; color: #17384F; line-height: 1.2; transition: background .25s; }
html body .rv-split-login { position: relative; z-index: 1; background: #7CC0E8; padding: 11px 26px 11px 20px; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
html body .rv-split-pay { padding: 11px 18px 11px 10px; margin-left: -12px; padding-left: 22px; background: #FBF8F4; }
html body .rv-split-login:hover { background: #5FAEDD; }
html body .rv-split-pay:hover { background: #FFFFFF; }
html body .rv-split > a:focus-visible { outline: 2px solid #17384F; outline-offset: -4px; }
/* v147: keep the one-row desktop header fitting on 1201-1439px laptops now that it carries the split pill */
@media (min-width: 1201px) and (max-width: 1439px) {
  html body header > div { gap: 18px !important; padding-left: 24px !important; padding-right: 24px !important; }
  html body header > div > a:first-child img[style*="height: 62px"] { height: 54px !important; }
  html body header nav[data-r="nav"] { gap: 3px !important; }
  html body header nav[data-r="nav"] > a:not([aria-label]):not([href*="Book"]):not([href*="book"]) { padding: 7px 10px !important; font-size: 14px !important; }
  html body header nav[data-r="nav"] a[aria-label="FAQ"] { margin-left: 2px !important; }
  html body header nav[data-r="nav"] a[aria-label="Contact"] { margin-right: 4px !important; }
  html body .rv-split > a { font-size: 14px; }
  html body .rv-split-login { padding: 10px 22px 10px 16px; }
  html body .rv-split-pay { padding: 10px 14px 10px 20px; }
  html body header a[href*="Book%20a%20Consult"] { padding: 11px 16px !important; font-size: 14px !important; margin-left: 5px; }
}
/* icon + heading rows ("Visiting us", "The practical part", office cards): keep the icon right beside its heading on phones */
@media (max-width: 1024px) {
  html body div[style*="justify-content: center"][style*="gap: 12px"] > img[aria-hidden="true"] + h3 { margin-left: 0 !important; margin-right: 0 !important; }
}

/* v150 footer: Leave a review | Pay my bill as one diagonal split pill, Join our team outlined beside it */
html body .rv-fsplit { display: inline-flex; align-items: stretch; flex: 0 0 auto; height: 42px; border-radius: 100px; overflow: hidden; isolation: isolate; box-shadow: 0 0 0 1.5px rgba(251,248,244,.35); }
html body .rv-fsplit > a { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; white-space: nowrap; line-height: 1; transition: background .2s; }
html body .rv-fsplit-review { position: relative; z-index: 1; background: #C4744C; color: #FBF8F4; padding: 0 28px 0 18px; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
html body .rv-fsplit-pay { background: #FBF8F4; color: #17384F; margin-left: -14px; padding: 0 18px 0 24px; }
html body .rv-fsplit-review:hover { background: #B4552D; color: #FBF8F4; }
html body .rv-fsplit-pay:hover { background: #FFFFFF; color: #17384F; }
html body .rv-fteam { height: 42px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; border-radius: 100px; border: 1.5px solid #7CC0E8; color: #FBF8F4; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
html body .rv-fteam:hover { background: #7CC0E8; color: #17384F; }
html body .rv-fsplit > a:focus-visible, html body .rv-fteam:focus-visible { outline: 2px solid #7CC0E8; outline-offset: -4px; }
@media (max-width: 1024px) { html body .rv-fsplit, html body .rv-fteam { height: 44px; } }
@media (max-width: 420px) { html body .rv-fsplit > a { font-size: 13px; gap: 6px; } html body .rv-fsplit > a > svg, html body .rv-fsplit > a > span[aria-hidden] { display: none; } html body .rv-fsplit-review { padding: 0 26px 0 18px; } html body .rv-fsplit-pay { padding: 0 18px 0 22px; } }
html body .rv-fsplit > .rv-fsplit-review { margin: 0 !important; }
html body .rv-fsplit > .rv-fsplit-pay { margin: 0 0 0 -14px !important; }
html body .rv-fsplit > a, html body a.rv-fteam { font-size: 13.5px !important; }
@media (max-width: 1024px) { html body div:has(> .rv-fsplit) { justify-content: center !important; } html body a.rv-fteam { margin: 0 !important; } }
@media (max-width: 420px) { html body .rv-fsplit > a { font-size: 13px !important; } }
