/* AminoStudy calculator module. Everything is scoped under .acalc; relies on tokens.css (variables + .glass). */

.acalc {
  --a-well: rgb(10 22 48 / .05);
  --a-well-shadow: inset 0 1px 2px rgb(10 22 48 / .07), inset 0 0 0 1px rgb(10 22 48 / .035);
  --a-raised: 0 1px 0 rgb(255 255 255 / .9) inset, 0 0 0 1px rgb(10 22 48 / .06), 0 1px 2px rgb(10 22 48 / .08), 0 6px 14px -8px rgb(10 22 48 / .22);
  --a-focus: 0 0 0 2px var(--paper-hi, #fff), 0 0 0 4px var(--brand, #2447D8);
  --k-vial: var(--brand); --k-nasal: var(--aqua-ink); --k-solution: var(--violet); --k-oral: oklch(0.62 0.15 55);
  font-family: var(--font); color: var(--ink); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
:where(.acalc) *, :where(.acalc) *::before, :where(.acalc) *::after { box-sizing: border-box; }
.acalc [hidden] { display: none !important; }
:where(.acalc) :where(button, input, select) { font: inherit; color: inherit; }
:where(.acalc) :where(h3, p, ol, ul) { margin: 0; }
:where(.acalc) :where(ol, ul) { padding: 0; list-style: none; }
.acalc :focus-visible { outline: none; box-shadow: var(--a-focus); }
.acalc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acalc.is-loading { min-height: 220px; border-radius: var(--r-lg); background: linear-gradient(100deg, rgb(255 255 255 / .35) 30%, rgb(255 255 255 / .7) 50%, rgb(255 255 255 / .35) 70%) 0 0 / 300% 100%; animation: acalc-shimmer 1.4s linear infinite; }
.acalc-fail { padding: 18px 20px; border-radius: var(--r-card); background: var(--bad-bg); color: var(--bad); font-size: 14px; }
@keyframes acalc-shimmer { to { background-position: -150% 0; } }

/* ---------- surfaces ---------- */
.acalc-panel { border-radius: var(--r-lg); padding: clamp(16px, 2.2vw, 26px); min-width: 0; }
.acalc-panel.glass:hover { translate: 0 0; }
.acalc-well { background: var(--a-well); box-shadow: var(--a-well-shadow); border-radius: 16px; }
.acalc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 26px; }
.acalc-label, .acalc-eyebrow, .acalc-count, .acalc-pill, .acalc-tag, .acalc-idx {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; font-weight: 500;
}
.acalc-label { color: var(--ink-3); display: block; }
.acalc-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); margin: 0; font-size: 11px; }
.acalc-eyebrow--h { font-size: 11px; }
.acalc-idx { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 7px; background: #fff; box-shadow: var(--a-raised); color: var(--brand-ink); letter-spacing: .02em; }
.acalc-count { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.acalc-eyebrow .acalc-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--pill); background: var(--ink); color: #fff; letter-spacing: 0; }
.acalc-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--pill); background: rgb(255 255 255 / .7); box-shadow: var(--a-raised); color: var(--ink-2); white-space: nowrap; }
.acalc-muted { color: var(--ink-3); }

/* ---------- buttons ---------- */
.acalc-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 0; border-radius: var(--pill); cursor: pointer; font-size: 14px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  text-decoration: none; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), color .2s var(--ease), opacity .2s;
}
.acalc-btn:active { transform: scale(.97); }
.acalc-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.acalc-btn--primary { background: var(--ink); color: #fff; box-shadow: 0 1px 0 rgb(255 255 255 / .18) inset, 0 8px 18px -10px rgb(10 22 48 / .7); }
.acalc-btn--primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .28) 50%, transparent 65%); transform: translateX(-110%); }
.acalc-btn--primary:hover:not(:disabled)::after { transform: translateX(110%); transition: transform .9s var(--ease); }
.acalc-btn--primary:hover:not(:disabled) { background: var(--brand-2); }
.acalc-btn--primary.is-done { background: var(--ok); }
.acalc-btn--ghost { background: rgb(255 255 255 / .82); color: var(--ink); box-shadow: var(--a-raised); }
.acalc-btn--ghost:hover:not(:disabled) { background: #fff; color: var(--brand-ink); }
.acalc-btn--ghost.is-done { color: var(--ok); }
.acalc-btn--quiet { background: transparent; color: var(--ink-3); padding: 0 12px; }
.acalc-btn--quiet:hover { color: var(--ink); background: var(--a-well); }
.acalc-btn--link .acalc-ico { transition: transform .3s var(--spring); }
.acalc-btn--link:hover .acalc-ico { transform: translateX(3px); }
.acalc-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.acalc-ibtn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; cursor: pointer; color: var(--ink-3);
  background: transparent; transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.acalc-ibtn:hover:not(:disabled) { background: #fff; color: var(--ink); box-shadow: var(--a-raised); }
.acalc-ibtn:active:not(:disabled) { transform: scale(.92); }
.acalc-ibtn:disabled { opacity: .3; cursor: default; }
.acalc-ibtn[aria-expanded="true"], .acalc-ibtn[aria-expanded="true"]:hover:not(:disabled) { background: var(--ink); color: #fff; }
.acalc-ibtn[data-act="x"]:hover { color: var(--bad); }
.acalc-textbtn { border: 0; background: none; padding: 2px 4px; cursor: pointer; color: var(--brand); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; border-radius: 6px; }
.acalc-textbtn:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.acalc-link { display: inline-flex; align-items: center; color: var(--brand); font-weight: 500; font-size: 14px; text-decoration: none; border-radius: 6px; padding: 2px 2px; }
.acalc-link span { transition: transform .3s var(--spring); display: inline-block; margin-left: 4px; }
.acalc-link:hover { color: var(--brand-ink); }
.acalc-link:hover span { transform: translateX(3px); }

/* ---------- chips + segmented ---------- */
.acalc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acalc-chip {
  height: 30px; padding: 0 12px; border: 0; border-radius: var(--pill); cursor: pointer; font-size: 13px; color: var(--ink-2);
  background: rgb(255 255 255 / .66); box-shadow: 0 0 0 1px rgb(10 22 48 / .07); white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.acalc-chip:hover { background: #fff; color: var(--ink); box-shadow: var(--a-raised); }
.acalc-chip:active { transform: scale(.96); }
.acalc-chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 6px 14px -8px rgb(10 22 48 / .6); }
.acalc-chips--quick .acalc-chip { font-family: var(--mono); font-size: 11.5px; letter-spacing: -.01em; height: 28px; }

.acalc-seg { position: relative; display: inline-flex; padding: 3px; border-radius: 12px; background: var(--a-well); box-shadow: var(--a-well-shadow); max-width: 100%; }
.acalc-seg-thumb { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 9px; background: #fff; box-shadow: var(--a-raised); transition: transform .45s var(--spring), width .45s var(--spring); pointer-events: none; }
.acalc-seg.is-instant .acalc-seg-thumb { transition: none; }
.acalc-seg-btn { position: relative; z-index: 1; flex: 1 1 auto; height: 34px; padding: 0 14px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; transition: color .2s var(--ease); }
.acalc-seg-btn:hover { color: var(--ink); }
.acalc-seg-btn[aria-checked="true"] { color: var(--ink); font-weight: 500; }
.acalc-seg--sm .acalc-seg-btn { height: 30px; padding: 0 10px; font-size: 12px; }
.acalc-seg--wrap { display: flex; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.acalc-seg--wrap::-webkit-scrollbar { display: none; }

/* ---------- fields ---------- */
.acalc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.acalc-input-row {
  display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 12px; background: rgb(255 255 255 / .9);
  box-shadow: 0 0 0 1px rgb(10 22 48 / .09), 0 1px 2px rgb(10 22 48 / .05); transition: box-shadow .2s var(--ease);
}
.acalc-input-row:focus-within { box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px rgb(36 71 216 / .14); }
.acalc-input, .acalc-select { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; background: transparent; outline: none; font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.acalc-input:focus-visible, .acalc-select:focus-visible { box-shadow: none; }
.acalc-input::placeholder { color: var(--ink-4); }
.acalc-input[aria-invalid="true"] { color: var(--bad); }
.acalc-input-row:has(.acalc-input[aria-invalid="true"]) { box-shadow: 0 0 0 1px var(--bad), 0 0 0 4px rgb(179 38 30 / .1); }
.acalc-select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 22px; letter-spacing: -.01em; font-size: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2357647E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") right 0 center no-repeat; }
.acalc-suffix { flex: none; padding-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.acalc-suffix:empty { display: none; }
.acalc-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.acalc-fields:has(> .acalc-field[hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acalc-field--sm .acalc-input-row { height: 38px; padding: 0 10px; border-radius: 10px; }
.acalc-field--sm .acalc-input, .acalc-field--sm .acalc-select { font-size: 13.5px; }

/* search */
.acalc-search { position: relative; display: flex; align-items: center; margin-bottom: 12px; }
.acalc-search .acalc-ico { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.acalc-search-input {
  width: 100%; height: 44px; padding: 0 14px 0 40px; border: 0; border-radius: var(--pill); background: rgb(255 255 255 / .9); outline: none;
  box-shadow: 0 0 0 1px rgb(10 22 48 / .09), 0 1px 2px rgb(10 22 48 / .05); font-size: 14.5px; transition: box-shadow .2s var(--ease);
}
.acalc-search-input:focus, .acalc-search-input:focus-visible { box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px rgb(36 71 216 / .14); }
.acalc-search-input::placeholder { color: var(--ink-4); }
.acalc-search-input::-webkit-search-cancel-button { cursor: pointer; }

/* ---------- planner ---------- */
.acalc-planner { display: grid; gap: clamp(14px, 2vw, 22px); }
.acalc-planner-grid { display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .acalc-planner-grid { grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr); } }
.acalc-lib { display: flex; flex-direction: column; }
@media (min-width: 900px) { .acalc-lib { position: sticky; top: calc(var(--nav-h, 64px) + 24px); } }
.acalc-lib .acalc-chips { margin-bottom: 12px; }
@media (max-width: 599px) {
  .acalc-lib .acalc-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * clamp(16px, 2.2vw, 26px)) 12px; padding: 2px clamp(16px, 2.2vw, 26px) 4px; }
  .acalc-lib .acalc-chips::-webkit-scrollbar { display: none; }
}
.acalc-list-wrap { height: clamp(280px, 52vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; scrollbar-width: thin; scrollbar-color: rgb(10 22 48 / .18) transparent; }
.acalc-list:focus-visible { box-shadow: none; }
.acalc-list-wrap:has(.acalc-list:focus-visible) { box-shadow: var(--a-well-shadow), 0 0 0 2px var(--brand); }
.acalc-list-group { position: sticky; top: -6px; z-index: 2; padding: 10px 10px 6px; margin: 0 -6px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  background: linear-gradient(rgb(234 239 248 / .97) 70%, rgb(234 239 248 / 0)); }
.acalc-list-group:first-child { padding-top: 6px; }
.acalc-opt {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px 9px 14px; border-radius: 11px; cursor: pointer;
  transition: background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.acalc-opt + .acalc-opt { margin-top: 1px; }
.acalc-opt:hover { background: rgb(255 255 255 / .55); }
.acalc-opt[aria-selected="true"] { background: #fff; box-shadow: var(--a-raised); }
.acalc-opt[aria-selected="true"]::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(var(--brand), var(--aqua)); }
.acalc-list:focus-visible .acalc-opt[aria-selected="true"] { box-shadow: var(--a-raised), 0 0 0 2px var(--brand); }
.acalc-opt-name { font-size: 14px; font-weight: 500; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acalc-opt-tags { display: flex; gap: 4px; flex: none; }
.acalc-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--info-bg); color: var(--brand-ink); letter-spacing: .02em; text-transform: none; font-size: 11px; }
.acalc-tag--soft { background: rgb(10 22 48 / .05); color: var(--ink-3); }
.acalc-empty { padding: 24px 12px; text-align: center; color: var(--ink-3); font-size: 14px; }

.acalc-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; }
.acalc-title--sm { font-size: 20px; letter-spacing: -.03em; margin-bottom: 12px; }
.acalc-mix { margin-top: 6px; font-family: var(--mono); font-size: 13px; color: var(--ink-3); letter-spacing: -.01em; }

.acalc-hero-well { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); align-items: center; gap: 12px 24px; margin-top: 16px; padding: 18px 20px; border-radius: 20px; }
.acalc-hero { min-width: 0; }
.acalc-hero-line { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; white-space: nowrap; }
.acalc-hero-num { font-family: var(--mono); font-size: clamp(46px, 6vw, 72px); font-weight: 500; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
/* rolling digits: each cell is 1em tall and clipped; the column of 0–9 slides. The gradient repeats every 1em. */
.acalc-roll { display: inline-flex; }
.acalc-roll-c { display: inline-block; height: 1em; line-height: 1; clip-path: inset(-.05em -.08em); vertical-align: baseline; }
.acalc-roll-c > .acalc-roll-col, .acalc-roll-s {
  background: linear-gradient(180deg, var(--ink) 30%, var(--brand-2)) 0 0 / 100% 1em repeat-y; -webkit-background-clip: text; background-clip: text; color: transparent; }
.acalc-roll-col { display: flex; flex-direction: column; transition: transform .75s cubic-bezier(.34, 1.36, .5, 1); will-change: transform; }
.acalc-roll-col > span { display: block; height: 1em; }
.acalc-hero-unit { font-family: var(--mono); font-size: 15px; color: var(--ink-2); letter-spacing: -.01em; }
.acalc-hero-sub { margin-top: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.acalc-hero.is-over .acalc-roll-col, .acalc-hero.is-over .acalc-roll-s { background-image: linear-gradient(180deg, var(--warn), oklch(0.5 0.14 40)); }
@media (max-width: 599px) { .acalc-hero-well { grid-template-columns: 1fr; padding: 16px; } }

/* glyphs */
.acalc-glyph { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px; transition: opacity .3s var(--ease); }
.acalc-glyph.is-dim { opacity: .35; }
.acalc-glyph-cap { text-align: right; font-size: 9.5px; color: var(--ink-4); }
.acalc-syr { display: block; width: 100%; height: auto; max-height: 92px; overflow: visible; }
.acalc-syr-needle { stroke: var(--ink-4); stroke-width: 1.6; stroke-linecap: round; }
.acalc-syr-hub { fill: rgb(10 22 48 / .16); }
.acalc-syr-barrel-bg { fill: rgb(255 255 255 / .9); }
.acalc-syr-barrel { fill: none; stroke: rgb(10 22 48 / .32); stroke-width: 1.3; }
.acalc-syr-flange { fill: rgb(10 22 48 / .28); }
.acalc-syr-rod, .acalc-syr-pad { fill: rgb(10 22 48 / .2); }
/* plunger: eases in with a slight overshoot */
.acalc-syr-fill, .acalc-syr-stopper, .acalc-syr-rod { transform-box: fill-box; transform-origin: left center; transition: transform .9s cubic-bezier(.3, 1.28, .5, 1); }
.acalc-syr-rod { transform-box: view-box; transform-origin: 352px 35px; }
.acalc-syr-fill { opacity: .9; }
.acalc-syr-stopper rect { fill: var(--ink-2); }
.acalc-syr-mark { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 2 2; }
.acalc-syr-ticks line { stroke: rgb(10 22 48 / .38); stroke-width: .8; }
.acalc-syr-ticks line.is-major { stroke: rgb(10 22 48 / .6); stroke-width: 1; }
.acalc-syr-ticks text { font-family: var(--mono); font-size: 9px; fill: var(--ink-3); }
.acalc-syr.is-over .acalc-syr-fill { fill: var(--warn); }
.acalc-syr.is-over .acalc-syr-mark { stroke: var(--warn); }
.acalc-syr.is-empty .acalc-syr-stopper { opacity: .5; }

.acalc-dots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; min-height: 64px; padding: 6px 0; }
.acalc-dot { position: relative; display: block; overflow: hidden; background: rgb(255 255 255 / .9); box-shadow: inset 0 0 0 1.3px rgb(10 22 48 / .22);
  transform: scale(.6); opacity: 0; transition: transform .5s var(--spring), opacity .3s var(--ease); }
.acalc-glyph.is-ready .acalc-dot { transform: scale(1); opacity: 1; }
.acalc-dot i { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(var(--f, 0)); transition: transform .6s var(--expo); }
.acalc-dots--spray .acalc-dot { width: 30px; height: 30px; border-radius: 50%; }
.acalc-dots--spray .acalc-dot i { background: radial-gradient(circle at 35% 30%, #fff 0 8%, transparent 9%), radial-gradient(circle at 50% 50%, var(--aqua), var(--aqua-ink)); }
.acalc-dots--pill .acalc-dot { width: 46px; height: 22px; border-radius: 11px; }
.acalc-dots--pill .acalc-dot i { background: linear-gradient(90deg, var(--k-oral) 0 50%, oklch(0.8 0.1 60) 50%); }
.acalc-dots.is-more::after { content: "+"; font-family: var(--mono); color: var(--ink-3); }

/* specs */
.acalc-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; border-top: 1px solid var(--line); }
.acalc-specs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acalc-specs--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acalc-spec { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.acalc-spec-v { display: block; margin-top: 5px; font-family: var(--mono); font-size: 14px; letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (max-width: 599px) { .acalc-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acalc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acalc-fields:has(> .acalc-field[hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.acalc-notes { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.acalc-notes::before { content: "Notes"; display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.acalc-corr { margin-top: 14px; display: grid; gap: 4px; padding: 10px 14px; border-radius: 12px; background: rgb(223 231 251 / .6); box-shadow: inset 3px 0 0 var(--brand-3); font-size: 13.5px; color: var(--ink-2); }
.acalc-corr .acalc-label { color: var(--brand-ink); }
.acalc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.acalc-spacer { flex: 1; }

.acalc-warns { display: grid; gap: 6px; margin-top: 12px; }
.acalc-warn { display: flex; gap: 9px; align-items: baseline; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.4; }
.acalc-warn-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; translate: 0 -1px; }
.acalc-warn--warn { background: var(--warn-bg); color: oklch(0.42 0.1 55); }
.acalc-warn--warn .acalc-warn-dot { background: var(--warn); }
.acalc-warn--bad { background: var(--bad-bg); color: var(--bad); }
.acalc-warn--bad .acalc-warn-dot { background: var(--bad); }
.acalc-warn--info { background: var(--info-bg); color: var(--brand-ink); }
.acalc-warn--info .acalc-warn-dot { background: var(--brand-3); }

/* ---------- common dosage protocol ---------- */
.acalc-proto { margin-top: 16px; }
.acalc-proto-head .acalc-label { white-space: nowrap; flex: none; }
.acalc-proto-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 24px; }
.acalc-proto-status {
  display: inline-block; max-width: 62%; height: 24px; line-height: 24px; padding: 0 10px; border-radius: var(--pill); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--mono); font-size: 11px; letter-spacing: -.01em; background: var(--info-bg); color: var(--brand-ink); box-shadow: 0 0 0 1px rgb(36 71 216 / .12);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.acalc-proto-status.is-default { background: rgb(10 22 48 / .05); color: var(--ink-3); box-shadow: none; }
.acalc-proto-status.is-custom { background: var(--warn-bg); color: oklch(0.42 0.1 55); box-shadow: 0 0 0 1px oklch(0.7 0.12 70 / .3); }
.acalc-proto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 8px; }
.acalc-proto.is-single .acalc-proto-grid { grid-template-columns: minmax(0, 260px); }
.acalc-pcard {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 11px 13px 12px; border-radius: 15px; cursor: pointer;
  background: rgb(255 255 255 / .55); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: 0 0 0 1px rgb(10 22 48 / .08), 0 1px 0 rgb(255 255 255 / .8) inset;
  transition: background-color .25s var(--ease), box-shadow .3s var(--ease), transform .35s var(--spring);
}
.acalc-pcard:hover:not(.is-disabled) { background: rgb(255 255 255 / .85); transform: translateY(-1px); box-shadow: var(--a-raised); }
.acalc-pcard:active:not(.is-disabled) { transform: scale(.985); }
.acalc-pcard.is-sel { background: #fff; box-shadow: 0 0 0 1.5px var(--brand), 0 10px 22px -14px rgb(36 71 216 / .6); }
.acalc-pcard:has(input:focus-visible) { box-shadow: var(--a-focus); }
.acalc-pcard.is-disabled { cursor: not-allowed; background: rgb(255 255 255 / .28); box-shadow: 0 0 0 1px rgb(10 22 48 / .06); }
.acalc-pcard.is-disabled > :not(.acalc-pcard-hint):not(input) { opacity: .55; }
.acalc-pcard-top { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.acalc-pcard-radio { flex: none; width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgb(10 22 48 / .25); background: #fff; position: relative; transition: box-shadow .25s var(--ease); }
.acalc-pcard-radio::after { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--brand); transform: scale(0); transition: transform .4s var(--spring); }
.acalc-pcard.is-sel .acalc-pcard-radio { box-shadow: inset 0 0 0 1.5px var(--brand); }
.acalc-pcard.is-sel .acalc-pcard-radio::after { transform: scale(1); }
.acalc-pcard-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; background: rgb(10 22 48 / .06); color: var(--ink-2); }
.acalc-pcard-tag--range { background: var(--info-bg); color: var(--brand-ink); margin-left: auto; }
.acalc-pcard-title { font-size: 14px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.acalc-pcard--sheet .acalc-pcard-title { color: var(--brand-ink); }
.acalc-pcard-dose { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.015em; color: var(--ink); line-height: 1.35; }
.acalc-pcard-meta { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.acalc-pcard-meta b { font-family: var(--mono); font-weight: 500; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); margin-right: 6px; }
.acalc-pcard-hint { font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; color: var(--ink-3); margin-top: 2px; }
@media (max-width: 599px) {
  .acalc-proto-status { max-width: 50%; }
  .acalc-proto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .acalc-pcard { padding: 10px 11px; border-radius: 13px; gap: 3px; }
  .acalc-pcard-title { font-size: 13px; }
  .acalc-pcard-dose { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .acalc-pcard-meta { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .acalc-pcard-tag--range { display: none; }
}
/* spring in with stagger whenever the cards are rebuilt */
.acalc-proto.is-in .acalc-pcard { animation: acalc-pop .62s cubic-bezier(.34, 1.45, .55, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes acalc-pop { from { opacity: 0; transform: translateY(12px) scale(.94); filter: blur(4px); } 60% { filter: blur(0); } }
.acalc-proto-range { margin-top: 10px; }
.acalc-proto-range[hidden] { display: none; }
.acalc-ticks { position: relative; height: 22px; margin: 2px 42px 0; }
.acalc-ticks span { position: absolute; top: 8px; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; color: var(--ink-4); white-space: nowrap; transition: color .2s var(--ease); }
.acalc-ticks span:not(:first-child):not(:last-child) { font-size: 0; width: 4px; height: 4px; top: 0; border-radius: 50%; background: rgb(10 22 48 / .22); }
.acalc-ticks span:not(:first-child):not(:last-child).is-on { background: var(--brand); }
.acalc-ticks span:first-child { transform: none; }
.acalc-ticks span:last-child { transform: translateX(-100%); }
.acalc-ticks span.is-on { color: var(--brand-ink); }
/* compact (dose helper) */
.acalc-proto--compact { margin-top: 10px; }
.acalc-proto--compact .acalc-proto-grid { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; scroll-snap-type: x proximity; }
.acalc-proto--compact .acalc-proto-grid::-webkit-scrollbar { display: none; }
.acalc-proto--compact .acalc-proto-grid { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 24px; }
.acalc-proto--compact .acalc-pcard { flex: 0 0 auto; width: 158px; padding: 9px 11px; gap: 2px; border-radius: 13px; scroll-snap-align: start; }
.acalc-proto--compact .acalc-pcard-top { position: absolute; top: 9px; right: 9px; min-height: 0; }
.acalc-proto--compact .acalc-pcard-tag { height: 16px; font-size: 9px; padding: 0 5px; }
.acalc-proto--compact .acalc-pcard-top .acalc-pcard-tag { display: none; }
.acalc-proto--compact .acalc-pcard-title { font-size: 12.5px; padding-right: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acalc-proto--compact .acalc-pcard-dose { font-size: 12px; color: var(--ink-2); }
.acalc-proto--compact .acalc-pcard-hint { font-size: 9.5px; }
.acalc-proto--compact .acalc-proto-status { max-width: 55%; }

/* ---------- stack ---------- */
.acalc-head--stack { flex-wrap: wrap; row-gap: 12px; }
.acalc-stack-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.acalc-stack-actions .acalc-btn { height: 36px; padding: 0 14px; font-size: 13.5px; }
.acalc-stack-empty { padding: 28px 20px; text-align: center; border-radius: 18px; font-size: 14.5px; }
.acalc-stack-empty p + p { margin-top: 4px; font-size: 14px; }
.acalc-stack-body { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .acalc-stack-body { grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr); } .acalc-sub--sched { grid-column: 1 / -1; } }
.acalc-rows { display: grid; gap: 8px; align-content: start; counter-reset: row; }
.acalc-row { border-radius: 16px; background: rgb(255 255 255 / .78); box-shadow: var(--a-raised); position: relative; overflow: hidden; }
.acalc-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--k-vial); opacity: .85; }
.acalc-row[data-kind="nasal"]::before { background: var(--k-nasal); }
.acalc-row[data-kind="solution"]::before { background: var(--k-solution); }
.acalc-row[data-kind="oral"]::before { background: var(--k-oral); }
.acalc-row.is-new { animation: acalc-in .6s var(--expo); }
@keyframes acalc-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
.acalc-row-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; }
.acalc-idx--row { background: var(--a-well); box-shadow: none; color: var(--ink-3); }
.acalc-row-text { min-width: 0; display: grid; gap: 2px; }
.acalc-row-name { font-weight: 600; letter-spacing: -.02em; font-size: 15px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.acalc-row-warn { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.acalc-row-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 1px 0 2px; min-width: 0; }
.acalc-pchip {
  display: inline-block; min-width: 0; max-width: 100%; height: 22px; line-height: 22px; padding: 0 9px; border-radius: var(--pill); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--mono); font-size: 11px; letter-spacing: -.01em; background: var(--info-bg); color: var(--brand-ink); box-shadow: 0 0 0 1px rgb(36 71 216 / .12);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.acalc-pchip.is-custom { background: var(--warn-bg); color: oklch(0.42 0.1 55); box-shadow: 0 0 0 1px oklch(0.7 0.12 70 / .3); }
.acalc-pchip.is-new { animation: acalc-chip-in .7s cubic-bezier(.34, 1.5, .55, 1) .12s both; }
@keyframes acalc-chip-in { from { opacity: 0; transform: scale(.6); filter: blur(4px); } }
.acalc-sync-host:has(> .acalc-sync[hidden]) { display: none; }
.acalc-sync { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; font-size: 13px; color: var(--ink-3); min-height: 20px; }
.acalc-sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; transition: background-color .3s var(--ease), transform .3s var(--spring); }
.acalc-sync[data-state="saved"] .acalc-sync-dot { background: var(--ok); }
.acalc-sync[data-state="saving"] .acalc-sync-dot, .acalc-sync[data-state="loading"] .acalc-sync-dot { background: var(--brand-3); animation: acalc-pulse 1s ease-in-out infinite; }
.acalc-sync[data-state="error"] .acalc-sync-dot { background: var(--warn); }
.acalc-sync[data-state="signedout"] .acalc-sync-dot { background: var(--brand-3); }
@keyframes acalc-pulse { 50% { transform: scale(.55); opacity: .5; } }
.acalc-sync-text { display: inline-block; white-space: nowrap; }
.acalc-sync-link { color: var(--brand); font-weight: 500; text-decoration: none; border-radius: 6px; }
.acalc-sync-link:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.acalc-row-sum { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); letter-spacing: -.01em; overflow-wrap: anywhere; }
.acalc-row-btns { display: flex; gap: 2px; }
.acalc-row-edit { padding: 2px 14px 14px; border-top: 1px dashed var(--line); margin: 0 8px; }
.acalc-fields--row { margin-top: 12px; }
.acalc-row-meta { display: flex; gap: 10px; align-items: baseline; margin-top: 10px; }
.acalc-row-meta .acalc-label { display: inline; }
.acalc-row-conc { font-family: var(--mono); font-size: 13px; }
@media (max-width: 599px) {
  .acalc-row-main { grid-template-columns: auto minmax(0, 1fr); padding-right: 12px; }
  .acalc-row-btns { grid-column: 1 / -1; justify-content: flex-end; margin-top: -4px; }
  .acalc-head--stack .acalc-stack-actions { width: 100%; }
  .acalc-head--stack .acalc-stack-actions .acalc-btn { flex: 1 1 auto; }
}

.acalc-sub { display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: 18px; background: var(--a-well); box-shadow: var(--a-well-shadow); min-width: 0; }
.acalc-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acalc-tile { padding: 12px; border-radius: 12px; background: #fff; box-shadow: var(--a-raised); min-width: 0; }
.acalc-tile-v { display: block; margin-top: 6px; font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.acalc-tile-v small { font-size: 12px; letter-spacing: 0; color: var(--ink-3); font-weight: 400; }
.acalc-need { display: grid; margin-top: 2px; }
.acalc-need li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.acalc-need li:first-child { border-top: 0; }
.acalc-need-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.acalc-need-v { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }

.acalc-sched-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.acalc-sched { width: 100%; min-width: 460px; border-collapse: separate; border-spacing: 0 4px; font-size: 13px; }
.acalc-sched th, .acalc-sched td { padding: 0; text-align: center; font-weight: 400; }
.acalc-sched thead th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 4px; width: 9%; }
.acalc-sched-name { text-align: left !important; padding-right: 12px !important; width: 30% !important; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-size: 13px; }
.acalc-sched tbody td, .acalc-sched tbody th { height: 34px; background: rgb(255 255 255 / .7); }
.acalc-sched tbody th { border-radius: 10px 0 0 10px; padding-left: 12px !important; }
.acalc-sched tbody td:last-child { border-radius: 0 10px 10px 0; }
.acalc-sdot { display: inline-grid; place-items: center; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: var(--k-vial); color: #fff; font-family: var(--mono); font-size: 9.5px; box-shadow: 0 2px 6px -2px var(--k-vial); }
tr[data-kind="nasal"] .acalc-sdot { background: var(--k-nasal); box-shadow: 0 2px 6px -2px var(--k-nasal); }
tr[data-kind="solution"] .acalc-sdot { background: var(--k-solution); box-shadow: 0 2px 6px -2px var(--k-solution); }
tr[data-kind="oral"] .acalc-sdot { background: var(--k-oral); box-shadow: 0 2px 6px -2px var(--k-oral); }
.acalc-sdot:has(.acalc-sr) { width: 14px; padding: 0; }
.acalc-d-s { display: none; }
@media (max-width: 599px) {
  .acalc-sched { min-width: 0; table-layout: fixed; }
  .acalc-sched-name { width: 36% !important; font-size: 12px; }
  .acalc-sched tbody th { padding-left: 8px !important; }
  .acalc-d-l { display: none; } .acalc-d-s { display: inline; }
  .acalc-sched tfoot th { padding-left: 8px !important; font-size: 9.5px; }
}
.acalc-sched-an { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.acalc-sched tfoot th, .acalc-sched tfoot td { padding-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.acalc-sched tfoot th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding-left: 12px !important; }
.acalc-print-head { display: none; }

/* ---------- reconstitution ---------- */
.acalc-recon-grid { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .acalc-recon-grid { grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); } }
.acalc-recon-in { display: grid; gap: 14px; align-content: start; }
.acalc-recon-in .acalc-seg { width: 100%; }
.acalc-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.acalc-pair .acalc-seg { height: 44px; align-items: stretch; }
.acalc-pair .acalc-seg-btn { height: auto; }
.acalc-du-host { display: flex; }
.acalc-du-host .acalc-seg { min-width: 100%; }
.acalc-quick { display: grid; gap: 8px; margin-top: 4px; }
.acalc-recon-out { min-width: 0; display: flex; flex-direction: column; }
.acalc-recon-out .acalc-hero-well { margin-top: 0; grid-template-columns: 1fr; }
.acalc-recon-out .acalc-glyph { margin-top: 4px; }
.acalc-sentence { margin-top: 14px; font-size: 15px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* ---------- dose helper ---------- */
.acalc-helper { max-width: 560px; }
.acalc-helper-card .acalc-head { margin-bottom: 12px; }
.acalc-helper .acalc-hero-well { margin-top: 0; grid-template-columns: 1fr; padding: 16px 18px; }
.acalc-helper .acalc-hero-num { font-size: clamp(44px, 5vw, 60px); }
.acalc-whatif { margin-top: 10px; padding: 12px 14px; border-radius: 16px; }
.acalc-whatif-head { display: flex; align-items: baseline; gap: 10px; }
.acalc-whatif-head .acalc-label { flex: 1; }
.acalc-range-v { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.acalc-whatif-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 8px; }
.acalc-whatif-row .acalc-ibtn { background: #fff; box-shadow: var(--a-raised); color: var(--ink); }
.acalc-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; border-radius: 8px; }
.acalc-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brand-3), var(--aqua)) 0 0 / var(--pct, 50%) 100% no-repeat, rgb(10 22 48 / .1); }
.acalc-range::-moz-range-track { height: 6px; border-radius: 3px; background: rgb(10 22 48 / .1); }
.acalc-range::-moz-range-progress { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brand-3), var(--aqua)); }
.acalc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgb(10 22 48 / .12), 0 3px 8px -2px rgb(10 22 48 / .35); transition: transform .25s var(--spring); }
.acalc-range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgb(10 22 48 / .12), 0 3px 8px -2px rgb(10 22 48 / .35); }
.acalc-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.acalc-range:focus-visible { box-shadow: none; }
.acalc-range:focus-visible::-webkit-slider-thumb { box-shadow: var(--a-focus); }
.acalc-range:focus-visible::-moz-range-thumb { box-shadow: var(--a-focus); }
.acalc-helper .acalc-actions { justify-content: flex-end; }

/* ---------- mini ---------- */
.acalc-mini-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(90px, .8fr) auto minmax(110px, 1fr) auto; align-items: end; gap: 12px; padding: 14px 16px; border-radius: var(--r-card); }
.acalc-mini-arrow { align-self: center; color: var(--ink-4); padding-top: 18px; }
.acalc-mini-out { min-width: 0; }
.acalc-mini-line { display: flex; align-items: baseline; gap: 6px; height: 34px; margin-top: 6px; }
.acalc-mini-num { font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.acalc-mini-unit { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.acalc-mini-sub { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acalc-mini-row .acalc-btn { height: 44px; margin-bottom: 0; }
.acalc-mini-out { align-self: center; }
@media (max-width: 720px) {
  .acalc-mini-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .acalc-mini-pick { grid-column: 1 / -1; }
  .acalc-mini-arrow { display: none; }
  .acalc-mini-row .acalc-btn { grid-column: 1 / -1; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .acalc *, .acalc *::before, .acalc *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; }
  .acalc.is-loading { animation: none; }
  .acalc-roll-col { will-change: auto; }
}

/* ---------- print: only the stack (when printed via the stack's button) ---------- */
@media print {
  @page { margin: 14mm 12mm; }
  /* The stack's print button marks the ancestor chain (.acalc-print-path); everything off that chain is hidden. */
  html.acalc-printing .acalc-print-path > :not(.acalc-print-path):not(.acalc-stack) { display: none !important; }
  html.acalc-printing .acalc-print-path {
    display: block !important; position: static !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
    min-height: 0 !important; height: auto !important; max-width: none !important; width: auto !important; overflow: visible !important;
    background: #fff !important; box-shadow: none !important; transform: none !important; filter: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  html.acalc-printing .acalc-print-path::before, html.acalc-printing .acalc-print-path::after { display: none !important; }
  html.acalc-printing, html.acalc-printing body { background: #fff !important; }
  html.acalc-printing .acalc-stack {
    position: static !important; margin: 0; padding: 0 !important; border-radius: 0;
    background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; color: #000;
  }
  html.acalc-printing .acalc-stack::before, html.acalc-printing .acalc-stack::after { display: none !important; }
  html.acalc-printing .acalc-print-head { display: block; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #ccc; font-size: 13px; }
  html.acalc-printing .acalc-eyebrow .acalc-count { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html.acalc-printing .acalc-sync-host, html.acalc-printing .acalc-stack-actions, html.acalc-printing .acalc-row-btns, html.acalc-printing .acalc-row-edit, html.acalc-printing .acalc-stack-empty { display: none !important; }
  html.acalc-printing .acalc-stack-body { display: block; }
  html.acalc-printing .acalc-row, html.acalc-printing .acalc-sub, html.acalc-printing .acalc-tile, html.acalc-printing .acalc-sched tbody td, html.acalc-printing .acalc-sched tbody th {
    box-shadow: none !important; background: #fff !important; border: 1px solid #ddd;
  }
  html.acalc-printing .acalc-row { break-inside: avoid; margin-bottom: 6px; }
  html.acalc-printing .acalc-sub { margin-top: 12px; break-inside: avoid; }
  html.acalc-printing .acalc-totals { grid-template-columns: repeat(4, 1fr); }
  html.acalc-printing .acalc-sched-wrap { overflow: visible; }
  html.acalc-printing .acalc-sched { min-width: 0; }
  html.acalc-printing .acalc-sdot { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none; }
  html.acalc-printing .acalc-row::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html.acalc-printing .acalc-pchip { animation: none; background: #fff !important; color: #000; box-shadow: none; border: 1px solid #bbb; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
