/*
Theme Name: molecalc
Description: The reagent bench: a periodic-table field and a reagent-label result card, for molecalculator.com (molecalc-2026-11-08). Every calculator shows its formula, constants and a worked example. No ads, no ad slots.
Version: 1.0.0
*/
@font-face { font-family: "Geologica"; src: url(assets/fonts/geologica-var.woff2) format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Spline Sans Mono"; src: url(assets/fonts/spline-sans-mono-var.woff2) format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

/* ---------------------------------------------------------------- tokens */
:root {
  --bg: #edf2f1;          /* bench: cool lab white */
  --paper: #f6f9f8;
  --card: #ffffff;
  --surface: #e1e9e8;
  --line: #c3d0cf;
  --line-2: #dbe4e3;
  --ink: #0f1f27;
  --ink-2: #283a42;
  --muted: #475960;
  --accent: #0b5f7a;      /* copper-sulfate teal: links, buttons, the label band */
  --accent-2: #084a60;
  --accent-soft: #d6eaf0;
  --on-accent: #ffffff;
  --signal: #ad1f66;      /* phenolphthalein magenta: the answer rule, lit elements, errors */
  --signal-soft: #f8dcea;
  --tile: #fbfdfd;
  --tile-line: #b4c4c6;
  --field: rgba(11, 95, 122, .075);
  --ink-band: #0d2730;
  --on-band: #e8f2f4;
  --on-band-2: #a9c3ca;
  --shadow: 0 1px 0 rgba(15, 31, 39, .05), 0 14px 32px -20px rgba(15, 31, 39, .45);
  --r: 10px;
  --r-s: 6px;
  --font: "Geologica", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b151a; --paper: #0f1c22; --card: #13232a; --surface: #1a2d35; --line: #2d454e; --line-2: #213740;
    --ink: #e5eef0; --ink-2: #c2d1d5; --muted: #9cb0b6; --accent: #5cc3df; --accent-2: #8ad5ea; --accent-soft: #123a47; --on-accent: #062029;
    --signal: #ff80b8; --signal-soft: #3c1729; --tile: #12212800; --tile-line: #2f4952; --field: rgba(92, 195, 223, .06);
    --ink-band: #08181e; --on-band: #e5eef0; --on-band-2: #9cb6bd; --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 34px -22px rgba(0, 0, 0, .9); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b151a; --paper: #0f1c22; --card: #13232a; --surface: #1a2d35; --line: #2d454e; --line-2: #213740;
  --ink: #e5eef0; --ink-2: #c2d1d5; --muted: #9cb0b6; --accent: #5cc3df; --accent-2: #8ad5ea; --accent-soft: #123a47; --on-accent: #062029;
  --signal: #ff80b8; --signal-soft: #3c1729; --tile: #12212800; --tile-line: #2f4952; --field: rgba(92, 195, 223, .06);
  --ink-band: #08181e; --on-band: #e5eef0; --on-band-2: #9cb6bd; --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 34px -22px rgba(0, 0, 0, .9); color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); font-optical-sizing: auto; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--font); line-height: 1.18; letter-spacing: -.012em; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4.2vw, 50px); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: clamp(22px, 2.3vw, 28px); font-weight: 650; }
h3 { font-size: 19px; font-weight: 620; }
p { margin: 0 0 1em; }
sub, sup { font-size: .7em; line-height: 0; }
.mono, code, pre, output { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: .9em; background: var(--surface); padding: .05em .35em; border-radius: 4px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: var(--r-s); }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- buttons + controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r-s); border: 1.5px solid transparent;
  font: 600 16px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-2); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.ctl { position: relative; display: flex; align-items: stretch; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-s); min-height: 48px; }
.ctl:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ctl input, .ctl select, .ctl textarea { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); font: 500 17px/1.3 var(--mono); padding: 11px 12px; outline: none; }
.ctl select { font-family: var(--font); appearance: auto; }
.ctl textarea { resize: vertical; }
.ctl .unit, .ctl .pre { display: flex; align-items: center; padding: 0 12px; font: 500 14px/1 var(--mono); color: var(--muted); background: var(--surface); border-left: 1px solid var(--line); border-radius: 0 var(--r-s) var(--r-s) 0; white-space: nowrap; }
.ctl .pre { border-left: 0; border-right: 1px solid var(--line); border-radius: var(--r-s) 0 0 var(--r-s); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .filter > label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field.invalid .ctl { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.err { margin: 0; font-size: 14px; color: var(--signal); font-weight: 500; }
.hint { margin: 0; font-size: 13.5px; color: var(--muted); }
.cta { font-weight: 600; text-decoration: none; white-space: nowrap; }
.cta:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- element tile (section marks) */
.etile { display: inline-grid; grid-template-rows: auto 1fr; flex: 0 0 auto; background: var(--card); border: 1.5px solid var(--accent); border-radius: 5px; color: var(--accent); line-height: 1;
  box-shadow: 2px 2px 0 var(--accent-soft); }
.etile-z { font: 600 10px/1 var(--mono); padding: 4px 0 0 5px; color: var(--signal); }
.etile-s { display: flex; align-items: center; justify-content: center; min-width: 42px; font: 700 17px/1 var(--font); letter-spacing: -.02em; padding: 0 4px 6px; }
.etile--m { width: 52px; height: 52px; }
.etile--l { width: 64px; height: 64px; }
.etile--l .etile-s { font-size: 22px; }
.etile--l .etile-z { font-size: 11.5px; }
.etile--s { width: 34px; height: 34px; box-shadow: none; border-width: 1px; }
.etile--s .etile-z { font-size: 8px; padding: 3px 0 0 3px; }
.etile--s .etile-s { font-size: 12px; min-width: 0; padding: 0 2px 4px; }

/* ---------------------------------------------------------------- header */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.head-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: 0 0 auto; }
.brand:hover { color: var(--ink); }
.brand .mark { display: block; }
.wordmark { font: 700 22px/1 var(--font); letter-spacing: -.03em; }
.wordmark span { font: 500 19px/1 var(--mono); letter-spacing: -.02em; color: var(--accent); margin-left: 1px; }
.head-search { flex: 1 1 auto; max-width: 460px; margin-left: auto; }
.head-search .search-row .ctl { min-height: 42px; }
.head-search .btn { min-height: 42px; padding: 0 14px; font-size: 15px; }
.head-tools { display: flex; align-items: center; gap: 6px; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); cursor: pointer; font: 600 15px/1 var(--font); }
.tool-btn:hover { background: var(--surface); color: var(--ink); }
.search-toggle, .menu-toggle { display: none; }
.main-nav { background: var(--paper); border-top: 1px solid var(--line-2); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 4px; color: var(--ink-2); text-decoration: none; font-size: 15.5px; font-weight: 520;
  border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--accent); }
.main-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--signal); font-weight: 620; }
.nav-z { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid var(--tile-line); border-radius: 3px; font-size: 11px; color: var(--muted); }
.main-nav a[aria-current="page"] .nav-z { border-color: var(--signal); color: var(--signal); }

/* ---------------------------------------------------------------- search + suggestions */
.search { position: relative; }
.search > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.search-row { display: flex; gap: 8px; }
.search-row .ctl { flex: 1; min-width: 0; }
.search-big .ctl { min-height: 56px; }
.search-big .ctl input { font-family: var(--font); font-size: 18px; }
.search-big .btn { min-height: 56px; padding: 0 24px; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: var(--shadow);
  max-height: 360px; overflow: auto; padding: 6px; }
.sugg a { display: block; padding: 10px 12px; border-radius: 4px; text-decoration: none; color: var(--ink); }
.sugg a:hover, .sugg a[aria-selected="true"] { background: var(--accent-soft); color: var(--ink); }
.sugg p { margin: 8px 12px; color: var(--muted); font-size: 15px; }
.sugg .s-all { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line-2); margin-top: 4px; }

/* ---------------------------------------------------------------- the periodic table */
.ptable { display: grid; grid-template-columns: repeat(18, 1fr); grid-template-rows: repeat(7, auto) var(--fgap, 10px) repeat(2, auto); gap: 3px; }
.pt-el { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid var(--tile-line); border-radius: 3px; background: var(--tile);
  color: var(--muted); line-height: 1; min-width: 0; }
.pt-el b { font: 600 1em/1 var(--font); }
/* band: the decorative field behind the home hero */
.bench { position: relative; overflow: hidden; background:
  radial-gradient(1200px 520px at 18% 30%, var(--bg) 35%, transparent 75%), var(--bg); }
.bench-field { position: absolute; inset: 0; pointer-events: none; display: flex; justify-content: center; padding: 22px 12px 0; }
.ptable-band { width: max(1280px, 100%); gap: 6px; opacity: .8; mask-image: linear-gradient(90deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 35%, rgba(0,0,0,.9) 70%); -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 35%, rgba(0,0,0,.9) 70%); }
.ptable-band .pt-el { border-color: var(--line); background: var(--field); color: var(--line); font-size: 15px; border-radius: 6px; }
.ptable-band .pt-el b { font-weight: 500; }
/* mini: inside the reagent label */
.ptable-mini { width: 100%; max-width: 230px; gap: 1.5px; --fgap: 4px; }
.ptable-mini .pt-el { border-radius: 1.5px; border-color: var(--line-2); background: var(--surface); }
.ptable-mini .pt-el b { display: none; }
.ptable-mini .pt-el.nw { background: transparent; }
.ptable-mini .pt-el.on { background: var(--signal); border-color: var(--signal); }
/* full: the lookup page */
.pt-wrap { overflow-x: auto; padding-bottom: 6px; }
.ptable-full { min-width: 940px; gap: 4px; }
.ptable-full .pt-el { text-decoration: none; color: var(--ink); background: var(--card); padding: 3px 2px; justify-content: space-between; border-color: var(--line); aspect-ratio: .86; }
.ptable-full .pt-el:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--ink); }
.ptable-full .pt-el .z { align-self: flex-start; font: 500 10px/1 var(--mono); color: var(--muted); padding-left: 2px; }
.ptable-full .pt-el b { font-size: 19px; font-weight: 650; }
.ptable-full .pt-el .w { font: 500 9.5px/1 var(--mono); color: var(--muted); }
.ptable-full .pt-el.nw { background: var(--surface); }
.ptable-full .pt-el.nw b { color: var(--muted); font-weight: 500; }
.pt-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--muted); margin: 12px 0 28px; }
.pt-k { display: inline-block; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 3px; background: var(--card); vertical-align: middle; }
.pt-k-n { background: var(--surface); margin-left: 12px; }

/* ---------------------------------------------------------------- home hero: the bench */
.hero-row { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; padding-top: 44px; padding-bottom: 52px; }
.hero-copy { padding-top: 18px; }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 14.5px; font-weight: 520; color: var(--ink-2); }
.hero-copy h1 { max-width: 13ch; margin-bottom: 16px; }
.lede { font-size: 18.5px; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.hero-tool .mm { display: contents; }
.hero-row { grid-template-areas: "copy label" "form label"; grid-template-rows: auto 1fr; row-gap: 0; }
.hero-copy { grid-area: copy; }
.hero-tool { display: contents; }
.mm-form { grid-area: form; align-self: start; }
.label-card { grid-area: label; }
.mm-field label { font-size: 15px; font-weight: 650; color: var(--ink); }
.mm-row { display: flex; gap: 8px; }
.mm-row .ctl { flex: 1; min-width: 0; min-height: 60px; border-width: 2px; border-color: var(--ink-2); }
.mm-row .ctl input { font: 600 23px/1.2 var(--mono); letter-spacing: .01em; padding: 12px 14px; }
.mm-row .btn { min-height: 60px; padding: 0 26px; font-size: 17px; }
.mm-field .hint { margin-top: 2px; }
.mm-picks { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mm-picks button { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); color: var(--ink); cursor: pointer;
  font: 500 15px/1 var(--mono); }
.mm-picks button:hover { border-color: var(--accent); color: var(--accent); }
/* the reagent label */
.label-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.label-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--accent) 0 18px, transparent 18px 24px); opacity: .55; }
.lc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 22px; background: var(--accent); color: var(--on-accent); }
.lc-k { font: 650 12.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.lc-f { font: 600 21px/1.1 var(--mono); overflow-wrap: anywhere; text-align: right; }
.lc-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 22px 8px; }
.lc-answer, .calc-answer { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.calc-k { font-size: 15px; font-weight: 650; color: var(--muted); letter-spacing: .01em; }
.calc-v { font: 600 clamp(44px, 6vw, 72px)/1.02 var(--mono); letter-spacing: -.035em; color: var(--ink); overflow-wrap: anywhere; }
.calc-v output { border-bottom: 4px solid var(--signal); padding-bottom: 2px; }
.calc-u { font: 500 .36em/1 var(--mono); letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.calc-pre { font-size: .55em; vertical-align: .55em; margin-right: 2px; color: var(--muted); }
.lc-pt { margin: 0; width: 230px; }
.lc-answer .calc-v { white-space: nowrap; font-size: clamp(40px, 5vw, 64px); }
.lc-pt figcaption { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.lc-bar { display: flex; height: 26px; margin: 12px 22px 4px; border-radius: 4px; overflow: hidden; background: var(--surface); }
.lc-bar .seg { display: flex; align-items: center; justify-content: center; min-width: 2px; border-right: 2px solid var(--card); font: 600 12.5px/1 var(--mono); color: #fff; }
.lc-bar .seg:last-child { border-right: 0; }
.seg.s0 { background: var(--accent); } .seg.s1 { background: var(--signal); } .seg.s2 { background: #4f8396; }
.seg.s3 { background: #8a4f6c; } .seg.s4 { background: #6d7f86; } .seg.s5 { background: #3f5058; }
:root[data-theme="dark"] .lc-bar .seg { color: #06171d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lc-bar .seg { color: #06171d; } }
.lc-bar .seg.s2, .lc-bar .seg.s3, .lc-bar .seg.s4, .lc-bar .seg.s5 { color: #fff; }
.label-card .tablewrap { margin: 8px 22px 0; }
.lc-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.lc-table th, .lc-table td { padding: 8px 8px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: baseline; }
.lc-table thead th { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--line); }
.lc-table .r, .list .r { text-align: right; }
.lc-table tbody th { font-weight: 500; white-space: nowrap; }
.sym { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 4px; border: 1.5px solid var(--accent); border-radius: 4px; color: var(--accent); font-weight: 650; font-size: 14px; }
.el-n { color: var(--muted); font-size: 14px; margin-left: 4px; }
.mm-empty { color: var(--muted); font-style: italic; }
.lc-conv { margin: 14px 22px 0; padding: 14px 0 6px; border-top: 1px dashed var(--line); }
.mm-conv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lc-out { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.lc-out output { font-weight: 650; color: var(--ink); }
.lc-foot { margin: 6px 22px 20px; font-size: 13px; color: var(--muted); }
.mm.is-err .calc-v output { border-bottom-color: var(--line); color: var(--muted); }

/* ---------------------------------------------------------------- bands + home sections */
.band { padding: 56px 0; }
.band-shelf { background: var(--paper); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sec-head h2 { margin: 0; }
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sec { position: relative; display: flex; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sec:hover { border-color: var(--accent); }
.sec-in { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 14px; min-width: 0; flex: 1; }
.sec-top { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.sec-h { margin: 0; font-size: 19px; font-weight: 650; }
.sec-h a { color: var(--ink); text-decoration: none; }
.sec-h a::after { content: ""; position: absolute; inset: 0; }
.sec-h a:hover { color: var(--accent); }
.sec-glyph { margin: 2px 0 0; font-size: 14px; color: var(--accent); background: var(--field); border-radius: 4px; padding: 5px 8px; align-self: flex-start; max-width: 100%; overflow-wrap: anywhere; }
.sec-d { margin: 0; font-size: 15px; color: var(--ink-2); }
.sec-s { list-style: none; margin: 6px 0 0; padding: 0; position: relative; z-index: 1; }
.sec-s li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; }
.sec-s a { color: var(--ink); text-decoration: none; }
.sec-s a:hover { color: var(--accent); text-decoration: underline; }
.sec-s .mono { color: var(--muted); white-space: nowrap; font-size: 13.5px; }
.sec-n { display: flex; justify-content: space-between; align-items: center; margin: auto 0 0; padding-top: 10px; font-size: 14px; color: var(--muted); position: relative; z-index: 1; }
.sec-wide { flex-direction: column; }
.sec-img { width: 100%; height: 150px; object-fit: cover; object-position: center; display: block; border-bottom: 1px solid var(--line); }
.sec-slim .sec-s li:nth-child(n+2) { display: none; }
.shelf:not(.shelf-home) .sec-slim .sec-s li:nth-child(n+2) { display: flex; }
.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; }
.ranked { list-style: none; margin: 0; padding: 0; counter-reset: rk; }
.ranked li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rk { color: var(--signal); font-size: 14px; font-weight: 600; }
.rk-t a { font-weight: 560; color: var(--ink); text-decoration: none; }
.rk-t a:hover { color: var(--accent); text-decoration: underline; }
.rk-c { display: block; font-size: 13.5px; color: var(--muted); }
.rk-n { font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.newest h2 { font-size: 20px; }
.newest ul { list-style: none; margin: 0 0 22px; padding: 0; }
.newest li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.newest li a { color: var(--ink); text-decoration: none; font-weight: 520; }
.newest li a:hover { color: var(--accent); text-decoration: underline; }
.newest time { font-size: 13px; color: var(--muted); }
.pt-promo { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); text-decoration: none; }
.pt-promo:hover { border-color: var(--accent); color: var(--ink); }
.pt-promo strong { font-size: 17px; }
.pt-promo > span:last-child { font-size: 14.5px; color: var(--muted); }
.pt-mini { display: flex; gap: 5px; margin-bottom: 6px; }
.pt-mini span { display: inline-flex; flex-direction: column; justify-content: space-between; width: 42px; height: 46px; padding: 4px 5px; border: 1.5px solid var(--accent); border-radius: 4px; font: 500 10px/1 var(--mono); color: var(--signal); }
.pt-mini b { font: 700 18px/1 var(--font); color: var(--accent); text-align: center; }
.band-ink { background: var(--ink-band); color: var(--on-band); }
.band-ink h2 { color: var(--on-band); }
.band-ink .cta { color: #8fd8ec; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.18); }
.steps li { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 6px 0; margin-right: 22px; border-right: 1px solid rgba(255,255,255,.12); }
.steps li:last-child { border-right: 0; margin-right: 0; }
.steps .mono { color: #ff9cc8; font-size: 13px; }
.steps strong { font-size: 17px; }
.steps span:last-child { color: var(--on-band-2); font-size: 15px; }

/* ---------------------------------------------------------------- footer */
.site-foot { background: var(--card); border-top: 1px solid var(--line); padding: 44px 0 0; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-brand p { color: var(--muted); font-size: 15px; margin: 12px 0 0; max-width: 34ch; }
.foot-col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; margin-bottom: 10px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.foot-col li a:hover { color: var(--accent); text-decoration: underline; }
.foot-base { margin-top: 32px; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line-2); }
.foot-base p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- breadcrumbs + entry */
.page-pad { padding-top: 22px; padding-bottom: 64px; }
.crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: 14px; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--line); margin-right: 6px; }
.crumbs a, .crumbs span { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted); }
.crumbs a { color: var(--accent); }
.crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; }
.sec-tab { margin: 0 0 12px; }
.sec-tab a, .sec-tab { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.sec-tab a:hover { color: var(--accent); }
.entry-head h1 { max-width: 28ch; font-size: clamp(28px, 3.3vw, 40px); }
.meta { color: var(--muted); font-size: 14.5px; }
.entry-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; align-items: start; margin-top: 12px; }
.calc-col { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.entry { min-width: 0; }
.entry-body { font-size: 17.5px; }
.entry-body h2 { margin-top: 1.5em; font-size: 24px; }
.entry-body h3 { margin-top: 1.2em; }
.entry-body ul, .entry-body ol { padding-left: 1.3em; }
.entry-body li { margin-bottom: .35em; }
.entry-body table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.entry-body th, .entry-body td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.entry-guide { max-width: 760px; }
/* the calculator card: a reagent label too */
.icard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.calc { display: flex; flex-direction: column; }
.calc-display { padding: 20px 22px 16px; border-top: 8px solid var(--accent); }
.icard .calc-v { font-size: clamp(46px, 5.4vw, 64px); }
.calc-msg { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--signal-soft); color: var(--ink); font-size: 15px; border-left: 4px solid var(--signal); }
.calc.is-err .calc-v output { border-bottom-color: var(--line); color: var(--muted); }
.calc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 16px 0 0; border-top: 1px dashed var(--line); }
.calc-tiles .tile { padding: 12px 12px 4px 0; border-right: 1px dashed var(--line-2); margin: 0; }
.calc-tiles .tile:last-child { border-right: 0; }
.calc-tiles .tile + .tile { padding-left: 12px; }
.calc-tiles dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.calc-tiles dd { margin: 4px 0 0; font: 600 21px/1.2 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.calc-tiles dd.tile-c { font: 400 12.5px/1.35 var(--font); color: var(--muted); margin-top: 4px; }
.tile-u { font-size: 14px; color: var(--muted); font-weight: 500; }
.tile-in dd:not(.tile-c) { color: var(--ink-2); font-weight: 500; }
.calc-form { padding: 18px 22px 20px; background: var(--paper); border-top: 1px solid var(--line-2); }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 16px; }
.field-wide { grid-column: 1 / -1; }
.calc-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.calc-chart { margin: 0; padding: 16px 22px 18px; border-top: 1px solid var(--line-2); }
.calc-chart.off { display: none; }
.calc-chart figcaption { font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.calc-chart svg { width: 100%; height: auto; display: block; }
.calc-chart svg text { font: 500 12px var(--mono); fill: var(--muted); }
.calc-chart .gl { stroke: var(--line-2); }
.calc-chart .ax { stroke: var(--line); }
.calc-chart .ln { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.calc-chart .pt { fill: var(--signal); stroke: var(--card); stroke-width: 2; }
.calc-chart .src { font-size: 13px; color: var(--muted); margin: 8px 0 6px; }
.calc-chart details summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.chart-skel { height: 300px; border-radius: var(--r-s); background: var(--surface); }
.calc-off { padding: 18px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--card); color: var(--ink-2); }
.card-details { margin: 0; display: grid; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 18px; }
.card-details div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.card-details div:last-child { border-bottom: 0; }
.card-details dt { color: var(--muted); font-weight: 600; }
.card-details dd { margin: 0; }
.ymyl { margin: 0; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-s) var(--r-s) 0; font-size: 14.5px; color: var(--ink); }
.formula-used { margin: 26px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.formula-used summary { cursor: pointer; padding: 12px 16px; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.formula-used pre { margin: 0 16px 10px; padding: 12px; background: var(--surface); border-radius: var(--r-s); overflow-x: auto; font-size: 13.5px; line-height: 1.5; white-space: pre; }
.formula-used .small { margin: 0 16px 14px; }
.pin { margin: 26px 0 0; max-width: 260px; }
.pin img { border-radius: var(--r-s); border: 1px solid var(--line); display: block; }
.pin figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.sources { margin-top: 26px; font-size: 14px; color: var(--muted); }
.rel-cards { margin-top: 30px; }
.rel-cards h2 { font-size: 20px; }
.rel-cards ul, .rel { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rel-cards li, .rel li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-s); }
.rel-cards li a, .rel li a { color: var(--ink); font-weight: 560; text-decoration: none; }
.rel-cards li a:hover, .rel li a:hover { color: var(--accent); text-decoration: underline; }
.rel-cards .mono, .rel .mono { color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- hub */
.hub-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: start; margin-bottom: 26px; }
.hub-copy h1 { max-width: 22ch; }
.hub-img { width: 180px; height: 270px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line); }
.proof { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 0; }
.proof div { padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-s); }
.proof dt { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.proof dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
.proof .glyph-s { font-size: 15px; color: var(--accent); }
.hub-top { margin: 8px 0 34px; }
.top-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.top-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.top-card:hover { border-color: var(--accent); color: var(--ink); }
.top-no { font-size: 12.5px; color: var(--muted); }
.top-t { font-weight: 650; font-size: 17px; }
.top-k { font-size: 13px; color: var(--muted); margin-top: 4px; }
.top-n { font-size: 26px; font-weight: 600; color: var(--ink); }
.top-n small { font-size: 14px; color: var(--muted); }
.top-x { font-size: 14.5px; color: var(--ink-2); }
.filter { display: flex; align-items: center; gap: 10px; }
.filter .ctl { min-height: 42px; width: min(300px, 60vw); }
.filter .ctl input { font-family: var(--font); font-size: 16px; padding: 8px 12px; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 15.5px; }
.list th, .list td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: baseline; }
.list thead th { background: var(--paper); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.list tbody tr:last-child td { border-bottom: 0; }
.list td a { color: var(--ink); font-weight: 520; text-decoration: none; }
.list td a:hover { color: var(--accent); text-decoration: underline; }
.list .num { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.list .num small { color: var(--muted); font-weight: 500; }
.empty { color: var(--muted); }
.empty-box { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-top: 18px; }
.inline-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.inline-links a { display: inline-flex; min-height: 40px; align-items: center; }
.nav-links { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.nav-links a, .nav-links span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); text-decoration: none; }
.nav-links .current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- pages, A-Z, forms */
.page-h { font-size: clamp(28px, 3.4vw, 40px); }
.page-art { max-width: 780px; }
.page-art.page-wide { max-width: none; }
.page-art .entry-body h2 { font-size: 23px; }
.search-page { max-width: 640px; margin: 8px 0 24px; }
.az-letters ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.az-letters a, .az-letters .az-off { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--card); font: 600 15px/1 var(--mono); text-decoration: none; color: var(--ink); }
.az-letters a:hover { border-color: var(--accent); color: var(--accent); }
.az-letters a[aria-current="page"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.az-letters .az-off { color: var(--line); background: transparent; border-style: dashed; }
.az-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.az-head h2 { margin: 0; }
.az-head small { font: 500 15px var(--font); color: var(--muted); }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; margin: 18px 0; }
.contact-form .field-wide, .contact-form .calc-actions, .contact-form .form-status { grid-column: 1 / -1; }
.contact-form .ctl input, .contact-form .ctl textarea { font-family: var(--font); }
.opt { font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; padding: 12px 14px; border-radius: var(--r-s); background: var(--accent-soft); }
.form-status.bad { background: var(--signal-soft); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .hero-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; margin-right: 0; }
}
@media (max-width: 900px) {
  .head-search { display: none; position: absolute; left: 0; right: 0; top: 100%; max-width: none; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .head-search.open { display: block; }
  .search-toggle, .menu-toggle { display: inline-flex; }
  .menu-toggle { border-radius: 22px; padding: 0 14px; }
  .head-tools { margin-left: auto; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 6px 0 10px; }
  .main-nav a { min-height: 48px; width: 100%; font-size: 17px; border-bottom: 1px solid var(--line-2); }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--signal); }
  .hero-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "form" "label"; padding-top: 26px; padding-bottom: 36px; row-gap: 18px; }
  .hero-copy { padding-top: 0; }
  .hero-copy h1 { max-width: 18ch; }
  .entry-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .calc-col { position: static; }
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .top-grid { grid-template-columns: minmax(0, 1fr); }
  .hub-head { grid-template-columns: minmax(0, 1fr) 120px; gap: 18px; }
  .hub-img { width: 120px; height: 180px; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .head-row { min-height: 60px; gap: 8px; }
  .wordmark { font-size: 19px; }
  .wordmark span { font-size: 16.5px; }
  .brand .mark { width: 30px; height: 30px; }
  .menu-toggle span { display: none; }
  .menu-toggle { border-radius: 50%; padding: 0 10px; }
  .kicker { font-size: 13px; margin-bottom: 12px; }
  .lede { font-size: 16.5px; margin-bottom: 0; }
  .mm-row .ctl input { font-size: 20px; }
  .mm-row .btn { padding: 0 16px; }
  .mm-picks { flex-wrap: nowrap; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
  .mm-picks li { flex: 0 0 auto; }
  .lc-head { padding: 10px 16px; }
  .lc-f { font-size: 18px; }
  .lc-top { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 4px; gap: 12px; }
  .lc-pt { width: 100%; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; align-items: end; }
  .ptable-mini { max-width: 200px; }
  .lc-answer .calc-v { font-size: 46px; }
  .lc-bar { margin: 10px 16px 4px; }
  .label-card .tablewrap { margin: 6px 16px 0; }
  .lc-table { font-size: 14px; }
  .lc-table th, .lc-table td { padding: 7px 4px; }
  .lc-table .el-n { display: none; }
  .lc-conv { margin: 12px 16px 0; }
  .mm-conv { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lc-foot { margin: 6px 16px 18px; }
  .calc-v { font-size: 44px; }
  .icard .calc-v { font-size: 44px; }
  .band { padding: 40px 0; }
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sec-wide { flex-direction: row; }
  .sec-img { width: 104px; height: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid var(--line); object-position: center; }
  .sec-in { padding: 14px 14px 12px; }
  .sec-wide .sec-s li:nth-child(n+2) { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding: 16px 0; }
  .ranked li { grid-template-columns: 34px minmax(0, 1fr); }
  .rk-n { grid-column: 2; font-size: 14px; }
  .calc-display { padding: 16px 16px 12px; }
  .calc-form { padding: 16px; }
  .calc-chart { padding: 14px 16px; }
  .calc-fields { grid-template-columns: minmax(0, 1fr); }
  .calc-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .calc-tiles .tile:nth-child(2n) { border-right: 0; }
  .calc-tiles .tile:nth-child(2n+1) { padding-left: 0; }
  .calc-tiles .tile:nth-child(odd):last-child { grid-column: 1 / -1; }
  .card-details div { grid-template-columns: 92px minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
  .crumbs li:last-child { display: none; }
  .crumbs li:nth-last-child(2)::after { content: ""; }
  .hub-head { grid-template-columns: minmax(0, 1fr); }
  .hub-img { display: none; }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .list th, .list td { padding: 10px 10px; }
  .hide-s { display: none; }
  .ptable-band { width: 900px; gap: 4px; }
  .ptable-band .pt-el { font-size: 11px; }
  .entry-body { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .site-head, .site-foot, .calc-form, .bench-field { display: none; } }
/* search field (the form has no .ctl wrapper) */
.search-row input[type="search"] { flex: 1; min-width: 0; width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--card); color: var(--ink); font: 400 16px/1.3 var(--font); outline: none; }
.search-row input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-big .search-row input[type="search"] { min-height: 56px; font-size: 18px; }
.head-search .search-row input[type="search"] { min-height: 42px; background: var(--paper); }
.rel-cards .cta { white-space: normal; display: inline-block; }
@media (max-width: 640px) {
  .lc-table thead th { font-size: 10.5px; letter-spacing: .02em; }
}
