/* Chinese Medicine Treatment Summary screens — shared by the U.S. page (/us/chinese-medicine/) and the
 * Hebrew page (/il/chinese-medicine/). Markup: templates/public/us_cm/_cm.html + _screens.html.
 * Timelines: static/public/home/cm-screens.js. Self-contained: tokens fall back to the HLISTIX palette
 * where the page (e.g. the Hebrew landing) does not define them, and the frame is always LTR. */
.cma { --h-navy: #203E6C; --h-blue: #4867F2; --h-teal-text: #1C7A6E; --h-body: #3A4250; --h-muted: #5B6270;
  --ease: cubic-bezier(.2, .7, .2, 1); direction: ltr; text-align: left; font-family: 'Inter', 'DM Sans', system-ui, sans-serif; }
.cma .pframe__dots { display: flex; gap: .35rem; }
.cma .pframe__dots i { inline-size: 10px; block-size: 10px; border-radius: 50%; background: #CBD3DF; }
.cma .hx-region { position: relative; overflow: hidden; background: #fff; }
.cma .hx-region img { position: absolute; max-width: none; height: auto; }
:where(.cma) p { margin: 0; }
/* One research-assistant panel, styled like the product's right rail */
.cmr { background: #fff; border: 1px solid #E1E6EF; border-radius: 12px; overflow: hidden; }
.cmr__head { display: flex; align-items: center; gap: .45rem; padding: .5rem .7rem; border-bottom: 1px solid #EEF1F6; }
.cmr__n { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #E8EEFC; color: var(--h-blue); font: 700 .66rem 'DM Sans', sans-serif; }
.cmr__t { font: 600 .82rem/1.25 'DM Sans', sans-serif; color: var(--h-navy); }
.cmr__m { margin-left: auto; font-size: .68rem; color: var(--h-muted); white-space: nowrap; }
.cmr--warn .cmr__m { color: #B4541D; }
.cmr__body { padding: .5rem .7rem .6rem; }
.cmr__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.cmr__list li { font-size: .76rem; line-height: 1.35; color: var(--h-body); padding: .38rem .5rem; border-radius: 8px; background: #F6F8FC; border: 1px solid #EDF0F6; }
.cmr__list li b { display: block; color: var(--h-navy); font-weight: 600; }
.cmr__list li span { display: block; font-size: .7rem; color: var(--h-muted); }
.cmr__list--warn li { background: #FFF8F1; border-color: #F6E3CF; }
.cmr__list--pattern li b { color: var(--h-teal-text); }
.cmr__line { margin: 0 !important; font-size: .76rem; line-height: 1.4; color: var(--h-body); }
.cmr__line b { color: var(--h-navy); font-weight: 600; }
.cmr__line em { font-style: normal; color: var(--h-muted); }
.cmr__muted { color: var(--h-muted); }
.cmr__foot { margin: .45rem 0 0 !important; font-size: .68rem; color: var(--h-muted); }
.cmr__quote { margin: 0 0 .3rem; font: 500 1rem/1.5 'Noto Serif TC', 'Songti TC', serif; color: var(--h-navy); }
.cmr__src { margin: .35rem 0 0 !important; font-size: .7rem; color: var(--h-teal-text); font-weight: 600; }
@keyframes cm-arrive { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* The product screen */
.cma { margin: 0; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid #D9E0EA; box-shadow: 0 40px 80px -40px rgba(15, 33, 66, .55), 0 12px 30px -18px rgba(15, 33, 66, .35); }
.cma__bar { display: flex; align-items: center; gap: .8rem; height: 36px; padding: 0 14px; background: #EEF2F7; border-bottom: 1px solid #DDE3EC; }
.cma__url { flex: 1; max-width: 640px; margin: 0 auto; padding: .2rem .8rem; border-radius: 8px; background: #fff; font: 500 .74rem 'DM Sans', sans-serif; color: #4B5563; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cma__top { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid #E5EAF1; font: 400 .82rem 'DM Sans', sans-serif; color: #1F2937; }
.cma__top b { font-size: .98rem; color: #111827; margin-right: .3rem; }
.cma__pill { padding: .12rem .55rem; border-radius: 99px; background: #E8F1FB; color: #0F5E9C; font-size: .72rem; font-weight: 600; }
.cma__pill--muted { background: #F1F5F9; color: #64748B; }
.cma__note { margin-left: auto; padding: .2rem .6rem; border-radius: 6px; background: #FEF6DD; color: #7A5A00; font-size: .72rem; font-weight: 600; }
.cma__body { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); background: #F4F6FA; align-items: start; }
.cma__body > * { min-width: 0; }
.cma__rec { padding: 12px; }
.cma__vp { position: relative; overflow: hidden; border-radius: 10px; background: #fff; border: 1px solid #E2E8F0; container-type: inline-size; }
.cma__strip { position: relative; width: 100%; transition: transform 1s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.cma__strip img { display: block; width: 100%; height: 100%; }
.cma__rail { padding: 12px 12px 14px 4px; display: grid; gap: .5rem; align-content: start; }
.cma__cap { padding: .55rem 1rem; font-size: .74rem; color: var(--h-muted); text-align: center; border-top: 1px solid #E5EAF1; background: #fff; }

/* Overlays on the record. Sizes follow the screenshot (strip width 950 px), via container units. */
.cmo { position: absolute; box-sizing: border-box; font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; color: #1F2937; pointer-events: none; }
.cmo-scroll { display: none; }
.cmo--type { background: #fff; padding: calc(100cqw * 5 / 950) calc(100cqw * 8 / 950); font-size: calc(100cqw * 11.2 / 950); line-height: 1.55; overflow: hidden; border-radius: 4px; }
.cmo--type.is-typing .cmo__txt::after { content: ''; display: inline-block; width: 1px; height: 1.1em; margin-left: 1px; vertical-align: -.15em; background: #2563EB; animation: cm-caret .9s steps(1) infinite; }
@keyframes cm-caret { 50% { opacity: 0; } }
.cmo--pick { display: flex; align-items: center; justify-content: center; border-radius: 999px; font-size: calc(100cqw * 10.2 / 950); white-space: nowrap; transition: background-color .25s, color .25s, border-color .25s, opacity .25s; }
.cmo--pick span { overflow: hidden; text-overflow: ellipsis; }
/* "on": the chip becomes selected (final state without script) */
.cmo--on { background: #0F70B7; color: #fff; border: 1px solid #0F70B7; }
.is-run .cmo--on:not(.is-on) { opacity: 0; }
/* "reveal": the screen shows it selected; while running it starts as an unselected chip */
.cmo--reveal { background: transparent; color: transparent; border: 1px solid transparent; }
.is-run .cmo--reveal:not(.is-on) { background: #fff; color: #374151; border-color: #D5DCE6; }
/* "off": a selection in the source screen that is not part of this demonstration */
.cmo--off { background: #fff; color: #374151; border: 1px solid #D5DCE6; }
/* the click */
.is-run .cmo--pick.is-on::after { content: ''; position: absolute; inset: -5px; border-radius: 999px; border: 2px solid #4867F2; animation: cm-ring 1.1s ease-out forwards; }
@keyframes cm-ring { 0% { opacity: 1; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.18); } }

/* The rail, as in the product */
.cmr-group { margin: .35rem 0 0 !important; font: 700 .66rem 'DM Sans', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--h-teal-text); }
.cmr-group:first-child { margin-top: 0 !important; }
.cmr__label { margin: .1rem 0 .35rem !important; font: 600 .7rem 'DM Sans', sans-serif; color: var(--h-muted); text-transform: uppercase; letter-spacing: .06em; }
.cmq { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.cmq li { position: relative; padding: .45rem .55rem .45rem .6rem; border-radius: 8px; background: #F6F8FC; border: 1px solid #EDF0F6; font-size: .78rem; line-height: 1.35; color: var(--h-body); padding-right: 4.8rem; }
.cmq__d { display: block; font: 700 .68rem 'DM Sans', sans-serif; color: var(--h-teal-text); margin-bottom: .1rem; }
.cmq__s { position: absolute; right: .5rem; top: .45rem; font-size: .66rem; font-weight: 700; }
.cmq__s i { font-style: normal; padding: .1rem .45rem; border-radius: 99px; background: #FFF4E5; color: #B45309; }
.cmx-st i:last-child { background: #E7F6EF; color: #047857; }
.cmx-st i:first-child { display: none; }
.is-run .cmx-st:not(.is-on) i:first-child { display: inline; }
.is-run .cmx-st:not(.is-on) i:last-child { display: none; }
.cmr__list--pattern li { position: relative; padding-right: 4.8rem; }
.cmf { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.cmf li { padding: .2rem .55rem; border-radius: 99px; background: #E8F6F3; color: var(--h-teal-text); font: 600 .72rem 'DM Sans', sans-serif; }
.cmr--row .cmr__head { padding: .45rem .65rem; border-bottom: 0; }
.cmr--row .cmr__t small { display: block; font: 400 .7rem/1.3 'DM Sans', sans-serif; color: var(--h-muted); margin-top: .1rem; }
.cmr__img > img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid #E2E8F0; }
.cmr__img .hx-region { border-radius: 6px; border: 1px solid #E2E8F0; }
.cmr--doc { border-color: #CFE8E2; }
.cmd { margin: 0 0 .45rem !important; font-size: .8rem; line-height: 1.45; color: var(--h-body); }
.cmd b { display: block; font: 700 .72rem 'DM Sans', sans-serif; color: var(--h-navy); }
.cmd--foot { font-size: .72rem; color: #047857; font-weight: 600; }

/* Arrival: before its moment a rail item is a quiet skeleton line (no blank boxes, no layout shift) */
.is-run .cmx:not(.is-on), .is-run .cmx:not(.is-on) * { color: transparent !important; }
.is-run .cmx:not(.is-on) { background-color: #EDF1F7 !important; border-color: transparent !important; border-radius: 6px; }
.is-run .cmx:not(.is-on) img, .is-run .cmx:not(.is-on) .hx-region { opacity: 0; }
.is-run .cmx:not(.is-on) .cmq__s i { background: transparent !important; }
.is-run .cmx.is-on { animation: cm-arrive .5s var(--ease) 1; }
@media (max-width: 860px) {
  .cma__body { grid-template-columns: 1fr; }
  .cma__rail { padding: 0 12px 14px; }
  .cma__note { display: none; }
  .cma__top { font-size: .75rem; }
}
/* Reduced motion: the demonstrations still play (they are the content) but nothing slides */
@media (prefers-reduced-motion: reduce) {
  .cma__strip { transition: none; }
  .is-run .cmx.is-on { animation: none; }
  .is-run .cmo--pick.is-on::after { animation: none; opacity: 0; }
  .cmo--pick { transition: none; }
}
.cmr > .cmr__head:last-child { border-bottom: 0; }
.cmr__img > img { max-height: 170px; object-fit: cover; object-position: top; }

/* Replay (screens play once when they come into view) */
.cma__replay { display: flex; justify-content: center; margin: 0 !important; padding: .55rem 1rem 0; background: #fff; border-top: 1px solid #E5EAF1; }
.cma__replay .playctl { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .9rem; border-radius: 99px; border: 1px solid #D6DDEA; background: #fff; color: var(--h-navy); font: 600 .8rem 'DM Sans', sans-serif; cursor: pointer; }
.cma__replay .playctl:hover { border-color: var(--h-blue); color: var(--h-blue); }
.cma__replay + .cma__cap { border-top: 0; }
