/* Shared public heroes: images must never determine the text column width.
 * The tokens layer precedes legacy, so important layout resets override the
 * older important theme rules without escalating selector specificity. */
@layer tokens {
  body[data-yitm-public-theme] #main-content .yitm-service-hero-shell .hero-grid {
    display:grid!important;
    grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)!important;
    grid-template-rows:none!important;
    gap:clamp(24px,4vw,48px)!important;
    align-items:start!important;
  }
  body[data-yitm-public-theme] #main-content .yitm-service-hero-shell .hero-grid > * {
    grid-column:auto!important;grid-row:auto!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    float:none!important;margin:0!important;
  }
  body[data-yitm-public-theme] #main-content .yitm-service-hero-shell :is(h1,.hero-h1,.hero-intro,.shared-panel,.shared-card) {
    width:auto!important;min-width:0!important;max-width:100%!important;
    overflow-wrap:break-word!important;white-space:normal!important;
  }
  body[data-yitm-public-theme] #main-content .yitm-service-hero-shell .hero-img {
    display:block!important;width:100%!important;height:auto!important;
    max-width:100%!important;max-height:none!important;object-fit:contain!important;
  }
  /* Every article family uses title/copy first, followed by full-width media. */
  body:is(.template-blog-post,[data-yitm-post-type="article"]) #main-content :is(.yitm-hero,.scam-post-hero,.post-hero,.blog-article-hero,.leadroom-article-hero,.yitm-funnel-hero,.yitm-triage-hero,.article-hero,.hub-article-hero,.blog-hero-stack) {
    box-sizing:border-box!important;width:100%!important;max-width:1180px!important;
    margin:24px auto!important;padding:clamp(20px,4vw,40px)!important;
    background:var(--yitm-white,#fff)!important;border:1px solid var(--yitm-border,#eacbc7)!important;
    border-top:4px solid var(--yitm-primary,#b63d36)!important;border-radius:24px!important;
  }
  body:is(.template-blog-post,[data-yitm-post-type="article"]) #main-content :is(.hero-grid,.yitm-hero-grid,.post-hero-grid,.blog-article-hero-grid,.leadroom-hero-grid,.leadroom-article-hero,.blog-article-hero,.post-hero,.yitm-funnel-hero,.yitm-triage-hero,.article-hero,.hub-article-hero,.blog-hero-stack) {
    display:flex!important;flex-direction:column!important;
    grid-template-columns:minmax(0,1fr)!important;gap:24px!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
  }
  body:is(.template-blog-post,[data-yitm-post-type="article"]) #main-content :is(.hero-grid,.yitm-hero-grid,.post-hero-grid,.blog-article-hero-grid,.leadroom-hero-grid,.leadroom-article-hero,.blog-article-hero,.post-hero,.yitm-funnel-hero,.yitm-triage-hero,.article-hero,.hub-article-hero,.blog-hero-stack) > * {
    grid-column:auto!important;grid-row:auto!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    flex:auto!important;float:none!important;margin-inline:auto!important;
  }
  body:is(.template-blog-post,[data-yitm-post-type="article"]) #main-content :is(.yitm-hero-copy,.post-hero-copy,.blog-article-hero-copy,.leadroom-hero-copy,.yitm-triage-hero > div) {
    order:0!important;width:100%!important;max-width:840px!important;min-width:0!important;
  }
  body:is(.template-blog-post,[data-yitm-post-type="article"]) #main-content :is(.yitm-hero-media,.scam-post-hero-image,.post-hero-image,.blog-article-hero-image,.leadroom-hero-media,.leadroom-article-hero-image,.blog-article-hero-media,.article-hero-media,.hero-img-col) {
    order:1!important;width:100%!important;max-width:1080px!important;min-width:0!important;margin:0 auto!important;
  }
  body:is(.template-blog-post,[data-yitm-post-type="article"]) #main-content :is(.yitm-hero,.scam-post-hero,.post-hero,.blog-article-hero,.leadroom-article-hero,.yitm-funnel-hero,.yitm-triage-hero,.article-hero,.hub-article-hero,.blog-hero-stack) h1 {
    width:auto!important;max-width:24ch!important;margin-inline:auto!important;
    font-size:clamp(2rem,4.5vw,3.5rem)!important;line-height:1.12!important;
    white-space:normal!important;overflow-wrap:break-word!important;
  }
  body:is(.template-blog-post,[data-yitm-post-type="article"]) #main-content :is(.yitm-hero,.scam-post-hero,.post-hero,.blog-article-hero,.leadroom-article-hero,.yitm-funnel-hero,.yitm-triage-hero,.article-hero,.hub-article-hero,.blog-hero-stack) img {
    display:block!important;width:100%!important;max-width:100%!important;
    height:auto!important;max-height:560px!important;object-fit:contain!important;
    float:none!important;margin:0 auto!important;border-radius:24px!important;
  }
  @media(max-width:980px) {
    body[data-yitm-public-theme] #main-content .yitm-service-hero-shell .hero-grid {grid-template-columns:minmax(0,1fr)!important;gap:24px!important}
  }
}

/* Shared dark-footer copy: applies outside article templates and to legacy notes.
   Reset is an early layer so these important colours beat legacy article layers. */
@layer reset {
  html:root:root body .yitm-unified-footer :is(.footer-referral-note,.yitm-footer-referral-note),
  html:root:root body .yitm-unified-footer :is(.footer-referral-note,.yitm-footer-referral-note) :is(a,p,span,strong,b,em,small) {
    color:var(--yitm-on-dark-copy,#EAF4FA)!important;
    -webkit-text-fill-color:var(--yitm-on-dark-copy,#EAF4FA)!important;
    opacity:1!important;text-shadow:none!important;
  }
  html:root:root body .yitm-unified-footer :is(.footer-referral-note,.yitm-footer-referral-note) a {
    text-decoration:underline!important;text-underline-offset:.18em;
  }
}



/* YITM blue front desk — 27 October 2026.
   Layout and semantic success/error states remain owned by their components. */
@layer tokens {
 html:root body[data-yitm-design-mode="home"] .home-core-hero {
  background:radial-gradient(ellipse at 95% 5%,#124A70 0%,#0B2344 48%,#071A33 100%)!important;
  color:var(--yitm-white)!important;min-height:0!important;
 }
 html:root body[data-yitm-design-mode="home"] .home-core-hero .home-assistant-intro {
  max-width:960px!important;text-align:left!important;margin:0 auto 28px!important;
 }
 html:root body[data-yitm-design-mode="home"] .home-core-hero .home-assistant-intro h1 {
  color:var(--yitm-white)!important;-webkit-text-fill-color:currentColor!important;
  font-family:var(--yitm-heading-font)!important;font-size:clamp(2rem,4.5vw,3.75rem)!important;
  font-weight:750!important;line-height:1.12!important;letter-spacing:-.035em!important;
  text-transform:none!important;max-width:22ch!important;margin:12px 0 18px!important;
 }
 html:root body[data-yitm-design-mode="home"] .home-core-hero .home-assistant-intro :is(p,.eyebrow,.home-neighbour-trust__text) {
  color:var(--yitm-on-dark-copy)!important;-webkit-text-fill-color:currentColor!important;
 }
 html:root body[data-yitm-design-mode="home"] .home-core-hero .home-assistant-intro p {
  font-size:clamp(1.125rem,1.6vw,1.3rem)!important;line-height:1.6!important;max-width:65ch!important;
 }
 html:root body[data-yitm-design-mode="home"] .home-core-hero .home-assistant-intro a {
  color:var(--yitm-white)!important;-webkit-text-fill-color:currentColor!important;
  text-decoration:underline!important;text-underline-offset:.2em;
 }
 html:root body[data-yitm-design-mode="home"] .home-core-hero :is(.yre,.yhq) {
  width:100%!important;max-width:960px!important;margin-inline:auto!important;
  background:var(--yitm-white)!important;color:var(--yitm-navy)!important;
  border:1px solid var(--yitm-border)!important;border-radius:24px!important;
  box-shadow:0 20px 60px #0003!important;
 }
 html:root body[data-yitm-design-mode="home"] .home-core-hero .home-frontdesk-call {
  display:flex!important;justify-content:center!important;align-items:center;flex-wrap:wrap;
  gap:8px 14px;margin:22px auto 0!important;color:var(--yitm-white)!important;
  font-size:1.125rem!important;line-height:1.6!important;
 }
 html:root body[data-yitm-design-mode="home"] .home-frontdesk-call a {
  display:inline-flex;align-items:center;min-height:48px;color:var(--yitm-white)!important;
  -webkit-text-fill-color:currentColor!important;font-weight:750;text-underline-offset:.2em;
 }
 html:root body :is(.nextgen-process,.yitm-app-header) {border-color:var(--yitm-border)!important}
 html:root body[data-yitm-design-mode="home"] .nextgen-process {background:var(--yitm-footer)!important}
 html:root body[data-yitm-design-mode="home"] .nextgen-process :is(h2,h3,p,.nextgen-kicker) {
  color:var(--yitm-on-dark-copy)!important;-webkit-text-fill-color:currentColor!important;
 }
}

/* Early reset layer also wins over the later community-page important rules. */
@layer reset {
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-assistant-intro :is(h1,p) {text-align:left!important;margin-left:0!important;margin-right:0!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-assistant-intro .eyebrow {background:transparent!important;border:0!important;padding:0!important;color:var(--yitm-on-dark-copy)!important;-webkit-text-fill-color:currentColor!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-neighbour-trust {justify-content:flex-start!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-frontdesk-call {justify-content:flex-start!important;margin-block:12px 0!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .yre h2 {font-size:clamp(1.4rem,2.5vw,1.8rem)!important;line-height:1.25!important;margin:12px 0!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .yre__intro {display:none!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .yre__form label {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
}

@layer reset {
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-neighbour-trust {margin:20px auto 0!important;max-width:960px;justify-content:flex-start!important;text-align:left!important;color:var(--yitm-on-dark-copy)!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-neighbour-trust__text {color:var(--yitm-on-dark-copy)!important;-webkit-text-fill-color:currentColor!important}
}

/* Build 2: make services explicit and keep community links readable on the navy hero. */
@layer reset {
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-assistant-intro h1.home-frontdesk-service-title {
  max-width:28ch!important;font-size:clamp(2rem,4vw,3.25rem)!important;line-height:1.15!important;
 }
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-community-shortcuts a,
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-community-shortcuts a:is(:link,:visited,:hover,:active,:focus-visible),
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-community-shortcuts a :is(span,strong,em,small,svg) {
  color:var(--yitm-white)!important;-webkit-text-fill-color:currentColor!important;
  font-size:1rem!important;line-height:1.6!important;opacity:1!important;
 }
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-community-shortcuts a {
  display:inline-flex!important;align-items:center;min-height:48px;padding:8px 12px;border-radius:10px;
  text-decoration:underline!important;text-underline-offset:.2em;
 }
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-community-shortcuts a:hover {background:#ffffff14!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .home-community-shortcuts a:focus-visible {
  outline:3px solid var(--yitm-white)!important;outline-offset:3px;
 }
}

/* Batch 5: a quiet rectangular frame replaces the oversized circular arcs. */
@layer reset {
 html:root:root body[data-yitm-design-mode="home"] #main #top.home-core-hero {position:relative!important;isolation:isolate;overflow:hidden!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top.home-core-hero::before,
 html:root:root body[data-yitm-design-mode="home"] #main #top.home-core-hero::after {
  content:""!important;display:block!important;position:absolute!important;pointer-events:none!important;
  z-index:0!important;inset:0!important;width:auto!important;height:auto!important;
  border:1px solid #52ddff40!important;border-radius:inherit!important;
  background:none!important;box-shadow:inset 0 1px 0 #52ddff35,inset 0 0 32px #139cff0d!important;
  opacity:1!important;transform:none!important;animation:none!important;
 }
 html:root:root body[data-yitm-design-mode="home"] #main #top.home-core-hero::before {background:linear-gradient(135deg,#139cff0d,transparent 45%)!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top.home-core-hero::after {border:0!important;box-shadow:none!important;background:linear-gradient(90deg,transparent,#52ddff90,#139cff60,transparent) top center / 80% 2px no-repeat!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top.home-core-hero>.wrap {position:relative!important;z-index:1!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .yitm-quoteme-mascot img {display:block;width:40px;height:40px;object-fit:contain}
 @media(forced-colors:active) {
  html:root:root body[data-yitm-design-mode="home"] #main #top.home-core-hero::before,
  html:root:root body[data-yitm-design-mode="home"] #main #top.home-core-hero::after {display:none!important}
 }
}

@layer reset {
 html:root:root body[data-yitm-design-mode="home"] #main #top .yhq__response-mascot {background:transparent!important;box-shadow:none!important}
 html:root:root body[data-yitm-design-mode="home"] #main #top .yhq__response-mascot img {display:block;width:32px;height:32px;object-fit:contain}
}
