/* Peptide COA Manager - Frontend styles */

.pcm-library {
	font-family: inherit;
	color: inherit;
	margin: 1.5em 0;
	/* CSS custom property the theme can override to clear its own sticky header
	   (Simple Banner + floating Peptidology menu). Default = 100px which fits
	   most themes; adjust with .pcm-library { --pcm-sticky-offset: 140px; } */
	--pcm-sticky-offset: 100px;
}

.pcm-toolbar {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 18px;
	position: sticky;
	top: var(--pcm-sticky-offset);
	z-index: 50;
	background: #fff;
	padding: 10px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* On phones the toolbar stacks tall (search field + wrapped filter pills, ~265px),
   so sticky pins it across the middle of the small viewport and it blocks the
   library while scrolling (QA July batch, Android/iOS #1). Below 640px let it
   scroll with the page; sticky stays desktop/tablet only. */
@media (max-width: 640px) {
	.pcm-toolbar { position: static; }
}

/* ---------- "How we test" explainer banner ---------- */
.pcm-explainer {
	margin-bottom: 18px;
	padding: 14px 16px;
	border: 1px solid #bfdbfe;
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	border-radius: 10px;
	color: #1e3a8a;
}
.pcm-explainer[hidden] { display: none !important; }
.pcm-explainer-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.pcm-explainer-title { display: flex; align-items: center; gap: 8px; font-size: 1em; }
.pcm-explainer-icon  { color: #1d4ed8; flex-shrink: 0; }
.pcm-explainer-dismiss {
	background: transparent; border: 0; color: #1e40af;
	font-size: 1.5em; line-height: 1; cursor: pointer;
	padding: 0 4px;
}
.pcm-explainer-dismiss:hover { color: #1e3a8a; }
.pcm-explainer-body { font-size: 0.9em; line-height: 1.5; color: #1e3a8a; }
.pcm-explainer-body p { margin: 8px 0; }
.pcm-explainer-tiers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 10px;
	margin: 10px 0 6px;
}
.pcm-explainer-tier {
	background: rgba(255, 255, 255, 0.55);
	padding: 10px 12px;
	border-radius: 8px;
}
.pcm-explainer-tier p { margin: 4px 0 0; font-size: 0.93em; color: #1e40af; }
.pcm-explainer-foot { font-size: 0.82em; color: #1e40af; margin: 8px 0 0; font-style: italic; }

/* ---------- Stats footer (verification timestamp) ---------- */
.pcm-stats-footer {
	margin: 6px 0 16px;
	font-size: 0.78em;
	color: #64748b;
	display: flex;
	align-items: center;
	gap: 6px;
}
.pcm-stats-foot-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #10b981;
	box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
	animation: pcm-pulse-green 2.4s infinite;
}
@keyframes pcm-pulse-green {
	0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
	70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
	100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ---------- "Just released" + "Newly 14×" markers ---------- */
.pcm-new-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #10b981;
	margin-left: 6px;
	vertical-align: middle;
	box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
	animation: pcm-pulse-green 2s infinite;
}
.pcm-new-pill {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 5px;
	font-size: 0.68em;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
	background: #10b981;
	color: #fff;
	border-radius: 999px;
	text-transform: uppercase;
	vertical-align: middle;
}
.pcm-tier-upgraded-pill {
	display: inline-block;
	margin-left: 3px;
	padding: 0 5px;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1.2;
	background: #fef9c3;
	color: #854d0e;
	border: 1px solid #fde68a;
	border-radius: 999px;
	vertical-align: middle;
	cursor: help;
}

/* ---------- Floating back-to-top pill ---------- */
.pcm-backtotop {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9000;
	background: #2271b1;
	color: #fff;
	padding: 10px 14px;
	border-radius: 999px;
	border: 0;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	font: inherit;
	font-size: 0.85em;
	font-weight: 600;
	display: none;
	align-items: center;
	gap: 6px;
}
.pcm-backtotop:hover { background: #1d4ed8; }
.pcm-backtotop-visible { display: inline-flex; }

/* ---------- Stats banner ---------- */
.pcm-library-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin-bottom: 22px;
	padding: 16px;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}
.pcm-stat-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 14px 16px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pcm-stat-card-wide {
	grid-column: span 2;
}
@media (max-width: 720px) {
	.pcm-stat-card-wide { grid-column: span 1; }
}
.pcm-stat-num {
	font-size: 1.85em;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	margin: 0;
}
.pcm-stat-lbl {
	font-size: 0.74em;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-top: 6px;
	font-weight: 600;
}
.pcm-stat-sub {
	font-size: 0.78em;
	color: #94a3b8;
	margin-top: 3px;
	font-style: italic;
}
.pcm-stat-labs {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.pcm-stat-labs li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	font-size: 0.85em;
	color: #334155;
	border-bottom: 1px dashed #e5e7eb;
	padding-bottom: 4px;
}
.pcm-stat-labs li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}
.pcm-stat-lab-name { font-weight: 500; }
.pcm-stat-lab-count {
	font-size: 0.92em;
	color: #64748b;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.pcm-search-label {
	font-weight: 600;
	font-size: 0.95em;
}

.pcm-search-input {
	width: 100%;
	max-width: 520px;
	padding: 10px 12px;
	border: 1px solid #c8ccd2;
	border-radius: 6px;
	font-size: 1em;
	box-sizing: border-box;
}

.pcm-search-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.pcm-results {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

/* ---------- Product card ----------
   Layout is locked down with high-specificity, !important resets so host themes
   can't reorder children (e.g. via `section { display: flex; flex-direction: row-reverse }`
   or `h3 { position: sticky; top: 60px }`), reposition the heading, or float it
   weirdly when scrolling. Cards are now <div> not <section>, and headings are
   <div role="heading"> not <h3>, so most theme heading/section rules don't apply at all. */
.pcm-library .pcm-product-block {
	position: static !important;
	display: block !important;
	float: none !important;
	clear: both !important;
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	isolation: isolate;
}

.pcm-library .pcm-product-head {
	position: static !important;
	top: auto !important;
	float: none !important;
	display: flex !important;
	flex-direction: row !important;
	align-items: flex-start !important;
	justify-content: space-between !important;
	gap: 16px !important;
	padding: 14px 18px !important;
	margin: 0 !important;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
	box-sizing: border-box;
}
.pcm-library .pcm-product-head-main {
	display: flex !important;
	flex-direction: column !important;
	gap: 4px !important;
	min-width: 0;
	flex: 1 1 auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

.pcm-library .pcm-product-name {
	position: static !important;
	top: auto !important;
	float: none !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 1.15em !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: #0f172a;
	letter-spacing: normal;
	text-transform: none;
}
.pcm-library .pcm-product-name a { color: inherit; text-decoration: none; }
.pcm-library .pcm-product-name a:hover { color: #2271b1; text-decoration: none; }

.pcm-product-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 0.82em;
	color: #6b7280;
}
.pcm-sku {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	background: #f3f4f6;
	padding: 1px 7px;
	border-radius: 4px;
	color: #4b5563;
	letter-spacing: 0.02em;
}
.pcm-product-count { color: #6b7280; }

/* ---------- Per-product COA table ----------
   Selectors are intentionally specific (scoped under .pcm-library .pcm-coa-table)
   to beat host-theme rules like `tr:nth-child(odd) { background: … }` and
   `tbody tr:hover { background: pink }` that were painting pink stripes. */
.pcm-library .pcm-coa-table {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	border-collapse: collapse !important;
	font-size: 0.92em;
	color: #1f2937;
	background: #fff;
	/* Fixed layout forces the browser to honor the percentage widths below,
	   so the header row and data rows line up to the same column boundaries. */
	table-layout: fixed !important;
	display: table !important;
}
/* Some themes apply `tr { display: flex }`, `td { display: block }`, or
   floats to all table cells. Lock down the table display model with !important
   so the colgroup widths are honored everywhere. */
.pcm-library .pcm-coa-table colgroup { display: table-column-group !important; }
.pcm-library .pcm-coa-table col      { display: table-column !important; }
.pcm-library .pcm-coa-table thead    { display: table-header-group !important; }
.pcm-library .pcm-coa-table tbody    { display: table-row-group !important; }
.pcm-library .pcm-coa-table tr       {
	display: table-row !important;
	float: none !important;
	width: auto !important;
}
.pcm-library .pcm-coa-table th,
.pcm-library .pcm-coa-table td {
	display: table-cell !important;
	float: none !important;
	box-sizing: border-box !important;
	min-width: 0 !important;
	max-width: none !important;
}
.pcm-library .pcm-coa-table thead tr,
.pcm-library .pcm-coa-table thead tr th {
	background: #f9fafb;
}
.pcm-library .pcm-coa-table thead th {
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
	padding: 9px 16px;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
	white-space: nowrap;
	background: #f9fafb;
}
.pcm-library .pcm-coa-table tbody tr,
.pcm-library .pcm-coa-table tbody tr td {
	background: #fff;
}
.pcm-library .pcm-coa-table tbody tr:nth-child(odd),
.pcm-library .pcm-coa-table tbody tr:nth-child(even),
.pcm-library .pcm-coa-table tbody tr:nth-of-type(odd),
.pcm-library .pcm-coa-table tbody tr:nth-of-type(even) {
	background: #fff;
}
.pcm-library .pcm-coa-table tbody td {
	padding: 11px 16px;
	border-bottom: 1px solid #f1f3f5;
	vertical-align: top;
	background: #fff;
}
.pcm-library .pcm-coa-table tbody tr:last-child td { border-bottom: 0; }
.pcm-library .pcm-coa-table tbody tr:hover td,
.pcm-library .pcm-coa-table tbody tr:nth-child(odd):hover td,
.pcm-library .pcm-coa-table tbody tr:nth-child(even):hover td { background: #f9fafb; }
.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-variant-start td { border-top: 1px solid #e5e7eb; }
.pcm-library .pcm-coa-table tbody tr:first-child.pcm-coa-row-variant-start td { border-top: 0; }

/* "Show N earlier batches" toggle row (between newest row + older rows of same variant). */
.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-toggle {
	background: transparent !important;
}
.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-toggle td {
	padding: 0 !important;
	border-top: 0 !important;
	border-bottom: 1px dashed #e5e7eb !important;
	background: transparent !important;
}
.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-toggle:hover td { background: transparent !important; }
.pcm-batches-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	background: #f8fafc;
	border: 0;
	border-top: 1px solid #e5e7eb;
	padding: 7px 12px;
	font: inherit;
	font-size: 0.82em;
	font-weight: 500;
	color: #2271b1;
	cursor: pointer;
	letter-spacing: 0.01em;
	transition: background 0.12s;
}
.pcm-batches-toggle:hover,
.pcm-batches-toggle:focus { background: #eef2f7; color: #1d4ed8; outline: none; }
.pcm-batches-toggle-open { background: #eef2f7; }
.pcm-batches-toggle-arrow { font-size: 0.9em; line-height: 1; }

/* Older-batch rows: subtle muting so they're visually secondary to the newest row. */
.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-older td { background: #fafbfc; }
.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-older .pcm-lot-link { color: #475569; }
.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-older .pcm-variant-label-repeat { color: #94a3b8; }
.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-older[hidden] { display: none !important; }

/* Column widths — sum to 100% so table-layout:fixed gives every cell its share.
   Real widths now come from the <colgroup> in the HTML; these are belt-and-suspenders. */
.pcm-library .pcm-coa-table tbody tr.pcm-filtered-out { display: none !important; }
.pcm-library .pcm-product-block.pcm-block-empty { display: none !important; }

.pcm-library .pcm-coa-table .pcm-col-variant { width: 12%; }
.pcm-library .pcm-coa-table .pcm-col-lot     { width: 12%; white-space: normal; overflow: hidden; text-overflow: ellipsis; }
.pcm-library .pcm-coa-table .pcm-col-date    { width: 10%; white-space: nowrap; color: #4b5563; }
.pcm-library .pcm-coa-table .pcm-col-vials   { width: 6%;  white-space: nowrap; text-align: center; }
.pcm-library .pcm-coa-table .pcm-col-purity  { width: 9%;  white-space: nowrap; }
.pcm-library .pcm-coa-table .pcm-col-tier    { width: 11%; white-space: normal; overflow: hidden; text-align: center; }
.pcm-library .pcm-coa-table .pcm-col-tests   { width: 28%; }
.pcm-library .pcm-coa-table .pcm-col-file    { width: 12%; white-space: nowrap; text-align: right; }
.pcm-library .pcm-coa-table thead .pcm-col-file  { text-align: right; }
.pcm-library .pcm-coa-table thead .pcm-col-vials { text-align: center; }
.pcm-library .pcm-coa-table thead .pcm-col-tier  { text-align: center; }

/* Tier pill: tight, prominent, with a subtle metallic gradient so the premium
   14× tier reads visually distinct from the standard 7× tier. */
.pcm-tier-pill {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	border: 1px solid transparent;
	font-variant-numeric: tabular-nums;
}
.pcm-tier-14x {
	background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
	color: #78350f;
	border-color: #f59e0b;
	box-shadow: 0 1px 0 rgba(245, 158, 11, 0.15);
}
.pcm-tier-7x {
	background: #dbeafe;
	color: #1e40af;
	border-color: #93c5fd;
}

/* Vials count cell: emphasized tabular number, faint "~" prefix when estimated. */
.pcm-vials-count {
	display: inline-block;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	color: #0f172a;
}
.pcm-vials-est { color: #6b7280; font-weight: 500; }
.pcm-vials-tilde {
	font-size: 0.85em;
	color: #94a3b8;
	margin-right: 1px;
	vertical-align: 1px;
}

.pcm-variant-label {
	font-weight: 500;
	color: #0f172a;
	display: inline-block;
}
.pcm-variant-label-repeat { color: #9ca3af; font-weight: 400; }
.pcm-variant-batch-count {
	display: inline-block;
	margin-left: 6px;
	font-size: 0.78em;
	color: #6b7280;
	background: #f3f4f6;
	padding: 1px 8px;
	border-radius: 999px;
	white-space: nowrap;
	vertical-align: middle;
}
.pcm-coa-row-discontinued .pcm-variant-label { color: #6b7280; font-style: italic; }
.pcm-discontinued-tag {
	display: inline-block;
	margin-left: 6px;
	font-size: 0.72em;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6b7280;
	background: #f3f4f6;
	padding: 1px 7px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
}

.pcm-lot-link {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.95em;
	color: #2271b1;
	text-decoration: none;
}
.pcm-lot-link:hover { text-decoration: underline; }

.pcm-purity-pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 0.82em;
	font-weight: 600;
	letter-spacing: 0.01em;
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}
.pcm-purity-medium { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.pcm-purity-low    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

/* ---------- Test result pills ---------- */
.pcm-test-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 5px;
	align-items: center;
	line-height: 1.2;
}
/* Product-page placement: sits between the badge row and the variant note.
   Slightly larger gap + a thin top divider so the pills read as a separate
   "test summary" group rather than just more chrome on the badge row. */
.pcm-product-test-pills {
	margin: 8px 0 6px;
	padding-top: 8px;
	border-top: 1px dashed #e5e7eb;
}
.pcm-product-test-pills .pcm-test-pills {
	gap: 5px 6px;
}
.pcm-product-test-pills .pcm-test-pill {
	font-size: 0.78em;
}
.pcm-test-pill {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 7px 2px 6px;
	border-radius: 999px;
	font-size: 0.74em;
	font-weight: 500;
	white-space: nowrap;
	border: 1px solid transparent;
	letter-spacing: 0.01em;
}
.pcm-test-pill-icon {
	font-size: 0.95em;
	font-weight: 700;
	line-height: 1;
}
.pcm-test-pill-label { line-height: 1; }

.pcm-test-pill-pass {
	background: #ecfdf5;
	color: #047857;
	border-color: #a7f3d0;
}
.pcm-test-pill-fail {
	background: #fee2e2;
	color: #b91c1c;
	border-color: #fecaca;
}
.pcm-test-pill-pending {
	background: #fef3c7;
	color: #92400e;
	border-color: #fde68a;
}
.pcm-test-pill-none {
	background: #f3f4f6;
	color: #9ca3af;
	border-color: #e5e7eb;
}

.pcm-file-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px;
	border-radius: 999px;
	font-size: 0.85em;
	font-weight: 500;
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.pcm-file-pill:hover { background: #2563eb; color: #fff; border-color: #2563eb; }
.pcm-file-pill svg { display: inline-block; }

.pcm-dash { color: #cbd5e1; }

/* Row highlight when WC fires found_variation. Wins over theme/zebra rules. */
.pcm-library .pcm-coa-table tbody tr.pcm-variant-active td,
.pcm-library .pcm-coa-table tbody tr.pcm-variant-active:hover td {
	background: #fffbeb;
	box-shadow: inset 3px 0 0 #f59e0b;
}

.pcm-empty {
	padding: 28px;
	text-align: center;
	color: #6b7280;
	background: #f9fafb;
	border-radius: 8px;
	border: 1px dashed #e5e7eb;
}

.pcm-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.15s;
}

/* ---------- Mobile (label/value stacked) ---------- */
@media (max-width: 640px) {
	.pcm-library .pcm-product-head { flex-direction: column !important; align-items: flex-start !important; padding: 12px 14px !important; }
	.pcm-library .pcm-coa-table thead { display: none !important; }
	.pcm-library .pcm-coa-table,
	.pcm-library .pcm-coa-table tbody,
	.pcm-library .pcm-coa-table tr,
	.pcm-library .pcm-coa-table td { display: block !important; width: auto !important; }
	.pcm-library .pcm-coa-table tbody tr {
		padding: 12px 14px !important;
		border-bottom: 1px solid #e5e7eb !important;
	}
	.pcm-library .pcm-coa-table tbody tr:last-child { border-bottom: 0 !important; }
	.pcm-library .pcm-coa-table tbody tr:hover td { background: transparent; }
	.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-variant-start { border-top: 0 !important; }
	.pcm-library .pcm-coa-table tbody td {
		padding: 3px 0 !important;
		border: 0 !important;
		display: flex !important;
		justify-content: space-between !important;
		align-items: center !important;
		gap: 12px;
	}
	.pcm-library .pcm-coa-table tbody td.pcm-col-variant {
		font-size: 1.02em;
		padding-bottom: 6px !important;
		margin-bottom: 6px;
		border-bottom: 1px dashed #e5e7eb !important;
	}
	.pcm-library .pcm-coa-table tbody td.pcm-col-variant:before { content: ""; }
	.pcm-library .pcm-coa-table tbody td:before {
		content: attr(data-label);
		font-size: 0.78em;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		color: #6b7280;
		font-weight: 500;
		flex-shrink: 0;
	}
	.pcm-library .pcm-coa-table tbody td.pcm-col-file { justify-content: flex-end !important; }
	.pcm-library .pcm-coa-table tbody td.pcm-col-file:before { display: none !important; }
	/* "Show N earlier batches" toggle on mobile: full-width button bar, no card padding around it. */
	.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-toggle {
		padding: 0 !important;
		border-bottom: 0 !important;
	}
	.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-toggle td {
		padding: 0 !important;
		display: block !important;
	}
	.pcm-library .pcm-coa-table tbody tr.pcm-coa-row-toggle td:before { display: none !important; }
	.pcm-batches-toggle {
		padding: 12px 14px;
		font-size: 0.95em;
	}
	/* Test pills wrap onto their own row below the label since 7 pills don't fit beside one. */
	.pcm-library .pcm-coa-table tbody td.pcm-col-tests {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 4px !important;
	}
	.pcm-variant-label-repeat { display: none; }
}

/* ============================
   Single COA page
   ============================ */
.pcm-coa-single {
	max-width: 880px;
	margin: 1.5em auto;
	font-family: inherit;
}
.pcm-coa-head { border-bottom: 2px solid #2271b1; padding-bottom: 12px; margin-bottom: 18px; }
.pcm-coa-title { margin: 0 0 4px; font-size: 1.6em; }
.pcm-coa-subtitle { margin: 0; color: #4b5563; font-size: 1.05em; }
.pcm-coa-subtitle a { text-decoration: none; }
.pcm-coa-variant { color: #6b7280; }

.pcm-coa-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px 24px;
	margin: 20px 0;
	padding: 16px 20px;
	background: #f7f8fa;
	border-radius: 8px;
}
.pcm-coa-facts div { display: flex; flex-direction: column; gap: 2px; }
.pcm-coa-facts dt {
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b7280;
	font-weight: 600;
	margin: 0;
}
.pcm-coa-facts dd { margin: 0; font-size: 1em; color: #111827; }
.pcm-coa-fresh { color: #6b7280; font-size: 0.9em; margin-left: 4px; }

.pcm-coa-notes { margin: 16px 0; }
.pcm-coa-notes h3 { font-size: 1em; margin: 0 0 6px; }

.pcm-coa-viewer { margin: 24px 0; }
.pcm-coa-viewer-actions { margin-bottom: 10px; }
.pcm-coa-embed { width: 100%; height: 720px; border: 1px solid #e3e5e8; border-radius: 6px; background: #fff; }
.pcm-coa-image { max-width: 100%; height: auto; border: 1px solid #e3e5e8; border-radius: 6px; }

.pcm-coa-footer { margin-top: 28px; padding-top: 14px; border-top: 1px solid #eef0f2; color: #6b7280; font-size: 0.9em; }
.pcm-coa-perma code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.pcm-coa-disclaimer { margin-top: 8px; font-style: italic; }

/* ============================
   Buttons
   ============================ */
.pcm-button {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 500;
	border: 1px solid #c8ccd2;
	background: #fff;
	color: inherit;
	cursor: pointer;
	font-size: 0.95em;
}
.pcm-button:hover { background: #f7f8fa; }
.pcm-button-primary { background: #2271b1; color: #fff; border-color: #2271b1; }
.pcm-button-primary:hover { background: #1c5e95; color: #fff; }

/* ============================
   Lot lookup form
   ============================ */
.pcm-lookup {
	max-width: 640px;
	margin: 1.5em 0;
	padding: 24px;
	background: #fff;
	border: 1px solid #e3e5e8;
	border-radius: 8px;
}
.pcm-lookup-title { margin: 0 0 6px; }
.pcm-lookup-help { color: #4b5563; margin: 0 0 14px; }
.pcm-lookup-form { display: flex; gap: 8px; flex-wrap: wrap; }
.pcm-lookup-input {
	flex: 1 1 240px;
	padding: 10px 12px;
	border: 1px solid #c8ccd2;
	border-radius: 6px;
	font-size: 1em;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	box-sizing: border-box;
}
.pcm-lookup-input:focus { outline: none; border-color: #2271b1; box-shadow: 0 0 0 2px rgba(34,113,177,0.15); }

.pcm-lookup-results { margin-top: 18px; }
.pcm-lookup-empty {
	padding: 14px;
	background: #fff5f5;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #7f1d1d;
}
.pcm-lookup-list { list-style: none; padding: 0; margin: 8px 0 0; }
.pcm-lookup-list li {
	padding: 10px 12px;
	border: 1px solid #eef0f2;
	border-radius: 6px;
	margin-bottom: 6px;
}
.pcm-lookup-list a { text-decoration: none; }
.pcm-lookup-date { color: #6b7280; margin-left: 6px; }

/* ============================
   Product badges
   ============================ */
.pcm-hidden { display: none !important; }

.pcm-badge-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 10px 0 6px;
}
.pcm-badge-row-loop {
	margin: 4px auto 6px;
	gap: 6px;
	justify-content: center;
	text-align: center;
}
/* Empty tier slot on the single product page badge row collapses so it doesn't
   leave an awkward flex gap when the product doesn't qualify for 7× or 14×. */
.pcm-tier-slot:empty { display: none; }

/* ---------- Filter pills (toolbar) ---------- */
.pcm-filter-pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}
.pcm-filter-label {
	font-size: 0.82em;
	font-weight: 600;
	color: #6b7280;
	margin-right: 4px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.pcm-filter-pill {
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #e5e7eb;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.82em;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s;
}
.pcm-filter-pill:hover { background: #e5e7eb; }
.pcm-filter-pill-active {
	background: #1e40af;
	color: #fff;
	border-color: #1e40af;
}
.pcm-filter-pill-active:hover { background: #1e3a8a; }

/* ---------- Sortable column headers ---------- */
.pcm-library .pcm-coa-table thead .pcm-col-sortable {
	cursor: pointer;
	user-select: none;
}
.pcm-library .pcm-coa-table thead .pcm-col-sortable:hover { color: #1e40af; }
.pcm-sort-arrow {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 4px;
	vertical-align: middle;
	opacity: 0.25;
}
.pcm-col-sortable.pcm-sort-active .pcm-sort-arrow { opacity: 1; }
.pcm-col-sortable.pcm-sort-active.pcm-sort-asc  .pcm-sort-arrow {
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-bottom: 5px solid #1e40af;
}
.pcm-col-sortable.pcm-sort-active.pcm-sort-desc .pcm-sort-arrow {
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid #1e40af;
}

/* ---------- Compare checkboxes ---------- */
.pcm-compare-check {
	display: inline-block;
	margin-right: 4px;
	vertical-align: middle;
	opacity: 0.4;
	transition: opacity 0.12s;
}
.pcm-library .pcm-coa-table tbody tr:hover .pcm-compare-check,
.pcm-compare-check-input:checked + * .pcm-compare-check,
.pcm-compare-check:has(input:checked) { opacity: 1; }
.pcm-compare-check-input { cursor: pointer; }
/* Touch devices: no hover, so always full opacity. */
@media (hover: none), (max-width: 640px) {
	.pcm-compare-check { opacity: 1; }
}

/* ---------- "Print summary" link in compound card header ---------- */
.pcm-library .pcm-print-link {
	font-size: 0.78em;
	font-weight: 500;
	color: #6b7280;
	text-decoration: none;
	margin-left: 10px;
}
.pcm-library .pcm-print-link:hover { color: #1d4ed8; }
@media print {
	/* Always-hide page chrome inside the library during browser print. */
	.pcm-print-link, .pcm-toolbar, .pcm-library-stats, .pcm-explainer,
	.pcm-stats-footer, .pcm-filter-empty, .pcm-compare-bar, .pcm-compare-modal,
	.pcm-backtotop, .pcm-batches-toggle {
		display: none !important;
	}
	.pcm-library .pcm-product-block { break-inside: avoid; page-break-inside: avoid; }
	/* Show every hidden row (older batches + history chart) during print. */
	.pcm-coa-row-older[hidden], .pcm-coa-row-history[hidden] { display: table-row !important; }
}
/* "Print summary" mode — body class added by JS just before window.print. */
body.pcm-printing-compound .pcm-library > *:not(.pcm-results),
body.pcm-printing-compound .pcm-product-block:not([data-pcm-print-target]),
body.pcm-printing-compound header,
body.pcm-printing-compound footer,
body.pcm-printing-compound nav,
body.pcm-printing-compound aside,
body.pcm-printing-compound .site-header,
body.pcm-printing-compound .site-footer,
body.pcm-printing-compound #wpadminbar {
	display: none !important;
}
body.pcm-printing-compound .pcm-product-block[data-pcm-print-target] {
	box-shadow: none;
	border: 1px solid #e5e7eb;
}

/* ---------- Empty-filter state panel ---------- */
.pcm-filter-empty {
	margin: 16px 0;
	padding: 28px 24px;
	background: #f9fafb;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	text-align: center;
}
.pcm-filter-empty[hidden] { display: none !important; }
.pcm-filter-empty-title {
	margin: 0 0 4px;
	font-size: 1.05em;
	font-weight: 600;
	color: #334155;
}
.pcm-filter-empty-sub {
	margin: 0 0 14px;
	font-size: 0.92em;
	color: #64748b;
}
.pcm-filter-reset {
	background: #2271b1;
	color: #fff;
	border: 0;
	padding: 8px 16px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
}
.pcm-filter-reset:hover { background: #1d4ed8; }

/* ---------- Compare floating bar ---------- */
.pcm-compare-bar {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 9000;
	display: flex;
	align-items: center;
	gap: 14px;
	background: #1f2937;
	color: #fff;
	padding: 10px 16px;
	border-radius: 8px;
	box-shadow: 0 12px 28px rgba(0,0,0,0.18), 0 4px 10px rgba(0,0,0,0.12);
	font-size: 0.9em;
}
.pcm-compare-bar[hidden] { display: none; }
.pcm-compare-count { color: #facc15; font-weight: 600; }
.pcm-compare-btn {
	background: #2563eb;
	color: #fff;
	border: 0;
	padding: 7px 14px;
	border-radius: 5px;
	font-weight: 600;
	cursor: pointer;
}
.pcm-compare-btn:hover { background: #1d4ed8; }
.pcm-compare-clear {
	background: transparent;
	color: #fff;
	border: 1px solid #4b5563;
	padding: 7px 12px;
	border-radius: 5px;
	cursor: pointer;
}

/* ---------- Compare modal ---------- */
.pcm-compare-modal {
	position: fixed;
	inset: 0;
	z-index: 9500;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.pcm-compare-modal[hidden] { display: none; }
.pcm-compare-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}
.pcm-compare-modal-inner {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 30px 60px rgba(0,0,0,0.25);
	width: 100%;
	max-width: 980px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px;
}
.pcm-compare-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: transparent;
	border: 0;
	font-size: 1.6em;
	color: #6b7280;
	cursor: pointer;
	line-height: 1;
}
.pcm-compare-modal-title { margin: 0 0 16px; font-size: 1.25em; color: #0f172a; }
.pcm-compare-grid {
	display: grid;
	gap: 14px;
}
.pcm-compare-col {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 14px;
	background: #fafbfc;
}
.pcm-compare-product { font-size: 1em; font-weight: 600; color: #0f172a; margin-bottom: 2px; }
.pcm-compare-variant { font-size: 0.85em; color: #6b7280; margin-bottom: 10px; }
.pcm-compare-rows { margin: 0; }
.pcm-compare-rows dt {
	font-size: 0.72em;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	margin-top: 8px;
}
.pcm-compare-rows dd { margin: 2px 0 0 0; font-size: 0.92em; color: #1f2937; }

/* ---------- History chart row ---------- */
.pcm-coa-row-history td {
	background: #f9fafb !important;
	padding: 10px 14px !important;
	border-top: 1px solid #e5e7eb !important;
}
.pcm-history-chart-wrap { padding: 4px 0; }
.pcm-history-chart-title {
	font-size: 0.78em;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	margin-bottom: 4px;
}
.pcm-history-chart { display: block; max-width: 600px; }
/* Tier pill on the product card (shop loop): same look as the library Tier column
   for visual continuity, but slightly tighter to fit alongside the Purity badge. */
.pcm-badge.pcm-tier-pill {
	padding: 3px 10px;
	font-weight: 700;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
}
.pcm-badge.pcm-tier-14x {
	background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
	color: #78350f;
	border-color: #f59e0b;
	box-shadow: 0 1px 0 rgba(245, 158, 11, 0.15);
}
.pcm-badge.pcm-tier-7x {
	background: #dbeafe;
	color: #1e40af;
	border-color: #93c5fd;
}
/* "New — Coming Soon" (re-merged 1.45.0): published product, all variations
   disabled — a pre-launch listing. Brand-magenta so it reads as a tease. */
.pcm-badge.pcm-coming-soon-pill {
	background: #fdf2f8;
	color: #be185d;
	border-color: #f9a8d4;
	font-weight: 600;
	letter-spacing: 0.01em;
}
.pcm-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 0.82em;
	font-weight: 500;
	text-decoration: none;
	border: 1px solid transparent;
	line-height: 1.3;
	white-space: nowrap;
	transition: background-color 0.12s ease, border-color 0.12s ease;
}
.pcm-badge:hover { text-decoration: none; }
.pcm-badge strong { font-weight: 600; letter-spacing: 0.01em; }

.pcm-badge-purity {
	background: #ecfdf5;
	color: #065f46;
	border-color: #a7f3d0;
}
.pcm-badge-purity:hover { background: #d1fae5; color: #064e3b; border-color: #6ee7b7; }

.pcm-badge-tested.pcm-badge-fresh { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.pcm-badge-tested.pcm-badge-fresh:hover { background: #dbeafe; }
.pcm-badge-tested.pcm-badge-aged  { background: #fffbeb; color: #78350f; border-color: #fde68a; }
.pcm-badge-tested.pcm-badge-aged:hover  { background: #fef3c7; }
.pcm-badge-tested.pcm-badge-stale { background: #fef2f2; color: #7f1d1d; border-color: #fecaca; }
.pcm-badge-tested.pcm-badge-stale:hover { background: #fee2e2; }

.pcm-badge-link {
	background: transparent;
	color: #2271b1;
	border-color: #c8ccd2;
	font-weight: 500;
}
.pcm-badge-link:hover { background: #f3f4f6; color: #1c5e95; border-color: #9ca3af; }

.pcm-badge-scrollto {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
	cursor: pointer;
	font-weight: 500;
}
.pcm-badge-scrollto:hover {
	background: #1c5e95;
	color: #fff;
	border-color: #1c5e95;
	text-decoration: none;
}

.pcm-badge-missing {
	background: #fef2f2;
	color: #7f1d1d;
	border-color: #fecaca;
}

.pcm-badge-variant-note {
	margin: 4px 0 14px;
	font-size: 0.78em;
	font-style: italic;
	color: #6b7280;
	line-height: 1.4;
}

@media (max-width: 480px) {
	.pcm-badge-row { gap: 6px; }
	.pcm-badge { font-size: 0.78em; padding: 4px 10px; }
}

/* "No COA available" fallback message */
.pcm-no-coa {
	margin: 12px 0 14px;
	padding: 12px 14px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-left: 3px solid #9ca3af;
	border-radius: 6px;
	font-size: 0.9em;
	line-height: 1.5;
	color: #374151;
}
.pcm-no-coa-title {
	margin: 0 0 4px;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.95em;
	color: #1f2937;
}
.pcm-no-coa-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #6b7280;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	font-style: normal;
	line-height: 1;
}
.pcm-no-coa-body {
	margin: 0;
	color: #4b5563;
}
.pcm-no-coa-body a {
	color: #2271b1;
	text-decoration: underline;
}
.pcm-no-coa-body a:hover { color: #1c5e95; }

/* Testing-exempt: positive variant of the no-COA block (re-merged 1.45.0). */
.pcm-no-coa--exempt {
	background: #f0fdf4;
	border-color: #bbf7d0;
	border-left-color: #16a34a;
}
.pcm-no-coa--exempt .pcm-no-coa-title { color: #14532d; }
.pcm-no-coa--exempt .pcm-no-coa-icon { background: #16a34a; }

/* ============================
   Quality scorecard
   ============================ */
.pcm-sc { background: #fff; border: 1px solid #e3e5e8; border-radius: 8px; padding: 18px 20px; margin: 18px 0 24px; }
.pcm-sc-title { font-size: 1.1em; font-weight: 500; margin: 0; }
.pcm-tab-scorecard .pcm-sc { margin-top: 0; }

/* In-summary placement — slightly tighter, full width of summary column */
.summary .pcm-tab-scorecards,
.product-summary .pcm-tab-scorecards,
.entry-summary .pcm-tab-scorecards { margin: 16px 0; clear: both; }
.summary .pcm-sc,
.product-summary .pcm-sc,
.entry-summary .pcm-sc { margin: 0; }

.pcm-conf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 14px; padding: 12px 14px; border-radius: 6px; border: 1px solid; }
.pcm-conf-pass { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.pcm-conf-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.pcm-conf-fail { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.pcm-conf-check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.pcm-conf-pass .pcm-conf-check { background: #10b981; }
.pcm-conf-warn .pcm-conf-check { background: #f59e0b; }
.pcm-conf-fail .pcm-conf-check { background: #ef4444; }
.pcm-conf-body { font-size: 13px; line-height: 1.4; }
.pcm-conf-body strong { font-weight: 500; }
.pcm-conf-meta { opacity: 0.85; font-weight: 400; }

.pcm-scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; margin: 0 0 12px; border: 1px solid #eef0f2; border-radius: 6px; overflow: hidden; background: #f9fafb; }
.pcm-scope-cell { padding: 10px 14px; border-right: 1px solid #eef0f2; }
.pcm-scope-cell:last-child { border-right: none; }
.pcm-scope-num { font-size: 22px; font-weight: 500; color: #111827; line-height: 1.1; }
.pcm-scope-lbl { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

.pcm-sc-blurb { font-size: 12.5px; color: #4b5563; margin: 0 0 14px; line-height: 1.5; }
.pcm-sc-loc { color: #6b7280; font-size: 0.95em; }

.pcm-sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pcm-sc-card { padding: 12px 14px; background: #f9fafb; border: 1px solid #eef0f2; border-radius: 6px; }
.pcm-sc-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.pcm-sc-check { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #10b981; color: #fff; font-size: 10px; font-weight: 600; flex-shrink: 0; }
.pcm-sc-check-warn { background: #f59e0b; }
.pcm-sc-check-fail { background: #ef4444; }
.pcm-sc-name { font-weight: 500; font-size: 13px; color: #111827; }
.pcm-sc-value { font-size: 14px; font-weight: 500; margin: 2px 0; color: #111827; }
.pcm-sc-detail { font-size: 11.5px; color: #6b7280; line-height: 1.4; }
.pcm-sc-tag { display: inline-block; padding: 1px 7px; border-radius: 4px; background: #f3f4f6; color: #4b5563; font-size: 10.5px; font-family: ui-monospace, Menlo, monospace; margin-top: 4px; }

.pcm-sc-card-identity { background: #f0fdfa; border-color: #99f6e4; }

.pcm-sc-card-featured { grid-column: 1 / -1; padding: 14px 16px; background: #f0f9ff; border-color: #bae6fd; }
.pcm-sc-feat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.pcm-sc-feat-title { font-size: 14px; font-weight: 500; color: #111827; display: flex; align-items: center; gap: 8px; }
.pcm-sc-feat-pill { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: #bae6fd; color: #075985; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; }
.pcm-sc-feat-why { font-size: 12px; color: #075985; margin: 4px 0 10px; line-height: 1.5; }
.pcm-sc-feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcm-sc-feat-method { background: #fff; border: 1px solid #bae6fd; border-radius: 6px; padding: 10px 12px; }
.pcm-sc-feat-mname { font-weight: 500; font-size: 12.5px; color: #111827; }
.pcm-sc-feat-mlab { font-size: 11.5px; color: #6b7280; margin: 2px 0 6px; }
.pcm-sc-feat-mdetail { font-size: 11px; color: #4b5563; line-height: 1.45; }

/* Heavy-metals: two-tier card with collapsible per-element table. */
.pcm-sc-card-elemental { background: #f0fdfa; border-color: #99f6e4; }
.pcm-sc-card-elemental-fail { background: #fef2f2; border-color: #fecaca; }
.pcm-sc-expand-btn {
	display: inline-flex; align-items: center; gap: 6px;
	margin-top: 8px;
	background: transparent; border: 0; padding: 4px 0;
	color: #0f766e; font: inherit; font-size: 12px; font-weight: 500;
	cursor: pointer;
}
.pcm-sc-expand-btn:hover { color: #115e59; text-decoration: underline; }
.pcm-sc-card-elemental-fail .pcm-sc-expand-btn { color: #b91c1c; }
.pcm-sc-card-elemental-fail .pcm-sc-expand-btn:hover { color: #7f1d1d; }
.pcm-sc-expand-arrow { transition: transform 0.15s ease; display: inline-block; }
.pcm-sc-expand-btn.pcm-sc-expanded .pcm-sc-expand-arrow { transform: rotate(180deg); }
.pcm-sc-expand-body { margin-top: 8px; }
.pcm-sc-elem-table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; border: 1px solid #ddd6fe11; border-radius: 4px; overflow: hidden; }
.pcm-sc-elem-table th, .pcm-sc-elem-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #f3f4f6; }
.pcm-sc-elem-table thead th { background: #f9fafb; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; font-weight: 600; }
.pcm-sc-elem-table tbody tr:last-child td { border-bottom: 0; }
.pcm-sc-elem-sym { color: #6b7280; font-size: 11px; }
.pcm-sc-elem-verdict { text-align: right; }
.pcm-sc-verdict { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 500; }
.pcm-sc-verdict-pass { background: #d1fae5; color: #065f46; }
.pcm-sc-verdict-fail { background: #fee2e2; color: #991b1b; }
.pcm-sc-elem-row-fail td { background: #fef2f2; }
.pcm-sc-elem-foot { font-size: 11px; color: #6b7280; line-height: 1.5; margin: 8px 0 0; }
.pcm-sc-elem-method { margin-top: 6px; }
.pcm-sc-dash { color: #9ca3af; }

.pcm-sc-footer { margin-top: 14px; padding-top: 10px; border-top: 1px solid #eef0f2; font-size: 11.5px; color: #6b7280; }
.pcm-sc-footer a { color: #2271b1; text-decoration: underline; }

/* ============================
   Multi-batch scorecard set
   (aggregate header + batch strip + per-batch scorecards)
   ============================ */
.pcm-batch-set { display: block; }
.pcm-batch-aggregate {
	display: flex; align-items: center; gap: 12px;
	padding: 12px 14px;
	background: #f0f9ff;
	border: 1px solid #bae6fd;
	border-radius: 8px;
	margin: 0 0 12px;
}
.pcm-batch-aggregate-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.pcm-batch-aggregate-body { font-size: 13px; line-height: 1.5; color: #075985; }
.pcm-batch-aggregate-body strong { display: block; font-weight: 500; color: #0c4a6e; }
.pcm-batch-aggregate-detail { color: #075985; }

.pcm-batch-strip {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
	margin: 0 0 16px;
}
.pcm-batch-strip-label {
	font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
	color: #6b7280; font-weight: 500; margin-right: 4px;
}
.pcm-batch-chip {
	display: inline-flex; flex-direction: column; align-items: flex-start;
	padding: 7px 11px;
	border: 1px solid #d1d5db; border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font: inherit; font-size: 12px;
	line-height: 1.3;
	transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.pcm-batch-chip:hover { background: #f3f4f6; border-color: #9ca3af; }
.pcm-batch-chip-active {
	background: #2271b1; color: #fff; border-color: #2271b1;
}
.pcm-batch-chip-active:hover { background: #1c5e95; border-color: #1c5e95; }
.pcm-batch-lot { font-weight: 500; }
.pcm-batch-latest {
	display: inline-block;
	font-size: 9.5px; padding: 1px 5px;
	background: #10b981; color: #fff;
	border-radius: 3px; margin-left: 4px;
	text-transform: uppercase; letter-spacing: 0.04em;
	font-weight: 500;
}
.pcm-batch-chip-active .pcm-batch-latest { background: #fff; color: #2271b1; }
.pcm-batch-date { font-size: 0.85em; color: #6b7280; margin-top: 1px; }
.pcm-batch-chip-active .pcm-batch-date { color: rgba(255,255,255,0.85); }

.pcm-batch-card .pcm-sc { margin-top: 0; margin-bottom: 0; }

/* Discontinued variant indicator */
.pcm-discontinued-tag {
	display: inline-block;
	font-size: 0.7em;
	font-weight: 500;
	padding: 1px 7px;
	border-radius: 4px;
	background: #f3f4f6;
	color: #6b7280;
	border: 1px solid #d1d5db;
	margin-left: 6px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	vertical-align: middle;
}
/* (Legacy variant-block discontinued rules removed in 1.15.0 — now handled per-row.) */

@media (max-width: 540px) {
	.pcm-scope { grid-template-columns: 1fr; }
	.pcm-scope-cell { border-right: none; border-bottom: 1px solid #eef0f2; }
	.pcm-scope-cell:last-child { border-bottom: none; }
	.pcm-sc-feat-grid { grid-template-columns: 1fr; }
}

/* ============================
   [coa_index] flat data grid
   ============================ */
.pcm-index {
	font-family: inherit;
	color: inherit;
	margin: 1.5em 0;
}
.pcm-index-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.pcm-index-toolbar-left {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	flex: 1;
	min-width: 240px;
}
.pcm-index-global {
	flex: 1;
	min-width: 220px;
	padding: 9px 12px;
	border: 1px solid #c8ccd2;
	border-radius: 6px;
	font-size: 1em;
	box-sizing: border-box;
}
.pcm-index-global:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}
.pcm-index-count {
	color: #4b5563;
	font-size: 0.9em;
	white-space: nowrap;
}

.pcm-index-table-wrap { overflow-x: auto; }
.pcm-index-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}
.pcm-index-table th,
.pcm-index-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #eef0f2;
	vertical-align: top;
}
.pcm-index-headers th {
	background: #f7f8fa;
	font-weight: 600;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #4b5563;
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}
.pcm-index-headers th:hover { background: #eef0f2; }
.pcm-index-headers th[data-sort]:after {
	content: '';
	display: inline-block;
	width: 0;
}
.pcm-th-label { display: inline-block; margin-right: 4px; }
.pcm-sort-ind { color: #2271b1; font-size: 0.85em; }

.pcm-index-filters th {
	background: #fff;
	padding: 6px 8px;
}
.pcm-fi {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #d4d7dc;
	border-radius: 4px;
	font-size: 0.9em;
	box-sizing: border-box;
}
.pcm-fi:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}
.pcm-fi-range { white-space: nowrap; }
.pcm-fi-range .pcm-fi {
	width: calc(50% - 4px);
	display: inline-block;
}
.pcm-fi-range .pcm-fi:first-child { margin-right: 4px; }

.pcm-index-body tr:hover { background: #fcfcfd; }
.pcm-index-sku {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.78em;
	color: #6b7280;
	margin-top: 2px;
}

.pcm-index-empty {
	margin: 18px 0;
	padding: 22px;
	text-align: center;
	color: #6b7280;
	background: #f7f8fa;
	border-radius: 6px;
}

.pcm-index-pagination {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: center;
	margin-top: 16px;
}
.pcm-index-pagination button[disabled] { opacity: 0.45; cursor: not-allowed; }
.pcm-page-info { color: #4b5563; font-size: 0.9em; }

/* Responsive: collapse to cards under 720px */
@media (max-width: 720px) {
	.pcm-index-table thead .pcm-index-headers,
	.pcm-index-table thead .pcm-index-filters th:nth-child(n+3) {
		display: none;
	}
	.pcm-index-table thead .pcm-index-filters {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 6px;
		padding: 8px;
	}
	.pcm-index-table thead .pcm-index-filters th {
		display: block;
		padding: 0;
		border: none;
	}
	.pcm-index-table tbody tr {
		display: block;
		padding: 10px;
		border-bottom: 1px solid #eef0f2;
	}
	.pcm-index-table tbody td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 4px 0;
		border: none;
	}
	.pcm-index-table tbody td:before {
		content: attr(data-label);
		font-weight: 600;
		color: #4b5563;
		font-size: 0.8em;
		text-transform: uppercase;
		letter-spacing: 0.04em;
	}
}

/* ============================
   Line-item COA info (My Account + emails)
   ============================ */
.pcm-line-coa-info {
	margin-top: 6px;
	font-size: 0.9em;
	color: #374151;
}
.pcm-line-coa-info a { font-weight: 600; }
.pcm-line-coa-purity { color: #065f46; }

/* ---- Single-product scope banner (1.35.0) — ?pcm_product= deep links ---- */
.pcm-scope-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0 0 14px;
	padding: 10px 14px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	font-size: 0.95em;
	color: #1e3a5f;
}
.pcm-scope-banner-text strong { font-weight: 700; }
.pcm-scope-banner-all {
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.pcm-scope-banner-all:hover,
.pcm-scope-banner-all:focus { text-decoration: underline; }
.pcm-scope-banner-notice {
	background: #fffbeb;
	border-color: #fde68a;
	color: #78350f;
}
@media print {
	.pcm-scope-banner { display: none; }
}

/* ============================================================
   1.41.0 — storefront UX: result count, product CTA, re-open
   explainer, compare-limit message, larger touch targets, and
   reduced-motion support.
   ============================================================ */
.pcm-result-count {
	margin: 6px 2px 10px;
	font-size: 0.9em;
	color: #475569;
}
.pcm-product-cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 2px 0 10px;
	padding: 7px 14px;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.2;
	color: #fff !important;
	background: #2271b1;
	border-radius: 6px;
	text-decoration: none;
}
.pcm-product-cta:hover,
.pcm-product-cta:focus { background: #1e40af; color: #fff !important; text-decoration: none; }
.pcm-explainer-reopen {
	margin-left: 6px;
	padding: 4px 10px;
	font-size: 0.85em;
	color: #1e40af;
	background: #eef2ff;
	border: 1px solid #c7d2fe;
	border-radius: 999px;
	cursor: pointer;
}
.pcm-explainer-reopen:hover { background: #e0e7ff; }
.pcm-compare-limit {
	margin-left: 8px;
	font-size: 0.85em;
	color: #b45309;
}

/* P1-3 — readability + touch targets on small screens. */
@media (max-width: 640px) {
	.pcm-filter-pill { min-height: 40px; padding: 8px 12px; font-size: 0.85em; }
	.pcm-search-input { font-size: 1em; min-height: 44px; }
	.pcm-compare-check { padding: 6px; }
	.pcm-compare-check-input { width: 20px; height: 20px; }
	.pcm-col-sortable { min-height: 40px; }
}

/* P3-8 — honor the user's reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
	.pcm-library *,
	.pcm-backtotop,
	.pcm-stat-num {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==== Clinical redesign layer (1.52.0) — neutral-clinical, Apple-like. ====
   Appended overrides: same selectors, later cascade. Color is reserved for
   verdicts; everything else is ink, paper, and hairlines. */
.pcm-library{--pcm-ink:#1d1d1f;--pcm-sub:#6e6e73;--pcm-hair:#e5e5ea;--pcm-pass:#1d9e75;--pcm-fail:#d85a30;--pcm-pend:#ba7517;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--pcm-ink)}
.pcm-library .pcm-search-input{font-size:16px;padding:12px 16px;border:1px solid var(--pcm-hair);border-radius:12px;width:100%;max-width:560px;background:#fff;box-shadow:none}
.pcm-library .pcm-search-input:focus{border-color:#86868b;outline:none;box-shadow:0 0 0 3px rgba(0,0,0,.04)}
.pcm-library .pcm-filter-pill{border:1px solid var(--pcm-hair);background:#fff;color:var(--pcm-sub);border-radius:999px;padding:5px 16px;font-size:13px;font-weight:400;box-shadow:none;transition:border-color .15s,color .15s}
.pcm-library .pcm-filter-pill:hover{border-color:#86868b;color:var(--pcm-ink)}
.pcm-library .pcm-filter-pill-active,.pcm-library .pcm-filter-pill.pcm-filter-pill-active{background:var(--pcm-ink);border-color:var(--pcm-ink);color:#fff}
/* 1.58.0: the 1.52.0 stats rules below originally targeted .pcm-stat-value/
   .pcm-stat-label — class names that don't exist in the banner markup
   (.pcm-stat-num/-lbl/-sub) — so only the wildcard reset landed and the strip
   collapsed into ragged, off-grid text. Replaced with a uniform Apple-style
   fact strip: strict 4-column grid (8 tiles = 4x2), every tile opening with
   the same top hairline, number / tracked overline label / quiet footnote. */
.pcm-library .pcm-library-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 36px;background:transparent;border:0;border-radius:0;padding:6px 2px 18px;margin:14px 0 18px;box-shadow:none;align-items:start}
.pcm-library .pcm-library-stats .pcm-stat-card{background:transparent;border:0;border-top:1px solid var(--pcm-hair);border-radius:0;box-shadow:none;padding:12px 0 0;margin:0;text-align:left}
.pcm-library .pcm-library-stats .pcm-stat-num{font-size:32px;line-height:1.1;font-weight:600;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--pcm-ink);background:none;-webkit-text-fill-color:var(--pcm-ink)}
.pcm-library .pcm-library-stats .pcm-stat-lbl{margin-top:4px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pcm-sub)}
.pcm-library .pcm-library-stats .pcm-stat-sub{margin-top:3px;font-size:12px;line-height:1.45;font-style:normal;color:var(--pcm-sub)}
.pcm-library .pcm-library-stats .pcm-stat-card-wide{grid-column:auto}
.pcm-library .pcm-library-stats .pcm-stat-labs{list-style:none;margin:8px 0 0;padding:0}
.pcm-library .pcm-library-stats .pcm-stat-labs li{display:flex;justify-content:space-between;gap:12px;padding:4px 0;margin:0;border:0;border-top:1px solid var(--pcm-hair);font-size:12px}
.pcm-library .pcm-library-stats .pcm-stat-labs li:first-child{border-top:0;padding-top:0}
.pcm-library .pcm-library-stats .pcm-stat-lab-name{color:var(--pcm-ink)}
.pcm-library .pcm-library-stats .pcm-stat-lab-count{color:var(--pcm-sub);font-variant-numeric:tabular-nums;white-space:nowrap}
@media (max-width:900px){.pcm-library .pcm-library-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}}
@media (max-width:480px){.pcm-library .pcm-library-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.pcm-library .pcm-library-stats .pcm-stat-num{font-size:26px}.pcm-library .pcm-library-stats .pcm-stat-card-wide{grid-column:span 2}}
.pcm-library .pcm-product-block{background:#fff;border:1px solid var(--pcm-hair);border-radius:14px;box-shadow:none;margin:0 0 14px;overflow:hidden}
.pcm-library .pcm-product-head{background:#fff;border-bottom:1px solid var(--pcm-hair);padding:14px 18px}
.pcm-library .pcm-product-name{font-size:16px;font-weight:600;letter-spacing:-.01em}
.pcm-library .pcm-coa-table{border:0}
.pcm-library .pcm-coa-table th{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--pcm-sub);font-weight:400;border-bottom:1px solid var(--pcm-hair);background:#fff}
.pcm-library .pcm-coa-table td{border-bottom:1px solid var(--pcm-hair);font-size:13px;vertical-align:middle}
.pcm-library .pcm-coa-table tr:last-child td{border-bottom:0}
.pcm-library .pcm-coa-table code,.pcm-library .pcm-lot{font-family:"SF Mono",SFMono-Regular,ui-monospace,Menlo,monospace;font-size:12px;background:transparent;color:var(--pcm-ink)}
.pcm-library .pcm-tier-pill{background:transparent;border:1px solid var(--pcm-hair);color:var(--pcm-sub);font-weight:500;letter-spacing:.03em;box-shadow:none}
.pcm-test-pills{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.pcm-panel-sum{display:inline-flex;align-items:center;border-radius:999px;font-size:12px;font-weight:600;padding:3px 12px;font-variant-numeric:tabular-nums;cursor:help}
.pcm-panel-sum--pass{background:#e1f5ee;color:#085041}
.pcm-panel-sum--fail{background:#faece7;color:#712b13}
.pcm-panel-sum--pending{background:#faeeda;color:#633806}
.pcm-test-pill{background:#fff;border:1px solid var(--pcm-hair);color:var(--pcm-sub);border-radius:999px;font-size:11px;padding:2px 10px;box-shadow:none}
.pcm-test-pill-pass .pcm-test-pill-icon{color:var(--pcm-pass)}
.pcm-test-pill-fail{border-color:#f0997b;color:#712b13;background:#faece7}
.pcm-test-pill-pending{border-color:#fac775;color:#633806}
.pcm-test-pill-none{display:none}
.pcm-library .pcm-result-count{font-size:12px;color:var(--pcm-sub)}
.pcm-library .button,.pcm-library button:not(.pcm-filter-pill){border-radius:10px}

/* ==== Clinical redesign layer, phase 2 (1.53.0): certificate document. ==== */
.pcm-coa-single{--pcm-ink:#1d1d1f;--pcm-sub:#6e6e73;--pcm-hair:#e5e5ea;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--pcm-ink);
  max-width:720px;margin:0 auto;background:#fff;border:1px solid var(--pcm-hair);border-radius:16px;padding:36px 40px}
@media (max-width:600px){.pcm-coa-single{padding:22px 18px;border-radius:12px}}
.pcm-coa-head{border:0;padding:0;margin:0 0 4px}
.pcm-coa-title{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--pcm-sub);font-weight:500;margin:0 0 6px}
.pcm-coa-subtitle{font-size:24px;font-weight:600;letter-spacing:-.015em;margin:0;color:var(--pcm-ink)}
.pcm-coa-subtitle a{color:inherit;text-decoration:none}
.pcm-coa-seal{display:inline-block;border-radius:999px;font-size:13px;font-weight:600;padding:5px 16px;margin:12px 0 0}
.pcm-coa-seal--pass{background:#e1f5ee;color:#085041}
.pcm-coa-seal--fail{background:#faece7;color:#712b13}
.pcm-coa-seal--pending{background:#faeeda;color:#633806}
.pcm-coa-facts{display:flex;flex-wrap:wrap;gap:0;border-top:1px solid var(--pcm-hair);border-bottom:1px solid var(--pcm-hair);margin:18px 0;padding:14px 0}
.pcm-coa-facts > div{flex:1;min-width:130px;padding:0 18px;border-left:1px solid var(--pcm-hair);margin:0}
.pcm-coa-facts > div:first-child{border-left:0;padding-left:0}
.pcm-coa-facts dt{font-size:11px;color:var(--pcm-sub);letter-spacing:.04em;text-transform:uppercase;font-weight:400;margin:0}
.pcm-coa-facts dd{font-size:18px;font-weight:600;font-variant-numeric:tabular-nums;margin:2px 0 0;color:var(--pcm-ink)}
.pcm-coa-facts dd strong{font-weight:600}
.pcm-coa-fresh{font-size:11px;color:var(--pcm-sub);font-weight:400}
.pcm-coa-single .pcm-test-pills{margin:4px 0 8px}
.pcm-coa-viewer{margin-top:18px}
.pcm-coa-viewer .pcm-button{border-radius:10px}
.pcm-coa-embed{border:1px solid var(--pcm-hair);border-radius:12px;width:100%;min-height:540px}
.pcm-coa-footer{border-top:1px solid var(--pcm-hair);margin-top:22px;padding-top:14px}
.pcm-coa-provenance{font-size:12px;color:var(--pcm-sub);margin:0 0 8px;line-height:1.7}
.pcm-coa-perma{font-size:11px;color:var(--pcm-sub)}
.pcm-coa-perma code{background:transparent;font-family:"SF Mono",SFMono-Regular,ui-monospace,Menlo,monospace;font-size:11px;color:var(--pcm-sub)}
.pcm-coa-disclaimer{font-size:11px;color:#a1a1a6;margin-top:6px}

/* ==== Clinical redesign layer, phase 3 (1.54.0): product trust module. ==== */
.pcm-trust-module{--pcm-ink:#1d1d1f;--pcm-sub:#6e6e73;--pcm-hair:#e5e5ea;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:#fff;border:1px solid var(--pcm-hair);border-radius:14px;padding:16px 18px;margin:0 0 18px;max-width:560px}
.pcm-trust-module__head{font-size:13px;font-weight:600;color:var(--pcm-ink);margin:0 0 10px;display:flex;align-items:center;gap:7px}
.pcm-trust-module__head::before{content:"✓";display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#e1f5ee;color:#085041;font-size:11px;font-weight:700}
.pcm-trust-module .pcm-badge-row-single{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 8px}
.pcm-trust-module .pcm-badge{background:#f5f5f7;border:0;border-radius:9px;color:var(--pcm-ink);font-size:12px;padding:6px 12px;text-decoration:none;box-shadow:none;font-variant-numeric:tabular-nums}
.pcm-trust-module .pcm-badge strong{font-weight:600}
.pcm-trust-module .pcm-badge-tested{color:var(--pcm-sub)}
.pcm-trust-module .pcm-badge-fresh{color:var(--pcm-ink)}
.pcm-trust-module .pcm-badge-stale{color:#854f0b}
.pcm-trust-module .pcm-tier-pill{background:transparent;border:1px solid var(--pcm-hair);color:var(--pcm-sub);font-weight:500}
.pcm-trust-module .pcm-badge-link{background:transparent;color:#0066cc;font-weight:500;padding-left:0}
.pcm-trust-module .pcm-badge-scrollto{background:transparent;color:var(--pcm-sub)}
.pcm-trust-module .pcm-product-test-pills{border-top:1px solid var(--pcm-hair);padding-top:10px;margin-top:2px}
.pcm-trust-module .pcm-badge-variant-note{font-size:11px;color:var(--pcm-sub);margin:8px 0 0}
.pcm-trust-module .pcm-no-coa{border:0;background:#f5f5f7;border-radius:10px;padding:10px 14px}

/* ==== Clinical layer refinement (1.55.0), per owner review of the live module:
   1) tier badges return to their RECOGNIZED branded fills (gold 14x; 7x now
      green per owner direction — was blue);
   2) passed test pills get a green fill so a checkmark can't read as greyed-out;
   3) the trust module earns more visual weight — customers were missing it. */
.pcm-library .pcm-tier-pill.pcm-tier-14x,.pcm-trust-module .pcm-tier-14x,.pcm-badge.pcm-tier-14x{
  background:linear-gradient(135deg,#fef3c7 0%,#fbbf24 100%);color:#78350f;border:1px solid #f59e0b;font-weight:600}
.pcm-library .pcm-tier-pill.pcm-tier-7x,.pcm-trust-module .pcm-tier-7x,.pcm-badge.pcm-tier-7x{
  background:#d9f2e5;color:#0f6e56;border:1px solid #5dcaa5;font-weight:600}
.pcm-test-pill-pass{background:#e6f6ee;border-color:#9fe1cb;color:#085041}
.pcm-test-pill-pass .pcm-test-pill-icon{color:#0f6e56;font-weight:700}
.pcm-trust-module{border-color:#bfe5d4;background:#fcfefd;box-shadow:0 1px 4px rgba(15,110,86,.07)}
.pcm-trust-module__head{font-size:15px}
.pcm-trust-module .pcm-badge-link{background:#0071e3;color:#fff;border-radius:999px;padding:8px 18px;font-weight:600;font-size:13px}
.pcm-trust-module .pcm-badge-link:hover{background:#0077ed;color:#fff}

/* ==== Library readability pass (1.56.0) — /certificates/ rows go from
   11 pills per row (incl. "– not tested" dashes that read as greyed-out)
   to ONE verdict chip + exception pills only. Numerics right-aligned,
   dates quieted, panel column reclaimed. */
.pcm-library .pcm-test-pills--summary{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.pcm-library .pcm-test-pills--summary .pcm-panel-sum{white-space:nowrap}
.pcm-library .pcm-col-tests{width:130px}
.pcm-library th.pcm-col-vials,.pcm-library td.pcm-col-vials{text-align:right}
.pcm-library td.pcm-col-date{color:var(--pcm-sub,#6e6e73);font-variant-numeric:tabular-nums;white-space:nowrap}
.pcm-library td.pcm-col-purity .pcm-purity-pill{font-variant-numeric:tabular-nums}
.pcm-library .pcm-coa-table td{vertical-align:middle}
.pcm-library .pcm-variant-batch-count{display:inline-block;margin-left:6px;padding:1px 7px;border:1px solid var(--pcm-hair,#e5e5ea);border-radius:999px;font-size:11px;color:var(--pcm-sub,#6e6e73);background:#fff;white-space:nowrap}
.pcm-library .pcm-discontinued-tag{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:11px;background:#f2f2f7;color:var(--pcm-sub,#6e6e73);border:1px solid var(--pcm-hair,#e5e5ea);white-space:nowrap}
@media (max-width:782px){.pcm-library th.pcm-col-vials,.pcm-library td.pcm-col-vials{text-align:left}}

/* ==== 1.63.0: aggregate purity chart is a VISIBLE panel below the current
   rows and above the earlier/discontinued section (no longer a hidden drawer). */
.pcm-coa-row-chart td {
	background: #f9fafb !important;
	padding: 12px 14px !important;
	border-top: 1px solid #e5e7eb !important;
}
.pcm-history-chart-static { padding: 2px 0; }
.pcm-history-chart-static .pcm-history-chart-title { margin-bottom: 6px; }

/* ==== 1.65.0: accessibility + touch tooltips ==== */
/* Visually-hidden text (history-chart screen-reader summary). */
.pcm-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* Shared tap/keyboard tooltip bubble — surfaces the title-attr explanations
   (tier battery, ~estimated vials, panel composition, fail/pending pills,
   New / upgraded pills) on touch devices and for keyboard users. */
.pcm-tip-bubble {
	position: absolute;
	z-index: 100000;
	max-width: 300px;
	background: #1e293b;
	color: #fff;
	font-size: 12px;
	line-height: 1.5;
	padding: 8px 11px;
	border-radius: 6px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
	pointer-events: none;
}
.pcm-tier-pill,
.pcm-tier-upgraded-pill,
.pcm-vials-count,
.pcm-panel-sum,
.pcm-test-pill,
.pcm-new-pill { cursor: help; }
.pcm-tier-pill:focus-visible,
.pcm-tier-upgraded-pill:focus-visible,
.pcm-vials-count:focus-visible,
.pcm-panel-sum:focus-visible,
.pcm-test-pill:focus-visible,
.pcm-new-pill:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}
