/* PillMath: calm apothecary. Linen paper, bottle green, brass, serif doses. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-wght-normal.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: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-wght-italic.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: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-wght-normal.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: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
	--pm-paper: #f3f1ea;
	--pm-surface: #fbfaf6;
	--pm-ink: #1c2824;
	--pm-muted: #5e6a64;
	--pm-faint: #8b958f;
	--pm-line: #d9d6cb;
	--pm-line-soft: #e7e4da;
	--pm-green: #1f4d3f;
	--pm-green-2: #2e6b58;
	--pm-sage: #e2e9e1;
	--pm-sage-2: #eef2ec;
	--pm-brass: #a07f2e;
	--pm-brass-soft: #f4ecd6;
	--pm-ok: #2e6b4c;
	--pm-ok-soft: #e3eee5;
	--pm-warn: #8a6214;
	--pm-warn-soft: #f6edd5;
	--pm-bad: #9a3a2b;
	--pm-bad-soft: #f5e3dd;
	--pm-bar-ok: #a8cdb5;
	--pm-bar-near: #e3cb8e;
	--pm-bar-over: #e8ab99;
	--pm-bar-low: #cdd3ce;
	--pm-focus: rgba(46, 107, 88, .35);
	--pm-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--pm-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--pm-r: 10px;
	--pm-r-s: 6px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--pm-paper: #121916;
		--pm-surface: #18211d;
		--pm-ink: #e7e5dd;
		--pm-muted: #a5aea8;
		--pm-faint: #7d8781;
		--pm-line: #2f3b36;
		--pm-line-soft: #26302c;
		--pm-green: #93c7b2;
		--pm-green-2: #b4dccb;
		--pm-sage: #1f2d27;
		--pm-sage-2: #1b2622;
		--pm-brass: #d6b45f;
		--pm-brass-soft: #2c2716;
		--pm-ok: #8ccaa6;
		--pm-ok-soft: #1d2c24;
		--pm-warn: #e2bd6a;
		--pm-warn-soft: #2d2615;
		--pm-bad: #f0a091;
		--pm-bad-soft: #351f1b;
		--pm-bar-ok: #5f9579;
		--pm-bar-near: #9a8244;
		--pm-bar-over: #a86857;
		--pm-bar-low: #4a5751;
		--pm-focus: rgba(147, 199, 178, .4);
		color-scheme: dark;
	}
}

/* Base */
body.pillmath-page { margin: 0; background: var(--pm-paper); color: var(--pm-ink); font: 400 17px/1.6 var(--pm-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.pillmath-page *, .pillmath-page *::before, .pillmath-page *::after { box-sizing: border-box; }
.pillmath-page a { color: var(--pm-green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pillmath-page a:hover { color: var(--pm-green-2); }
.pillmath-page h1, .pillmath-page h2, .pillmath-page h3 { font-family: var(--pm-serif); font-weight: 500; line-height: 1.15; letter-spacing: -.012em; margin: 0 0 .5em; color: var(--pm-ink); font-variation-settings: "opsz" 96; }
.pillmath-page h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 450; letter-spacing: -.022em; }
.pillmath-page h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-top: 2.2em; }
.pillmath-page h3 { font-size: 1.15rem; font-variation-settings: "opsz" 24; }
.pm-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.pm-narrow { max-width: 760px; }
.pm-main { padding: 28px 0 72px; min-height: 60vh; }
.pm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pm-skip { position: absolute; left: -999px; top: 8px; background: var(--pm-surface); padding: 8px 12px; z-index: 20; }
.pm-skip:focus { left: 8px; }
.pm-small { font-size: .86rem; color: var(--pm-muted); line-height: 1.5; }
.pm-muted { color: var(--pm-muted); }
.pm-lead { font-size: 1.14rem; color: var(--pm-muted); max-width: 40em; line-height: 1.6; }
.pillmath-page :focus-visible { outline: 3px solid var(--pm-focus); outline-offset: 2px; }

/* Header */
.pm-header { background: color-mix(in srgb, var(--pm-paper) 88%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--pm-line); position: sticky; top: 0; z-index: 10; }
.admin-bar .pm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .pm-header { top: 0; position: relative; } }
.pm-header-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.pm-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pm-ink) !important; }
.pm-i { position: relative; display: inline-block; user-select: none; }
.pm-i::before { content: ""; position: absolute; left: 56%; top: .13em; width: .15em; height: .27em; border-radius: .08em; background: var(--pm-brass); transform: translateX(-50%) rotate(35deg); }
.pm-logo-txt { font-family: var(--pm-serif); font-size: 1.42rem; font-weight: 520; letter-spacing: -.02em; font-variation-settings: "opsz" 48; }
.pm-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.pm-nav a { text-decoration: none; color: var(--pm-muted); padding: 8px 12px; font-size: .95rem; font-weight: 500; border-bottom: 1px solid transparent; }
.pm-nav a:hover { color: var(--pm-ink); }
.pm-nav a[aria-current="page"] { color: var(--pm-green); border-bottom-color: var(--pm-green); }
.pm-menu-btn { display: none; background: none; border: 0; color: var(--pm-ink); padding: 8px; cursor: pointer; }
@media (max-width: 780px) {
	.pm-menu-btn { display: block; }
	.pm-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--pm-surface); border-bottom: 1px solid var(--pm-line); flex-direction: column; padding: 6px 20px 14px; }
	.pm-nav-open .pm-nav { display: flex; }
	.pm-nav a { padding: 12px 0; border-bottom: 1px solid var(--pm-line-soft); }
	.pm-nav a[aria-current="page"] { border-bottom-color: var(--pm-line-soft); }
}

/* Hero */
.pm-hero { padding: 36px 0 8px; }
.pm-hero h1 { max-width: 15em; margin-bottom: .35em; }
.pm-hero .pm-lead { margin-top: 0; }
.pm-eyebrow { display: none; }

/* Profile bar: a quiet line, not a box */
.pm-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 0; margin: 18px 0 20px; border-top: 1px solid var(--pm-line); border-bottom: 1px solid var(--pm-line); }
.pm-profile select { min-height: 40px; }
.pm-profile .pm-weight { display: inline-flex; align-items: center; gap: 6px; color: var(--pm-muted); font-size: .92rem; }
.pm-profile .pm-weight input { width: 92px; min-height: 40px; }
.pm-adults { margin-left: auto; }
@media (max-width: 560px) { .pm-adults { margin-left: 0; width: 100%; } .pm-profile label { flex: 1 1 40%; } .pm-profile select, .pm-profile .pm-weight input { width: 100%; } }

/* Segmented control */
.pm-seg { display: inline-flex; border: 1px solid var(--pm-line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; background: var(--pm-surface); }
.pm-seg button { border: 0; background: none; padding: 7px 15px; border-radius: 999px; font: inherit; font-size: .92rem; font-weight: 500; color: var(--pm-muted); cursor: pointer; min-height: 36px; }
.pm-seg button:hover { color: var(--pm-ink); }
.pm-seg button[aria-pressed="true"] { background: var(--pm-green); color: var(--pm-paper); }
.pm-seg-wide { margin-bottom: 14px; }

/* Forms */
.pillmath-page select, .pillmath-page input[type="number"], .pillmath-page input[type="text"], .pillmath-page input[type="search"] {
	font: inherit; font-size: 1rem; color: var(--pm-ink); background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--pm-r-s); padding: 8px 11px; min-height: 44px; max-width: 100%;
}
.pillmath-page select:hover, .pillmath-page input:hover { border-color: var(--pm-faint); }
.pillmath-page select:focus, .pillmath-page input:focus { outline: 3px solid var(--pm-focus); outline-offset: 0; border-color: var(--pm-green-2); }
.pm-row { display: flex; flex-wrap: wrap; gap: 12px 14px; margin: 10px 0; }
.pm-field { display: flex; flex-direction: column; gap: 5px; min-width: 130px; }
.pm-field.pm-grow { flex: 1 1 260px; }
.pm-field.pm-grow select { width: 100%; }
/* A select beside a fixed-width number stays on the line instead of filling it. */
.pm-field.pm-grow .pm-inline select, .pm-sblock .pm-field.pm-grow .pm-inline select { width: auto; flex: 0 0 auto; min-width: 86px; max-width: 220px; }
.pm-row > .pm-field.pm-grow { max-width: 420px; }
.pm-flabel { font-size: .82rem; font-weight: 600; color: var(--pm-muted); }
.pm-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pm-inline input { width: 118px; }
.pm-unitword { color: var(--pm-muted); }
.pm-tag { font-size: .76rem; font-weight: 600; color: var(--pm-warn); background: var(--pm-warn-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }

/* Buttons */
.pm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 20px; border-radius: 999px; background: var(--pm-green); color: var(--pm-paper) !important; border: 1px solid var(--pm-green); font: inherit; font-size: .96rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.pm-btn:hover { background: var(--pm-green-2); border-color: var(--pm-green-2); }
.pm-btn-ghost { background: transparent; color: var(--pm-green) !important; border-color: var(--pm-line); }
.pm-btn-ghost:hover { background: var(--pm-sage-2); border-color: var(--pm-green-2); }
.pm-btn-s { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.pm-btn[disabled] { opacity: .65; cursor: default; }
.pm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Calculator panel */
.pm-calc, .pm-stack { background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--pm-r); padding: 20px; }
@media (min-width: 720px) { .pm-calc { padding: 28px 32px; } }
.pm-calc-sec { padding: 2px 0 16px; border-bottom: 1px solid var(--pm-line-soft); margin-bottom: 16px; }
.pm-step { font-family: var(--pm-serif) !important; font-size: 1.12rem !important; font-weight: 500 !important; margin: 4px 0 10px !important; color: var(--pm-ink); }
details.pm-check { border-bottom: 0; }
details.pm-check > summary { cursor: pointer; list-style: none; color: var(--pm-green); }
details.pm-check > summary::-webkit-details-marker { display: none; }
details.pm-check > summary::before { content: "+"; display: inline-block; width: 1.1em; }
details.pm-check[open] > summary::before { content: "\2212"; }
.pm-result { margin: 6px 0; }
.pm-target { font-weight: 600; margin: 0 0 6px; }
.pm-hint { color: var(--pm-muted); font-style: italic; font-family: var(--pm-serif); }
.pm-loading { color: var(--pm-muted); padding: 28px 0; text-align: center; font-family: var(--pm-serif); font-style: italic; }

/* The dispensary label: the one bold element */
.pm-answer { position: relative; background: var(--pm-paper); border: 1px solid var(--pm-green); border-radius: 4px; padding: 18px 22px 16px; margin: 12px 0; box-shadow: inset 0 0 0 3px var(--pm-paper), inset 0 0 0 4px color-mix(in srgb, var(--pm-green) 45%, transparent); }
.pm-big { font-family: var(--pm-serif); font-size: clamp(1.7rem, 4.4vw, 2.35rem); font-weight: 500; line-height: 1.12; letter-spacing: -.02em; color: var(--pm-green); margin: 0 0 8px; font-variation-settings: "opsz" 144; }
.pm-big-s { font-size: 1.35rem; margin-bottom: 4px; }
.pm-answer .pm-small { margin: 3px 0; color: var(--pm-muted); }
.pm-answer.is-odd { border-color: var(--pm-warn); box-shadow: inset 0 0 0 3px var(--pm-paper), inset 0 0 0 4px color-mix(in srgb, var(--pm-warn) 40%, transparent); }
.pm-answer.is-odd .pm-big { color: var(--pm-warn); }
.pm-answer-s { padding: 12px 16px; margin: 10px 0 0; }
.pm-fixes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: .9rem; color: var(--pm-muted); }
.pm-quiet { color: var(--pm-faint); }
/* Notes: a thin coloured rule instead of a filled box */
.pm-odd, .pm-ulmsg { background: none; border-left: 2px solid currentColor; border-radius: 0; padding: 2px 0 2px 12px; margin: 10px 0; font-size: .9rem; line-height: 1.5; }
.pm-odd { color: var(--pm-warn); }
.pm-ulmsg p { margin: 6px 0 0; }
.pm-ulmsg.is-ok { color: var(--pm-ok); }
.pm-ulmsg.is-near { color: var(--pm-warn); }
.pm-ulmsg.is-over { color: var(--pm-bad); }
.pm-ulmsg.is-none { color: var(--pm-muted); border-left: 0; padding-left: 0; }
.pm-ulmsg.is-note { color: var(--pm-muted); }
/* Safe-limit line */
.pm-limit { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--pm-line-soft); font-size: .86rem; color: var(--pm-muted); }
.pm-limit p { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pm-limit strong { font-weight: 600; }
.pm-limit.is-near strong { color: var(--pm-warn); }
.pm-limit.is-over strong { color: var(--pm-bad); }
.pm-limit.is-none { border-top: 0; padding-top: 0; }
.pm-lbar { height: 3px; background: var(--pm-line); border-radius: 99px; overflow: hidden; }
.pm-lbar span { display: block; height: 100%; background: var(--pm-faint); border-radius: 99px; }
.pm-limit.is-near .pm-lbar span { background: var(--pm-warn); }
.pm-limit.is-over .pm-lbar span { background: var(--pm-bad); }
.pm-tipwrap { position: relative; display: inline-flex; vertical-align: middle; }
@media (hover: hover) { .pm-tipwrap:hover .pm-ev-tip { display: block; } }
.pm-bar { height: 3px; background: var(--pm-line); border-radius: 99px; overflow: hidden; }
.pm-bar span { display: block; height: 100%; background: currentColor; border-radius: 99px; }
.pm-bottle { font-weight: 600; }
.pm-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; margin: 10px 0; }
.pm-multi input { width: 100%; }

/* Tables */
.pm-tablewrap { overflow-x: auto; }
.pm-table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pm-table th, .pm-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--pm-line-soft); vertical-align: top; }
.pm-table thead th { font-size: .82rem; font-weight: 600; color: var(--pm-muted); border-bottom-color: var(--pm-line); }
.pm-table tbody th { font-weight: 500; }
.pm-table tr.is-me { background: var(--pm-sage); }
.pm-table tr.is-me th { font-weight: 700; color: var(--pm-green); }
.pm-pill { display: inline-block; border-radius: 99px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }
.pm-pill.is-ok { background: var(--pm-ok-soft); color: var(--pm-ok); }
.pm-pill.is-low { background: var(--pm-sage-2); color: var(--pm-muted); }
.pm-pill.is-near { background: var(--pm-warn-soft); color: var(--pm-warn); }
.pm-pill.is-over { background: var(--pm-bad-soft); color: var(--pm-bad); }

/* Supplement page */
.pm-crumbs { font-size: .86rem; color: var(--pm-muted); margin-bottom: 14px; }
.pm-crumbs a { color: var(--pm-muted); }
.pm-toc { display: flex; gap: 4px 18px; flex-wrap: wrap; margin: 6px 0 4px; font-size: .92rem; }
.pm-toc a { text-decoration: none; color: var(--pm-muted); border-bottom: 1px solid var(--pm-line); padding-bottom: 1px; }
.pm-toc a:hover { color: var(--pm-green); border-color: var(--pm-green); }
.pm-refs { display: grid; gap: 0; grid-template-columns: 1fr; border-top: 1px solid var(--pm-line); }
@media (min-width: 780px) { .pm-refs { grid-template-columns: 1fr 1fr; } .pm-refcard + .pm-refcard { border-left: 1px solid var(--pm-line); } }
.pm-refcard { padding: 18px 20px 18px 0; }
.pm-refcard + .pm-refcard { padding-left: 20px; }
@media (max-width: 779px) { .pm-refcard + .pm-refcard { padding-left: 0; border-top: 1px solid var(--pm-line); } }
.pm-refcard h3 { font-size: 1.05rem; margin-bottom: 2px; }
.pm-refcard.is-active h3 { color: var(--pm-green); }
.pm-ul { margin: 12px 0 4px; }
.pm-note { border-left: 2px solid var(--pm-brass); padding-left: 10px; }
.pm-src { font-size: .82rem; color: var(--pm-muted); margin: 10px 0 0; }
.pm-cite { white-space: normal; }

/* Studies */
.pm-studies { display: grid; gap: 0 32px; border-top: 1px solid var(--pm-line); }
@media (min-width: 820px) { .pm-studies { grid-template-columns: 1fr 1fr; } }
.pm-study { padding: 20px 0; border-bottom: 1px solid var(--pm-line); }
.pm-study h3 { margin: 6px 0 4px; }
.pm-study p { margin: 6px 0; }
.pm-dose { font-family: var(--pm-serif); font-size: 1.5rem; font-weight: 500; color: var(--pm-green); margin: 0 0 6px !important; letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.pm-study.is-caution .pm-dose { color: var(--pm-muted); }
.pm-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-badge { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--pm-sage-2); color: var(--pm-muted); margin: 0; text-decoration: none; }
.pm-badge-warn { background: var(--pm-warn-soft); color: var(--pm-warn); }
.pm-badge-new { background: var(--pm-brass-soft); color: var(--pm-brass); }
.pm-grade.is-strong { background: var(--pm-ok-soft); color: var(--pm-ok); }
.pm-grade.is-moderate { background: var(--pm-sage); color: var(--pm-green); }
.pm-grade.is-weak { background: transparent; color: var(--pm-muted); box-shadow: inset 0 0 0 1px var(--pm-line); }
.pm-grade-line { margin: 0 0 6px; }
.pm-contra { margin-top: 12px; padding: 10px 0 0 14px; border-left: 2px solid var(--pm-brass); font-size: .93rem; }
.pm-contra-h { font-family: var(--pm-serif); font-style: italic; color: var(--pm-brass); margin: 0 0 4px !important; }
.pm-contra p { margin: 0 0 4px; }

/* Best form */
.pm-best { padding: 18px 22px; background: var(--pm-brass-soft); border-radius: var(--pm-r); }
.pm-best p { margin: 0 0 8px; }
.pm-best-pick { font-family: var(--pm-serif); font-size: 1.3rem; font-weight: 500; }
.pm-best-kind { margin: 0 0 2px !important; font-size: .82rem; font-weight: 600; color: var(--pm-brass); }
.pm-star { color: var(--pm-brass); }

.pm-two { display: grid; gap: 0 40px; }
@media (min-width: 780px) { .pm-two { grid-template-columns: 1fr 1fr; } }
.pm-safety { border-top: 3px double var(--pm-brass); margin-top: 36px; padding-top: 4px; }
.pm-safety h2 { margin-top: .9em; }
.pm-details { border-bottom: 1px solid var(--pm-line); padding: 10px 0; }
.pm-details summary { cursor: pointer; font-family: var(--pm-serif); font-size: 1.08rem; }
.pm-reflist { padding-left: 1.3em; font-size: .95rem; }
.pm-reflist li { margin: 0 0 12px; }
.pm-reflist .pm-badge { margin-right: 4px; }
.pm-list { padding-left: 1.2em; }
.pm-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pm-facts a { font-size: .95rem; }
.pm-aff { margin: 18px 0; }
.pm-aff .pm-small { margin: 6px 0 0; }

/* Index: a dispensary drawer list with dotted leaders */
.pm-grid { list-style: none; padding: 0; margin: 10px 0 0; columns: 1; column-gap: 48px; }
@media (min-width: 680px) { .pm-grid { columns: 2; } }
@media (min-width: 1000px) { .pm-grid { columns: 3; } }
.pm-grid li { break-inside: avoid; }
.pm-card { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; text-decoration: none; color: var(--pm-ink) !important; border-bottom: 1px solid var(--pm-line-soft); }
.pm-card-t { font-family: var(--pm-serif); font-size: 1.1rem; font-weight: 450; white-space: nowrap; }
.pm-card::after { content: ""; order: 2; flex: 1; border-bottom: 1px dotted var(--pm-faint); transform: translateY(-4px); min-width: 12px; }
.pm-card-f { order: 3; font-size: .82rem; color: var(--pm-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-card:hover .pm-card-t { color: var(--pm-green); }
.pm-cat { font-size: 1.2rem !important; color: var(--pm-muted); margin-top: 1.6em !important; }

/* How it works (a real sequence) */
.pm-how { display: grid; gap: 28px; margin: 44px 0 8px; }
@media (min-width: 780px) { .pm-how { grid-template-columns: repeat(3, 1fr); } }
.pm-how > div { border-top: 1px solid var(--pm-ink); padding-top: 14px; }
.pm-how h2 { font-size: 1.2rem; margin: 6px 0 4px; }
.pm-how p { margin: 0; color: var(--pm-muted); font-size: .95rem; }
.pm-num { font-family: var(--pm-serif); font-style: italic; font-size: 1.05rem; color: var(--pm-brass); }
.pm-trust { margin-top: 56px; padding: 28px 0 8px; border-top: 3px double var(--pm-line); }
.pm-trust h2 { margin-top: 0; }
.pm-trust p { max-width: 44em; }
.pm-prose li { margin-bottom: 6px; }
.pm-prose p, .pm-prose li { max-width: 40em; }

/* Ads */
.pm-ad { margin: 28px auto; max-width: 1120px; padding: 0 20px; text-align: center; }
.pm-ad-lbl { display: block; font-size: .72rem; color: var(--pm-faint); margin-bottom: 4px; }

/* Footer */
.pm-footer { border-top: 1px solid var(--pm-line); padding: 32px 0 40px; font-size: .92rem; color: var(--pm-muted); }
.pm-disclaimer { max-width: 46em; }
.pm-disclaimer strong { color: var(--pm-ink); }
.pm-footnav { display: flex; gap: 6px 18px; flex-wrap: wrap; margin: 14px 0; }
.pm-footnav a { color: var(--pm-muted); }

/* ---------- Stack builder ---------- */
.pm-stack { background: transparent; border: 0; padding: 0; }
.pm-stack-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 960px) { .pm-stack-grid { grid-template-columns: minmax(0, 1fr) 380px; } .pm-plan-col { position: sticky; top: 88px; } .admin-bar .pm-plan-col { top: 120px; } }
@media (max-width: 959px) { .pm-plan-col { order: -1; } }

.pm-sitems { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--pm-line); }
.pm-sitem { border-bottom: 1px solid var(--pm-line); background: var(--pm-paper); }
.pm-sitem.is-drag { opacity: .5; }
.pm-sitem.is-over-top { box-shadow: 0 -2px 0 var(--pm-green); }
.pm-sitem.is-over-bot { box-shadow: 0 2px 0 var(--pm-green); }
.pm-shead { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 28px; gap: 10px; align-items: center; padding: 12px 0; cursor: pointer; }
.pm-handle { cursor: grab; color: var(--pm-faint); background: none; border: 0; padding: 6px 2px; touch-action: none; display: flex; }
.pm-handle:active { cursor: grabbing; }
.pm-sname { font-family: var(--pm-serif); font-size: 1.15rem; font-weight: 500; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.pm-ssub { display: block; font-family: var(--pm-sans); font-size: .86rem; color: var(--pm-muted); font-weight: 400; }
.pm-sdose { text-align: right; font-size: .95rem; font-weight: 600; color: var(--pm-green); font-variant-numeric: tabular-nums; max-width: 46%; }
.pm-sdose.is-muted { color: var(--pm-faint); font-weight: 400; font-style: italic; font-size: .85rem; max-width: 58%; }
.pm-smark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.pm-smark.is-ok { background: var(--pm-ok-soft); color: var(--pm-ok); }
.pm-smark.is-warn { background: var(--pm-warn-soft); color: var(--pm-warn); }
.pm-smark.is-bad { background: var(--pm-bad-soft); color: var(--pm-bad); }
.pm-smark.is-empty { box-shadow: inset 0 0 0 1px var(--pm-line); color: var(--pm-faint); }
.pm-sbody { padding: 2px 0 18px 36px; }
/* On a phone a long dose line sits under the name, instead of crushing it to one letter a line. */
@media (max-width: 560px) {
	.pm-sbody { padding-left: 0; }
	.pm-shead { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
	.pm-shead > .pm-handle { flex: none; }
	.pm-sname { flex: 1 1 auto; }
	.pm-smark { flex: none; }
	.pm-sdose { order: 9; flex: 1 0 100%; max-width: none; text-align: left; }
	.pm-ssub { overflow-wrap: anywhere; }
}
.pm-sbody[hidden] { display: none; }
.pm-sfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.pm-link { background: none; border: 0; padding: 4px 0; color: var(--pm-muted); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pm-link:hover { color: var(--pm-bad); }
.pm-x { display: none; }

/* Add box with search */
.pm-add { position: relative; margin: 18px 0 8px; }
.pm-add input { width: 100%; padding-left: 40px !important; }
.pm-add svg { position: absolute; left: 13px; top: 13px; color: var(--pm-faint); pointer-events: none; }
.pm-addlist { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--pm-r-s); box-shadow: 0 12px 28px rgba(20, 32, 27, .12); list-style: none; margin: 0; padding: 4px; max-height: 320px; overflow: auto; z-index: 5; }
.pm-addlist li { padding: 9px 12px; border-radius: 4px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.pm-addlist li span { color: var(--pm-muted); font-size: .85rem; }
.pm-addlist li[aria-selected="true"], .pm-addlist li:hover { background: var(--pm-sage); }

/* Plan */
.pm-plan { background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--pm-r); padding: 22px 22px 18px; }
.pm-plan h2 { margin: 0 0 4px !important; font-size: 1.45rem !important; }
.pm-plan-meta { font-size: .85rem; color: var(--pm-muted); margin: 0 0 12px; }
.pm-slot { padding: 18px 0 10px; border-top: 1px solid var(--pm-line-soft); }
.pm-slot:first-of-type { border-top: 0; padding-top: 6px; }
.pm-slot-h { display: flex; align-items: center; gap: 8px; margin: 0 0 11px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pm-brass); }
.pm-slot-h svg { flex: none; }
.pm-slot ul { list-style: none; margin: 0; padding: 0; }
.pm-slot li { margin: 0 0 11px; line-height: 1.4; }
.pm-pline { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.pm-pname { font-size: 1.02rem; font-weight: 500; letter-spacing: -.004em; }
.pm-pform { color: var(--pm-faint); font-size: .86rem; font-weight: 400; }
.pm-pform::before { content: ' '; }
.pm-slot li .pm-q { color: var(--pm-muted); font-size: .94rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-slot li .pm-tip { display: block; color: var(--pm-faint); font-size: .84rem; margin-top: 2px; }
.pm-slot li.is-check .pm-q { color: var(--pm-warn); font-weight: 600; }
.pm-plan .pm-actions { margin-top: 14px; }
.pm-plan .pm-btn { flex: 1 1 auto; }

/* Totals with bars */
.pm-totals2 { margin-top: 28px; }
.pm-trow { display: grid; grid-template-columns: 150px minmax(0, 1fr) 160px; gap: 6px 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--pm-line-soft); font-variant-numeric: tabular-nums; }

/* Daily totals: the bar fills to the safe limit, the stripe is the official intake. */
.pm-tlegend2 { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 4px; padding: 9px 12px; background: var(--pm-sage-2); border-radius: var(--pm-r-s); }
.pm-tlegend2 span { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--pm-muted); }
.pm-tlegend2 i { display: inline-block; }
.pm-tlegend2 .pm-lg-bar { width: 26px; height: 9px; border-radius: 5px; background: var(--pm-bar-ok); }
.pm-tlegend2 .pm-lg-ref { width: 3px; height: 21px; border-radius: 2px; background: var(--pm-ink); }
.pm-trow.is-bar { display: block; padding: 13px 0; }
.pm-trow.is-flat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; }
.pm-thead2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pm-tname2 { font-weight: 600; }
.pm-tamt.is-over { color: var(--pm-bad); font-weight: 600; }
.pm-tamt.is-near { color: var(--pm-warn); }
.pm-tbar2 { position: relative; height: 10px; margin: 15px 0; }
.pm-tb-track { position: absolute; inset: 0; border-radius: 5px; background: var(--pm-line-soft); overflow: hidden; }
.pm-tb-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pm-bar-ok); }
.pm-tbar2.is-low .pm-tb-track i { background: var(--pm-bar-low); }
.pm-tbar2.is-near .pm-tb-track i { background: var(--pm-bar-near); }
.pm-tbar2.is-over .pm-tb-track i { background: var(--pm-bar-over); }
.pm-tbar2 b { position: absolute; top: -7px; bottom: -7px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--pm-ink); }
.pm-tnote { margin: 0; font-size: .84rem; color: var(--pm-muted); }
.pm-tfoot { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.pm-tcap { flex: none; font-size: .76rem; color: var(--pm-faint); white-space: nowrap; }
.pm-tbar2.is-past .pm-tb-track { border-right: 3px solid var(--pm-ink); }
@media (max-width: 460px) { .pm-tfoot { flex-direction: column; gap: 2px; } .pm-tcap { align-self: flex-start; } }
.pm-tside { display: flex; align-items: baseline; gap: 10px; }
.pm-tside small { font-size: .84rem; color: var(--pm-muted); }
.pm-tside small.is-faint { color: var(--pm-faint); }
@media (max-width: 420px) { .pm-trow.is-flat .pm-thead2, .pm-trow.is-flat { display: flex; flex-wrap: wrap; gap: 4px 10px; } .pm-tside { width: 100%; justify-content: space-between; } }
.pm-trow:first-of-type { border-top: 1px solid var(--pm-line); }
.pm-tname { font-weight: 600; }
.pm-tname small { display: block; font-weight: 400; color: var(--pm-muted); font-size: .84rem; }
.pm-tbar { position: relative; height: 8px; background: var(--pm-line-soft); border-radius: 99px; }
.pm-tbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--pm-ok); }
.pm-tbar.is-low i { background: var(--pm-faint); }
.pm-tbar.is-near i { background: var(--pm-warn); }
.pm-tbar.is-over i { background: var(--pm-bad); }
.pm-tbar.is-none i { background: var(--pm-faint); opacity: .5; }
.pm-trow .pm-pill { justify-self: end; }
.pm-tbar b { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--pm-ink); border-radius: 1px; }
.pm-tbar b.is-ul { background: var(--pm-bad); }
.pm-tlegend { font-size: .8rem; color: var(--pm-muted); grid-column: 2; margin-top: -2px; }
@media (max-width: 560px) { .pm-trow { grid-template-columns: 1fr auto; } .pm-trow .pm-pill { grid-column: 2; grid-row: 1; } .pm-tbar, .pm-tlegend { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { .pillmath-page * { transition: none !important; } }
.pm-range-h { font-family: var(--pm-serif); font-size: 1rem; margin: 14px 0 -4px; color: var(--pm-muted); }

/* Small brass capsule, the same mark as the dot in the logo */
.pm-capsule { display: inline-block; width: .5em; height: .9em; border-radius: .25em; background: var(--pm-brass); transform: rotate(35deg); margin: 0 .5em 0 .15em; vertical-align: -.1em; flex: none; }
.pm-bestnote { font-size: .88rem; color: var(--pm-muted); margin: 6px 0 0; line-height: 1.45; }
.pm-bestnote.is-best strong { color: var(--pm-ink); font-weight: 600; }
.pm-bestnote a { color: var(--pm-green); }

/* Evidence meter: three capsules, label, "why" tooltip */
.pm-ev { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--pm-muted); }
.pm-ev-caps { display: inline-flex; gap: 3px; }
.pm-ev-caps i { width: 7px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1.2px var(--pm-faint); opacity: .9; transform: rotate(35deg); }
.pm-ev.is-strong .pm-ev-caps i.on { background: var(--pm-ok); box-shadow: none; }
.pm-ev.is-moderate .pm-ev-caps i.on { background: var(--pm-brass); box-shadow: none; }
.pm-ev.is-weak .pm-ev-caps i.on { background: var(--pm-faint); box-shadow: none; }
.pm-ev.is-strong .pm-ev-l { color: var(--pm-ok); }
.pm-ev.is-moderate .pm-ev-l { color: var(--pm-brass); }
.pm-ev-i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--pm-line); background: var(--pm-surface); color: var(--pm-muted); font: italic 600 .78rem/1 var(--pm-serif); cursor: pointer; padding: 0; display: grid; place-items: center; }
.pm-ev-i:hover, .pm-ev-i[aria-expanded="true"] { border-color: var(--pm-green); color: var(--pm-green); }
.pm-ev-tip { display: none; position: absolute; z-index: 30; left: 0; top: calc(100% + 8px); width: min(320px, 80vw); background: var(--pm-surface); color: var(--pm-ink); border: 1px solid var(--pm-line); border-radius: 6px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(28, 40, 36, .12); font-weight: 400; font-size: .86rem; line-height: 1.45; }
.pm-ev-tip span, .pm-ev-tip a { display: block; margin-top: 6px; }
.pm-ev-tip a { color: var(--pm-green); }
.pm-ev-i[aria-expanded="true"] + .pm-ev-tip { display: block; }
@media (hover: hover) { .pm-ev:hover .pm-ev-tip, .pm-ev-i:focus-visible + .pm-ev-tip { display: block; } }
.pm-ev-row { margin: 8px 0 4px; }
.pm-ev-tip::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }

/* Custom picker (study doses and goals, with evidence meters) */
.pm-pick { position: relative; width: 100%; }
.pm-pick-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; font: inherit; font-size: 1rem; color: var(--pm-ink); background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--pm-r-s); padding: 9px 12px; min-height: 44px; cursor: pointer; }
.pm-pick-btn:hover { border-color: var(--pm-faint); }
.pm-pick-btn:focus-visible { outline: 3px solid var(--pm-focus); outline-offset: 0; border-color: var(--pm-green-2); }
.pm-pick-btn svg { flex: none; color: var(--pm-muted); }
.pm-pick-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-pick-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--pm-r-s); box-shadow: 0 10px 28px rgba(28, 40, 36, .14); max-height: 360px; overflow-y: auto; outline: none; }
.pm-pick-list li { padding: 9px 10px; border-radius: 4px; cursor: pointer; display: grid; gap: 4px; }
.pm-pick-list li + li { border-top: 1px solid var(--pm-line-soft); }
.pm-pick-list li.is-active, .pm-pick-list li:hover { background: var(--pm-sage-2); }
.pm-pick-list li[aria-selected="true"] .pm-pick-name { font-weight: 600; color: var(--pm-green); }
.pm-pick-list li[aria-disabled="true"] { opacity: .5; cursor: default; }
.pm-pick-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pm-pick-dose { font-size: .86rem; color: var(--pm-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-ev-mini { font-size: .76rem; gap: 6px; }
.pm-ev-mini .pm-ev-caps i { width: 6px; height: 12px; }
@media (max-width: 560px) {
	.pm-seg-wide { display: flex; width: 100%; border-radius: 14px; }
	.pm-seg-wide button { flex: 1 1 auto; border-radius: 10px; }
}
.pm-gridnote { font-size: .88rem; color: var(--pm-muted); max-width: 70ch; margin: 0 0 18px; }

.pm-pair-h { font-family: var(--pm-serif); font-size: 1.1rem; font-weight: 500; margin: 18px 0 6px; }
.pm-pair-h.is-helps { color: var(--pm-green); }
.pm-pair-h.is-apart { color: var(--pm-warn); }
.pm-pairs { list-style: none; margin: 0; padding: 0; }
.pm-pair { border-top: 1px solid var(--pm-line-soft); padding: 12px 0; }
.pm-pair-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pm-pair-name { font-weight: 600; }
.pm-pair p { margin: 6px 0 0; }
.pm-stips { margin: 14px 0 0; padding: 0; list-style: none; }
.pm-stips li { border-left: 2px solid var(--pm-brass); padding: 2px 0 2px 12px; margin: 8px 0; font-size: .9rem; }
.pm-stips li.is-apart { border-color: var(--pm-warn); }
.pm-moved { display: block; font-size: .8rem; color: var(--pm-muted); font-style: italic; }

.pm-showall { margin: 6px 0 4px; }
.pm-mvbox { margin: 12px 0; }
.pm-mvbox h3 { font-family: var(--pm-serif); font-size: 1.05rem; font-weight: 500; margin: 0 0 6px; }
.pm-mvcheck { list-style: none; margin: 0; padding: 0; }
.pm-mvcheck li { border-left: 2px solid var(--pm-line); padding: 2px 0 2px 12px; margin: 6px 0; font-size: .9rem; }
.pm-mvcheck li.is-bad { border-color: var(--pm-bad); color: var(--pm-bad); }
.pm-mvcheck li.is-warn, .pm-mvcheck li.is-miss { border-color: var(--pm-warn); }
.pm-mvcheck li.is-low { border-color: var(--pm-faint); }
.pm-mvcheck li.is-ok { border-color: var(--pm-ok); color: var(--pm-muted); }

.pm-extras { margin: 10px 0 0; display: grid; gap: 6px; }
.pm-extra { display: grid; grid-template-columns: minmax(120px, 180px) 90px 3.2em auto; gap: 8px; align-items: center; justify-content: start; }
.pm-extra input { min-height: 38px; }
.pm-extra-u { font-size: .86rem; color: var(--pm-muted); }
.pillmath-page .pm-extra-add { width: auto; max-width: 260px; justify-self: start; }
.pm-plan-notes { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--pm-line-soft); }
.pm-plan-notes ul { margin: 4px 0 0; padding-left: 18px; font-size: .9rem; }
.pm-plan-notes li { margin: 4px 0; }

/* Open stack card: three labelled blocks */
.pm-sblock { padding: 14px 0 12px; }
.pm-sblock + .pm-sblock { border-top: 1px solid var(--pm-line-soft); }
.pm-sblock-h { font-family: var(--pm-serif); font-size: .95rem; font-weight: 500; color: var(--pm-muted); margin: 0 0 8px; }
.pm-sblock .pm-row { margin: 0 0 8px; }
.pm-sblock .pm-row:last-child { margin-bottom: 0; }
.pm-row-end { align-items: flex-end; }
.pm-row-end .pm-ev-row { margin: 0 0 8px; }
.pm-per { color: var(--pm-muted); font-size: .9rem; padding: 0 2px; }
.pm-tagline { margin: 2px 0 0; }
.pm-fromlist { list-style: none; margin: 4px 0 0; padding: 0; font-size: .9rem; }
.pm-fromlist li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.pm-from-a { color: var(--pm-muted); white-space: nowrap; }
.pm-fline { align-items: flex-end; }
.pm-fline-x { padding-bottom: 8px; }
.pm-addform { margin-top: 2px; }
.pm-tagline .pm-tag { margin-right: 6px; }
.pm-sblock .pm-field.pm-grow { flex: 1 1 200px; }
.pm-sblock .pm-field.pm-grow select { width: 100%; }
.pm-sblock .pm-answer { margin-top: 0; }
.pm-sblock .pm-bestnote { margin-top: 10px; }

.pm-sblock .pm-field, .pm-sblock .pm-inline > select, .pm-sblock .pm-inline > input { min-width: 0; max-width: 100%; }
.pm-sblock .pm-inline { max-width: 100%; }
@media (max-width: 560px) {
	.pm-sblock .pm-field { flex: 1 1 100%; }
	.pm-sblock .pm-inline > input { width: 5.5em; }
	.pm-sblock .pm-inline > select { max-width: 9em; }
	.pm-extra { grid-template-columns: minmax(0, 1fr) 72px 2.6em auto; }
}
.pm-sbody select { width: 100%; min-width: 0; }
.pm-sbody .pm-inline > select { width: auto; flex: 0 1 auto; }
.pm-sbody .pm-field { min-width: 0; }
.pm-sblock .pm-inline { flex-wrap: nowrap; }
.pm-sblock .pm-inline > input { width: 6.5em; }
.pm-sblock .pm-inline > select { flex: 0 1 auto; }

.pm-sblock .pm-row > .pm-field:not(.pm-grow) { flex: 0 1 auto; }
.pm-sblock .pm-extra-u { white-space: nowrap; }

.pm-add-s { max-width: 320px; }
.pm-addlist li.pm-addgroup { font-size: .76rem; font-weight: 600; color: var(--pm-muted); background: none; cursor: default; padding-bottom: 2px; }
.pm-addlist li.pm-addgroup:hover { background: none; }
@media (max-width: 560px) {
	.pm-card { flex-wrap: wrap; }
	.pm-card-t { white-space: normal; }
	.pm-card-f { order: 3; white-space: normal; }
}
.pm-plan-notes li.is-apart { color: var(--pm-ink); }
.pm-plan-notes li.is-apart::marker { color: var(--pm-bad); }
.pm-sc { position: relative; }
.pm-sc-in { width: 100%; padding-right: 34px !important; }
.pm-sc .pm-sc-car { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--pm-muted); pointer-events: none; }
.pm-sc-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--pm-r-s); box-shadow: 0 10px 28px rgba(28, 40, 36, .14); max-height: 300px; overflow-y: auto; }
.pm-sc-list li { padding: 9px 12px; border-radius: 4px; cursor: pointer; }
.pm-sc-list li.is-active, .pm-sc-list li:hover { background: var(--pm-sage-2); }
.pm-sc-list li[aria-selected="true"] { font-weight: 600; color: var(--pm-green); }
.pm-sc-list li[aria-disabled="true"] { color: var(--pm-muted); cursor: default; }
.pm-stips.pm-stips-row { margin: 12px 0 0; }
.pm-stips.pm-stips-row li { font-size: .86rem; margin: 6px 0; }
.pm-code-hint { margin-top: 10px; color: var(--pm-muted); }
.pm-browse-all { margin: 16px 0 0; }
.pm-browse-all a { font-weight: 600; }
.pm-extra-us { max-width: 110px; }
.pm-tnote.is-check { margin-top: 5px; color: var(--pm-bad); }
.pm-about { margin: 10px 0 0; }
.pm-about > summary { cursor: pointer; font-size: .9rem; color: var(--pm-muted); padding: 2px 0; }
.pm-about > summary:hover { color: var(--pm-ink); }
.pm-about-body { padding-top: 6px; }
.pm-about-body > *:first-child { margin-top: 0; }
.pm-answer.is-empty { background: none; border-style: dashed; }
.pm-resultsec .pm-result { margin-top: 8px; }

/* Wide screens: inputs on the left, the answer beside them instead of below the fold. */
@media (min-width: 1100px) {
	.pm-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); column-gap: 36px; align-items: start; }
	.pm-calc > * { grid-column: 1; min-width: 0; }
	.pm-calc > .pm-resultsec, .pm-calc > .pm-check, .pm-calc > .pm-actions { grid-column: 2; }
	.pm-calc > .pm-resultsec { grid-row: 1; }
	.pm-calc > .pm-check { grid-row: 2; }
	.pm-calc > .pm-actions { grid-row: 3; }
	.pm-calc > .pm-resultsec, .pm-calc > .pm-check { border-bottom: 0; }
	.pm-calc > .pm-actions { margin-top: 4px; }
}

/* Dialogs in the site's own clothes, instead of the browser's. */
.pm-dlg-open, .pm-dlg-open body { overflow: hidden; }
.pm-dlg-back { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(28, 40, 36, .42); }
.pm-dlg { width: min(460px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--pm-r); box-shadow: 0 20px 60px rgba(28, 40, 36, .26); padding: 22px 24px; }
.pm-dlg-h { margin: 0 0 8px; font-family: var(--pm-serif); font-size: 1.25rem; font-weight: 500; line-height: 1.25; }
.pm-dlg-b { margin: 0 0 14px; color: var(--pm-muted); line-height: 1.5; }
.pm-dlg-in, .pm-dlg-ta { width: 100%; box-sizing: border-box; font: inherit; }
.pm-dlg-ta { font-size: .86rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; resize: vertical; }
.pm-dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.pm-btn-danger { background: var(--pm-bad); border-color: var(--pm-bad); }
.pm-btn-danger:hover { background: #823125; border-color: #823125; }
@media (max-width: 420px) { .pm-dlg-foot { flex-direction: column-reverse; } .pm-dlg-foot .pm-btn { width: 100%; } }
