.bio-calc {
	background: var(--wp--preset--color--base, #ffffff);
	border: 1px solid var(--wp--preset--color--border, #e2e8f0);
	border-radius: 12px;
	padding: clamp(1rem, 3vw, 2rem);
	margin: 1.5rem 0;
}

.bio-calc__intro {
	margin-block-start: 0;
	color: var(--wp--preset--color--muted, #4b5563);
}

.bio-field label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast, #111827);
	margin-block-end: 0.25rem;
}

.bio-calc input[type='text'],
.bio-calc input[type='number'],
.bio-calc select,
.bio-calc textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--wp--preset--color--border, #e2e8f0);
	border-radius: 8px;
	padding: 0.6rem 0.75rem;
	font-size: 1rem;
	line-height: 1.4;
	background: #fff;
	color: var(--wp--preset--color--contrast, #111827);
	min-height: 44px;
}

.bio-calc textarea {
	min-height: 80px;
	resize: vertical;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bio-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin-block-end: 1rem;
}

@media (min-width: 640px) {
	.bio-grid {
		grid-template-columns: 1fr 1fr;
	}
	.bio-grid--3 {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

.bio-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-block-end: 1rem;
}

.bio-btn {
	border: 0;
	border-radius: 8px;
	padding: 0.65rem 1.1rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	min-height: 44px;
}

.bio-btn--primary {
	background: var(--wp--preset--color--primary, #2563eb);
	color: #ffffff;
}

.bio-btn--primary:hover {
	background: var(--wp--preset--color--primary-dark, #1e40af);
}

.bio-btn--secondary {
	background: var(--wp--preset--color--surface, #f1f5f9);
	color: var(--wp--preset--color--contrast, #111827);
}

.bio-btn--secondary:hover {
	background: #e2e8f0;
}

.bio-btn--ghost {
	background: transparent;
	color: var(--wp--preset--color--muted, #4b5563);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bio-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.bio-result {
	margin-block-start: 0.25rem;
}

.bio-result__box {
	background: var(--wp--preset--color--surface, #f1f5f9);
	border-radius: 10px;
	padding: 1rem 1.25rem;
}

.bio-result__big {
	font-size: clamp(1.4rem, 4vw, 2rem);
	font-weight: 700;
	color: var(--wp--preset--color--primary, #2563eb);
}

.bio-result__summary,
.bio-result__formula,
.bio-result__note {
	margin-block: 0.5rem;
}

.bio-result__formula {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.85rem;
}

.bio-result__note {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted, #4b5563);
}

.bio-errors {
	color: var(--wp--preset--color--danger, #dc2626);
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: 0.75rem 1rem 0.75rem 2rem;
}

.bio-errors li {
	margin-block-end: 0.25rem;
}

.bio-kv {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.3rem 1rem;
	margin: 0.9rem 0 0;
	padding: 0.75rem 0 0;
	border-top: 1px solid #e3e8ee;
}

.bio-kv__k {
	font-size: 0.9rem;
	color: #33475b;
}

.bio-kv__v {
	font-weight: 600;
	text-align: right;
}

.bio-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0.25rem 0 0.75rem;
	font-size: 0.9rem;
}

.bio-table th,
.bio-table td {
	text-align: left;
	padding: 0.4rem 0.5rem;
	border-bottom: 1px solid #e3e8ee;
}

.bio-table th {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6b7c8f;
}

.bio-table tr:last-child td {
	border-bottom: 0;
}

.bio-noscript {
	color: var(--wp--preset--color--danger, #dc2626);
}

.bio-scale-note {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted, #4b5563);
	background: var(--wp--preset--color--surface, #f1f5f9);
	border-left: 3px solid var(--wp--preset--color--primary, #2563eb);
	padding: 0.6rem 0.75rem;
	border-radius: 0 8px 8px 0;
	margin-block-end: 1rem;
}

/* ---- Punnett square grid ---- */
.bio-ps-grid {
	border-collapse: collapse;
	margin-block: 1rem;
	font-size: 0.9375rem;
}

.bio-ps-grid th,
.bio-ps-grid td {
	border: 1px solid #cbd5e1;
	padding: 0.5rem 0.75rem;
	text-align: center;
	min-width: 3.5rem;
}

.bio-ps-grid thead th,
.bio-ps-grid__side {
	background: #f8fafc;
	font-weight: 700;
	color: #334155;
}

.bio-ps-grid__corner {
	background: #e2e8f0;
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	max-width: 12rem;
}

/* ---- BMI category badge ---- */
.bio-badge {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	color: #fff;
}

.bio-badge--under { background: #2563eb; }
.bio-badge--normal { background: #16a34a; }
.bio-badge--over { background: #d97706; }
.bio-badge--obese { background: #dc2626; }

/* ---- Codon / peptide output ---- */
.bio-peptide {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	background: #eef2f6;
	border-radius: 6px;
	padding: 0.5rem 0.6rem;
	margin: 0 0 0.5rem;
	word-break: break-all;
}

/* -------------------------------------------------------------------
 * Ported component styles (2026-10-15).
 * Taken from the GPA site stylesheet and prefix-renamed for the lab tools
 * moved from studentgpacalculator.com to this subdomain. Mirrors the main
 * site look for the ported components; existing bio-* rules above win.
 * ------------------------------------------------------------------- */

.bio-calc select, .bio-calc input[type='text'], .bio-calc input[type='number'] {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--wp--preset--color--border, #e2e8f0);
	border-radius: 8px;
	padding: 0.6rem 0.75rem;
	font-size: 1rem;
	line-height: 1.4;
	background: #fff;
	color: var(--wp--preset--color--contrast, #111827);
	min-height: 44px;
}

.bio-check {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	margin-block-end: 1rem;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.bio-check input {
	margin: 0.2rem 0 0;
	width: 1.1rem;
	height: 1.1rem;
	min-height: 0;
	flex: 0 0 auto;
	accent-color: var(--wp--preset--color--primary, #2563eb);
}

.bio-result__summary, .bio-result__formula, .bio-result__note {
	margin-block: 0.5rem;
}

.bio-breakdown {
	width: 100%;
	border-collapse: collapse;
	margin-block-start: 1rem;
	font-size: 0.9rem;
}

.bio-breakdown th, .bio-breakdown td {
	text-align: left;
	border-bottom: 1px solid var(--wp--preset--color--border, #e2e8f0);
	padding: 0.5rem 0.4rem;
}

.bio-breakdown th {
	font-weight: 600;
}

.bio-cum__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin-block-end: 0.5rem;
}

.bio-pyramid {
	margin: 0 0 1rem;
}

.bio-pyramid__row {
	display: grid;
	grid-template-columns: minmax(7.5rem, 1fr) minmax(6rem, 2fr) minmax(8rem, auto);
	align-items: center;
	gap: 0.5rem 0.75rem;
	padding: 0.35rem 0;
}

.bio-pyramid__label {
	font-weight: 600;
	font-size: 0.9rem;
}

.bio-pyramid__track {
	background: #eef2f6;
	border-radius: 999px;
	height: 1.1rem;
	overflow: hidden;
}

.bio-pyramid__fill {
	background: linear-gradient(90deg, #2f7d5d, #6aa84f);
	height: 100%;
	border-radius: 999px;
	min-width: 0.35rem;
}

.bio-pyramid__value {
	font-size: 0.85rem;
	color: #33475b;
	white-space: nowrap;
}

.bio-pyramid__drop {
	grid-column: 2 / -1;
	font-size: 0.75rem;
	color: #6b7c8f;
	margin: -0.15rem 0 0.1rem;
}

.bio-result__box--error {
	border-color: #c0392b;
}

.bio-result__note--warn {
	background: #fff8e6;
	border-left: 3px solid #d99b1c;
	padding: 0.5rem 0.65rem;
	border-radius: 0 4px 4px 0;
}

.bio-frags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0.25rem 0 0.75rem;
}

.bio-frags__chip {
	background: #eef4f0;
	border: 1px solid #c9ddd2;
	border-radius: 999px;
	padding: 0.15rem 0.6rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #2f5d4a;
	white-space: nowrap;
}

.bio-phylo__row {
	margin-bottom: 0.75rem;
}

.bio-tree {
	margin: 0.25rem 0 0.75rem;
	font-size: 0.9rem;
}

.bio-tree__row {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
	padding: 0.1rem 0;
	white-space: nowrap;
}

.bio-tree__bar {
	color: #b9c4d0;
	font-family: ui-monospace, Consolas, monospace;
}

.bio-tree__mark {
	color: #2f7d5d;
	font-weight: 700;
}

.bio-tree__label {
	font-weight: 600;
}

.bio-tree__height {
	color: #6b7c8f;
	font-size: 0.8rem;
	font-family: ui-monospace, Consolas, monospace;
}

@media (min-width: 640px) {
	.bio-cum__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 34rem) {
	.bio-pyramid__row {
		grid-template-columns: 1fr;
	}
	.bio-pyramid__value, .bio-pyramid__drop {
		grid-column: 1;
	}
}

/* ---- result label used by the ported render helpers ---- */
.bio-result__label {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #334155;
	margin-block: 0 0.25rem;
}
