/* =========================================================
   BOLI CARE · FEATURES v2.3.2
   A. "En consultation": the patient summary is built by the scroll itself
   B. "Entre les consultations": the weekly evolution grid fills week by week with the scroll
   Product values (--p-*) are read from the boli-pro prototype.
   Scrubbing: JS writes one progress value (--p) per scene; each element derives its own
   state in CSS from its window [--t0, --t1], so the build plays forward and backward.
   ========================================================= */

.fx-consult,
.fx-remote {
  --p-ink: #0E1B17;
  --p-muted: #58655F;
  --p-axis: #77736A;
  --p-rule: #E9E5DD;
  --p-grid: #EEECE7;
  --p-chip: #F6F4F1;
  --p-line: #2B3D37;
  --p-taken: #9BABA6;
  --p-missed: #D46A2E;
  --p-sched: #829790;
  --p-d0: #E3E7E5;
  --p-d1: #D9A21B;
  --p-d2: #D46A2E;
  --p-d3: #B02A4F;
  --p-checked: #2B3D37;
  --fx-ease: cubic-bezier(.16, 1, .3, 1);
  position: relative;
  z-index: 1;
}

/* ─── Shared heads ─── */
.fx-title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 12px 0 14px;
}
.fx-lede { font-size: clamp(1rem, 1.1vw, 1.12rem); line-height: 1.6; color: var(--ink-soft); max-width: 52ch; margin: 0; }
.fx-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(28px, 3vw, 40px);
}
.fx-head--split .fx-title { margin-bottom: 0; font-size: clamp(2.1rem, 3.8vw, 3.1rem); }
.fx-remote-head { max-width: 840px; margin: 0 auto 36px auto; }
.fx-remote-head .apple-sec-title { font-size: clamp(2.2rem, 4.0vw, 3.2rem); margin-bottom: 20px; }
.fx-remote-head .apple-sec-lede { font-size: 1.08rem; line-height: 1.65; color: var(--ink, #0D1A14); max-width: 85ch; margin: 0 auto; }

/* ─── Product card (boli-pro .patient-card) ─── */
.fx-card {
  background: #fff;
  border: 1px solid var(--p-rule);
  border-radius: 24px;
  padding: 24px 0;
  color: var(--p-ink);
  font-family: var(--font-body);
}
.fx-card-head { padding: 0 24px 16px; border-bottom: 1px solid var(--p-rule); }
.fx-card-title { font-family: var(--font-head); font-size: 18px; font-weight: 600; line-height: 1.2; margin: 0; color: var(--p-ink); letter-spacing: 0; }
.fx-card-range { margin-left: 12px; font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--p-muted); }
.fx-card-sub { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--p-muted); }
.fx-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 14px 24px 0; font-size: 11px; color: var(--p-muted); }
.fx-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.fx-lg-sq { border-radius: 2px !important; }
.fx-lg-sq--sched { background: #fff; box-shadow: inset 0 0 0 1.25px var(--p-sched); }
.fx-lg-line { width: 18px !important; height: 2px !important; border-radius: 2px !important; background: var(--p-line); }

/* SVG charts */
.fx-chart { position: relative; }
.fx-traj-svg, .fx-ress-svg { display: block; width: 100%; height: auto; overflow: visible; }
.fx-grid { stroke: var(--p-grid); stroke-width: 1; stroke-dasharray: 3 4; }
.fx-axis { font-family: var(--font-body); font-size: 17px; font-weight: 500; fill: var(--p-axis); }
.fx-weight { fill: none; stroke: var(--p-line); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fx-wdot { fill: var(--p-line); stroke: #fff; stroke-width: 1.5; }
.fx-rdot { stroke: #fff; stroke-width: 1.5; }
.fx-sq-taken { fill: var(--p-taken); }
.fx-sq-missed { fill: var(--p-missed); }
.fx-sq-sched { fill: #fff; stroke: var(--p-sched); stroke-width: 1.2; }
.fx-today line { stroke: #6A7C76; stroke-width: 1.5; stroke-dasharray: 4 4; }
.fx-today text { font-family: var(--font-body); font-size: 15px; font-weight: 600; fill: #56665F; }
.fx-traj-svg { margin-top: 18px; padding: 0 20px; box-sizing: border-box; }
.fx-cursor { display: none; }

/* ─── A · Scene 1: Dernier bilan ─── */
.fx-metrics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.fx-metric { padding: 22px 24px 20px; box-shadow: -1px 0 0 0 var(--p-rule), 0 -1px 0 0 var(--p-rule); min-height: 132px; }
.fx-metric:nth-child(-n+2) { box-shadow: -1px 0 0 0 var(--p-rule); }
.fx-m-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fx-m-label { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--p-muted); }
.fx-i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--p-rule); font-family: var(--font-head); font-size: 10.8px; font-weight: 600; line-height: 16px; text-align: center; color: var(--p-muted); }
.fx-m-value { margin: 0; display: flex; align-items: baseline; gap: 8px; font-family: var(--font-head); font-size: 24px; font-weight: 600; line-height: 1.1; }
.fx-count { font-variant-numeric: tabular-nums; }
.fx-m-unit { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--p-ink); }
.fx-m-unit--body { font-family: var(--font-head); font-size: 24px; font-weight: 600; }
.fx-m-chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.fx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--p-chip); font-size: 12.5px; line-height: 18px; }
.fx-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.fx-chip--more { color: var(--p-muted); }

/* ─── A · Scene 3: Moral, stress, sommeil ─── */
.fx-ress-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx-ress { padding: 20px 20px 0; display: flex; flex-direction: column; }
.fx-ress + .fx-ress { box-shadow: -1px 0 0 0 var(--p-rule); }
.fx-ress-name { margin: 0; font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--p-muted); }
.fx-ress-stat { margin: 10px 0 8px; display: flex; align-items: baseline; gap: 8px; }
.fx-ress-value { font-family: var(--font-head); font-size: 24px; font-weight: 600; }
.fx-ress-mention { font-size: 11px; color: var(--p-muted); }
.fx-ress-svg .fx-axis { font-size: 17px; }
.fx-ress .fx-legend { margin-top: auto; padding: 8px 0 0; gap: 10px; flex-wrap: nowrap; font-size: 10.5px; }
.fx-ress .fx-legend i { width: 8px; height: 8px; }

/* ─── A · Layout ─── */
.fx-consult { background: #fff; }
.fx-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4.5vw, 72px); align-items: center; }
.fx-stage { display: none; }
.fx-consult { padding: clamp(56px, 8vw, 96px) 0 24px; }
.fx-step .fx-step-panel { grid-template-rows: 1fr; }
.fx-step .fx-scene { padding-bottom: 28px; max-width: 860px; }
.fx-head { margin-bottom: clamp(20px, 2.6vw, 32px); }
.fx-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-soft); }
.fx-step { position: relative; border-bottom: 1px solid var(--rule-soft); }
.fx-step-head { margin: 0; }
.fx-step-btn {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: baseline;
  gap: 4px;
  padding: 14px 0;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: clamp(1.02rem, 1.25vw, 1.14rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.005em;
  color: var(--ink);
  transition: color .4s var(--fx-ease);
}
.fx-step-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.fx-step-num { font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .1em; color: #8A6424; opacity: 1; transition: opacity .4s var(--fx-ease); }
.fx-step.is-active .fx-step-btn, .fx-step.is-done .fx-step-btn { color: var(--ink); }
.fx-step.is-active .fx-step-num { opacity: 1; }
.fx-step-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--fx-ease); }
.fx-step-inner { overflow: hidden; min-height: 0; }
.fx-step.is-active .fx-step-panel { grid-template-rows: 1fr; }
.fx-step-panel p { margin: 0; padding: 0 0 16px 34px; font-size: 14.5px; line-height: 1.6; color: var(--ink-muted); max-width: 46ch; }
/* progress rail on the step's bottom rule, filled by the scroll */
.fx-step-rail { display: none; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; opacity: 0; transition: opacity .4s ease; }
.fx-step.is-active .fx-step-rail { opacity: 1; }
.fx-step-rail i { display: block; height: 100%; background: var(--green); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.fx-hint { display: none; }

.fx-stage { position: relative; perspective: 1600px; }
.fx-stage-body { position: relative; display: grid; }
.fx-stage-body > .fx-scene { grid-area: 1 / 1; align-self: center; transform-origin: 50% 40%; will-change: transform, opacity, filter; }
.fx-stage .fx-card { box-shadow: 0 50px 120px -50px rgba(13, 26, 20, .38), 0 2px 6px rgba(13, 26, 20, .04); }
.fx-stage-note { margin: 14px 4px 0; font-size: 11.5px; color: var(--ink-muted); }

/* scrub: element state derived from the scene progress */
.fx-scrub .fx-k {
  --u: clamp(0, (var(--p, 0) - var(--t0)) / (var(--t1) - var(--t0)), 1);
  --e: calc(1 - (1 - var(--u)) * (1 - var(--u)));
  opacity: var(--u);
  transform: translateY(calc((1 - var(--e)) * 16px));
}
.fx-scrub .fx-k--lift {
  transform: translateY(calc((1 - var(--e)) * 46px)) scale(calc(.9 + var(--e) * .1));
  filter: blur(calc((1 - var(--e)) * 6px));
}
.fx-scrub .fx-chip.fx-k { transform: translateX(calc((1 - var(--e)) * -14px)); }
.fx-scrub [data-front] [data-x] {
  --u: clamp(0, (var(--q, 0) - var(--x, 0)) * 16, 1);
  opacity: var(--u);
  transform: scale(calc(.2 + var(--u) * .8));
  transform-box: fill-box;
  transform-origin: center;
}
.fx-scrub [data-front] .fx-today { transform: none; }
.fx-scrub .fx-cursor { display: block; opacity: var(--cur, 0); pointer-events: none; }
.fx-cursor line { stroke: var(--green); stroke-width: 2; }
.fx-cursor-tag { fill: var(--green); }
.fx-cursor-txt { font-family: var(--font-body); font-size: 13px; font-weight: 600; fill: #fff; }

/* Desktop scrollytelling */
@media (min-width: 900px) and (min-height: 600px) {
  .fx-scrub .fx-consult { padding: 0; }
  .fx-scrub .fx-step-btn { color: var(--ink-faint); }
  .fx-scrub .fx-step.is-active .fx-step-btn, .fx-scrub .fx-step.is-done .fx-step-btn { color: var(--ink); }
  .fx-scrub .fx-step-num { opacity: .55; }
  .fx-scrub .fx-step.is-active .fx-step-num { opacity: 1; }
  .fx-scrub .fx-step-rail { display: block; }
  .fx-scrub .fx-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); }
  .fx-scrub .fx-stage { display: block; }
  .fx-scrub .fx-step .fx-step-panel { grid-template-rows: 0fr; }
  .fx-scrub .fx-step.is-active .fx-step-panel { grid-template-rows: 1fr; }
  .fx-scrub .fx-step .fx-scene { padding-bottom: 0; max-width: none; }
  .fx-scrub .fx-scrolly { height: calc(var(--fx-steps, 3) * 100vh + 40vh); }
  .fx-scrub .fx-sticky {
    position: sticky;
    top: var(--fx-top, 80px);
    height: calc(100vh - var(--fx-top, 80px));
    display: flex;
    align-items: center;
    overflow: hidden;
  }
  .fx-scrub .fx-step .fx-scene { display: none; }
  .fx-scrub .fx-stage-body .fx-scene { display: block; }
  .fx-scrub .fx-hint {
    display: flex; align-items: center; gap: 10px; margin: 22px 0 0;
    font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted);
    opacity: var(--hint, 1); transition: opacity .3s ease;
  }
  .fx-hint-mouse { width: 16px; height: 24px; border: 1.5px solid currentColor; border-radius: 9px; position: relative; }
  .fx-hint-mouse i { position: absolute; left: 50%; top: 5px; width: 2px; height: 5px; margin-left: -1px; border-radius: 2px; background: currentColor; animation: fx-wheel 1.6s ease-in-out infinite; }
  @keyframes fx-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(7px); opacity: 0; } 100% { opacity: 0; } }
}
/* Below: steps stacked, each scene scrubbed by its own position in the viewport */
@media (max-width: 899px), (max-height: 599px) {
  .fx-consult { padding: clamp(56px, 8vw, 88px) 0 24px; }
  .fx-layout { grid-template-columns: minmax(0, 1fr); }
  .fx-left, .fx-steps, .fx-step, .fx-scene { min-width: 0; }
  .fx-stage { display: none; }
  .fx-step .fx-step-panel { grid-template-rows: 1fr; }
  .fx-step-btn { color: var(--ink); cursor: default; }
  .fx-step-num { opacity: 1; }
  .fx-step-rail { display: none; }
  .fx-step .fx-scene { padding-bottom: 28px; }
  .fx-step .fx-card { box-shadow: 0 30px 70px -45px rgba(13, 26, 20, .35); }
}
@media (max-width: 680px) {
  .fx-head--split { grid-template-columns: 1fr; }
  .fx-metrics { grid-template-columns: 1fr; }
  .fx-metric, .fx-metric:nth-child(-n+2) { box-shadow: 0 -1px 0 0 var(--p-rule); min-height: 0; }
  .fx-metric:first-child { box-shadow: none; }
  .fx-ress-grid { grid-template-columns: 1fr; }
  .fx-ress + .fx-ress { box-shadow: 0 -1px 0 0 var(--p-rule); }
  .fx-ress { padding-bottom: 16px; }
  .fx-ress-svg { max-height: 200px; width: auto; max-width: 100%; margin: 0 auto; }
  .fx-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fx-traj-svg { padding: 0 8px; min-width: 640px; }
  .fx-card-range { display: block; margin: 4px 0 0; }
  .fx-step-panel p { padding-left: 0; }
}

/* ─── B · Remote follow-up: weekly grid ─── */
.fx-remote {
  background: radial-gradient(900px 500px at 8% 0%, rgba(216, 167, 77, .10), transparent 60%), #F1EBDF;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(72px, 9vw, 112px) 0 clamp(64px, 8vw, 104px);
}
.fx-grid-wrap { max-width: 1170px; margin: 0 auto; transform-origin: 50% 0; }
.fx-card--grid { padding-bottom: 20px; box-shadow: 0 40px 90px -50px rgba(13, 26, 20, .35); }
.fx-g-scroll { position: relative; overflow-x: auto; padding: 18px 24px 0; scrollbar-width: thin; }
.fx-g-scroll:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; border-radius: 8px; }
.fx-g-table { border-collapse: collapse; width: 100%; min-width: 892px; table-layout: fixed; font-family: var(--font-body); }
.fx-g-table th, .fx-g-table td { padding: 0; }
.fx-g-stub, .fx-g-label { width: 190px; }
.fx-g-month { height: 20px; padding: 0 4px !important; text-align: left; vertical-align: middle; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--p-muted); border-left: 1px solid var(--p-grid); white-space: nowrap; overflow: hidden; }
.fx-g-week { height: 22px; text-align: center; font-size: 11px; font-weight: 400; color: #5D6F68; font-variant-numeric: tabular-nums; border-radius: 999px; transition: background .25s ease, color .25s ease; }
.fx-g-week.is-mstart { box-shadow: inset 1px 0 0 var(--p-grid); }
.fx-g-week.is-today { color: #FAF9F5; font-weight: 600; background: var(--p-ink); }
.fx-g-week.is-scan { position: relative; z-index: 2; color: #fff; font-weight: 600; background: var(--green); box-shadow: none; }
.fx-g-section th { padding: 16px 0 6px !important; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--p-muted); }
.fx-g-label { height: 26px; text-align: left; font-size: 12px; font-weight: 400; color: var(--p-ink); padding: 0 8px 0 12px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: #fff; z-index: 2; }
.fx-g-label span span { color: var(--p-muted); }
.fx-g-table tbody tr:not(.fx-g-section) { border-bottom: 1px solid var(--p-grid); }
.fx-g-cell { position: relative; height: 26px; text-align: center; vertical-align: middle; box-shadow: inset 1px 0 0 var(--p-grid); }
.fx-g-cell.is-step { box-shadow: inset 2px 0 0 var(--p-ink); }
.fx-g-cell.is-hatch { box-shadow: inset 0 0 0 1px #EEECE7; }
.fx-g-cell.is-hatch::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #DFDCD8 0 3px, #fff 3px 6px); }
.fx-g-cell > i { position: relative; }
.fx-g-dose { font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-g-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.fx-d0 { width: 8px; height: 8px; background: var(--p-d0); }
.fx-d1 { background: var(--p-d1); }
.fx-d2 { background: var(--p-d2); }
.fx-d3 { background: var(--p-d3); }
.fx-g-chk { background: var(--p-checked); }
.fx-g-inj { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.fx-g-inj--taken { background: var(--p-taken); }
.fx-g-inj--missed { background: var(--p-missed); }
.fx-g-inj--unknown { background: #5F7168; }
.fx-g-legend { margin: 14px 24px 0; padding: 14px 0 0; border-top: 1px solid var(--p-rule); }
.fx-g-legend .fx-g-dot { width: 10px; height: 10px; }
.fx-g-hatch-chip { width: 12px !important; height: 12px !important; border-radius: 2px !important; background: repeating-linear-gradient(135deg, #DFDCD8 0 3px, #fff 3px 6px) !important; box-shadow: inset 0 0 0 1px #EEECE7; }
/* scan line following the build front */
.fx-g-scan { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--green); opacity: 0; pointer-events: none; z-index: 1; box-shadow: 0 0 0 6px rgba(13, 91, 63, .07); }

/* grid scrub: labels cascade first, then the weeks fill one after the other */
.fx-scrub [data-fx-grid] .fx-g-fall,
.fx-scrub [data-fx-grid] .fx-g-cell > i,
.fx-scrub [data-fx-grid] .fx-g-dose > span,
.fx-scrub [data-fx-grid] .fx-g-cell.is-hatch::before {
  --u: clamp(0, (var(--p, 0) - var(--s)) / .05, 1);
  --e: calc(1 - (1 - var(--u)) * (1 - var(--u)));
  opacity: var(--u);
}
.fx-scrub [data-fx-grid] .fx-g-fall { --s: calc(var(--r) * .009); transform: translateX(calc((1 - var(--e)) * -18px)); }
.fx-scrub [data-fx-grid] .fx-g-cell > i,
.fx-scrub [data-fx-grid] .fx-g-dose > span { --s: calc(.16 + var(--c) * .027 + var(--r) * .0016); transform: translateY(calc((1 - var(--e)) * -22px)) scale(calc(.4 + var(--e) * .6)); }
.fx-scrub [data-fx-grid] .fx-g-cell.is-hatch::before { --s: calc(.16 + var(--c) * .027); }
.fx-scrub [data-fx-grid] .fx-g-fall { display: inline-block; }

@media (min-width: 900px) and (min-height: 600px) {
  .fx-scrub .fx-grid-scrolly { height: 230vh; }
  .fx-scrub .fx-grid-sticky { position: sticky; top: calc(var(--fx-top, 80px) + 12px); }
}

.fx-grid-demo { max-width: 1170px; margin: 14px auto 0; font-size: 11.5px; color: var(--ink-muted); }
.fx-note {
  max-width: 1170px;
  margin: clamp(24px, 3vw, 36px) auto 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  border: 1px solid rgba(13, 91, 63, .18);
  border-left: 3px solid var(--green);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}
.fx-note svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--green); stroke-width: 1.6; stroke-linecap: round; }
.fx-note p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
@media (max-width: 680px) {
  .fx-g-stub, .fx-g-label { width: 150px; }
  .fx-g-scroll { padding: 14px 12px 0; }
}


/* ─── v2.3.6 · modules rebuilt from the 2026-10-07 prototypes (Camille Claudel) ─── */
.fx-metrics--5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fx-metrics--5 .fx-metric { grid-column: span 2; min-height: 150px; }
.fx-metrics--5 .fx-metric:nth-child(n+4) { grid-column: span 3; }
.fx-metrics--5 .fx-metric:nth-child(-n+3) { box-shadow: -1px 0 0 0 var(--p-rule); }
.fx-metrics--5 .fx-metric:nth-child(n+4) { box-shadow: -1px 0 0 0 var(--p-rule), 0 -1px 0 0 var(--p-rule); }
.fx-metrics--5 .fx-metric:first-child, .fx-metrics--5 .fx-metric:nth-child(4) { box-shadow: 0 -1px 0 0 transparent; }
.fx-metrics--5 .fx-metric:nth-child(4) { box-shadow: 0 -1px 0 0 var(--p-rule); }
.fx-m-chips .fx-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.fx-releve { display: flex; align-items: flex-end; gap: 3px; height: 20px; margin-top: 14px; }
.fx-releve i { display: block; width: 8px; height: var(--h); border-radius: 4px; background: var(--c); }
.fx-releve-txt { margin: 8px 0 0; font-size: 11px; line-height: 1.35; color: var(--p-muted); }
.fx-goal { margin-top: 16px; }
.fx-goal-bar { position: relative; display: block; height: 8px; border-radius: 999px; background: var(--p-chip); }
.fx-goal-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--part) * var(--e, 1)); border-radius: 999px; background: var(--p-line); }
.fx-goal-dot { position: absolute; top: 50%; left: calc(var(--part) * var(--e, 1)); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--p-line); box-shadow: 0 0 0 2px #fff; }
.fx-goal-arr { position: absolute; top: -4px; bottom: -4px; left: var(--arr); width: 2px; border-radius: 2px; background: var(--p-ink); }
.fx-goal-lab { display: block; margin-top: 10px; padding-left: calc(var(--arr) - 3.5em); font-size: 11.5px; font-weight: 600; color: var(--green, #0d5b3f); }
.fx-crans { display: flex; gap: 4px; margin-top: 18px; }
.fx-crans i { flex: 1; height: 8px; border-radius: 999px; background: var(--p-chip); }
.fx-crans i.is-on { background: var(--p-d1); }
.fx-axis--b { font-weight: 600; }
.fx-band-doses { font-weight: 400; fill: var(--p-muted); }
.fx-band-per { fill: var(--p-muted); }
.fx-lg-sq--unknown { background: #fff; box-shadow: inset 0 0 0 1.25px #D1CEC7; }
@media (max-width: 899px) {
  .fx-metrics--5 { grid-template-columns: 1fr; }
  .fx-metrics--5 .fx-metric, .fx-metrics--5 .fx-metric:nth-child(n+4) { grid-column: auto; box-shadow: 0 -1px 0 0 var(--p-rule); min-height: 0; }
  .fx-metrics--5 .fx-metric:first-child { box-shadow: none; }
}
/* the full trajectory (two treatments, ~2 years) is wider than the 2026-10-05 one: bigger type so it stays readable once scaled */
.fx-card--traj .fx-axis { font-size: 21px; }
.fx-card--traj .fx-today text { font-size: 19px; }
.fx-g-label .fx-g-fall { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-metrics--5 .fx-m-value { display: block; }
.fx-metrics--5 .fx-m-value .fx-m-unit { margin-left: 6px; }
