/* Chrysalis v2 · fix round 1 · group fxd: small things that look broken (14 Nov 2026).
   Loaded last and only while the round is on (inc/v2/v2-fix1-fxd.php); every rule also sits under body.chvf1.
   No new words, no new colours: #34C28A is the site's green, #0E0E10 its ink. Safari 16.4 is the floor. */

/* ---------- a. phone menu, Research areas: one column while two do not fit ----------
   navbest.css sets 1fr 1fr; a 1fr track cannot go under its longest chip, so the right column ran to 417 px and off a
   360 to 414 px screen. Under 430 px the chips stack, each name and its line on one row.
   Review fix (14 Nov 2026): the break is the brief's 430 px, not 434. From 430 px (iPhone Pro Max and Plus) both columns
   are whole on the screen today (they end at 417 px), so those phones keep the two columns they have. */
@media (max-width:429.98px){
  body.chvf1 .c3-root.hd3 .nm-pareas{grid-template-columns:minmax(0,1fr)}
}

/* ---------- b. sign-in: "Stay signed in" as a designed tick box ----------
   22 px, 6 px corners, the fields' own ring; ticked = green fill with an ink tick. The 2 px margin keeps the row 26 px
   high as before, so nothing under it moves. */
body.chvf1 .chv2-si__stay{position:relative}
body.chvf1 .chv2-si__stay::after{content:"";position:absolute;left:0;right:0;top:-9px;bottom:-9px} /* 44 px tap row */
body.chvf1 .chv2-si__stay input[type="checkbox"]{
  -webkit-appearance:none;appearance:none;flex:none;box-sizing:border-box;width:22px;height:22px;margin:2px 0;padding:0;
  border:0;border-radius:6px;cursor:pointer;
  background-color:transparent;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.6l4.6 4.6L19 7.6' fill='none' stroke='%230E0E10' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:50% 50%;background-size:0 0;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.30);
  transition:background-color .18s cubic-bezier(.165,.84,.44,1),box-shadow .18s cubic-bezier(.165,.84,.44,1),background-size .18s cubic-bezier(.165,.84,.44,1),transform .18s cubic-bezier(.165,.84,.44,1);
}
body.chvf1 .chv2-si__stay input[type="checkbox"]:checked{background-color:#34C28A;background-size:16px 16px;box-shadow:inset 0 0 0 1px #34C28A}
body.chvf1 .chv2-si__stay input[type="checkbox"]:active{transform:scale(.96)}
body.chvf1 .chv2-si__stay input[type="checkbox"]:focus-visible{outline:2px solid #fff;outline-offset:3px}
@media (hover:hover) and (pointer:fine){
  body.chvf1 .chv2-si__stay:hover input[type="checkbox"]:not(:checked){box-shadow:inset 0 0 0 1px rgba(255,255,255,.55)}
}
@media (prefers-reduced-motion:reduce){
  body.chvf1 .chv2-si__stay input[type="checkbox"]{transition:background-color .18s linear,box-shadow .18s linear}
  body.chvf1 .chv2-si__stay input[type="checkbox"]:active{transform:none}
}
@media (forced-colors:active){ /* Windows high contrast drops backgrounds: hand the box back to the system */
  body.chvf1 .chv2-si__stay input[type="checkbox"]{-webkit-appearance:checkbox;appearance:auto;width:20px;height:20px;margin:3px 0;background:none;box-shadow:none}
}

/* ---------- c. iPhone zoom: the three fields under 16 px (measured on 23 pages) ----------
   iOS Safari zooms the page when a focused field's text is under 16 px. Each field keeps its box. */
@media (max-width:767.98px){
  /* shop Sort (14 px): tighter side padding and tracking pay for the larger text, so the pill stays 44 px high and
     190 px wide and still shares a row with "In stock only" on a 375 px screen */
  body.chvf1 .s3 .s3-sort__sel{font-size:max(16px,1em);letter-spacing:-.02em;padding:0 32px 0 13px}
  /* pass 2 (15 Nov 2026): the arrow sits 12 px from the edge (was 14): with the longest label the arrow now has about
     11 px to the text and 15 px to the edge, against 14 px from the edge to the text, so the pill reads even again */
  body.chvf1 .s3 .s3-sort svg{right:12px}
  /* Library search (15 px): 0.775 px less padding each side pays for the taller line, the pill stays 53 px */
  body.chvf1 .cl-research-library .search input{font-size:max(16px,1em);padding-top:14.225px;padding-bottom:14.225px}
  /* cart quantity (13 px): the box is fixed at 32 x 44 px */
  body.chvf1 .k-qty input{font-size:max(16px,1em)}
}

/* ---------- d. Build a Stack bar: the "-10%" badge was cut at the bottom ----------
   .sx-peek__t clips (it guards a long line with "..."), and the badge's padding hangs under its 18 px line.
   Padding widens the clip, the negative margin gives the height back: the bar does not move. */
@media (max-width:899px){
  body.chvf1 .sx-page .sx-peek__t{padding:4px 0;margin:-4px 0}
  body.chvf1 .sx-page .sx-peek__pct{position:relative;top:-1px} /* its middle on the bar's middle, with the dots and the arrow */
}

/* ---------- e. cart and checkout summary: the "Stack · -10%" chip was ink on a dark card ----------
   The chip's size, capitals and place stay (offer.css); it only takes the site's green. Not the cart drawer (white today). */
body.chvf1.chv2d main .sx-tag__t{color:#34C28A;border-color:rgba(52,194,138,.45);background-color:rgba(52,194,138,.10)}

/* ---------- f. designed Library articles: diagram labels ----------
   option-a.css gives every Library svg stroke:currentColor at 1.5 px; the other articles' drawings switch it off,
   the .dg drawings (the buying guide, 56 labels) did not, so each letter carried an outline. */
body.chvf1 .cl-feature .dg text{stroke:none}

/* ---------- g. product price line: "AED 280 per 10 mg vial" stays on one line ----------
   Where price, unit and stock state do not fit one row, the stock state takes the second row; where they fit
   (most pages at 390 px, every page on a computer) the row is exactly as before. */
body.chvf1 .c3-root .p3-price{flex-wrap:wrap;row-gap:8px}
body.chvf1 .c3-root .p3-price__u{white-space:nowrap;margin-right:auto}
body.chvf1 .c3-root .p3-price__s{margin-left:0}

/* ---------- h. search panel: no dot left hanging when "17 COMPOUNDS · FROM AED 160" takes two lines ----------
   The two halves are already nowrap spans (footer.php). Here the dot between them is drawn in the second half's own
   left padding, pulled back past the row's left edge: beside the first half it shows, at the start of a line it is
   cut away. Only the left edge clips (clip-path, not overflow), so no word can ever be cut. The typed " · " stays in
   the page for screen readers and copy, at size 0. */
body.chvf1 .cl-search__format .t-meta{display:flex;flex-wrap:wrap;font-size:0;letter-spacing:0;
  -webkit-clip-path:inset(-4px -100vw -4px 0);clip-path:inset(-4px -100vw -4px 0)}
body.chvf1 .cl-search__format .t-meta > .cl-nowrap{position:relative;flex:none;font-size:.75rem;letter-spacing:.06em}
body.chvf1 .cl-search__format .t-meta > .cl-nowrap ~ .cl-nowrap{margin-left:-.77em;padding-left:.77em}
body.chvf1 .cl-search__format .t-meta > .cl-nowrap:not(:last-child){margin-right:.77em}
body.chvf1 .cl-search__format .t-meta > .cl-nowrap ~ .cl-nowrap::before{content:"\00B7";content:"\00B7" / "";position:absolute;left:0;top:0;width:.77em;text-align:center;letter-spacing:0}

/* ---------- i. Track order: the site's standard button ----------
   The plugin's own sheet spreads the label and a typed arrow to the two ends. Here: label and arrow centred together,
   14 px medium, and the arrow is the icon every other button uses.
   Review fix (15 Nov 2026): 48 px, the height of the site's .btn (base.css min-height 48px; Sign in, Send enquiry and
   Explore the catalogue all measure 48), not 52: PLAN 1.15's "52 px" does not match the .btn it names. */
body.chvf1 .cl-tracking-main .cl-tracking-submit{justify-content:center;gap:10px;height:48px;min-height:48px;padding:0 24px;border:1px solid transparent;
  font-size:.875rem;font-weight:500;line-height:1.1;letter-spacing:.04em}
/* the typed arrow becomes the sprite's arrow-right (same path, same 16 px, same weight); a browser without masks keeps the typed one */
@supports ((-webkit-mask-image:none) or (mask-image:none)){
  body.chvf1 .cl-tracking-main .cl-tracking-submit > span[aria-hidden="true"]{flex:none;width:16px;height:16px;font-size:0;line-height:0;background-color:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M13.75 5.75 20 12l-6.25 6.25'/%3E%3C/svg%3E") 50% 50%/16px 16px no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M13.75 5.75 20 12l-6.25 6.25'/%3E%3C/svg%3E") 50% 50%/16px 16px no-repeat}
}
body.chvf1 .cl-tracking-main .cl-tracking-submit > span[aria-hidden="true"]{transition:transform .3s cubic-bezier(.165,.84,.44,1)}
/* the same 4 px nudge as .btn .i (base.css); --nudge is 0 under reduced motion */
@media (hover:hover) and (pointer:fine){
  body.chvf1 .cl-tracking-main .cl-tracking-submit:hover > span[aria-hidden="true"]{transform:translateX(var(--nudge,4px))}
}
body.chvf1 .cl-tracking-main .cl-tracking-submit:focus-visible > span[aria-hidden="true"]{transform:translateX(var(--nudge,4px))}
@media (prefers-reduced-motion:reduce){
  body.chvf1 .cl-tracking-main .cl-tracking-submit > span[aria-hidden="true"]{transition:none}
}
