/* Peptide Reconstitution Calculator: site styles ("Clean Lab"). No external requests, system fonts only.
   Light theme only. All motion is off under prefers-reduced-motion. */
:root {
  --bg: #ffffff;
  --glass: rgba(255, 255, 255, .74);
  --surface: #ffffff;
  --surface-2: #f6fbfe;
  --ink: #14212b;
  --ink-soft: #4a5b68;
  --ink-mute: #5b6b77;
  --line: #e6eef3;
  --line-2: #d7e3ea;
  --accent: #0b6e99;
  --accent-strong: #08597c;
  --accent-ink: #ffffff;
  --accent-soft: #eaf6fc;
  --ring: #0b6e99;
  --ring-glow: rgba(42, 168, 224, .22);
  --warn: #7a4200;
  --warn-bg: #fff4e2;
  --error: #a3261b;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 20px 60px -30px rgba(20, 60, 90, .35);
  --shadow-hover: 0 14px 30px -18px rgba(20, 60, 90, .4);
  --max: 68rem;
  --measure: 45.5rem; /* 68ch at the 17px body size; rem so smaller-text blocks share the same column edge */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
  interpolate-size: allow-keywords;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font);
}

/* Drifting soft blobs behind everything (CSS only) */
.bg {
  position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 35% at 20% 20%, #d9f3ff 0, transparent 70%),
    radial-gradient(35% 30% at 80% 10%, #e3fbef 0, transparent 70%),
    radial-gradient(30% 30% at 70% 80%, #efe9ff 0, transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift { to { transform: translate(4%, 3%) scale(1.06); } }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; border-radius: 8px; }

/* Header and nav */
.site-head { background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(230, 238, 243, .8); }
.site-head .wrap { padding-top: 16px; padding-bottom: 10px; }
.site-name { font-weight: 700; font-size: 1.02rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.site-name:hover { color: var(--ink); }
.site-name .mark { width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg, #2aa8e0, #0b6e99); display: inline-block; position: relative; flex: none; }
.site-name .mark::after { content: ""; position: absolute; left: 6px; right: 6px; top: 11px; height: 2px; border-radius: 2px; background: #fff; }

/* Main column: everything is a readable measure, wide blocks opt out */
main { padding: 12px 0 48px; }
main > .wrap > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
main > .wrap > .tool, main > .wrap > .related { max-width: none; }
h1 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 2.85rem); line-height: 1.12; margin: .35em 0 .35em; letter-spacing: -.02em; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.2em 0 .6em; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; line-height: 1.35; margin: 1.5em 0 .4em; }
h4 { font-size: 1rem; margin: 1.2em 0 .3em; }
p, ul, ol, table { margin: 0 0 1em; }
main li + li { margin-top: .3em; }
p, li, dd, h1, h2, h3 { overflow-wrap: break-word; }
.cite-text { overflow-wrap: anywhere; }
.crumbs { font-size: .85rem; color: var(--ink-mute); margin-top: 18px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li { margin-top: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--ink-mute); }
.meta-line { font-size: .88rem; color: var(--ink-mute); margin-bottom: .8em; }
.draft-banner { background: var(--warn-bg); color: var(--warn); border: 1px solid #e8c48f; border-radius: var(--radius-sm); padding: 8px 14px; font-size: .9rem; margin: 12px 0; }
.lede { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.6; }
.lede p:last-child { margin-bottom: 0; }

/* Hero: centered on the homepage */
.hero { padding: 14px 0 6px; }
.type-tool .hero { text-align: center; padding: 34px 0 10px; }
.type-tool .hero .lede { max-width: 620px; margin: 0 auto; }
.type-tool .hero .draft-banner { display: inline-block; }

/* Tables: soft borders */
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.table-scroll table { margin: 0; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
caption { text-align: left; padding: 10px 12px 4px; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
tbody tr:last-child > * { border-bottom: 0; }
th + th, td + td, th + td, td + th { border-left: 1px solid var(--line); }
thead th { background: var(--surface-2); font-size: .86rem; font-weight: 650; color: var(--ink-soft); }
tbody th { font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
code, pre, textarea.code { font-family: var(--mono); font-size: .85rem; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 .3em; }

/* Glass cards */
.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin: 24px auto 28px;
}
.card h2 { margin-top: 0; }
@media (min-width: 640px) { .card { padding: 26px; } }

/* Calculator: one frosted card, form and result side by side on wide screens */
.tool {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 26px auto 40px;
  max-width: 60rem;
  display: grid;
  grid-template-columns: 1fr;
}
.tool > .card { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; box-shadow: none; margin: 0; border-radius: 0; }
.tool > .result-card { border-top: 1px solid var(--line); }
@media (min-width: 820px) {
  .tool { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .tool > .result-card { border-top: 0; border-left: 1px solid var(--line); }
  .tool > .card { padding: 30px; }
}
.calc h2, .result-title { font-size: 1.1rem; margin: 0 0 14px; letter-spacing: 0; }
.calc .field { margin: 0 0 16px; }
.calc label.field-label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 6px; }
.calc .row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.calc input[type="text"] {
  font: inherit; font-size: 1.2rem; padding: 11px 14px; flex: 1 1 8rem; min-width: 0; width: 10rem;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink);
  font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s;
}
.calc input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring-glow); }
.calc input[type="text"]:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.calc input[aria-invalid="true"] { border-color: var(--error); }
.unit-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; padding: 3px; gap: 2px; }
.unit-toggle label { padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: .95rem; position: relative; border-radius: 9px; color: var(--ink-soft); display: flex; align-items: center; transition: background .2s, color .2s; }
.unit-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.unit-toggle label:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.unit-toggle label:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 1px; }
.unit-static { align-self: center; font-weight: 600; color: var(--ink-soft); padding: 0 6px; }
.hint { font-size: .85rem; color: var(--ink-mute); margin: 6px 0 0; }
.err { color: var(--error); font-size: .9rem; margin: 6px 0 0; }
.err:empty { display: none; }
.result .big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.result .big div { background: var(--surface-2); border: 1px solid #e4f0f6; border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.result .big dt { font-size: .78rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.result .big dd { margin: 2px 0 0; font-size: clamp(1.3rem, 1rem + 1.3vw, 1.75rem); line-height: 1.25; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-height: 1.25em; overflow-wrap: anywhere; }
.result .table-scroll table { table-layout: fixed; }
.result td.num { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result th[scope="row"], .result thead th:first-child { width: 28%; }
@media (max-width: 480px) { .result th, .result td { padding: 8px 8px; font-size: .88rem; } }
#out-inputs { font-weight: 600; }
.result-card .empty { color: var(--ink-mute); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.print-only { display: none; }
@media (max-width: 380px) { .result .big { grid-template-columns: 1fr; } }

/* Buttons */
.btn { font: inherit; font-size: .9rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; display: inline-block; transition: transform .2s, box-shadow .2s, background .2s; }
.btn.ghost { background: #fff; color: var(--accent); border-color: var(--line-2); }
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(20, 60, 90, .5); border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Formula box */
.formula { background: linear-gradient(135deg, rgba(234, 246, 252, .85), rgba(240, 251, 245, .85)); }
.formula .eq { font-size: 1.2rem; font-weight: 700; font-family: var(--mono); color: var(--ink); }

/* Share, Embed, Cite, Prefer: compact pill row with small popovers */
.share-row { position: relative; margin: 6px auto 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.type-tool .share-row, .type-chart .share-row { align-items: center; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { font: inherit; font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; min-height: 38px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-soft); cursor: pointer; text-decoration: none; transition: border-color .2s, color .2s, box-shadow .2s, transform .2s; }
.pill:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 8px 18px -14px rgba(20, 60, 90, .5); transform: translateY(-1px); }
.pill[aria-expanded="true"] { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.pill.wide { padding: 7px 20px; }
.ico { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }
.share-note { margin-left: 2px; }
.pop { position: absolute; z-index: 20; top: 48px; left: 0; width: min(100%, 30rem); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px 16px 12px; text-align: left; animation: pop-in .18s ease; }
.type-tool .pop, .type-chart .pop { left: 50%; transform: translateX(-50%); }
.pop[hidden] { display: none; }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.pop-head h2 { font-size: 1rem; margin: 0; }
.pop-x { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 999px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pop-x:hover { color: var(--accent); border-color: var(--accent); }
.pop textarea.code { width: 100%; min-height: 6rem; padding: 10px; margin-top: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: var(--ink); resize: vertical; }
.pop .cite-text { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: .92rem; margin: 6px 0 0; }
.pop-actions { margin: 10px 0 0; display: flex; align-items: center; }
@keyframes pop-in { from { opacity: 0; margin-top: -4px; } to { opacity: 1; margin-top: 0; } }
.copied { font-size: .85rem; color: var(--accent); margin-left: 10px; }

/* Small helper tools inside a guide section */
.mini-tool { margin: 18px 0 22px; padding: 18px 20px; }
.mini-tool h3 { margin: 0 0 4px; font-size: 1.05rem; }
.mini-form { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 0; }
.mini-field { flex: 1 1 12rem; min-width: 0; }
.mini-field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; }
.mini-field input { font: inherit; font-size: 1.1rem; width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s; }
.mini-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring-glow); outline: 2px solid var(--ring); outline-offset: 1px; }
.mini-field input[aria-invalid="true"] { border-color: var(--error); }
.mini-out { margin: 12px 0 0; padding: 10px 14px; background: var(--surface-2); border: 1px solid #e4f0f6; border-radius: var(--radius-sm); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.mini-label { font-size: .78rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.mini-out output { font-size: 1.35rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Chart */
.chart-table th[scope="row"] { white-space: nowrap; }
.chart-note { font-size: .88rem; color: var(--ink-mute); }

/* Article sections */
main > .wrap > section:not(.card) > h2:first-child { margin-top: 1.9em; }
main > .wrap > section ul, main > .wrap > section ol { padding-left: 1.3em; }

/* FAQ: every answer visible, in soft cards */
.faq h2 { margin-bottom: .7em; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--glass); margin: 0 0 10px; padding: 14px 18px 4px; transition: box-shadow .25s, border-color .25s; }
.faq-item:hover { border-color: var(--line-2); box-shadow: var(--shadow-hover); }
.faq-item h3 { margin: 0 0 6px; font-size: 1.02rem; }
.faq-a p { margin: 0 0 .7em; }

/* Sources */
.sources { border-top: 1px solid var(--line); margin-top: 2.4em; }
.sources h2 { font-size: 1.1rem; margin-top: 1.4em; }
.sources ol { padding-left: 1.4em; font-size: .9rem; color: var(--ink-soft); }
.sources li { overflow-wrap: anywhere; }
.sources li::marker { color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* More guides: card grid with hover lift */
.related { margin-top: 3em; }
.related h2 { text-align: center; }
.related ul.guides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 14px; }
.related li { margin: 0; }
.g { display: block; height: 100%; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .25s, box-shadow .25s, border-color .25s; }
.g:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--line-2); color: var(--ink); }
.g:focus-visible { outline-offset: 3px; border-radius: 16px; }
.g b { display: block; font-size: 1rem; line-height: 1.35; margin-bottom: 6px; }
.g span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .85rem; color: var(--ink-mute); line-height: 1.5; }
.official { border-left: 4px solid var(--accent); }

/* Scroll reveal: only armed by site.js, so content shows without JavaScript */
.reveal-on .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal-on .reveal.in { opacity: 1; transform: none; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: rgba(255, 255, 255, .6); font-size: .88rem; color: var(--ink-mute); padding: 26px 0 34px; text-align: center; }
.site-foot p { margin: 0 0 .5em; }
.site-foot ul { list-style: none; padding: 0; margin: 0 0 .6em; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.site-foot li + li { margin-top: 0; }
.site-foot a { color: var(--ink-soft); }

/* Embed page: same calculator look, compact */
body.embed { background: var(--bg); font-size: 16px; }
body.embed main { padding: 10px 0; }
body.embed .wrap { padding: 0 10px; }
body.embed main > .wrap > * { max-width: none; }
body.embed .tool { margin: 0; max-width: none; box-shadow: 0 12px 34px -26px rgba(20, 60, 90, .45); border-radius: 18px; }
body.embed .tool > .card { padding: 18px; }
@media (min-width: 560px) { body.embed .tool { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } body.embed .tool > .result-card { border-top: 0; border-left: 1px solid var(--line); } }
.embed-foot { font-size: .8rem; color: var(--ink-mute); margin: 10px 4px 0; text-align: center; }

@media (max-width: 420px) {
  body { font-size: 16px; }
  .card { padding: 18px; border-radius: 20px; }
  .tool { border-radius: 20px; }
  .tool > .card { padding: 18px; }
}

/* Floating logo layer: decorative copies of the vial badge behind all content. Fixed, so no layout shift and no
   horizontal scroll. Positions and timing by :nth-child. Motion stops under reduced motion; hidden in print. */
.floaters { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.floaters i {
  position: absolute; display: block;
  background: url("/assets/logo.svg") center / contain no-repeat;
  transform: rotate(var(--r, 0deg));
  animation: float-logo 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes float-logo {
  0%   { transform: translate(0, 0) rotate(var(--r, 0deg)); }
  50%  { transform: translate(10px, -18px) rotate(calc(var(--r, 0deg) + 6deg)); }
  100% { transform: translate(-8px, 12px) rotate(calc(var(--r, 0deg) - 5deg)); }
}
.floaters i:nth-child(1) { left: 4%; top: 8%; width: 64px; height: 64px; opacity: 0.1; --r: -8deg; animation-duration: 19s; animation-delay: 0s; }
.floaters i:nth-child(2) { left: 22%; top: 30%; width: 34px; height: 34px; opacity: 0.08; --r: 10deg; animation-duration: 23s; animation-delay: -4s; }
.floaters i:nth-child(3) { left: 38%; top: 6%; width: 48px; height: 48px; opacity: 0.09; --r: -4deg; animation-duration: 17s; animation-delay: -9s; }
.floaters i:nth-child(4) { left: 57%; top: 22%; width: 90px; height: 90px; opacity: 0.07; --r: 6deg; animation-duration: 27s; animation-delay: -2s; }
.floaters i:nth-child(5) { left: 78%; top: 9%; width: 40px; height: 40px; opacity: 0.1; --r: -10deg; animation-duration: 21s; animation-delay: -12s; }
.floaters i:nth-child(6) { left: 90%; top: 34%; width: 58px; height: 58px; opacity: 0.08; --r: 8deg; animation-duration: 25s; animation-delay: -6s; }
.floaters i:nth-child(7) { left: 8%; top: 52%; width: 80px; height: 80px; opacity: 0.07; --r: 5deg; animation-duration: 29s; animation-delay: -15s; }
.floaters i:nth-child(8) { left: 30%; top: 68%; width: 30px; height: 30px; opacity: 0.11; --r: -12deg; animation-duration: 18s; animation-delay: -3s; }
.floaters i:nth-child(9) { left: 50%; top: 48%; width: 44px; height: 44px; opacity: 0.08; --r: 9deg; animation-duration: 24s; animation-delay: -10s; }
.floaters i:nth-child(10) { left: 70%; top: 62%; width: 72px; height: 72px; opacity: 0.07; --r: -6deg; animation-duration: 26s; animation-delay: -7s; }
.floaters i:nth-child(11) { left: 86%; top: 76%; width: 36px; height: 36px; opacity: 0.1; --r: 12deg; animation-duration: 20s; animation-delay: -14s; }
.floaters i:nth-child(12) { left: 16%; top: 86%; width: 52px; height: 52px; opacity: 0.09; --r: -8deg; animation-duration: 22s; animation-delay: -5s; }
.floaters i:nth-child(13) { left: 46%; top: 88%; width: 28px; height: 28px; opacity: 0.12; --r: 7deg; animation-duration: 19s; animation-delay: -11s; }
.floaters i:nth-child(14) { left: 64%; top: 94%; width: 60px; height: 60px; opacity: 0.08; --r: -5deg; animation-duration: 28s; animation-delay: -1s; }
@media (max-width: 640px) {
  .floaters i:nth-child(n+9) { display: none; }
  .floaters i { max-width: 56px; max-height: 56px; }
}

/* U-100 syringe: units to mL (volume only) */
.u100 { max-width: var(--measure); }
.u100 .unit-toggle { flex-wrap: wrap; }
.u100-size { margin: 12px 0 0; }
.u100-size .field-label { font-weight: 600; font-size: .88rem; display: block; margin-bottom: 5px; }
.u100-pic { margin: 14px 0 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 6px; }
.u100-pic svg { display: block; width: 100%; height: auto; }
.u100-text { margin: 10px 0 0; font-weight: 600; }
.syr-glass { fill: #f4fafd; stroke: #8fb3c7; stroke-width: 2; }
.syr-fill { fill: #7fd3ee; opacity: .75; }
.syr-tick { stroke: #3d5464; stroke-width: 1; }
.syr-tick.major { stroke-width: 1.6; }
.syr-num { font: 600 15px var(--font); fill: #2c3e4b; text-anchor: middle; }
.syr-ml { font: 13px var(--font); fill: #4a5b68; text-anchor: middle; }
.syr-cap { font: 600 12px var(--font); fill: #4a5b68; }
.syr-needle { stroke: #9aa9b3; stroke-width: 2; }
.syr-hub { fill: #d3dee5; stroke: #8fb3c7; stroke-width: 1.5; }
.syr-stopper { fill: #2f4250; }
.syr-rod { fill: #c7d4dc; stroke: #93a6b2; stroke-width: 1.2; }
.syr-flange { fill: #dfe8ee; stroke: #8fb3c7; stroke-width: 1.5; }

/* Reduced motion: no drift, no count-up (handled in calc.js), no reveal, no hover lift */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .bg, .floaters i { animation: none; }
  .reveal-on .reveal { opacity: 1; transform: none; }
  .g:hover, .btn:not(:disabled):hover, .pill:hover { transform: none; }
}

/* Print */
@media print {
  :root { --bg: #fff; --surface: #fff; --glass: #fff; --ink: #000; --ink-soft: #333; --ink-mute: #333; --line: #999; --line-2: #999; --accent: #000; --accent-soft: #fff; --shadow: none; }
  body { font-size: 11pt; }
  .bg, .floaters, .site-head .nav, .skip, .share-row, .mini-form, .result-actions, .no-print, .draft-banner, .related { display: none !important; }
  .card, .tool { backdrop-filter: none; box-shadow: none; }
  a { color: #000; text-decoration: none; }
  .print-only { display: block; }
  .reveal-on .reveal { opacity: 1 !important; transform: none !important; }
  html.print-card body > *:not(main) { display: none !important; }
  html.print-card main > .wrap > *:not(.tool) { display: none !important; }
  html.print-card .tool > *:not(.result-card) { display: none !important; }
  .tool { display: block; border: 0; }
  .card { border: 1px solid #999; break-inside: avoid; }
  .chart-table { font-size: 9.5pt; }
}

.site-name{display:inline-flex;align-items:center;gap:10px}.site-name .logo{width:36px;height:36px;flex:none;display:block}

/* On this page index */
html { scroll-behavior: smooth; }
section[id], h2[id], #calc { scroll-margin-top: 16px; }
.toc { max-width: 68ch; margin: 18px auto 8px; padding: 14px 18px; border: 1px solid #e6eef3; border-radius: 16px; background: rgba(255,255,255,.75); backdrop-filter: blur(10px); }
.toc-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #5b6b77; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.toc a { display: inline-block; font-size: 13.5px; line-height: 1.3; padding: 6px 11px; border-radius: 999px; border: 1px solid #d7e3ea; background: #fff; color: #0b6e99; text-decoration: none; transition: border-color .2s, transform .2s; }
.toc a:hover, .toc a:focus-visible { border-color: #2aa8e0; transform: translateY(-1px); }
@media print { .toc { display: none; } }
.toc li, .toc li + li { margin: 0; padding: 0; }
.toc ol { align-items: center; gap: 6px; }
.toc { padding: 12px 16px; }
.toc a { font-size: 13px; padding: 5px 10px; }

/* Clean header nav (2026-10-04) */
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.nav { display: flex; align-items: center; gap: 4px; margin: 0; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: .92rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; background: none; border: 0; cursor: pointer; list-style: none; transition: background .2s, color .2s; }
.nav-link::-webkit-details-marker { display: none; }
.nav-link:hover, .nav-link:focus-visible { background: rgba(42,168,224,.10); color: var(--ink); }
.nav-link[aria-current="page"], .nav-link.is-current { color: var(--accent); font-weight: 600; }
.nav-menu { position: relative; }
.nav-menu > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.nav-menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.nav-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 250px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid #e6eef3; border-radius: 14px; box-shadow: 0 18px 40px -20px rgba(20,60,90,.35); }
.nav-panel li, .nav-panel li + li { margin: 0; }
.nav-panel a { display: block; padding: 9px 12px; border-radius: 9px; font-size: .92rem; color: var(--ink); text-decoration: none; }
.nav-panel a:hover, .nav-panel a:focus-visible { background: rgba(42,168,224,.10); }
.nav-panel a[aria-current="page"] { background: var(--accent-soft); font-weight: 600; }
@media (max-width: 640px) {
  .site-head .wrap { flex-wrap: wrap; gap: 6px; }
  .nav { width: 100%; justify-content: space-between; }
  .nav-link { padding: 7px 9px; font-size: .88rem; }
  .nav-menu { position: static; }
  .nav-panel { left: 16px; right: 16px; min-width: 0; }
}

/* Header layering and focus (2026-10-04): the header blur makes its own stacking context, so lift the whole
   header above the frosted cards and the floating vials, or the Guides panel is painted over. */
.site-head { position: relative; z-index: 50; }
.nav-panel { z-index: 60; max-height: calc(100vh - 90px); overflow-y: auto; }
.nav-menu > summary:focus:not(:focus-visible), .nav-menu > summary.by-pointer:focus-visible { outline: none; }
.nav-menu > summary.by-pointer:focus-visible:not(:hover) { background: none; }

/* Mobile pass (2026-10-04): tap targets, type floor, tables, index, popovers, motion */
h2 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.45rem); }
.result .big dt, .mini-label { font-size: max(.78rem, 13px); }
.embed-foot { font-size: max(.8rem, 13px); }
.pill { min-height: 44px; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.pop-x { width: 44px; height: 44px; }
.unit-toggle label { min-height: 44px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; }
.site-name { min-height: 44px; }
.nav-link { min-height: 44px; }
.nav-panel a { display: flex; align-items: center; min-height: 44px; }
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs { margin-top: 6px; }
.crumbs li + li::before { align-self: center; }
.crumbs li { display: flex; align-items: center; }
.site-foot ul { gap: 0 16px; }

/* Wide tables scroll inside their box: edge shadows show there is more, first column stays put */
.table-scroll {
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255, 255, 255, 0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(255, 255, 255, 0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(20, 60, 90, .18), rgba(20, 60, 90, 0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(20, 60, 90, .18), rgba(20, 60, 90, 0)) right center / 14px 100% no-repeat scroll,
    var(--surface);
}
.table-scroll table { background: transparent; }

@media (max-width: 640px) {
  /* Header: brand row, then the four links spread across one row */
  .site-head .wrap { padding-top: 6px; padding-bottom: 2px; gap: 0; }
  .site-name { font-size: 1rem; gap: 8px; max-width: 100%; min-width: 0; }
  .site-name .logo { width: 32px; height: 32px; }
  .site-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; }
  .nav { width: 100%; justify-content: space-between; gap: 0; margin: 0 -8px; width: calc(100% + 16px); }
  .nav-link { padding: 0 8px; font-size: .9rem; }
  .nav-panel { left: 12px; right: 12px; top: 100%; padding: 6px; max-height: calc(100vh - 110px); }
  .nav-panel a { font-size: 1rem; }

  /* Hero: shorter so the calculator starts in the first screen */
  .type-tool .hero { padding: 6px 0 0; }
  .hero { padding: 4px 0 0; }
  h1 { font-size: clamp(1.6rem, 1.1rem + 2.6vw, 2.2rem); margin: .3em 0 .3em; }
  .lede { font-size: 1rem; line-height: 1.55; }
  .meta-line { margin-bottom: .4em; }
  .tool { margin: 14px auto 28px; }
  .card { margin: 18px auto 22px; }
  .calc .field { margin-bottom: 12px; }
  .result .big dd { font-size: 1.3rem; }

  /* On this page: one swipeable row of pills, fading at the right edge */
  .toc { padding: 10px 0 4px 12px; margin: 14px auto 6px; }
  .toc-title { margin: 0 0 4px; font-size: 13px; }
  .toc ol { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 0 28px 8px 0; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent);
    scrollbar-width: none; }
  .toc ol::-webkit-scrollbar { display: none; }
  .toc li { flex: none; scroll-snap-align: start; }
  .toc a { white-space: nowrap; font-size: 14px; padding: 0 12px; }

  /* Wide tables: sticky first column */
  .table-scroll tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
  .table-scroll thead tr > :first-child { background: var(--surface-2); white-space: normal; }
  .table-scroll td.num, .chart-table thead th { white-space: nowrap; }
  .result .table-scroll td.num { white-space: normal; }
  .table-scroll table:not(.chart-table) th, .table-scroll table:not(.chart-table) td { min-width: 8rem; font-size: .9rem; padding: 8px 10px; }
  .result .table-scroll th, .result .table-scroll td { min-width: 0 !important; }
  .chart-table th[scope="row"] { white-space: normal; min-width: 6.5rem; }

  /* Embed and Cite: bottom sheet */
  .pop, .type-tool .pop, .type-chart .pop {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; transform: none;
    max-height: 82vh; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 18px 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 50px -20px rgba(20, 60, 90, .45); animation: sheet-in .2s ease;
  }
  .pop textarea.code { font-size: 16px; min-height: 7.5rem; }
  .pills { justify-content: center; }

  /* Syringe size choices: equal cells, never a ragged wrap */
  .u100 .unit-toggle { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.4rem, 1fr)); width: 100%; }
  .u100 .unit-toggle label { justify-content: center; text-align: center; padding: 6px 8px; font-size: .9rem; line-height: 1.25; }
  .mini-tool { padding: 16px; }

  /* Lighter background on phones: no blob drift behind the blur, fewer and smaller vials */
  .bg { animation: none; will-change: auto; }
  .floaters i:nth-child(n+6) { display: none; }
  .floaters i { max-width: 40px; max-height: 40px; }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 480px) {
  .result .big { grid-template-columns: 1fr; gap: 8px; }
  .result .big div { padding: 10px 14px; }
  .formula .eq { font-size: 1.05rem; }
}
.u100-pic svg.narrow .syr-num { font-size: 24px; }
.u100-pic svg.narrow .syr-ml { font-size: 21px; }
.u100-pic svg.narrow .syr-cap { font-size: 19px; }
.u100-pic svg.narrow .syr-tick { stroke-width: 1.4; }
.u100-pic svg.narrow .syr-tick.major { stroke-width: 2.2; }
.site-foot a, .crumbs a { min-width: 44px; justify-content: center; }
.pop textarea.code { font-size: max(16px, .85rem); }

/* One column edge for every block on content pages (Ken 2026-10-04) */
body:not(.embed) main > .wrap > .tool { max-width: var(--measure); }
body:not(.embed) .tool .calc, body:not(.embed) .tool > * { max-width: none; }
.toc { max-width: var(--measure); }

/* Compact calculator card (Ken 2026-10-04): less vertical space, same tap sizes */
@media (min-width: 720px) {
  body:not(.embed) .tool > .card { padding: 22px 24px; }
}
.calc h2, .result-title { font-size: 1.02rem; margin: 0 0 10px; }
.calc .field { margin: 0 0 12px; }
.calc label.field-label { font-size: .86rem; margin-bottom: 4px; }
.calc input[type="text"] { min-height: 44px; padding-top: 8px; padding-bottom: 8px; font-size: 16px; }
.unit-toggle label { padding: 5px 12px; }
.calc .hint { font-size: .8rem; margin-top: 4px; line-height: 1.4; }
.calc .hint.free { margin-top: 2px; color: var(--accent); font-weight: 600; }
.result-card .empty { font-size: .95rem; line-height: 1.5; margin: 0; }
