/* =========================================================
   THE HARTMERE EDIT FINDER
   Compact, self-contained frontend styles
========================================================= */

.hef-root,
.hef-root *,
.hef-root *::before,
.hef-root *::after{
  box-sizing:border-box!important;
  font-family:"Cormorant Garamond",Georgia,"Times New Roman",serif!important;
}

.hef-root{
  --hef-accent:#173A2A;
  --hef-deep:#102C20;
  --hef-gold:#B59157;
  --hef-gold-dark:#96713F;
  --hef-gold-soft:#D8C49D;
  --hef-ivory:#F7F3EB;
  --hef-cream:#FCFAF6;
  --hef-white:#FFFFFF;
  --hef-text:#26382E;
  --hef-muted:#74695F;
  --hef-border:#DDD2C2;
  position:relative!important;
  z-index:999999!important;
}

/* ---------- floating trigger ---------- */
.hef-floating{
  appearance:none!important;
  -webkit-appearance:none!important;
  position:fixed!important;
  z-index:999990!important;
  right:22px!important;
  bottom:22px!important;
  width:auto!important;
  min-width:0!important;
  height:48px!important;
  min-height:48px!important;
  margin:0!important;
  padding:5px 10px 5px 6px!important;
  display:none!important;
  grid-template-columns:36px auto 22px!important;
  align-items:center!important;
  gap:8px!important;
  background:#173A2A!important;
  border:1px solid #173A2A!important;
  border-radius:8px!important;
  box-shadow:0 10px 26px rgba(16,44,32,.19)!important;
  color:#fff!important;
  text-align:left!important;
  cursor:pointer!important;
  overflow:hidden!important;
}

.hef-floating.is-visible{display:grid!important;}

.hef-floating__mark{
  width:36px!important;
  height:36px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#F7F3EB!important;
  border:1px solid #D8C49D!important;
  border-radius:50%!important;
  color:#173A2A!important;
  font-size:20px!important;
  line-height:1!important;
  font-weight:500!important;
}

.hef-floating__copy{display:block!important;line-height:1!important;}
.hef-floating__copy small{
  display:block!important;
  margin:0 0 2px!important;
  color:#D8C49D!important;
  font-size:7px!important;
  line-height:1!important;
  font-weight:600!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}
.hef-floating__copy strong{
  display:block!important;
  color:#fff!important;
  font-size:13px!important;
  line-height:1!important;
  font-weight:600!important;
  white-space:nowrap!important;
}
.hef-floating__arrow{color:#D8C49D!important;font-size:12px!important;line-height:1!important;}

/* ---------- backdrop ---------- */
.hef-backdrop{
  position:fixed!important;
  z-index:999995!important;
  inset:0!important;
  margin:0!important;
  padding:0!important;
  background:rgba(16,44,32,.48)!important;
  backdrop-filter:blur(3px)!important;
  -webkit-backdrop-filter:blur(3px)!important;
}

/* ---------- fixed popup shell ---------- */
.hef-modal{
  position:fixed!important;
  z-index:999996!important;
  top:50%!important;
  left:50%!important;
  width:min(760px,calc(100vw - 32px))!important;
  height:auto!important;
  max-height:calc(100vh - 34px)!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  transform:translate(-50%,-50%)!important;
  background:#FCFAF6!important;
  border:2px solid #171717!important;
  border-radius:14px!important;
  box-shadow:0 26px 70px rgba(16,44,32,.24)!important;
  color:#26382E!important;
}

.hef-modal::before{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  inset:7px!important;
  border:1px solid rgba(181,145,87,.14)!important;
  border-radius:9px!important;
  pointer-events:none!important;
}

.hef-modal--results{
  height:min(720px,calc(100vh - 34px))!important;
  max-height:min(720px,calc(100vh - 34px))!important;
}

.hef-close{
  appearance:none!important;
  -webkit-appearance:none!important;
  position:absolute!important;
  z-index:20!important;
  top:12px!important;
  right:12px!important;
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  min-height:32px!important;
  margin:0!important;
  padding:0 0 2px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#F7F3EB!important;
  border:1px solid #DDD2C2!important;
  border-radius:50%!important;
  color:#173A2A!important;
  box-shadow:none!important;
  font-size:22px!important;
  line-height:1!important;
  font-weight:400!important;
  cursor:pointer!important;
}
.hef-close:hover{background:#173A2A!important;border-color:#173A2A!important;color:#fff!important;}

/* ---------- shared text ---------- */
.hef-kicker{
  margin:0 0 8px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  color:#96713F!important;
  font-size:8px!important;
  line-height:1!important;
  font-weight:600!important;
  letter-spacing:.15em!important;
  text-transform:uppercase!important;
}
.hef-kicker span{width:18px!important;height:1px!important;background:#B59157!important;display:block!important;}

.hef-modal h2{
  margin:0!important;
  padding:0!important;
  color:#173A2A!important;
  font-size:clamp(32px,4vw,44px)!important;
  line-height:1!important;
  font-weight:500!important;
  letter-spacing:-.02em!important;
}

/* ---------- intro ---------- */
.hef-intro{
  position:relative!important;
  z-index:2!important;
  padding:34px 34px 26px!important;
  text-align:center!important;
  background:linear-gradient(120deg,#FCFAF6 0%,#F7F3EB 100%)!important;
}

.hef-sub{
  max-width:610px!important;
  margin:10px auto 0!important;
  padding:0!important;
  color:#74695F!important;
  font-size:15px!important;
  line-height:1.45!important;
  font-weight:400!important;
}

.hef-badges{
  margin:14px 0 16px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:6px!important;
}
.hef-badges span{
  min-height:27px!important;
  padding:0 10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#fff!important;
  border:1px solid #D8C49D!important;
  border-radius:4px!important;
  color:#173A2A!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:600!important;
  letter-spacing:.04em!important;
}

.hef-btn,
a.hef-btn{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:auto!important;
  min-width:150px!important;
  min-height:42px!important;
  margin:0!important;
  padding:0 16px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  background:#173A2A!important;
  border:1px solid #173A2A!important;
  border-radius:4px!important;
  color:#fff!important;
  box-shadow:none!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:600!important;
  text-decoration:none!important;
  cursor:pointer!important;
}
.hef-btn:hover,a.hef-btn:hover{background:#102C20!important;border-color:#102C20!important;color:#fff!important;}

.hef-link{
  appearance:none!important;
  -webkit-appearance:none!important;
  min-height:28px!important;
  margin:8px auto 0!important;
  padding:0 4px!important;
  display:block!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  color:#74695F!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:600!important;
  text-decoration:underline!important;
  text-decoration-color:#D8C49D!important;
  text-underline-offset:3px!important;
  cursor:pointer!important;
}

/* ---------- question ---------- */
.hef-progress{
  position:relative!important;
  z-index:4!important;
  width:100%!important;
  height:3px!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#E8E0D4!important;
}
.hef-progress span{display:block!important;height:100%!important;background:#B59157!important;transition:width .2s ease!important;}

.hef-question{
  position:relative!important;
  z-index:2!important;
  padding:25px 28px 20px!important;
  background:#FCFAF6!important;
}

.hef-question__meta{
  margin:0 40px 8px 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  color:#96713F!important;
  font-size:8px!important;
  line-height:1!important;
  font-weight:600!important;
  letter-spacing:.13em!important;
  text-transform:uppercase!important;
}
.hef-question__meta em{font-style:normal!important;color:#74695F!important;}

.hef-question h2{
  max-width:640px!important;
  margin-bottom:14px!important;
  font-size:clamp(27px,3.4vw,36px)!important;
  line-height:1.04!important;
}

.hef-answers{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}

.hef-answer{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:100%!important;
  min-width:0!important;
  min-height:67px!important;
  margin:0!important;
  padding:10px 10px!important;
  display:grid!important;
  grid-template-columns:24px minmax(0,1fr) 20px!important;
  align-items:center!important;
  gap:8px!important;
  background:#fff!important;
  border:1px solid #DDD2C2!important;
  border-radius:8px!important;
  box-shadow:none!important;
  color:#26382E!important;
  text-align:left!important;
  cursor:pointer!important;
  transition:border-color .15s ease,background-color .15s ease,transform .15s ease!important;
}
.hef-answer:hover{border-color:#B59157!important;background:#FAF7F1!important;transform:translateY(-1px)!important;}
.hef-answer__num{color:#96713F!important;font-size:8px!important;font-weight:600!important;}
.hef-answer__copy{min-width:0!important;display:block!important;}
.hef-answer__copy strong{
  display:block!important;
  margin:0 0 3px!important;
  color:#173A2A!important;
  font-size:14px!important;
  line-height:1.1!important;
  font-weight:600!important;
}
.hef-answer__copy small{
  display:block!important;
  color:#74695F!important;
  font-size:9.5px!important;
  line-height:1.25!important;
  font-weight:400!important;
}
.hef-answer__arrow{
  width:20px!important;
  height:20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #D8C49D!important;
  border-radius:50%!important;
  color:#173A2A!important;
  font-size:8px!important;
}
.hef-answer:hover .hef-answer__arrow{background:#173A2A!important;border-color:#173A2A!important;color:#fff!important;}

.hef-actions{
  margin-top:12px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
}
.hef-back{
  appearance:none!important;
  -webkit-appearance:none!important;
  min-height:30px!important;
  margin:0!important;
  padding:0 7px!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  color:#173A2A!important;
  font-size:10px!important;
  font-weight:600!important;
  cursor:pointer!important;
}
.hef-back:disabled{opacity:.35!important;cursor:default!important;}
.hef-actions .hef-link{margin:0!important;}

/* ---------- loading ---------- */
.hef-loading{
  position:relative!important;
  z-index:2!important;
  padding:42px 28px!important;
  text-align:center!important;
}
.hef-spinner{
  width:34px!important;
  height:34px!important;
  margin:0 auto 12px!important;
  border:2px solid #E2D8C8!important;
  border-top-color:#173A2A!important;
  border-radius:50%!important;
  animation:hefSpin .75s linear infinite!important;
}
@keyframes hefSpin{to{transform:rotate(360deg)}}
.hef-loading h2{font-size:31px!important;}
.hef-loading p{margin:7px auto 0!important;color:#74695F!important;font-size:13px!important;}

/* ---------- results: ONLY THIS AREA SCROLLS ---------- */
.hef-resultsScroll{
  position:relative!important;
  z-index:2!important;
  width:100%!important;
  height:100%!important;
  max-height:100%!important;
  margin:0!important;
  padding:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-width:thin!important;
  scrollbar-color:#B59157 #F1EADF!important;
}
.hef-resultsScroll::-webkit-scrollbar{width:8px!important;}
.hef-resultsScroll::-webkit-scrollbar-track{background:#F1EADF!important;}
.hef-resultsScroll::-webkit-scrollbar-thumb{background:#B59157!important;border-radius:20px!important;border:2px solid #F1EADF!important;}

.hef-resultHead{
  padding:26px 28px 19px!important;
  text-align:center!important;
  background:linear-gradient(120deg,#FCFAF6,#F7F3EB)!important;
  border-bottom:1px solid #DDD2C2!important;
}
.hef-resultHead h2{font-size:37px!important;}
.hef-resultHead > p:last-child{max-width:620px!important;margin:8px auto 0!important;color:#74695F!important;font-size:13.5px!important;line-height:1.4!important;}

.hef-sectionTitle{
  padding:15px 24px 9px!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:16px!important;
}
.hef-sectionTitle > div{display:flex!important;align-items:center!important;gap:8px!important;}
.hef-sectionTitle span{color:#96713F!important;font-size:8px!important;font-weight:600!important;}
.hef-sectionTitle h3{margin:0!important;color:#173A2A!important;font-size:21px!important;line-height:1!important;font-weight:600!important;}
.hef-sectionTitle p{max-width:340px!important;margin:0!important;color:#74695F!important;font-size:9.5px!important;line-height:1.25!important;text-align:right!important;}

.hef-products{
  padding:0 24px 8px!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}
.hef-product{
  min-width:0!important;
  min-height:104px!important;
  padding:9px!important;
  display:grid!important;
  grid-template-columns:80px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  background:#fff!important;
  border:1px solid #DDD2C2!important;
  border-radius:8px!important;
  color:#26382E!important;
  text-decoration:none!important;
}
.hef-product:hover{border-color:#B59157!important;color:#26382E!important;}
.hef-product__image{
  width:80px!important;
  height:80px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #EEE8DE!important;
  border-radius:6px!important;
}
.hef-product__image img{display:block!important;width:88%!important;height:88%!important;object-fit:contain!important;}
.hef-product__content{min-width:0!important;display:block!important;}
.hef-product__content em{
  display:block!important;
  margin:0 0 3px!important;
  color:#96713F!important;
  font-size:7.5px!important;
  line-height:1!important;
  font-style:normal!important;
  font-weight:600!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.hef-product__content h3{
  margin:0!important;
  padding:0!important;
  display:-webkit-box!important;
  overflow:hidden!important;
  color:#173A2A!important;
  font-size:14px!important;
  line-height:1.16!important;
  font-weight:600!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
}
.hef-product__price{margin:3px 0 0!important;color:#173A2A!important;font-size:12px!important;font-weight:600!important;}
.hef-product__content small{
  margin:3px 0 0!important;
  display:-webkit-box!important;
  overflow:hidden!important;
  color:#74695F!important;
  font-size:8.5px!important;
  line-height:1.2!important;
  font-weight:400!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
}

.hef-sectionTitle--guides{padding-top:13px!important;}
.hef-guides{
  padding:0 24px 12px!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}
.hef-guide{
  position:relative!important;
  min-width:0!important;
  padding:12px 13px!important;
  display:block!important;
  background:#F7F3EB!important;
  border:1px solid #DDD2C2!important;
  border-radius:8px!important;
  color:#26382E!important;
  text-decoration:none!important;
}
.hef-guide:hover{border-color:#B59157!important;color:#26382E!important;}
.hef-guide__eyebrow{display:block!important;margin:0 0 4px!important;color:#96713F!important;font-size:7px!important;font-weight:600!important;letter-spacing:.1em!important;text-transform:uppercase!important;}
.hef-guide h3{margin:0!important;color:#173A2A!important;font-size:15px!important;line-height:1.15!important;font-weight:600!important;}
.hef-guide p{margin:5px 0 0!important;display:-webkit-box!important;overflow:hidden!important;color:#74695F!important;font-size:9.5px!important;line-height:1.3!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;}
.hef-guide small{margin:5px 0 0!important;display:block!important;color:#74695F!important;font-size:8px!important;line-height:1.25!important;}
.hef-guide__arrow{margin-top:7px!important;display:block!important;color:#173A2A!important;font-size:9px!important;font-weight:600!important;}

.hef-resultActions{
  padding:5px 24px 20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
}
.hef-outline{
  appearance:none!important;
  -webkit-appearance:none!important;
  min-width:90px!important;
  min-height:42px!important;
  margin:0!important;
  padding:0 14px!important;
  background:#fff!important;
  border:1px solid #D8C49D!important;
  border-radius:4px!important;
  color:#173A2A!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:600!important;
  cursor:pointer!important;
}

/* ---------- tablet/mobile ---------- */
@media(max-width:700px){
  .hef-floating{right:14px!important;bottom:16px!important;height:45px!important;min-height:45px!important;grid-template-columns:33px auto 18px!important;padding:5px 8px 5px 5px!important;}
  .hef-floating__mark{width:33px!important;height:33px!important;font-size:18px!important;}
  .hef-modal{width:calc(100vw - 20px)!important;max-height:calc(100vh - 20px)!important;border-radius:12px!important;}
  .hef-modal--results{height:calc(100vh - 20px)!important;max-height:calc(100vh - 20px)!important;}
  .hef-intro{padding:30px 18px 22px!important;}
  .hef-modal h2{font-size:31px!important;}
  .hef-sub{font-size:13.5px!important;line-height:1.4!important;}
  .hef-badges{margin:12px 0 14px!important;gap:5px!important;}
  .hef-badges span{font-size:8px!important;padding:0 8px!important;}
  .hef-question{padding:21px 15px 16px!important;}
  .hef-question h2{font-size:27px!important;margin-bottom:11px!important;}
  .hef-answers{grid-template-columns:1fr!important;gap:6px!important;}
  .hef-answer{min-height:58px!important;padding:8px!important;grid-template-columns:22px minmax(0,1fr) 20px!important;}
  .hef-answer__copy strong{font-size:13.5px!important;}
  .hef-answer__copy small{font-size:9px!important;}
  .hef-actions{margin-top:9px!important;}
  .hef-resultHead{padding:22px 16px 16px!important;}
  .hef-resultHead h2{font-size:32px!important;}
  .hef-sectionTitle{padding:13px 14px 8px!important;display:block!important;}
  .hef-sectionTitle > div{margin-bottom:4px!important;}
  .hef-sectionTitle p{text-align:left!important;}
  .hef-products,.hef-guides{padding-left:14px!important;padding-right:14px!important;grid-template-columns:1fr!important;}
  .hef-product{grid-template-columns:72px minmax(0,1fr)!important;min-height:94px!important;}
  .hef-product__image{width:72px!important;height:72px!important;}
  .hef-resultActions{padding:5px 14px 16px!important;}
}

@media(max-width:390px){
  .hef-floating__copy small{display:none!important;}
  .hef-floating__copy strong{font-size:12px!important;}
  .hef-intro{padding-left:14px!important;padding-right:14px!important;}
  .hef-question{padding-left:12px!important;padding-right:12px!important;}
  .hef-modal h2{font-size:28px!important;}
}

@media(prefers-reduced-motion:reduce){
  .hef-spinner{animation:none!important;}
  .hef-answer,.hef-progress span{transition:none!important;}
}
