/* FIBRZ hero widget (v15 score-journey) — scoped for Martina site dark plum hero */
.fz-hero-widget{
  --fz-plum:#3a0e2c;
  --fz-yellow:#f2f65b;
  --fz-cream:#f4f8ee;
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(240px,290px);
  gap:clamp(8px,1.5vw,20px);
  align-items:center;
  min-height:clamp(380px,48vw,520px);
  color:var(--fz-plum);
  isolation:isolate;
  font-family:inherit;
}

.fz-hero-widget .shared-map-rail{
  position:relative;
  z-index:1;
  pointer-events:none;
  min-height:clamp(320px,42vw,480px);
}

.fz-hero-widget .shared-map-stage,
.fz-hero-widget .hero-map-crop{
  position:relative;
  width:100%;
  height:100%;
  min-height:inherit;
  aspect-ratio:1218/1502;
  max-height:min(520px,70vh);
  overflow:visible;
}

.fz-hero-widget .hero-map-crop:before{
  content:'';
  position:absolute;
  inset:8% -8% 0;
  border-radius:46% 46% 15% 15%;
  background:
    radial-gradient(ellipse 34% 49% at 27% 48%,rgba(252,251,11,.42),transparent 95%),
    radial-gradient(ellipse 36% 48% at 75% 52%,rgba(200,97,153,.38),transparent 95%);
  filter:blur(22px);
  z-index:0;
  pointer-events:none;
}

.fz-hero-widget .anatomy{
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.fz-hero-widget .anatomy svg{
  width:100%;
  height:100%;
  display:block;
  max-height:min(520px,70vh);
}

.fz-hero-widget .map-loading{
  color:rgba(244,248,238,.7);
  font-size:13px;
  letter-spacing:.04em;
}

.fz-hero-widget .body-shell{
  fill:rgba(244,248,238,.07)!important;
  stroke:rgba(244,248,238,.32);
  stroke-width:1;
  vector-effect:non-scaling-stroke;
}

.fz-hero-widget .muscle{
  opacity:var(--finding-opacity,.3);
  transition:opacity .65s;
}

@media (prefers-reduced-motion:reduce){
  .fz-hero-widget .muscle{transition:none}
}

.fz-hero-widget .score-rail{
  position:relative;
  z-index:5;
  width:100%;
  max-width:300px;
  justify-self:end;
}

.fz-hero-widget .score-rail:before{
  content:'';
  position:absolute;
  top:-40px;left:-60px;
  width:360px;height:360px;
  background:radial-gradient(ellipse,rgba(212,141,175,.35),transparent 67%);
  pointer-events:none;
  z-index:-1;
}

.fz-hero-widget .score-widget.thick-glass,
.fz-hero-widget .thick-glass{
  border:1.5px solid rgba(255,255,255,.85);
  background:
    radial-gradient(ellipse at 15% 10%,color-mix(in srgb,var(--score-tint,#f2f65b) 55%,transparent),transparent 85%),
    linear-gradient(135deg,rgba(255,255,255,.78),rgba(255,255,255,.28));
  backdrop-filter:blur(28px) saturate(145%);
  -webkit-backdrop-filter:blur(28px) saturate(145%);
  box-shadow:
    inset 0 2px 3px #fff,
    inset 0 -2px 6px rgba(58,14,44,.12),
    0 18px 45px rgba(58,14,44,.18);
  border-radius:28px;
}

.fz-hero-widget .score-widget{
  position:relative;
  padding:19px 15px 15px;
  overflow:hidden;
  transition:background .5s,box-shadow .5s;
  --score:74;
  isolation:isolate;
}

.fz-hero-widget .score-widget:before{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,rgba(255,255,255,.36),transparent 45%,rgba(255,255,255,.12));
  pointer-events:none;
  z-index:0;
}

.fz-hero-widget .score-widget > *{position:relative;z-index:1}

.fz-hero-widget .widget-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
  opacity:.78;
  font-weight:600;
}

.fz-hero-widget .score-arc{
  position:relative;
  height:130px;
  margin-top:13px;
}

.fz-hero-widget .score-arc svg{
  display:block;
  width:100%;
  height:100%;
  overflow:visible;
}

.fz-hero-widget .score-arc path{
  fill:none;
  stroke-width:18;
  stroke-linecap:round;
}

.fz-hero-widget .arc-track{stroke:rgba(58,14,44,.12)}
.fz-hero-widget .arc-value{
  stroke:var(--fz-plum);
  stroke-dasharray:var(--score) 100;
  transition:stroke-dasharray .6s cubic-bezier(.2,.8,.2,1),stroke .5s;
}

.fz-hero-widget .score-arc output{
  position:absolute;
  left:0;right:0;bottom:3px;
  text-align:center;
  font-size:clamp(58px,8vw,73px);
  line-height:1;
  letter-spacing:-.04em;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  color:var(--fz-plum);
}

.fz-hero-widget #score-delta,
.fz-hero-widget .score-delta{
  text-align:center;
  font-size:12px;
  min-height:21px;
  line-height:1.4;
  margin:4px 0 0;
  opacity:.8;
}

.fz-hero-widget #visit-date,
.fz-hero-widget .visit-date{
  text-align:center;
  font-size:13px;
  margin-top:9px;
  font-weight:500;
}

.fz-hero-widget .visit-switch{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:2px;
  background:rgba(255,255,255,.22);
  border:1px solid rgba(255,255,255,.55);
  border-radius:15px;
  padding:3px;
  margin-top:12px;
  box-shadow:inset 0 2px 5px rgba(58,14,44,.1),0 1px 1px rgba(255,255,255,.5);
}

.fz-hero-widget .visit-switch button{
  border:1px solid transparent;
  background:transparent;
  border-radius:11px;
  padding:5px 1px;
  min-height:44px;
  line-height:1.1;
  cursor:pointer;
  color:inherit;
  font:inherit;
}

.fz-hero-widget .visit-switch button > span{
  display:block;
  font-size:17px;
  font-weight:600;
}

.fz-hero-widget .visit-switch small{
  font-size:9px;
  letter-spacing:0;
  opacity:.75;
}

.fz-hero-widget .visit-switch button[aria-pressed="true"]{
  background:linear-gradient(140deg,#faffb0,var(--fz-yellow));
  border-color:rgba(255,255,255,.65);
  box-shadow:inset 0 2px 1px rgba(255,255,255,.55),0 3px 8px rgba(58,14,44,.14);
  color:var(--fz-plum);
}

.fz-hero-widget .autoplay-toggle{
  display:block;
  margin:10px auto 0;
  padding:6px 10px;
  border:0;
  border-radius:12px;
  background:rgba(255,255,255,.5);
  min-height:34px;
  font-size:11px;
  text-decoration:underline;
  text-underline-offset:2px;
  cursor:pointer;
  color:inherit;
  font:inherit;
}

.fz-hero-widget .score-expanded{
  display:block;
  max-height:0;
  opacity:0;
  overflow:hidden;
  transition:max-height .55s,opacity .45s,margin .5s;
  margin-top:0;
}

.fz-hero-widget .score-widget.detailed .score-expanded{
  max-height:280px;
  opacity:1;
  margin-top:16px;
}

.fz-hero-widget #score-four,
.fz-hero-widget .score-four{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px 14px;
}

.fz-hero-widget #score-four > div,
.fz-hero-widget .score-four > div{
  border-top:1px solid rgba(58,14,44,.16);
  padding-top:8px;
}

.fz-hero-widget #score-four span,
.fz-hero-widget .score-four span{
  font-size:12px;
  display:block;
  opacity:.75;
}

.fz-hero-widget #score-four strong,
.fz-hero-widget .score-four strong{
  font-size:26px;
  line-height:1.25;
  font-weight:600;
  font-variant-numeric:tabular-nums;
}

.fz-hero-widget #score-four small,
.fz-hero-widget .score-four small{
  font-size:11px;
  margin-left:4px;
  opacity:.7;
  font-weight:500;
}

.fz-hero-widget #balance-summary,
.fz-hero-widget .balance-summary{
  font-size:12px;
  margin-top:12px;
  line-height:1.45;
  opacity:.8;
}

.fz-hero-widget .visually-hidden{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

.fz-hero-widget .widget-note{
  margin-top:12px;
  font-size:11px;
  text-align:center;
  opacity:.55;
}

/* Mobile: map then score card (copy already above via .fibrz-hero .inner) */
@media (max-width:1100px){
  .fz-hero-widget{
    grid-template-columns:1fr;
    min-height:0;
    gap:8px;
  }
  .fz-hero-widget .shared-map-rail{
    min-height:0;
    max-width:420px;
    margin:0 auto;
    width:100%;
  }
  .fz-hero-widget .shared-map-stage,
  .fz-hero-widget .hero-map-crop{
    max-height:min(380px,70vw);
    min-height:260px;
  }
  .fz-hero-widget .score-rail{
    max-width:360px;
    margin:0 auto;
    justify-self:center;
  }
  .fz-hero-widget .score-rail:before{opacity:.4}
}

@media (max-width:480px){
  .fz-hero-widget .visit-switch small{display:none}
  .fz-hero-widget .score-arc{height:118px}
  .fz-hero-widget .score-arc output{font-size:62px}
}

@supports not (background: color-mix(in srgb, red 50%, transparent)){
  .fz-hero-widget .score-widget.thick-glass,
  .fz-hero-widget .thick-glass{
    background:
      radial-gradient(ellipse at 15% 10%,var(--score-tint,#f2f65b),transparent 70%),
      linear-gradient(135deg,rgba(255,255,255,.78),rgba(255,255,255,.28));
  }
}

/* ── 2026-09-23b: tighter mobile stack — map then score, no sideways crop ── */
@media (max-width:900px){
  .fz-hero-widget{
    grid-template-columns:1fr;
    grid-template-rows:auto auto;
    min-height:0;
    width:100%;
    max-width:100%;
    overflow-x:clip;
    gap:12px;
  }
  .fz-hero-widget .shared-map-rail{
    order:1;
    min-height:0;
    max-width:min(300px,86vw);
    margin:0 auto;
    width:100%;
  }
  .fz-hero-widget .shared-map-stage,
  .fz-hero-widget .hero-map-crop{
    max-height:min(300px,58vw);
    min-height:180px;
    overflow:hidden;
  }
  .fz-hero-widget .anatomy svg,
  .fz-hero-widget .body-shell svg{
    max-width:100%;
    height:auto;
  }
  .fz-hero-widget .score-rail{
    order:2;
    max-width:min(360px,100%);
    width:100%;
    margin:0 auto;
    justify-self:center;
  }
  .fz-hero-widget .score-widget{
    max-width:100%;
  }
  .fz-hero-widget .visit-switch button{
    min-height:44px;
  }
}
@media (max-width:480px){
  .fz-hero-widget{gap:10px;}
  .fz-hero-widget .shared-map-rail{max-width:min(240px,78vw);}
  .fz-hero-widget .shared-map-stage,
  .fz-hero-widget .hero-map-crop{
    max-height:min(260px,52vw);
    min-height:160px;
  }
  .fz-hero-widget .visit-switch button{
    min-height:44px;
    padding:6px 2px;
  }
  .fz-hero-widget .score-arc{height:110px;}
  .fz-hero-widget .score-arc output{font-size:54px;}
  .fz-hero-widget .autoplay-toggle{min-height:44px;}
}
