/* Ivypop V71 — one cohesive Ease In / Dive In segmented control.
   Strictly scoped to the existing Candid Chemistry mode control.
   V70 content, icons, state engine, question categories and all other modules stay unchanged. */
#the-details.v62-chemistry .chem-v55-mode {
  box-sizing:border-box!important;
  position:relative!important;
  isolation:isolate!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch!important;
  flex-wrap:nowrap!important;
  gap:0!important;
  width:min(100%,350px)!important;
  min-width:0!important;
  padding:4px!important;
  border:1px solid rgba(255,255,255,.86)!important;
  border-radius:999px!important;
  background:rgba(255,247,244,.94)!important;
  box-shadow:0 8px 26px rgba(53,25,42,.105),inset 0 1px 0 rgba(255,255,255,.95)!important;
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
}
#the-details.v62-chemistry .chem-v55-mode button,
#the-details.v62-chemistry .chem-v55-mode button.selected {
  box-sizing:border-box!important;
  min-width:0!important;
  width:100%!important;
  min-height:44px!important;
  margin:0!important;
  padding:8px 11px!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:9px!important;
  position:relative!important;
  z-index:1!important;
  border:1px solid transparent!important;
  border-radius:999px!important;
  background:transparent!important;
  background-image:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  box-shadow:none!important;
  transform:none!important;
  color:#30232D!important;
  text-align:center!important;
  font:750 13px/1.15 'DM Sans',system-ui,sans-serif!important;
  letter-spacing:0!important;
  text-shadow:none!important;
  transition:color .20s ease,transform .14s ease!important;
  -webkit-tap-highlight-color:transparent;
}
#the-details.v62-chemistry .chem-v55-mode button.selected {color:#FFFFFF!important;}
#the-details.v62-chemistry .chem-v55-mode button svg,
#the-details.v62-chemistry .chem-v55-mode button i {
  flex:none!important;
  width:17px!important;
  height:17px!important;
  stroke-width:2.35;
}
/* Fallback for older browsers: still one unified control with a dark selected half. */
#the-details.v62-chemistry .chem-v55-mode button.selected {
  background:#241B25!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09)!important;
}
/* Current browsers: dark selection surface glides beneath the two labels. */
@supports selector(.chem-v55-mode:has(button.selected)) {
  #the-details.v62-chemistry .chem-v55-mode::before {
    content:"";
    position:absolute;
    z-index:0;
    top:5px;
    bottom:5px;
    left:5px;
    width:calc((100% - 10px)/2);
    border-radius:999px;
    background:#241B25;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.11),0 3px 10px rgba(34,19,29,.12);
    pointer-events:none;
    transform:translateX(0);
    transition:transform .205s cubic-bezier(.22,.75,.22,1);
    will-change:transform;
  }
  #the-details.v62-chemistry .chem-v55-mode:has(button[data-chem-mode="dive_in"].selected)::before {
    transform:translateX(100%);
  }
  #the-details.v62-chemistry .chem-v55-mode button.selected {
    background:transparent!important;
    box-shadow:none!important;
  }
}
/* Older V58 indicator must not create a second dark selection surface. */
#the-details.v62-chemistry .chem-v55-mode .v58-selection-indicator {display:none!important;}
#the-details.v62-chemistry .chem-v55-mode button:active {transform:scale(.985)!important;}
#the-details.v62-chemistry .chem-v55-mode button:focus-visible {
  outline:2px solid #B0266B!important;
  outline-offset:1px!important;
}
#the-details.v62-chemistry .chem-v55-mode button:focus:not(:focus-visible){outline:none!important;}
@media(max-width:700px) {
  #the-details.v62-chemistry .chem-v55-mode {width:min(100%,320px)!important;}
  #the-details.v62-chemistry .chem-v55-mode button,
  #the-details.v62-chemistry .chem-v55-mode button.selected {
    min-height:42px!important;
    font-size:12px!important;
    padding:7px 9px!important;
    gap:7px!important;
  }
  #the-details.v62-chemistry .chem-v55-mode button svg,
  #the-details.v62-chemistry .chem-v55-mode button i {width:16px!important;height:16px!important;}
}
@media(prefers-reduced-motion:reduce) {
  #the-details.v62-chemistry .chem-v55-mode::before,
  #the-details.v62-chemistry .chem-v55-mode button {transition:none!important;}
}
