/* MJ Fence ME — UX polish/refactor layer, loaded after the legacy bundle.
   Goal: calmer orange, stronger spruce accents, predictable responsive layouts, better tap targets. */
:root{
  --ux-orange:#f0782b;
  --ux-orange-2:#d85816;
  --ux-orange-3:#b9440f;
  --ux-spruce:#145c5a;
  --ux-spruce-2:#0f4947;
  --ux-spruce-3:#eaf4f1;
  --ux-ink:#211c19;
  --ux-text:#3a332d;
  --ux-muted:#74675e;
  --ux-cream:#fff8f0;
  --ux-paper:#fffdf8;
  --ux-line:rgba(20,92,90,.16);
  --ux-line-strong:rgba(20,92,90,.30);
  --ux-shadow:0 20px 64px rgba(33,28,25,.12);
  --ux-shadow-soft:0 12px 34px rgba(33,28,25,.08);
  --ux-radius:clamp(18px,2vw,28px);
  --ux-header-h:78px;
  --safe-bottom:env(safe-area-inset-bottom,0px);
  accent-color:var(--ux-spruce);
}

html{
  scroll-padding-top:calc(var(--ux-header-h) + 18px);
  text-size-adjust:100%;
}

body{
  color:var(--ux-ink);
  background:
    radial-gradient(circle at 10% 0%,rgba(20,92,90,.08),transparent 30%),
    radial-gradient(circle at 92% 2%,rgba(240,120,43,.08),transparent 26%),
    linear-gradient(180deg,#fff9f1 0%,#f7efe5 46%,#fff8f0 100%) !important;
  font-size:clamp(16px,.92vw,18px);
  overflow-x:hidden;
}

body,
button,
input,
select,
textarea{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

::selection{background:rgba(20,92,90,.22);color:var(--ux-ink)}

main{isolation:isolate}

.container{
  width:min(100%,calc(var(--max,1180px) + 44px));
  padding-inline:clamp(16px,3vw,22px) !important;
}

img{height:auto}

button,
a,
.btn,
.nav-toggle,
.filter-btn,
.tool-chip,
.dock-btn,
.summary-button{
  touch-action:manipulation;
  -webkit-tap-highlight-color:rgba(20,92,90,.14);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible{
  outline:3px solid rgba(240,120,43,.70) !important;
  outline-offset:3px !important;
}

input,
select,
textarea{
  min-height:48px;
  font-size:16px !important;
  border-color:rgba(20,92,90,.22) !important;
}

textarea{line-height:1.5}

label{line-height:1.35}

h1,h2,h3{
  color:var(--ux-ink);
  text-wrap:balance;
}

p,.lead,li{
  text-wrap:pretty;
}

p,.lead{
  max-width:72ch;
}

.lead{
  color:var(--ux-text) !important;
  line-height:1.64;
  font-weight:650;
}

/* Header: one clean desktop row, earlier mobile menu before it gets cramped. */
.site-header{
  z-index:240 !important;
  background:rgba(255,248,240,.90) !important;
  border-bottom:1px solid rgba(33,28,25,.08) !important;
  box-shadow:0 12px 36px rgba(33,28,25,.07) !important;
  backdrop-filter:saturate(160%) blur(16px);
  -webkit-backdrop-filter:saturate(160%) blur(16px);
}

.site-header.scrolled,
.ux-scrolled .site-header{
  background:rgba(255,248,240,.96) !important;
  box-shadow:0 16px 48px rgba(33,28,25,.10) !important;
}

.header-inner{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:clamp(.6rem,1.35vw,1.25rem) !important;
  padding-block:clamp(.55rem,1vw,.82rem) !important;
}

.brand{min-width:0 !important;align-self:center}
.brand img{
  width:clamp(148px,14vw,190px) !important;
  max-height:58px;
  object-fit:contain;
}

.main-nav{
  justify-content:center;
  gap:.25rem !important;
  min-width:0;
}

.main-nav a{
  white-space:nowrap;
  min-height:42px;
  padding:.58rem .64rem !important;
  border-radius:999px !important;
  color:var(--ux-text) !important;
  font-size:clamp(.86rem,.82vw,.96rem);
  line-height:1;
}

.main-nav a:hover,
.main-nav a.active,
.main-nav a[aria-current="page"]{
  background:rgba(20,92,90,.10) !important;
  border-color:rgba(20,92,90,.20) !important;
  color:var(--ux-spruce-2) !important;
  text-decoration:none !important;
}

.header-cta{
  gap:.45rem !important;
  min-width:max-content;
}

.header-cta .phone-link{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  color:var(--ux-ink) !important;
  font-size:.94rem;
}

.header-cta .phone-link span{color:var(--ux-spruce) !important}

.header-text-link{
  min-width:56px;
}

.nav-toggle{
  min-height:44px;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  border-color:var(--ux-line) !important;
  color:var(--ux-spruce-2) !important;
  background:rgba(255,255,255,.88) !important;
  box-shadow:0 8px 22px rgba(33,28,25,.07);
}

.nav-toggle::before{
  content:"☰";
  font-size:1.05em;
  line-height:1;
}

.nav-toggle[aria-expanded="true"]::before{content:"×"}

@media (max-width:1180px){
  .header-cta .phone-link span{display:none}
  .main-nav a{padding-inline:.52rem !important;font-size:.88rem}
}

@media (max-width:1080px){
  .header-inner{grid-template-columns:auto 1fr auto}
  .nav-toggle{display:inline-flex !important;justify-self:end;grid-column:3}
  .header-cta{grid-column:2;grid-row:1;justify-self:end;margin-right:4.7rem}
  .main-nav{
    position:fixed !important;
    left:clamp(12px,3vw,22px) !important;
    right:clamp(12px,3vw,22px) !important;
    top:calc(var(--ux-header-h) + 8px) !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:stretch !important;
    justify-content:stretch !important;
    gap:.5rem !important;
    padding:.8rem !important;
    border-radius:24px !important;
    border:1px solid rgba(20,92,90,.16) !important;
    background:rgba(255,250,244,.98) !important;
    box-shadow:0 28px 88px rgba(33,28,25,.20) !important;
    backdrop-filter:saturate(150%) blur(16px);
    -webkit-backdrop-filter:saturate(150%) blur(16px);
    opacity:0;
    transform:translateY(-8px) scale(.985);
    pointer-events:none;
    transition:opacity .18s ease, transform .18s ease;
  }
  .main-nav.open,
  .nav-open .main-nav{
    opacity:1;
    transform:translateY(0) scale(1);
    pointer-events:auto;
  }
  .main-nav a{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
    padding:.8rem .75rem !important;
    border-radius:16px !important;
    background:rgba(255,255,255,.72);
    border:1px solid rgba(20,92,90,.10);
    font-size:.96rem;
  }
  .main-nav .ux-mobile-nav-actions{grid-column:1 / -1}
}

@media (max-width:660px){
  .header-inner{grid-template-columns:auto 1fr;gap:.55rem !important}
  .brand img{width:148px !important;max-height:54px}
  .nav-toggle{grid-column:2;justify-self:end}
  .header-cta{display:none !important}
  .main-nav{grid-template-columns:1fr !important;top:calc(var(--ux-header-h) + 6px) !important}
}

/* Buttons: orange only where action matters; spruce for support choices. */
.btn{
  min-height:46px;
  border-radius:999px !important;
  padding:.78rem 1.08rem !important;
  background:linear-gradient(135deg,var(--ux-orange),var(--ux-orange-2) 58%,var(--ux-orange-3)) !important;
  border-color:rgba(33,28,25,.11) !important;
  color:#fffaf4 !important;
  box-shadow:0 14px 32px rgba(240,120,43,.23) !important;
  font-weight:950 !important;
  letter-spacing:-.01em;
}

.btn:hover,
.btn:focus-visible{
  background:linear-gradient(135deg,#ff8840,#df5f1a 58%,#bf4911) !important;
  box-shadow:0 18px 42px rgba(240,120,43,.29) !important;
  transform:translateY(-1px);
  text-decoration:none !important;
}

.btn.secondary,
.btn.ghost,
.dark-ghost,
.header-text-link,
.mobile-action-rail .btn.secondary,
.lead-rail .btn.secondary,
.ux-next-step-actions .btn.secondary,
.ux-primary-path-actions .btn.secondary{
  background:linear-gradient(135deg,#fff,var(--ux-spruce-3)) !important;
  color:var(--ux-spruce-2) !important;
  border:1px solid var(--ux-line) !important;
  box-shadow:0 8px 22px rgba(20,92,90,.08) !important;
}

.btn.secondary:hover,
.btn.ghost:hover,
.dark-ghost:hover,
.header-text-link:hover,
.mobile-action-rail .btn.secondary:hover,
.lead-rail .btn.secondary:hover{
  background:linear-gradient(135deg,#fff,#dfeeea) !important;
  border-color:var(--ux-line-strong) !important;
  box-shadow:0 12px 28px rgba(20,92,90,.12) !important;
}

.btn.small{min-height:42px;padding:.58rem .82rem !important}

/* Hero and top conversion path. */
.hero,
.page-hero{
  background:
    radial-gradient(circle at 9% 0%,rgba(20,92,90,.14),transparent 28%),
    radial-gradient(circle at 90% 4%,rgba(240,120,43,.09),transparent 26%),
    linear-gradient(180deg,#fff9f1 0%,#f6efe6 52%,#f3f8f4 100%) !important;
}

.hero:before,
.page-hero:before{
  opacity:.22 !important;
  filter:saturate(.95) contrast(.96);
}

.hero:after,
.page-hero:after{
  background:linear-gradient(120deg,rgba(255,250,244,.96) 0%,rgba(255,250,244,.90) 42%,rgba(20,92,90,.18) 78%,rgba(20,92,90,.08) 100%) !important;
}

.hero h1,
.page-hero h1,
.hero .lead,
.page-hero .lead,
.hero .eyebrow,
.page-hero .eyebrow,
.hero .breadcrumbs,
.page-hero .breadcrumbs,
.hero .breadcrumbs a,
.page-hero .breadcrumbs a{
  color:var(--ux-ink) !important;
  text-shadow:none !important;
}

.hero-grid{
  grid-template-columns:minmax(0,1fr) minmax(320px,.58fr) !important;
  gap:clamp(1.4rem,3.4vw,3rem) !important;
  align-items:center;
  padding-block:clamp(3rem,6vw,5.25rem) clamp(2.6rem,4.8vw,4.6rem) !important;
}

.hero h1{
  max-width:12.5ch;
  font-size:clamp(2.45rem,4.9vw,4.9rem) !important;
  line-height:.98 !important;
  letter-spacing:-.065em !important;
  margin-bottom:clamp(.9rem,1.5vw,1.1rem) !important;
}

.page-hero h1{
  max-width:13.5ch;
  line-height:1.02 !important;
}

.eyebrow{
  color:var(--ux-spruce-2) !important;
  letter-spacing:.075em;
}

.eyebrow:before{background:var(--ux-spruce) !important}

.hero-actions,
.section-actions{
  gap:.7rem !important;
}

.pill-row{gap:.55rem !important;margin-top:1.3rem !important}
.pill{
  background:rgba(255,255,255,.78) !important;
  border-color:rgba(20,92,90,.13) !important;
  color:var(--ux-text) !important;
  box-shadow:0 8px 18px rgba(33,28,25,.05);
}
.pill:before,
.icon,
.estimate-step span{
  background:linear-gradient(135deg,var(--ux-spruce),var(--ux-spruce-2)) !important;
  color:#fffaf4 !important;
}

.hero-card,
.quote-card,
.card,
.feature-card,
.content-card,
.control-card,
.tool-card,
.ux-jump-panel,
.ux-next-step-panel,
.ux-primary-path-panel,
.conversion-panel,
.enterprise-disclosure{
  border-radius:var(--ux-radius) !important;
  background:linear-gradient(150deg,rgba(255,255,255,.96),rgba(248,252,249,.90)) !important;
  border-color:rgba(20,92,90,.13) !important;
  box-shadow:var(--ux-shadow-soft), inset 0 1px 0 rgba(255,255,255,.86) !important;
}

.hero-card{
  padding:clamp(1.1rem,2.2vw,1.65rem) !important;
  align-self:center;
}

.fast-quote{gap:.85rem !important}
.fast-quote>strong{
  font-size:clamp(1.1rem,1.55vw,1.38rem) !important;
  line-height:1.22;
}

.mini-stat{
  gap:.8rem !important;
  padding:.9rem !important;
  border-radius:18px !important;
  background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(234,244,241,.76)) !important;
  border-color:var(--ux-line) !important;
}

.mini-stat p{margin:.15rem 0 0;font-size:.94rem;line-height:1.45;color:var(--ux-text) !important}
.stat-icon{
  width:40px !important;
  height:40px !important;
  border-radius:14px !important;
  font-size:1rem !important;
  background:linear-gradient(135deg,var(--ux-orange),var(--ux-orange-2)) !important;
}

@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr !important;padding-block:2.8rem 2.3rem !important}
  .hero h1{max-width:13ch}
  .hero-card{max-width:720px}
  .page-hero h1{max-width:16ch}
}

@media (max-width:560px){
  .hero-grid{padding-block:2.25rem 1.9rem !important}
  .hero h1{font-size:clamp(2.25rem,13vw,3.05rem) !important;max-width:12ch}
  .hero-actions,
  .section-actions{
    display:grid !important;
    grid-template-columns:1fr;
    width:100%;
  }
  .hero-actions .btn,
  .section-actions .btn{width:100%}
  .pill-row{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));gap:.48rem !important}
  .pill{justify-content:center;text-align:center;font-size:.82rem;padding:.5rem .45rem !important}
  .mini-stat{grid-template-columns:36px 1fr !important}
  .stat-icon{width:36px !important;height:36px !important}
}

@media (max-width:380px){
  .pill-row{grid-template-columns:1fr}
}

/* Responsive grids: same HTML, better behavior across 320px to widescreen. */
.section{padding-block:clamp(3rem,5vw,4.75rem) !important}
.section.compact{padding-block:clamp(2rem,4vw,3.1rem) !important}
.section-header{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(260px,.72fr);
  align-items:end;
  gap:clamp(1rem,2.3vw,1.6rem) !important;
  margin-bottom:clamp(1.15rem,2.6vw,1.9rem) !important;
}
.section-header .lead{margin:0 !important}

.grid-3,
.grid-2,
.site21-intent-grid,
.site22-expanded-proof-grid,
.site22-town-link-grid,
.seo-region-grid,
.site30-step-grid,
.site31-mini-grid,
.site32-stage-grid,
.site33-step-grid,
.local-trust-strip,
.style-selector-grid,
.before-after-grid,
.repair-grid,
.town-project-grid,
.planner-promo-grid,
.maintenance-grid,
.gallery-shortcut-grid,
.packet-path-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)) !important;
  gap:clamp(.85rem,1.8vw,1.15rem) !important;
}

.card,
.feature-card,
.content-card,
.tool-card{
  padding:clamp(1rem,2.2vw,1.55rem) !important;
}

.card h3,
.feature-card h3{font-size:clamp(1.08rem,1.35vw,1.24rem)}
.card p,
.feature-card p{color:var(--ux-text);line-height:1.57}

.site21-intent-card{
  position:relative;
  overflow:hidden;
}

@media (hover:hover){
  .card:hover,
  .feature-card:hover,
  .content-card:hover,
  .gallery-item:hover{
    transform:translateY(-2px) !important;
    box-shadow:0 20px 52px rgba(33,28,25,.12), inset 0 1px 0 rgba(255,255,255,.90) !important;
  }
}

.site21-intent-card.is-active{
  border-color:rgba(240,120,43,.52) !important;
  background:
    linear-gradient(160deg,rgba(255,255,255,.98),rgba(255,244,233,.95)) !important;
  box-shadow:0 22px 50px rgba(240,120,43,.12), 0 14px 34px rgba(33,28,25,.08), inset 0 1px 0 rgba(255,255,255,.9) !important;
  transform:translateY(-2px) !important;
}

.site21-intent-card.is-active::before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg,var(--ux-orange),var(--ux-spruce));
}

.site21-intent-card.is-active span{
  background:rgba(240,120,43,.12) !important;
  color:var(--ux-orange-2) !important;
}

.site21-intent-card.is-active strong{
  color:var(--ux-spruce-2) !important;
}

@media (max-width:840px){
  .section-header{grid-template-columns:1fr}
}

/* Conversion bands and inserted UX panels. */
.cta-band,
.conversion-panel,
.ux-primary-path-panel,
.ux-next-step-panel,
.site21-router-panel,
.site21-photo-panel,
.site21-game-panel{
  grid-template-columns:minmax(0,1fr) minmax(260px,.42fr) !important;
  gap:clamp(1rem,2.4vw,1.6rem) !important;
}

.cta-band,
.ux-primary-path-panel{
  position:relative;
  overflow:hidden;
}

.cta-band{
  background:
    radial-gradient(circle at 8% 0%,rgba(240,120,43,.18),transparent 26%),
    linear-gradient(135deg,#0f2927,#145c5a 54%,#0b2423) !important;
}

.cta-band h2,
.cta-band p,
.cta-band .eyebrow{color:#fffaf4 !important}

.conversion-panel{
  background:
    radial-gradient(circle at 6% 0%,rgba(20,92,90,.14),transparent 28%),
    linear-gradient(135deg,#fffdf8,#eef7f4 62%,#fff0e4) !important;
  color:var(--ux-ink) !important;
}
.conversion-panel h2,
.conversion-panel p,
.conversion-panel .eyebrow{color:var(--ux-ink) !important}
.conversion-panel p{color:var(--ux-text) !important}
.conversion-badges span{background:rgba(20,92,90,.08) !important;color:var(--ux-spruce-2) !important;border-color:var(--ux-line) !important}

.ux-primary-path-panel:before{background:linear-gradient(90deg,var(--ux-orange),var(--ux-spruce),var(--ux-ink)) !important}
.ux-primary-path-actions,
.ux-next-step-actions,
.conversion-actions{gap:.7rem !important}
.ux-primary-path-actions .btn,
.ux-next-step-actions .btn,
.conversion-actions .btn{width:100%}

@media (max-width:820px){
  .cta-band,
  .conversion-panel,
  .ux-primary-path-panel,
  .ux-next-step-panel,
  .site21-router-panel,
  .site21-photo-panel,
  .site21-game-panel{
    grid-template-columns:1fr !important;
  }
  .ux-primary-path-actions,
  .ux-next-step-actions,
  .conversion-actions,
  .site21-router-actions,
  .site21-photo-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100%;
  }
}

/* Galleries and media stay consistent without stretching pages. */
.gallery-grid,
.project-proof-grid,
.proof-gallery-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)) !important;
  gap:clamp(.8rem,1.7vw,1.15rem) !important;
}

.gallery-item,
.project-proof-card,
.case-photo-card{
  border-radius:clamp(18px,2vw,24px) !important;
}

.gallery-item img,
.project-proof-media img,
.case-photo-card img,
.style-card img,
.town-card img{
  width:100%;
  aspect-ratio:4 / 3;
  height:auto !important;
  object-fit:cover;
}

.gallery-caption{font-size:.95rem;line-height:1.3}

/* Forms and tool layouts. */
.form-grid,
.quote-prep-form-card .form-grid,
.quote-prep-form-grid,
.estimate-layout,
.tools-dashboard,
.site31-matchmaker-layout,
.site31-form-grid,
.site32-readiness-layout,
.site32-notes-grid,
.site33-walkthrough-layout,
.site33-form-grid,
.service-map-wrap,
.planner-wrap,
.planner-pro-wrap{
  gap:clamp(.9rem,2vw,1.35rem) !important;
}

@media (max-width:920px){
  .estimate-layout,
  .tools-dashboard,
  .site31-matchmaker-layout,
  .site32-readiness-layout,
  .site33-walkthrough-layout,
  .service-map-wrap,
  .planner-wrap,
  .planner-pro-wrap{
    grid-template-columns:1fr !important;
  }
  .estimate-side-panel,
  .tool-side,
  .site31-result-card,
  .site32-score-column,
  .site33-preview-column,
  .planner-sidebar,
  .planner-stage{
    position:static !important;
    max-height:none !important;
    overflow:visible !important;
  }
}

@media (max-width:720px){
  .form-grid,
  .quote-prep-form-card .form-grid,
  .quote-prep-form-grid,
  .site31-form-grid,
  .site32-notes-grid,
  .site33-form-grid{
    grid-template-columns:1fr !important;
  }
  .form-grid .full,
  .site32-notes-grid .full,
  .site33-form-grid .full{grid-column:1 !important}
}

/* Desktop rail: useful after scrolling, not screaming on first paint. */
.lead-rail{
  right:max(14px,calc((100vw - var(--max,1180px))/2 - 92px)) !important;
  bottom:clamp(5.5rem,9vh,7.5rem) !important;
  max-width:152px !important;
  gap:.45rem !important;
  opacity:0;
  pointer-events:none;
  transform:translateY(10px) scale(.98);
  transition:opacity .18s ease, transform .18s ease;
}

.ux-past-hero .lead-rail{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}

.lead-rail .btn{
  min-height:42px !important;
  padding:.58rem .7rem !important;
  border-radius:14px !important;
  font-size:.82rem !important;
}

.lead-rail .btn:first-child{
  background:linear-gradient(135deg,var(--ux-orange),var(--ux-orange-2)) !important;
}

@media (max-width:1180px){
  .lead-rail{display:none !important}
}

/* Mobile bottom action rail: one-thumb friendly, hides while typing or when menu is open. */
@media (max-width:760px){
  body{padding-bottom:calc(84px + var(--safe-bottom)) !important}
  .site-footer{padding-bottom:calc(116px + var(--safe-bottom)) !important}
  .mobile-sticky.mobile-action-rail,
  .mobile-action-rail{
    display:grid !important;
    grid-template-columns:.9fr .9fr 1.16fr auto !important;
    width:min(calc(100vw - 16px),620px) !important;
    left:50% !important;
    right:auto !important;
    bottom:calc(8px + var(--safe-bottom)) !important;
    transform:translateX(-50%);
    padding:6px !important;
    gap:6px !important;
    border-radius:18px !important;
    background:rgba(255,250,244,.97) !important;
    border:1px solid rgba(20,92,90,.16) !important;
    box-shadow:0 18px 54px rgba(33,28,25,.22), inset 0 1px 0 rgba(255,255,255,.86) !important;
    z-index:220 !important;
  }
  body.nav-open .mobile-action-rail,
  .ux-input-active .mobile-action-rail{
    transform:translateX(-50%) translateY(calc(110% + 18px)) !important;
    opacity:0 !important;
    pointer-events:none !important;
  }
  .mobile-action-rail .ux-rail-link,
  .mobile-action-rail .btn,
  .ux-rail-more{
    min-height:48px !important;
    border-radius:13px !important;
    padding:.58rem .42rem !important;
    font-size:.76rem !important;
    line-height:1.05 !important;
    box-shadow:none !important;
  }
  .mobile-action-rail .ux-rail-link[data-rail-action="quote"]{
    font-size:.82rem !important;
  }
  .ux-rail-menu{
    bottom:calc(100% + 7px) !important;
  }
}

@media (max-width:370px){
  .mobile-action-rail .ux-rail-link,
  .mobile-action-rail .btn,
  .ux-rail-more{font-size:.70rem !important;padding-inline:.28rem !important}
}

/* Planner guardrails for smaller screens. */
@media (max-width:900px){
  .planner-workflow-card{grid-template-columns:1fr !important;border-radius:22px !important}
  .planner-stepper{
    display:flex !important;
    gap:.55rem !important;
    overflow-x:auto;
    padding-bottom:.25rem;
    scroll-snap-type:x proximity;
  }
  .planner-step{min-width:124px;scroll-snap-align:start}
  .planner-pro-stage,
  .planner-stage,
  .pro-canvas-shell,
  .canvas-shell{border-radius:22px !important}
}

@media (max-width:560px){
  .planner-canvas-dock{gap:5px !important}
  .dock-btn{font-size:.78rem !important;padding:.46rem .52rem !important}
  .planner-selection-panel{grid-template-columns:1fr 1fr !important}
}

/* Footer: high contrast, clean columns. */
.site-footer{
  background:
    radial-gradient(circle at 8% 0%,rgba(240,120,43,.18),transparent 24%),
    linear-gradient(180deg,#0b2423 0%,#081817 100%) !important;
  border-top:1px solid rgba(240,120,43,.24) !important;
}

.footer-grid{
  grid-template-columns:minmax(260px,1.2fr) minmax(180px,.55fr) minmax(220px,.85fr) !important;
  gap:clamp(1.4rem,3vw,2.2rem) !important;
}

.site-footer p,
.site-footer a,
.site-footer .footer-bottom{
  line-height:1.7;
}

.site-footer .footer-links{
  gap:.42rem !important;
}

.site-footer .footer-links a{
  padding:.12rem 0;
}

.footer-logo{max-width:205px}

@media (max-width:820px){
  .footer-grid{grid-template-columns:1fr !important}
}

/* Optional extras stay optional. */
.enterprise-disclosure > summary,
.ux-resource-disclosure > summary,
.ux-footer-more-links > summary,
.ux-link-cloud-more > summary{
  min-height:54px;
}

/* Accessibility and motion preferences. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.001ms !important;
  }
  .lead-rail{opacity:1;transform:none}
}

@media print{
  body{background:#fff !important;color:#111 !important;padding-bottom:0 !important}
  .site-header,
  .mobile-sticky,
  .lead-rail,
  .easter-egg,
  .ux-scroll-meter{display:none !important}
  .card,
  .feature-card,
  .content-card,
  .tool-card{box-shadow:none !important;background:#fff !important;border-color:#bbb !important}
}

/* Media cards use a predictable crop so gallery grids do not jump between screen sizes. */
.gallery-item img,
.project-proof-media img,
.case-photo-card img{
  height:clamp(220px,24vw,292px) !important;
}

@media (max-width:560px){
  .gallery-item img,
  .project-proof-media img,
  .case-photo-card img{height:clamp(210px,62vw,270px) !important}
}

/* Final collision guard: legacy bundle added an after-icon; ux-polish owns the menu icon. */
.nav-toggle::after{content:none !important;display:none !important;}

/* Keep the desktop rail out of the footer/contact area. */
.lead-rail-hidden .lead-rail{
  opacity:0 !important;
  pointer-events:none !important;
  transform:translateY(10px) scale(.98) !important;
}

/* Compact UX feature layer: generated section jumps and safer form completion. */
.ux-page-jump-nav{
  position:sticky;
  top:calc(var(--ux-header-h) + 6px);
  z-index:38;
  margin-top:-.2rem;
  pointer-events:none;
}

.ux-page-jump-panel{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:.75rem;
  width:min(100%,980px);
  min-width:0;
  margin-inline:auto;
  border:1px solid rgba(20,92,90,.14);
  border-radius:999px;
  background:rgba(255,250,244,.92);
  box-shadow:0 14px 38px rgba(33,28,25,.10),inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter:saturate(150%) blur(14px);
  -webkit-backdrop-filter:saturate(150%) blur(14px);
  padding:.42rem .48rem .42rem .8rem;
  pointer-events:auto;
}

.ux-page-jump-panel > span{
  color:var(--ux-spruce-2);
  font-size:.72rem;
  font-weight:1000;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}

.ux-page-jump-list{
  display:flex;
  gap:.38rem;
  min-width:0;
  max-width:100%;
  overflow:auto;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
}

.ux-page-jump-list::-webkit-scrollbar{display:none}

.ux-page-jump-list a{
  flex:0 0 auto;
  scroll-snap-align:start;
  max-width:220px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  border:1px solid transparent;
  border-radius:999px;
  padding:.46rem .68rem;
  color:var(--ux-text);
  background:rgba(255,255,255,.66);
  font-size:.82rem;
  font-weight:900;
  text-decoration:none;
}

.ux-page-jump-list a:hover,
.ux-page-jump-list a.is-active{
  color:#fffaf4;
  background:linear-gradient(135deg,var(--ux-spruce),var(--ux-spruce-2));
  border-color:rgba(255,255,255,.32);
}

.ux-form-assist{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.45rem .8rem;
  align-items:center;
  margin:.35rem 0 1rem;
  border:1px solid rgba(20,92,90,.14);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(234,244,241,.88),rgba(255,248,240,.92));
  padding:.64rem .76rem;
}

.ux-form-assist span,
.ux-form-assist small{
  color:var(--ux-text);
  font-size:.82rem;
  font-weight:900;
}

.ux-form-assist small{
  color:var(--ux-muted);
  text-align:right;
}

.ux-form-assist i{
  grid-column:1 / -1;
  height:7px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(20,92,90,.12);
}

.ux-form-assist i b{
  display:block;
  width:0;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--ux-orange),var(--ux-spruce));
  transition:width .18s ease;
}

.ux-form-complete .ux-form-assist{
  border-color:rgba(20,92,90,.26);
  box-shadow:0 12px 28px rgba(20,92,90,.08);
}

.ux-field-attention{
  display:block;
  margin-top:.18rem;
  color:#8b2e0c;
  font-size:.78rem;
  font-weight:900;
  line-height:1.35;
}

.ux-field-attention[hidden]{display:none !important}

.ux-field-needs-attention input,
.ux-field-needs-attention select,
.ux-field-needs-attention textarea,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"]{
  border-color:rgba(216,88,22,.72) !important;
  box-shadow:0 0 0 4px rgba(240,120,43,.13) !important;
}

.ux-form-has-errors .ux-form-assist{
  border-color:rgba(216,88,22,.28);
  background:linear-gradient(135deg,rgba(255,245,236,.96),rgba(255,255,255,.92));
}

.ux-link-matrix-more{
  margin-top:.7rem;
}

.ux-link-matrix-more > summary{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-height:46px;
  border:1px dashed rgba(20,92,90,.20);
  border-radius:999px;
  background:rgba(255,255,255,.70);
  color:var(--ux-spruce-2);
  font-weight:1000;
  cursor:pointer;
  list-style:none;
}

.ux-link-matrix-more > summary::-webkit-details-marker{display:none}

.ux-link-matrix-more > summary span{
  display:inline-grid;
  place-items:center;
  min-width:1.8rem;
  height:1.8rem;
  border-radius:999px;
  background:rgba(240,120,43,.13);
  color:var(--ux-orange-3);
  font-size:.76rem;
}

.ux-link-matrix-more > div{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:.55rem;
  margin-top:.65rem;
}

.ux-link-matrix-more a{
  display:flex;
  align-items:center;
  min-height:44px;
  border:1px solid rgba(20,92,90,.13);
  border-radius:14px;
  background:rgba(255,255,255,.78);
  color:var(--ux-spruce-2);
  font-weight:900;
  padding:.58rem .72rem;
  text-decoration:none;
}

.ux-link-matrix-more a:hover{
  border-color:rgba(240,120,43,.30);
  color:var(--ux-orange-3);
  text-decoration:none;
}

@media (max-width:760px){
  .ux-page-jump-nav{
    top:calc(var(--ux-header-h) + 4px);
    margin-inline:0;
  }
  .ux-page-jump-panel{
    grid-template-columns:1fr;
    gap:.34rem;
    border-radius:20px;
    padding:.55rem;
  }
  .ux-page-jump-panel > span{
    padding-left:.22rem;
    font-size:.66rem;
  }
  .ux-page-jump-list a{
    max-width:72vw;
    min-height:40px;
    display:inline-flex;
    align-items:center;
  }
  .ux-form-assist{
    grid-template-columns:1fr;
    gap:.38rem;
  }
  .ux-form-assist small{text-align:left}
}

/* UX max layer: command guide, quote coach, resume recovery, and full-card affordance. */
.ux-command-trigger{
  position:fixed;
  right:clamp(14px,2vw,24px);
  bottom:clamp(18px,3vh,32px);
  z-index:230;
  display:grid;
  gap:1px;
  min-width:132px;
  min-height:56px;
  border:1px solid rgba(255,255,255,.34);
  border-radius:19px;
  padding:.58rem .78rem;
  background:linear-gradient(135deg,var(--ux-spruce),var(--ux-spruce-2));
  color:#fffaf4;
  box-shadow:0 18px 46px rgba(20,92,90,.28),inset 0 1px 0 rgba(255,255,255,.18);
  cursor:pointer;
}

.ux-command-trigger span{
  font-size:.88rem;
  font-weight:1000;
  line-height:1;
}

.ux-command-trigger small{
  color:rgba(255,250,244,.76);
  font-size:.66rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ux-command-trigger.is-tool-route{
  display:none;
}

.ux-command-shell[hidden]{display:none !important}

.ux-command-shell{
  position:fixed;
  inset:0;
  z-index:500;
  display:grid;
  place-items:start center;
  padding:calc(var(--ux-header-h) + 24px) 16px 20px;
}

.ux-command-backdrop{
  position:absolute;
  inset:0;
  background:rgba(18,15,12,.46);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.ux-command-panel{
  position:relative;
  display:grid;
  gap:1rem;
  width:min(100%,780px);
  max-height:min(760px,calc(100dvh - var(--ux-header-h) - 48px));
  overflow:auto;
  border:1px solid rgba(255,255,255,.28);
  border-radius:30px;
  background:
    radial-gradient(circle at 5% 0%,rgba(240,120,43,.20),transparent 28%),
    linear-gradient(145deg,rgba(255,253,248,.98),rgba(238,247,244,.97));
  box-shadow:0 34px 100px rgba(33,28,25,.34),inset 0 1px 0 rgba(255,255,255,.92);
  padding:clamp(1rem,2.5vw,1.45rem);
}

.ux-command-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}

.ux-command-head h2{
  margin:.1rem 0 0;
  font-size:clamp(1.55rem,3vw,2.3rem);
  letter-spacing:-.05em;
}

.ux-command-close{
  min-height:40px;
  border:1px solid var(--ux-line);
  border-radius:999px;
  padding:.45rem .75rem;
  background:#fff;
  color:var(--ux-spruce-2);
  font-weight:950;
  cursor:pointer;
}

.ux-command-search-label{
  display:grid;
  gap:.42rem;
  color:var(--ux-spruce-2);
  font-weight:1000;
}

.ux-command-search{
  min-height:56px !important;
  border-radius:18px !important;
  border:1px solid rgba(20,92,90,.20) !important;
  background:#fff !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 10px 26px rgba(33,28,25,.07);
  font-size:1.02rem !important;
}

.ux-command-primary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.65rem;
}

.ux-command-action,
.ux-command-result{
  display:grid;
  gap:.18rem;
  min-width:0;
  border:1px solid rgba(20,92,90,.13);
  border-radius:18px;
  background:rgba(255,255,255,.78);
  color:var(--ux-ink);
  padding:.78rem;
  text-decoration:none;
  box-shadow:0 10px 24px rgba(33,28,25,.06);
}

.ux-command-action:hover,
.ux-command-result:hover{
  transform:translateY(-1px);
  border-color:rgba(240,120,43,.28);
  box-shadow:0 16px 34px rgba(33,28,25,.10);
  text-decoration:none;
}

.ux-command-action small,
.ux-command-result span{
  color:var(--ux-orange-3);
  font-size:.66rem;
  font-weight:1000;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ux-command-action strong,
.ux-command-result strong{
  color:var(--ux-ink);
  font-size:1rem;
  line-height:1.16;
}

.ux-command-action span,
.ux-command-result small{
  color:var(--ux-text);
  font-size:.82rem;
  line-height:1.32;
}

.ux-command-results{
  display:grid;
  gap:.5rem;
}

.ux-command-result{
  grid-template-columns:minmax(90px,.22fr) minmax(0,.34fr) minmax(0,1fr);
  align-items:center;
  border-radius:16px;
  padding:.7rem .8rem;
}

.ux-command-empty{
  margin:0;
  border:1px dashed rgba(20,92,90,.22);
  border-radius:18px;
  background:rgba(255,255,255,.58);
  color:var(--ux-text);
  padding:1rem;
  font-weight:850;
}

.ux-clickable-card{
  cursor:pointer;
  position:relative;
}

.ux-clickable-card:focus-visible{
  outline:3px solid rgba(240,120,43,.70) !important;
  outline-offset:4px;
}

.ux-clickable-card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  box-shadow:inset 0 0 0 0 rgba(240,120,43,0);
  transition:box-shadow .16s ease;
}

.ux-clickable-card:hover::after,
.ux-clickable-card:focus-visible::after{
  box-shadow:inset 0 0 0 2px rgba(240,120,43,.22);
}

.ux-back-top{
  position:fixed;
  right:clamp(14px,2vw,24px);
  bottom:calc(clamp(18px,3vh,32px) + 68px);
  z-index:228;
  width:46px;
  height:46px;
  border:1px solid rgba(20,92,90,.18);
  border-radius:999px;
  background:rgba(255,250,244,.94);
  color:var(--ux-spruce-2);
  box-shadow:0 12px 28px rgba(33,28,25,.16);
  font-weight:1000;
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .16s ease,transform .16s ease;
  cursor:pointer;
}

.ux-back-top.is-visible{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

.ux-resume-draft{
  position:fixed;
  left:50%;
  bottom:clamp(18px,3vh,32px);
  z-index:231;
  display:flex;
  align-items:center;
  gap:.45rem;
  transform:translateX(-50%);
  border:1px solid rgba(20,92,90,.18);
  border-radius:999px;
  background:rgba(255,250,244,.96);
  box-shadow:0 18px 48px rgba(33,28,25,.20),inset 0 1px 0 rgba(255,255,255,.84);
  padding:.42rem;
}

.ux-resume-draft[hidden]{display:none !important}

.ux-resume-draft a{
  border-radius:999px;
  background:linear-gradient(135deg,var(--ux-orange),var(--ux-orange-2));
  color:#fffaf4;
  font-weight:1000;
  padding:.58rem .85rem;
  text-decoration:none;
}

.ux-resume-draft button{
  border:0;
  border-radius:999px;
  background:rgba(20,92,90,.09);
  color:var(--ux-spruce-2);
  font-weight:950;
  padding:.5rem .65rem;
  cursor:pointer;
}

.ux-has-resume-draft .ux-command-trigger{
  bottom:calc(clamp(18px,3vh,32px) + 66px);
}

.ux-has-resume-draft .ux-back-top{
  bottom:calc(clamp(18px,3vh,32px) + 134px);
}

.ux-quote-coach{
  grid-column:1 / -1;
  display:grid;
  gap:.55rem;
  margin-top:-.15rem;
  border:1px solid rgba(20,92,90,.14);
  border-radius:18px;
  background:
    radial-gradient(circle at 0% 0%,rgba(240,120,43,.14),transparent 36%),
    linear-gradient(135deg,rgba(255,255,255,.92),rgba(234,244,241,.82));
  padding:.85rem;
}

.ux-quote-coach strong{
  color:var(--ux-spruce-2);
  font-size:.82rem;
  font-weight:1000;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ux-quote-coach p{
  margin:0;
  color:var(--ux-text);
  font-size:.92rem;
  line-height:1.45;
}

.ux-quote-coach div{
  display:flex;
  flex-wrap:wrap;
  gap:.42rem;
}

.ux-quote-coach button{
  min-height:36px;
  border:1px solid rgba(20,92,90,.14);
  border-radius:999px;
  background:#fff;
  color:var(--ux-spruce-2);
  font-size:.78rem;
  font-weight:950;
  padding:.38rem .62rem;
  cursor:pointer;
}

.ux-quote-coach button:hover{
  border-color:rgba(240,120,43,.35);
  color:var(--ux-orange-3);
}

@media (max-width:900px){
  .ux-command-primary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ux-command-result{grid-template-columns:1fr;gap:.14rem}
}

@media (max-width:760px){
  .ux-command-trigger{
    right:10px;
    bottom:calc(74px + var(--safe-bottom));
    min-width:0;
    min-height:44px;
    border-radius:999px;
    padding:.5rem .66rem;
  }
  .ux-command-trigger small{display:none}
  .ux-command-shell{
    align-items:end;
    place-items:end center;
    padding:12px 10px calc(12px + var(--safe-bottom));
  }
  .ux-command-panel{
    width:100%;
    max-height:calc(100dvh - 24px - var(--safe-bottom));
    border-radius:24px;
  }
  .ux-command-primary{grid-template-columns:1fr 1fr}
  .ux-command-action{padding:.7rem}
  .ux-back-top{
    right:auto;
    left:10px;
    bottom:calc(74px + var(--safe-bottom));
    width:44px;
    height:44px;
  }
  .ux-resume-draft{
    left:8px;
    right:8px;
    bottom:calc(74px + var(--safe-bottom));
    transform:none;
    justify-content:space-between;
    border-radius:18px;
  }
  .ux-resume-draft a{flex:1;text-align:center}
  .ux-has-resume-draft .ux-command-trigger{
    bottom:calc(134px + var(--safe-bottom));
  }
  .ux-has-resume-draft .ux-back-top{
    bottom:calc(134px + var(--safe-bottom));
  }
}

@media (max-width:430px){
  .ux-command-primary{grid-template-columns:1fr}
  .ux-command-trigger span{font-size:.78rem}
}
