/* Clear Peptide Calculator theme: design A v2.2 (accepted by the owner 2026-10-29). Source of the design: work/design/concepts/a-rx-label/ (tokens.css, base.css, style.css), copied here in that order; the site additions follow at the end. */
/* Fonts: self-hosted latin subsets of Public Sans, Atkinson Hyperlegible Mono and Next (SIL OFL 1.1, assets/fonts/OFL-*.txt). */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("../fonts/public-sans-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/atkinson-mono-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/atkinson-next-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-copy: 1.0625rem; --text-lg: 1.2rem; --text-xl: 1.44rem; --text-2xl: 1.728rem; --text-3xl: 2.074rem; --text-4xl: 2.488rem; --text-5xl: 2.986rem;
  --text-display-s: 1.728rem; --text-display: 2.074rem; --text-section: 1.2rem; --text-title: 1rem; --text-lead: 1rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --color-error: oklch(52% 0.19 27); --color-success: oklch(50% 0.12 150);
  --container: 1440px; --gutter: 64px; --gap-columns: 32px; --section-gap-s: 120px; --section-gap: 144px; --section-gap-l: 176px;
  --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600;
  color-scheme: light dark;
  --color-paper: oklch(98.5% 0.004 265); --color-paper-2: oklch(96% 0.008 265); --color-paper-3: oklch(93% 0.011 265);
  --color-ink: oklch(21% 0.025 265); --color-ink-2: oklch(38% 0.025 265); --color-muted: oklch(52% 0.02 265);
  --color-rule: oklch(89% 0.01 265);
  --color-accent: oklch(46% 0.2 265); --color-accent-ink: oklch(98.5% 0.004 265); --color-focus: oklch(50% 0.2 265);
  --color-accent-soft: oklch(94.5% 0.022 265); --color-liquid: oklch(89% 0.045 265); --color-stopper: oklch(30% 0.015 265);
  --color-print-ink: oklch(21% 0.025 265);
  --font-display: "Public Sans", ui-sans-serif, system-ui, sans-serif; --font-body: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --font-outlier: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --font-brand: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, sans-serif;
  --body-weight: 400; --display-weight: 800; --control-h: 2.5rem;
  --radius-card: 4px; --radius-pill: 999px; --rule-hair: 1px; --shadow-card: none;
  --tracking-display: -0.02em;
}

[data-mode="dark"] {
  --color-paper: oklch(17% 0.012 265); --color-paper-2: oklch(20% 0.013 265); --color-paper-3: oklch(23% 0.014 265);
  --color-ink: oklch(94% 0.01 265); --color-ink-2: oklch(83% 0.015 265); --color-muted: oklch(67% 0.018 265);
  --color-rule: oklch(31% 0.014 265);
  --color-accent: oklch(74% 0.125 268); --color-accent-ink: oklch(17% 0.012 265); --color-focus: oklch(76% 0.115 268);
  --color-accent-soft: oklch(26% 0.04 265); --color-liquid: oklch(37% 0.07 265); --color-stopper: oklch(60% 0.015 265);
  --color-error: oklch(72% 0.15 27);
  --body-weight: 350;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) {
    --color-paper: oklch(17% 0.012 265); --color-paper-2: oklch(20% 0.013 265); --color-paper-3: oklch(23% 0.014 265);
    --color-ink: oklch(94% 0.01 265); --color-ink-2: oklch(83% 0.015 265); --color-muted: oklch(67% 0.018 265);
    --color-rule: oklch(31% 0.014 265);
    --color-accent: oklch(74% 0.125 268); --color-accent-ink: oklch(17% 0.012 265); --color-focus: oklch(76% 0.115 268);
    --color-accent-soft: oklch(26% 0.04 265); --color-liquid: oklch(37% 0.07 265); --color-stopper: oklch(60% 0.015 265);
    --color-error: oklch(72% 0.15 27);
    --body-weight: 350;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-muted) var(--color-paper); scroll-padding-top: var(--space-3xl); }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); }
::selection { background: color-mix(in oklab, var(--color-accent) 22%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 700); font-synthesis: none; letter-spacing: var(--tracking-display); line-height: 1.05; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h1 { max-width: 20ch; font-size: var(--text-display); } h2 { max-width: 30ch; font-size: var(--text-section); } h3 { max-width: 40ch; font-size: var(--text-title); line-height: 1.2; }
.lead { font-size: var(--text-lead); line-height: 1.45; max-width: 52ch; }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 65ch; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.num, .figure, td.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-slot] { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--color-paper-2, var(--color-paper)), var(--color-paper-3, var(--color-paper))); }
[data-slot] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
[data-slot]:has(> img) > :not(img):not([data-keep]) { display: none !important; }
@media (max-width: 60rem) { :root { --gutter: 24px; --section-gap-s: 80px; --section-gap: 96px; --section-gap-l: 120px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; --section-gap-s: 56px; --section-gap: 72px; --section-gap-l: 96px; --gap-columns: 16px; } }
@media (prefers-reduced-motion: reduce) { *:not(.keep-motion), *:not(.keep-motion)::before, *:not(.keep-motion)::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* Hallmark · shape: app screen · genre: editorial · theme: brand · redesign: full
 * paper: oklch(98.5% 0.004 265) · accent: oklch(46% 0.2 265) · display: Public Sans · body: Public Sans · brand and numbers: Atkinson Hyperlegible Next and Mono
 * nav: top bar, the scale mark and the Clear wordmark, five tool links, a disclosure menu under 60rem · signature: the drawn U-100 syringe, its stopper on the units · states: example (marked in the fields), part-example, empty, incomplete, invalid, result, limit · phone: vial and water in one row, a result bar while the answer is off screen, the answer first when opened from a link
 * axes: light/grotesk-heavy/cool · posture: tool first · contrast: pass · modes: light+dark · v2.2.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V3 · weakest: V, a two-column tool screen is the category's usual frame; the syringe drawn at the result's full width and the printed vial label carry the difference */
/* Hallmark · waive 38iii · the heavier word is Clear, the brand name, set by weight only in the wordmark and on the printed vial label · the owner asked for Clear heavier and the rest of the name lighter */

body { font-weight: var(--body-weight); }
.figure-face, .num { font-family: var(--font-outlier); font-weight: 500; }

/* Top bar */
.topbar { border-bottom: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); }
.topbar-in { display: flex; align-items: center; gap: var(--space-lg); min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-xs); font-family: var(--font-brand); font-weight: 400; font-size: var(--text-md); text-decoration: none; color: var(--color-ink); }
.wordmark b, .print-label h2 b { font-weight: 700; }
.wordmark svg { flex: none; }
.mark-ink { fill: var(--color-ink); } .mark-dose { fill: var(--color-accent); }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-card); color: var(--color-ink-2); text-decoration: none; font-size: var(--text-sm); }
.nav a[aria-current="page"] { color: var(--color-ink); background: var(--color-paper-2); }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-card); color: var(--color-ink); cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--color-paper-2); }
.menu ul { position: absolute; right: 0; top: calc(100% + var(--space-2xs)); z-index: var(--z-dropdown); min-width: 14rem; margin: 0; padding: var(--space-2xs); list-style: none; background: var(--color-paper); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); }
.menu a { display: block; padding: var(--space-sm); color: var(--color-ink); text-decoration: none; border-radius: var(--radius-card); }
@media (hover: hover) {
  .nav a:hover, .menu a:hover, .menu summary:hover { background: var(--color-paper-2); color: var(--color-ink); }
}

/* The screen: inputs on the left, the label on the right */
.calc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--gap-columns); row-gap: var(--space-xl); padding-block: var(--space-xl) var(--space-2xl); }
.calc-input { grid-column: 1 / span 4; grid-row: 1 / span 2; display: grid; align-content: start; gap: var(--space-md); }
.calc-input h1 { font-size: var(--text-display); }
.lead { color: var(--color-ink-2); }
.scope { font-size: var(--text-sm); color: var(--color-ink-2); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); }
.rx { grid-column: 5 / span 8; grid-row: 1; align-self: start; }
.below { grid-column: 5 / span 8; grid-row: 2; align-self: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); padding-top: var(--space-md); }
.below h2 { margin-bottom: var(--space-md); }

/* Fields */
.fields { display: grid; gap: var(--space-xs); margin: 0; padding: 0; border: 0; }
.field { display: grid; gap: var(--space-2xs); min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { padding: 0; font-weight: 600; font-size: var(--text-sm); color: var(--color-ink); }
.row { display: flex; gap: var(--space-xs); min-width: 0; }
.box { position: relative; flex: 1 1 auto; min-width: 0; }
.input { width: 100%; height: var(--control-h); padding: 0 var(--space-sm); border: 1px solid var(--color-muted); border-radius: var(--radius-card); background: var(--color-paper); color: var(--color-ink); font-family: var(--font-outlier); font-weight: 500; font-size: var(--text-md); outline: 2px solid transparent; outline-offset: -3px; transition: background-color var(--dur-micro) var(--ease-out); }
.box .input { padding-right: 3rem; }
.input::placeholder { color: var(--color-muted); opacity: 1; font-family: var(--font-body); font-weight: 400; }
.input:focus-visible { outline-color: var(--color-focus); border-color: var(--color-ink-2); }
.input[aria-invalid="true"] { border-color: var(--color-error); }
.input:disabled { opacity: 0.55; cursor: not-allowed; }
.suffix { position: absolute; right: var(--space-sm); top: 50%; translate: 0 -50%; color: var(--color-ink-2); font-size: var(--text-sm); pointer-events: none; }
.msg { min-height: 1lh; font-size: var(--text-sm); color: var(--color-error); }
.msg:empty::before { content: "\00a0"; }
/* Vial and water share a row; the vial's unit switch is the narrow one */
.pair { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: var(--space-sm); }
/* The vial unit sits in the field, where the water field has its mL: it rarely changes. The dose unit, where a mcg/mg
 * slip happens, keeps its open switch. */
.unit-pick { position: absolute; inset-block: 1px; right: 1px; width: 4.25rem; padding: 0 0 0 var(--space-sm); border: 0; border-left: 1px solid var(--color-muted); border-radius: 0 3px 3px 0; background: var(--color-paper-2); color: var(--color-ink); font: 600 var(--text-sm) / 1 var(--font-body); appearance: none; cursor: pointer; }
.unit-pick:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.box:has(.unit-pick)::after { content: ""; position: absolute; right: 0.85rem; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--color-ink-2); border-bottom: 1.5px solid var(--color-ink-2); translate: 0 -70%; rotate: 45deg; pointer-events: none; }
.box:has(.unit-pick) .input { padding-right: 5rem; }
@media (hover: hover) { .unit-pick:hover { background: var(--color-paper-3); } }

/* The example in the fields: grey until the visitor replaces or confirms it */
.ex-tag { display: none; margin-left: var(--space-2xs); font-size: var(--text-xs); font-weight: 400; color: var(--color-muted); }
.field:has(input[data-example]) .ex-tag { display: inline; }
.input[data-example] { color: var(--color-muted); }
.calc[data-example="some"] .box:has(input[data-example]) .input { border-color: var(--color-accent); background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px var(--color-accent); }
.stale { display: grid; gap: var(--space-3xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-card); background: var(--color-accent-soft); font-size: var(--text-sm); color: var(--color-ink); }
.stale:empty { display: none; }
.stale-head { font-weight: 600; }
.stale-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: var(--space-sm); }
.stale-row b { font-weight: 600; }

/* Segmented radios: the unit and the syringe */
.seg { display: inline-flex; flex: none; padding: var(--space-3xs); gap: var(--space-3xs); border: 1px solid var(--color-muted); border-radius: var(--radius-card); background: var(--color-paper); }
.seg label { position: relative; display: grid; place-items: center; min-width: 3rem; height: calc(var(--control-h) - 6px); padding: 0 var(--space-sm); border-radius: 2px; color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 600; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--color-accent); color: var(--color-accent-ink); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.seg label:active { translate: 0 1px; }
.seg--wide { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.seg--wide label { height: auto; min-height: calc(var(--control-h) + 8px); padding: var(--space-2xs) var(--space-xs); line-height: 1.25; text-align: center; }
.seg--wide small { display: block; font-size: var(--text-xs); font-weight: 400; }
.seg--wide + .seg--wide { margin-top: var(--space-2xs); }
/* Vial presets: buttons in the segmented look, pressed while the vial holds that size */
.seg button { display: grid; place-items: center; min-width: 3rem; height: calc(var(--control-h) - 6px); padding: 0 var(--space-sm); border: 0; border-radius: 2px; background: none; color: var(--color-ink-2); font: 600 var(--text-sm) / 1 var(--font-body); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.seg button[aria-pressed="true"] { background: var(--color-accent); color: var(--color-accent-ink); }
.seg button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.seg button:active { translate: 0 1px; }
.presets .seg { grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr)); }
.presets .seg button { height: auto; min-height: calc(var(--control-h) + 2px); }
.lines { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-lg); padding-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.lines label { position: relative; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 2rem; cursor: pointer; }
.lines label::before { content: ""; flex: none; width: 1rem; height: 1rem; box-sizing: border-box; border: 1px solid var(--color-muted); border-radius: var(--radius-pill); background: var(--color-paper); }
.lines label::after { content: ""; position: absolute; inset: -6px -4px; }
.lines input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lines label:has(input:checked) { color: var(--color-ink); }
.lines label:has(input:checked)::before { border: 5px solid var(--color-accent); }
.lines label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-card); }
@media (hover: hover) {
  .input:hover:not(:focus-visible) { background: var(--color-paper-2); }
  .seg label:hover:not(:has(input:checked)) { background: var(--color-paper-2); color: var(--color-ink); }
  .seg button:hover:not([aria-pressed="true"]) { background: var(--color-paper-2); color: var(--color-ink); }
  .lines label:hover:not(:has(input:checked)) { color: var(--color-ink); }
  .lines label:hover:not(:has(input:checked))::before { border-color: var(--color-ink-2); }
}

/* Quiet links and the one button */
.link-btn { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 2rem; padding: 0; border: 0; background: none; color: var(--color-accent); font-weight: 600; font-size: var(--text-sm); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; cursor: pointer; position: relative; }
.link-btn::before { content: ""; position: absolute; inset: -12px -6px; }
.link-btn svg { flex: none; }
.btn { display: inline-flex; align-items: center; gap: var(--space-xs); height: var(--control-h); padding: 0 var(--space-md); border: 0; border-radius: var(--radius-card); background: var(--color-accent); color: var(--color-accent-ink); font-weight: 600; font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.btn:active { translate: 0 1px; }
@media (hover: hover) {
  .link-btn:hover { color: var(--color-ink); }
  .btn:hover { background: color-mix(in oklab, var(--color-accent) 86%, var(--color-ink)); }
}
.from-label { font-size: var(--text-lg); font-weight: 600; line-height: 1.35; color: var(--color-ink); max-width: 40ch; }
.example-line { font-size: var(--text-sm); color: var(--color-ink-2); }
.calc:not([data-example="all"]) .example-line { display: none; }
.btn:disabled { background: var(--color-paper-3); color: var(--color-muted); cursor: not-allowed; translate: none; }
.link-btn:disabled { color: var(--color-muted); text-decoration: none; cursor: not-allowed; }
.actions-note { font-size: var(--text-sm); color: var(--color-ink-2); }

/* The label: the answer, the syringe, the facts */
.rx { border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper); }
.rx-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: 48px; padding: var(--space-xs) var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); }
.rx-head h2 { font-size: var(--text-md); font-weight: 600; letter-spacing: 0; }
.tag { padding: var(--space-3xs) var(--space-xs); border-radius: var(--radius-card); background: var(--color-accent-soft); color: var(--color-ink); font-size: var(--text-sm); font-weight: 600; }
.rx-body { display: grid; gap: var(--space-md); padding: var(--space-lg); }
.answer-main { min-width: 0; }
.answer { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-md); }
.figure { display: flex; align-items: baseline; gap: var(--space-xs); line-height: 1; }
.figure-n { font-variant-numeric: tabular-nums; font-size: var(--text-5xl); font-weight: 600; letter-spacing: -0.03em; color: var(--color-ink); }
.figure-u { font-size: var(--text-xl); font-weight: 600; color: var(--color-ink); }
.figure-sub { margin-top: var(--space-xs); color: var(--color-ink-2); }
.figure-sub b { color: var(--color-ink); font-weight: 600; }
.prompt { max-width: 34ch; font-size: var(--text-lg); line-height: 1.35; color: var(--color-ink); }
.limit-head { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.01em; color: var(--color-error); line-height: 1.15; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); }
.notice { font-size: var(--text-sm); color: var(--color-ink-2); }
.notice:empty { display: none; }
.cpc-share-url { display: block; width: 100%; margin-top: var(--space-2xs); height: var(--control-h); padding: 0 var(--space-sm); border: 1px solid var(--color-muted); border-radius: var(--radius-card); background: var(--color-paper); color: var(--color-ink); }
.limits { display: grid; gap: var(--space-xs); }
.limits:empty { display: none; }
.limit { max-width: 64ch; color: var(--color-ink); }
.limit .link-btn { min-height: 0; font-size: inherit; margin-left: var(--space-2xs); }
.limit--warn { padding-left: var(--space-sm); border-left: 3px solid var(--color-error); }
.limit-lead { display: block; font-weight: 700; color: var(--color-error); }
.picture { min-height: 7rem; padding-top: var(--space-xs); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: var(--rule-hair) solid var(--color-rule); }
.facts div { display: grid; gap: var(--space-3xs); padding: var(--space-md) var(--space-lg); }
.facts div + div { border-left: var(--rule-hair) solid var(--color-rule); }
.facts dt { font-size: var(--text-sm); color: var(--color-ink-2); }
.facts dd { margin: 0; font-size: var(--text-lg); color: var(--color-ink); }

/* What each state shows */
.calc:not([data-state="result"]) .on-result { display: none; }
.calc:not([data-state="limit"]) .on-limit { display: none; }
.calc:is([data-state="result"], [data-state="limit"]) .on-wait { display: none; }
.calc:is([data-example="none"], :not([data-state="result"], [data-state="limit"])) .on-example { display: none; }

/* An example result reads as one: every number worked from it, and the syringe, muted */
.calc:not([data-example="none"]) :is(.figure-n, .figure-u, .figure-sub b, .facts dd, .units-table td, .steps dd) { color: var(--color-muted); }
.calc:not([data-example="none"]) .syr-liquid { fill: var(--color-paper-3); }
.calc:not([data-example="none"]) .syr-mark { stroke: var(--color-muted); }
.calc:not([data-example="none"]) .syr-mark-label { fill: var(--color-muted); }

/* The drawn syringe (engine/syringe.mjs) */
.syr { display: block; max-width: 100%; height: auto; }
.syr-barrel { fill: var(--color-paper); }
.syr-barrel-edge { fill: none; stroke: var(--color-ink-2); stroke-width: 1.5; }
.syr-liquid { fill: var(--color-liquid); }
.syr-tick { stroke: var(--color-ink-2); stroke-width: 1; }
.syr-tick--long { stroke: var(--color-ink); stroke-width: 1.5; }
.syr-num { fill: var(--color-ink-2); font-family: var(--font-outlier); font-weight: 500; }
.syr-stopper { fill: var(--color-stopper); }
.syr-rib { stroke: var(--color-paper-3); stroke-width: 1.5; }
.syr-rod, .syr-flange, .syr-hub { fill: var(--color-paper-3); stroke: var(--color-ink-2); stroke-width: 1; }
.syr-needle { fill: var(--color-ink-2); }
.syr-mark { stroke: var(--color-accent); stroke-width: 2; }
.syr-mark-label { fill: var(--color-accent); font-family: var(--font-outlier); font-weight: 600; }
.syr--limit .syr-mark { stroke: var(--color-error); }
.syr--limit .syr-mark-label { fill: var(--color-error); }

/* Below: the units table and the worked steps */
.units-table { width: 100%; border-collapse: collapse; }
.units-table caption { text-align: left; padding-bottom: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.units-table th { text-align: left; padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); border-bottom: var(--rule-hair) solid var(--color-ink-2); }
.units-table th.num { white-space: nowrap; }
.units-table td { padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.units-table tr.is-current td { background: var(--color-accent-soft); font-weight: 600; }
.units-table td:first-child, .units-table thead th:first-child { padding-left: var(--space-sm); }
.wait-line { color: var(--color-ink-2); }
.rules { display: grid; gap: var(--space-xs); margin: 0 0 var(--space-lg); padding-left: 1.25rem; color: var(--color-ink); }
.rules li::marker { color: var(--color-ink-2); }
.steps { display: grid; gap: 0; margin: 0; }
.steps div { display: grid; gap: var(--space-3xs); padding-block: var(--space-xs); border-top: var(--rule-hair) solid var(--color-rule); }
.steps dt { font-weight: 600; font-size: var(--text-sm); color: var(--color-ink); }
.steps dd { margin: 0; overflow-wrap: anywhere; }
.steps-head { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); margin-bottom: var(--space-xs); }

.footer { border-top: var(--rule-hair) solid var(--color-rule); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-md); padding-block: var(--space-lg); font-size: var(--text-sm); color: var(--color-ink-2); }
.footer ul { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin: 0; padding: 0; list-style: none; }
.footer a { color: var(--color-ink-2); }

/* The vial label is for paper only */
.print-label { display: none; }

/* Phone: the answer sits under the fields, so a bar at the bottom carries it while it is below the screen.
 * calculator.js sets data-dock and lifts the bar over the on-screen keyboard (--dock-lift). */
.dock { display: none; }

@media (max-width: 75rem) {
  .calc-input { grid-column: 1 / span 5; }
  .rx, .below { grid-column: 6 / span 7; }
  .below { grid-template-columns: 1fr; }
}
@media (max-width: 60rem) {
  .nav { display: none; }
  .menu { display: block; }
  .calc { row-gap: var(--space-lg); padding-block: var(--space-lg) var(--space-xl); }
  .calc { grid-template-rows: none; }
  .calc-input, .rx, .below { grid-column: 1 / -1; grid-row: auto; }
  .below { padding-top: var(--space-md); }
  .calc-input h1 { font-size: var(--text-display-s); }
  .below { row-gap: var(--space-xl); }
  /* Opened from a link with an answer: the answer comes first, the fields under it. */
  .calc[data-order="result"] .calc-input { display: contents; }
  .calc[data-order="result"] .calc-input > * { grid-column: 1 / -1; }
  .calc[data-order="result"] .rx { order: 1; }
  .calc[data-order="result"] :is(.example-line, .fields) { order: 2; }
  .calc[data-order="result"] .scope { order: 3; }
  .calc[data-order="result"] .below { order: 4; }
}
@media (max-width: 40rem) {
  .topbar-in { min-height: 56px; }
  /* The answer moves up: the scope line goes under the label on a phone. */
  .calc { row-gap: var(--space-md); }
  .calc-input { display: contents; }
  .calc-input > * { grid-column: 1 / -1; }
  .scope { order: 1; }
  .below { order: 2; }
  .wordmark { font-size: var(--text-sm); }
  .rx-head, .rx-body { padding-inline: var(--space-md); }
  .rx-body { padding-block: var(--space-md); }
  /* The syringe comes right under the number; print and link follow it. */
  .answer { display: contents; }
  .actions, .notice { order: 1; }
  .figure-n { font-size: var(--text-4xl); }
  .answer { min-height: 0; }
  .facts { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; padding: var(--space-sm) var(--space-md); }
  .facts div + div { border-left: 0; border-top: var(--rule-hair) solid var(--color-rule); }
  .facts dd { font-size: var(--text-md); }
}
@media (max-width: 60rem) {
  .dock { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: 56px; padding: var(--space-xs) var(--gutter) calc(var(--space-xs) + env(safe-area-inset-bottom)); border-top: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); color: var(--color-ink); text-decoration: none; transform: translateY(var(--dock-lift, 0px)); transition: opacity var(--dur-short) var(--ease-out); }
  /* Without the script there is no result to carry: no bar. Off while the answer is on screen. */
  .calc:not([data-dock]) .dock { display: none; }
  .calc[data-dock="off"] .dock { visibility: hidden; opacity: 0; transition: opacity var(--dur-short) var(--ease-out), visibility 0s linear var(--dur-short); }
  .dock-value { font-family: var(--font-outlier); font-weight: 600; font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
  .calc[data-state="limit"] .dock-value { color: var(--color-error); font-family: var(--font-body); font-size: var(--text-md); }
  .dock-go { display: inline-flex; align-items: center; gap: var(--space-2xs); flex: none; color: var(--color-accent); font-size: var(--text-sm); }
  .calc[data-dock="above"] .dock-go svg { rotate: 180deg; }
  .calc:not([data-example="none"]) .dock-value { color: var(--color-muted); }
}
@media (pointer: coarse) { :root { --control-h: 2.75rem; } }

@media print {
  @page { margin: 12mm; }
  :root { color-scheme: light; }
  body { background: none; color: var(--color-print-ink); }
  /* Only the label prints: every box off its path from body is hidden (GeneratePress wraps main in #page and #content). */
  body > :not(#page), #page > :not(#content), #content > :not(main), main > :not(.calc-section),
  .calc-section > :not(.calc), .calc > :not(.print-label) { display: none !important; }
  .calc { display: block; padding: 0 !important; }
  .print-label { display: block; width: 90mm; padding: 4mm 5mm; border: 0.4mm solid var(--color-print-ink); border-radius: 2mm; color: var(--color-print-ink); font-size: 10pt; line-height: 1.35; }
  .print-label h2 { font-family: var(--font-brand); font-weight: 400; font-size: 11pt; letter-spacing: 0; margin-bottom: 2mm; }
  .print-label dl { display: grid; grid-template-columns: auto 1fr; gap: 1mm 4mm; margin: 0; }
  .print-label dt { font-weight: 600; }
  .print-label dd { margin: 0; }
  .print-label .mixed { margin-top: 3mm; padding-top: 2mm; border-top: 0.3mm solid var(--color-print-ink); }
}

/* ------------------------------------------------------------------------------------------------------------------
 * Site additions to the concept: the WordPress frame, the device switch and the pen, the converter, breadcrumbs, the
 * page copy under the calculator (method, formulas, devices, FAQ, sources, related tools) and the footer.
 * ------------------------------------------------------------------------------------------------------------------ */

/* GeneratePress wraps the page in .site.container and .site-content: they add nothing here. */
.site.container, .site-content { display: block; max-width: none; margin: 0; padding: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: var(--space-xs); left: var(--space-xs); z-index: var(--z-toast); width: auto; height: auto; padding: var(--space-xs) var(--space-sm); clip-path: none; background: var(--color-paper); color: var(--color-ink); border: 2px solid var(--color-focus); border-radius: var(--radius-card); }
.topbar { position: relative; z-index: var(--z-raised); }
.wordmark span { white-space: nowrap; }
.nav a:not([aria-current]) { color: var(--color-ink-2); }

/* The calculator's section carries the #calculator anchor; the form inside keeps the concept's grid. */
.calc-section { scroll-margin-top: var(--space-lg); }

/* What shows for each device and direction (calculator.js sets data-device and data-from on the form). */
.calc:not([data-device="pen"]) [data-cpc-for="pen"], .calc[data-device="pen"] [data-cpc-for="syringe"] { display: none !important; }
.calc:not([data-from="ml"]) [data-cpc-from="ml"], .calc[data-from="ml"] [data-cpc-from="units"] { display: none !important; }
.calc:not([data-from="dose"]) [data-cpc-from="dose"], .calc[data-from="dose"] [data-cpc-from="units"] { display: none !important; }
.seg--two { grid-template-columns: repeat(2, 1fr); }
/* Field messages keep room under number fields; a fieldset after a fieldset gets the same air. */
.fields > fieldset + fieldset { margin-top: var(--space-sm); }
.seg--wide + .field, .seg--two + .field { margin-top: var(--space-xs); }
.pair--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* A field beside a taller one (a hint under it) keeps its rows at the top instead of stretching them. */
.pair > .field { align-content: start; }
.hint { font-size: var(--text-sm); color: var(--color-ink-2); max-width: 46ch; }
.hint a { color: var(--color-accent); font-weight: 600; }
.pen-set { gap: var(--space-xs); }
.box--select::after { content: ""; position: absolute; right: 0.95rem; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--color-ink-2); border-bottom: 1.5px solid var(--color-ink-2); translate: 0 -70%; rotate: 45deg; pointer-events: none; }
.pen-pick { appearance: none; padding-right: 2.5rem; font-family: var(--font-body); font-weight: 500; cursor: pointer; }
.figure-dial { margin-top: var(--space-xs); font-weight: 600; color: var(--color-accent); }
.calc:not([data-example="none"]) .figure-dial { color: var(--color-muted); }

/* The drawn pen (engine/pendial.mjs) */
.pen { display: block; max-width: 100%; height: auto; }
.pen-needle { fill: var(--color-ink-2); }
.pen-holder { fill: var(--color-paper-2); stroke: var(--color-ink-2); stroke-width: 1; }
.pen-glass { fill: var(--color-paper); stroke: var(--color-rule); stroke-width: 1; }
.pen-liquid { fill: var(--color-liquid); }
.pen-plunger { fill: var(--color-stopper); }
.pen-body { fill: var(--color-paper-3); stroke: var(--color-ink-2); stroke-width: 1; }
.pen-window { fill: var(--color-paper); stroke: var(--color-ink); stroke-width: 1.5; }
.pen-drum { fill: var(--color-ink); font-family: var(--font-outlier); font-weight: 700; }
.pen-drum--faded { fill: var(--color-muted); font-weight: 500; }
.pen-pointer { fill: var(--color-accent); }
.pen-knob { fill: var(--color-ink-2); }
.pen-rib { stroke: var(--color-paper-3); stroke-width: 1.5; }
.pen-label { fill: var(--color-accent); font-family: var(--font-outlier); font-weight: 600; }
.pen--limit .pen-pointer { fill: var(--color-error); }
.calc:not([data-example="none"]) .pen-liquid { fill: var(--color-paper-3); }
.calc:not([data-example="none"]) :is(.pen-label, .pen-drum) { fill: var(--color-muted); }

/* Breadcrumbs */
.crumbs { padding-top: var(--space-md); }
.cpc-breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-xs); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); color: var(--color-ink-2); }
.cpc-breadcrumb li + li::before { content: "/"; margin-right: var(--space-xs); color: var(--color-muted); }
.cpc-breadcrumb a { color: var(--color-ink-2); }
.cpc-breadcrumb [aria-current] { color: var(--color-ink); }
.crumbs + .calc-section .calc { padding-top: var(--space-md); }

/* Pages without a calculator (service pages, not found): the H1, the lead and the copy in one column */
.plain { display: grid; gap: var(--space-sm); max-width: 72ch; padding-block: var(--space-xl) var(--space-2xl); }
.plain .copy { grid-column: auto; margin-top: var(--space-lg); }
.guide-head { padding-bottom: var(--space-lg); }
.copy code { white-space: nowrap; }

/* The page copy under the calculator, its contents sticky in the left column */
.page-copy { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); padding-block: var(--space-xl) var(--space-2xl); border-top: var(--rule-hair) solid var(--color-rule); }
.copy { grid-column: 5 / span 8; font-size: var(--text-copy); }
.copy > section { padding-bottom: var(--space-xl); }
.copy > section + section { padding-top: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); }
.toc { grid-column: 1 / span 3; align-self: start; position: sticky; top: var(--space-lg); font-size: var(--text-sm); }
.toc-head { margin-bottom: var(--space-xs); font-weight: 600; color: var(--color-ink-2); }
.toc ol { display: grid; margin: 0; padding: 0; list-style: none; border-left: var(--rule-hair) solid var(--color-rule); }
.toc a { display: block; padding: var(--space-2xs) var(--space-sm); color: var(--color-ink); text-decoration: none; }
@media (hover: hover) { .toc a:hover { color: var(--color-accent); text-decoration: underline; } }
.copy h2 { max-width: 40ch; font-size: var(--text-xl); margin-bottom: var(--space-md); scroll-margin-top: var(--space-lg); }
.copy h3 { margin: var(--space-lg) 0 var(--space-xs); font-size: var(--text-lg); font-weight: 700; letter-spacing: 0; }
.copy p, .copy li { max-width: 68ch; }
.copy p + p, .copy p + ul, .copy p + ol, .copy ul + p, .copy ol + p, .copy table + p, .copy .formula + p { margin-top: var(--space-sm); }
.copy ul, .copy ol { display: grid; gap: var(--space-2xs); margin: var(--space-sm) 0 0; padding-left: 1.25rem; }
.copy li::marker { color: var(--color-ink-2); }
.copy a { color: var(--color-accent); }
.copy .units-table { margin-top: var(--space-md); }
.units-table th[scope="row"] { font-size: inherit; font-weight: 600; padding-left: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
.units-table td.src { font-size: var(--text-sm); color: var(--color-ink-2); }
.units-table :is(td.src, th small) time { white-space: nowrap; }
.units-table :is(th[scope="row"], thead th) small { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--color-ink-2); }
.units-table td.over { font-size: var(--text-sm); color: var(--color-ink-2); white-space: nowrap; }
/* A number cell's note under the number: the mL under the units, the arms a figure covers. */
.units-table td.num small { display: block; font-size: var(--text-sm); color: var(--color-ink-2); white-space: nowrap; }
/* #status: one row per authority, its name and date on the left. */
.status { margin: var(--space-md) 0 0; border-top: var(--rule-hair) solid var(--color-rule); }
.status div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: var(--space-md); padding: var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.status dt { font-weight: 600; }
.status dt time { display: block; font-weight: 400; font-size: var(--text-sm); color: var(--color-ink-2); }
.status dd { margin: 0; max-width: 68ch; }
@media (max-width: 40rem) { .status div { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-3xs); } }
/* [cpc_vial_units]: the strength fields over the steps. */
.vial-units { display: grid; gap: var(--space-sm); margin-top: var(--space-md); }
.vial-units .seg { justify-self: start; }
.vial-units .pair { max-width: 26rem; }
.vial-units .msg:empty { display: none; }
.copy .vial-units .units-table { margin-top: 0; }
.formula { display: grid; gap: var(--space-2xs); margin: var(--space-md) 0 0; padding: var(--space-md) var(--space-lg); border-left: 3px solid var(--color-accent); background: var(--color-paper-2); font-family: var(--font-outlier); font-weight: 500; font-size: var(--text-sm); overflow-wrap: anywhere; }
.formula dt { font-family: var(--font-body); font-weight: 600; color: var(--color-ink-2); }
.formula dd { margin: 0 0 var(--space-xs); }
.formula dd:last-child { margin-bottom: 0; }
.example { margin-top: var(--space-md); padding: var(--space-md) var(--space-lg); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); }
.example p { max-width: none; }
.faq h3 { font-size: var(--text-md); }
.sources { list-style: none; padding-left: 0 !important; }
.sources li { padding-block: var(--space-xs); border-top: var(--rule-hair) solid var(--color-rule); }
.sources li:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.sources small { display: block; font-size: var(--text-sm); color: var(--color-ink-2); }
.tools { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm) !important; list-style: none; padding-left: 0 !important; }
.tools li { max-width: none; }
.tools a { display: grid; gap: var(--space-3xs); height: 100%; padding: var(--space-md); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); color: var(--color-ink); text-decoration: none; }
.tools a b { color: var(--color-accent); font-weight: 700; }
.tools a span { font-size: var(--text-sm); color: var(--color-ink-2); }
@media (hover: hover) { .tools a:hover { border-color: var(--color-accent); background: var(--color-accent-soft); } }
.water-table th[scope="row"] { white-space: nowrap; }

/* Footer */
.footer-in { align-items: baseline; }
.footer-note { flex-basis: 100%; max-width: 72ch; }
.footer .wordmark { font-size: var(--text-sm); }

@media (max-width: 75rem) {
  .copy { grid-column: 6 / span 7; }
  .toc { grid-column: 1 / span 4; }
}
@media (max-width: 60rem) {
  .copy { grid-column: 1 / -1; }
  .toc { display: none; }
  .page-copy { padding-block: var(--space-lg) var(--space-xl); }
}
@media (max-width: 40rem) {
  .tools { grid-template-columns: 1fr; }
  .formula { padding: var(--space-sm) var(--space-md); }
  .pair--even { column-gap: var(--space-sm); }
  .units-table :is(th, td) { padding-right: var(--space-xs); }
  .units-table td:first-child, .units-table thead th:first-child, .units-table th[scope="row"] { padding-left: var(--space-xs); }
  /* Tables in the copy: text one step smaller on a phone, so four columns fit the screen. */
  .copy .units-table { font-size: var(--text-sm); }
}
/* Under 360 px a four-column table can still be wider than the screen: it scrolls sideways instead of being cut off. */
@media (max-width: 22.4rem) { .copy .units-table { display: block; overflow-x: auto; } .copy .units-table caption { display: block; } }
