/* cost.css (2026-10-30): the business case page (business_case/index.html), a fullPage sequence.
   The intro (the question, three numbers, the case in four numbers), five waterfall pages
   (a chart on the left, a note per bar on the right) and the sources. The drawer with every
   input slides in from the right. The rest is home.css. The slide on screen is on BODY as
   page_bg_case, page_bg_case_h … (home.js), for the header and the nav dots. */

.page_case {
    --cs_base: rgb(160 220 255);       /* a starting or finishing bar */
    --cs_up: #ff8a6b;                  /* a cost that adds up */
    --cs_down: #6ee7a8;                /* a saving */
    --cs_panel: rgba(4, 12, 48, 0.72);
}

.
    min-height: calc(100vh - 33rem);

.cs_intro {
    /*! background-image: radial-gradient(80rem 50rem at 80% 15%, rgba(125, 211, 252, 0.18), transparent 70%), var(--grid); */
  /*! background-color: #07103a; */
}

.section {
    background-image: radial-gradient(70rem 50rem at 15% 10%, rgba(255, 138, 107, 0.10), transparent 70%), var(--grid);
  /*! background-color: #070f35; */
}

.value_in_steps .wrap {
    position: relative;
    top: 2.5rem;
}


/* backgrounds: the site's grid, a little light in a different corner on each page */
.bg_case { /*! background-image: radial-gradient(80rem 50rem at 80% 15%, rgba(125, 211, 252, 0.18), transparent 70%), var(--grid); */ /*! background-color: #07103a; */ background-image: url(../assets/knee_tka.jpg);background-size: cover;/*! background-image: url(../assets/how_spd_blur.jpg); */opacity: 0.15;}
.bg_case_h, .bg_case_m { background-image: radial-gradient(70rem 50rem at 15% 10%, rgba(255, 138, 107, 0.10), transparent 70%), var(--grid); background-color: #070f35; }
.bg_case_h2, .bg_case_m2, .bg_case_g, .bg_case_mg { background-image: radial-gradient(70rem 50rem at 85% 90%, rgba(110, 231, 168, 0.10), transparent 70%), var(--grid); background-color: #061235; }
.bg_case_end { background-image: radial-gradient(70rem 50rem at 50% 0%, rgba(125, 211, 252, 0.18), transparent 70%), var(--grid); background-color: #0a1230; }

/* ── the intro ───────────────────────────────────────────────────────────── */
.cs_intro_grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4.8rem; align-items: center; }
.cs_intro h1 { font-size: clamp(3.4rem, 4.6vw, 5.6rem); }
.cs_intro .sub { line-height: 1.5; margin-bottom: 2.4rem; }
.cs_quick { display: flex; flex-wrap: wrap; gap: 1.2rem 1.6rem; }
.cs_quick label { display: grid; gap: 0.4rem; font-size: 1.3rem; color: var(--muted); }
.cs_quick input {
    width: 16rem; height: 4.4rem; padding: 0 1.2rem; border-radius: 0.8rem;
    border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35); color: var(--amber);
    font: 600 1.9rem/1 "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums;
}
.cs_quick input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.cs_hint { color: var(--muted); font-size: 1.4rem; margin: 1.4rem 0 0; }

.cs_keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; }
.cs_keys li {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1.6rem;
    padding: 2.2rem 2.6rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: #00000054; backdrop-filter: blur(0.4rem);
}
.cs_keys li span { color: var(--muted); font-size: 1.5rem; }
.cs_keys li b { font-size: 2.4rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.cs_keys li s { color: var(--cs_up); text-decoration-thickness: 1px; }
.cs_keys li em { font-style: normal; color: var(--cs_down); }
.cs_keys li.now { border: 2px solid var(--accent); background: #000000a3; }
.cs_keys li.now b { color: var(--cs_down); }

/* ── a waterfall page ────────────────────────────────────────────────────── */
.cs_wf .wrap { max-width: 140rem; padding-top: 7.2rem; padding-right: 6rem;

    padding: 2.2rem clamp(3rem, calc(-35rem + 0.35*100vw), 40rem) 0 clamp(3rem, calc(-35rem + 0.35*100vw), 40rem);
}
.cs_head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.cs_head .kicker { margin-bottom: 0.6rem; }
.cs_head h2 { margin: 0; }
.cs_change { background: transparent; cursor: pointer; font: inherit; font-weight: 600; font-size: 1.4rem; }

.cs_body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 3.2rem; align-items: stretch; }

.cs_chart { 
    
    min-height: calc(100vh - 27rem);
    max-height: calc(100vh - 27rem);
}

.whole_solution .cs_chart {
    min-height: calc(100vh - 32rem);
    max-height: calc(100vh - 32rem);
}

.OR_prod .cs_chart {
      min-height: calc(100vh - 28rem);
    max-height: calc(100vh - 28rem);
}


.hospital_after .cs_chart {
     min-height: calc(100vh - 30rem);
    max-height: calc(100vh - 30rem);
}


.whole_solution .cs_notes {
     min-height: calc(100vh - 32rem);
    max-height: calc(100vh - 32rem);
}

.whole_solution .wrap {
    position: relative;
    top: 2rem;
}

.OR_prod .wrap {
    position: relative;
    top: 1rem;
}


.cs_chart svg { display: block; overflow: visible; }

.wf_grid { stroke: rgba(255, 255, 255, 0.10); stroke-width: 1; }
.wf_axis { fill: var(--muted); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.wf_link { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; stroke-dasharray: 3 3; }
.wf_bar { cursor: default; outline: none; }
.wf_bar rect { transition: opacity 0.15s, filter 0.15s; }
.wf_base rect, .wf_total rect { fill: var(--cs_base); }
.wf_up rect { fill: var(--cs_up); }
.wf_down rect, .wf_gain rect { fill: var(--cs_down); }
.wf_loss rect { fill: var(--cs_up); }
.wf_val { fill: var(--ink); font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wf_lab { fill: var(--muted); font-size: 1.2rem; }
.wf_bar.wf_hot rect, .wf_bar:focus rect { filter: drop-shadow(0 0 0.8rem rgba(255, 255, 255, 0.55)); }
.wf_bar.wf_hot .wf_lab { fill: var(--ink); }

.cs_notes {
    list-style: none; margin: 0; padding: 0 0.6rem 0 0; display: grid; gap: 0.6rem; align-content: start;
    max-height: calc(100vh - 29rem); overflow-y: auto; counter-reset: none;
    scrollbar-color: var(--scrollbar_bg_color) var(--scrollbar_back_var_bg_color);
}

.wf_note { padding: 1.1rem 1.4rem; border-radius: 0.8rem; border: 1px solid transparent; border-left: 3px solid var(--line); background: var(--cs_panel); transition: border-color 0.15s, background 0.15s; }
.wf_note b { display: flex; justify-content: space-between; gap: 1rem; font-size: 1.5rem; }
.wf_note b span { font-variant-numeric: tabular-nums; }
.wf_note p { margin: 0.3rem 0 0; color: var(--muted); font-size: 1.35rem; line-height: 1.45; }
.wf_note.wf_up { border-left-color: var(--cs_up); }
.wf_note.wf_up b span { color: var(--cs_up); }
.wf_note.wf_down { border-left-color: var(--cs_down); }
.wf_note.wf_down b span { color: var(--cs_down); }
.wf_note.wf_gain { border-left-color: var(--cs_down); }
.wf_note.wf_gain b span { color: var(--cs_down); }
.wf_note.wf_loss { border-left-color: var(--cs_up); }
.wf_note.wf_loss b span { color: var(--cs_up); }
.wf_note.wf_base, .wf_note.wf_total { border-left-color: var(--cs_base); }
.wf_note.wf_total b span { color: var(--cs_base); }
.wf_note.wf_hot { border-color: rgba(255, 255, 255, 0.35); background: rgba(10, 25, 85, 0.9); }

/* ── the end: talk to us, the sources ────────────────────────────────────── */
.cs_end .wrap { max-width: 140rem; padding-top: 7.2rem; padding-bottom: 8rem; padding: 7.2rem clamp(3rem, calc(-35rem + 0.35*100vw), 40rem);}
.cs_end_grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 4.8rem; align-items: start; }
.cs_copied { color: var(--muted); font-size: 1.3rem; min-height: 1.6rem; }
.cs_end button.btn { cursor: pointer; font: inherit; font-weight: 600; background: transparent; }
.cs_sources h3 { margin: 0 0 1rem; font-size: 1.8rem; }
.cs_sources ol { margin: 0; padding-left: 2.2rem; display: grid; gap: 0.8rem; color: var(--muted); font-size: 1.3rem; line-height: 1.45; max-height: 62vh; overflow-y: auto; }
.cs_sources a { color: var(--ink); text-underline-offset: 2px; }

/* ── the drawer ──────────────────────────────────────────────────────────── */
.cs_drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 200; width: min(46rem, 100vw);
    display: flex; flex-direction: column; background: #050b2c; border-left: 1px solid var(--line);
    box-shadow: -2rem 0 4rem rgba(0, 0, 0, 0.5);
    padding-right: env(safe-area-inset-right, 0px);
}
.cs_drawer[hidden] { display: none; }
.cs_drawer_head, .cs_drawer_foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.6rem 2rem; border-bottom: 1px solid var(--line); }
.cs_drawer_foot { border-bottom: 0; border-top: 1px solid var(--line); padding-bottom: calc(1.6rem + env(safe-area-inset-bottom, 0px)); }
.cs_drawer_foot .btn { cursor: pointer; font: inherit; font-weight: 600; }
.cs_drawer_foot .btn_ghost { background: transparent; }
.cs_drawer_head h3 { margin: 0; font-size: 1.8rem; }
.cs_x { background: none; border: 0; color: var(--ink); font-size: 2.8rem; line-height: 1; cursor: pointer; padding: 0 0.4rem; }
.cs_drawer_body { flex: 1; overflow-y: auto; padding: 0.4rem 2rem 2rem; overscroll-behavior: contain; }
.cs_drawer fieldset { border: 0; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1.2rem; }
.cs_drawer legend { font-size: 1.2rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); font-weight: 600; margin-bottom: 0.4rem; }
.cs_field { display: grid; gap: 0.4rem; font-size: 1.35rem; color: var(--muted); }
.cs_l { display: flex; gap: 0.8rem; align-items: baseline; justify-content: space-between; }
.cs_inp { display: flex; align-items: center; gap: 0.4rem; height: 3.8rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 0.6rem; background: rgba(0, 0, 0, 0.35); width: 18rem; }
.cs_inp:focus-within { border-color: var(--amber); }
.cs_inp i { font-style: normal; color: var(--muted); font-size: 1.3rem; }
.cs_inp input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--amber); font: 600 1.6rem "Inter", system-ui, sans-serif; outline: none; font-variant-numeric: tabular-nums; }
.cs_tag { flex: none; font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1rem 0.6rem; border-radius: 0.4rem; border: 1px dashed var(--line); color: var(--muted); }
a.cs_src { border-style: solid; border-color: var(--amber); color: var(--amber); text-decoration: none; }

@media (max-width: 800px) {
    .cs_intro_grid, .cs_body, .cs_end_grid { grid-template-columns: minmax(0, 1fr); }
    .cs_wf .wrap, .cs_end .wrap { padding-top: 0; }
    .cs_chart { height: 34rem; }
    .cs_notes, .cs_sources ol { max-height: none; overflow: visible; }
    .cs_quick input { width: 13rem; }
    .cs_keys li { flex-direction: column; gap: 0.4rem; }
}

/* the summary: the value of a case, to each (2026-10-31) */
.bg_case_sum { background-image: radial-gradient(80rem 50rem at 50% 100%, rgba(110, 231, 168, 0.14), transparent 70%), var(--grid); background-color: #06143a; }
.cs_lede { margin: 0.8rem 0 0; max-width: 72ch; color: var(--muted); font-size: 1.5rem; line-height: 1.45; }
.cs_keys li.now b { color: var(--cs_down); }

.not_counted .cs_lede {
    max-width: 89ch;
}


@media (max-height: 700px) {
    
        
    .cs_mo_txt p {
        background:red;
        display: none;
    }
    
    
}




/* the moments no budget counts (2026-10-31): counted, never priced */
.bg_case_mo { background-image: radial-gradient(70rem 50rem at 20% 85%, rgba(255, 138, 107, 0.10), transparent 70%), var(--grid); background-color: #080d30; }
.cs_mo .cs_head h2 { max-width: 24ch; }
.cs_moments { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
.cs_moment { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; align-items: start; padding: 2.2rem 2.4rem; border: 1px solid var(--line); border-left: 3px solid var(--cs_down); border-radius: var(--radius); background: var(--cs_panel); }
.cs_mo_num b { display: block; font-size: 4.2rem; line-height: 1; font-weight: 800; color: var(--cs_down); font-variant-numeric: tabular-nums; }
.cs_mo_num span { display: block; margin-top: 0.6rem; color: var(--muted); font-size: 1.3rem; line-height: 1.35; }
.cs_mo_txt h3 { margin: 0 0 0.8rem; font-size: 1.8rem; line-height: 2.0rem;}
.cs_mo_txt q { display: block; font-size: 1.5rem; font-style: italic; line-height: 1.2; color: var(--ink); quotes: '\201C' '\201D'; }
.cs_mo_txt p { margin: 0.8rem 0 0; color: var(--muted); font-size: 1.3rem; line-height: 1.45; }
@media (max-width: 1100px) { .cs_moments { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) { .cs_moment { grid-template-columns: minmax(0, 1fr); gap: 1rem; } .cs_mo_num b { font-size: 3.6rem; } }

/* the implant OEM's value as a share of the sale, brought forward (2026-10-31) */
.cs_keys li span small { display: block; margin-top: 0.3rem; font-size: 1.3rem; color: var(--cs_down); font-weight: 600; }
.cs_lede .cs_big { color: var(--cs_down); font-size: 1.15em; }

/* the estimates switch, year by year (2026-10-31) */
.cs_scen { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1.4rem; font-size: 1.4rem; color: var(--muted); }
.cs_scen button { cursor: pointer; font: inherit; font-weight: 600; font-size: 1.35rem; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 99rem; padding: 0.5rem 1.4rem; }
.cs_scen button.on { background: var(--accent); border-color: var(--accent); color: #04102e; }
.cs_scen button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.yr_h .yr_p0, .yr_sw.yr_h { fill: var(--cs_down); background: var(--cs_down); }
.yr_h .yr_p1 { fill: #3fbf86; }
.yr_h .yr_p2 { fill: #b9f5d6; }
.yr_m .yr_p0, .yr_sw.yr_m { fill: var(--cs_base); background: var(--cs_base); }
.yr_m .yr_p1 { fill: #6fb4e6; }
.yr_sw { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 0.2rem; vertical-align: -0.1rem; margin-left: 0.4rem; }
.yr_key p { color: var(--muted); }
.yr_val { font-size: 1.15rem; }
