/* QtyHome Calculators — styles are scoped to .qh-calc / .qh-tables so they don't affect the theme. */
.qh-calc, .qh-tables {
	--qh-surface: #ffffff;
	--qh-ink: #1d2321;
	--qh-muted: #5d6763;
	--qh-line: #d9ddd9;
	--qh-field: #f7f8f6;
	--qh-tape: #f2b705;
	--qh-accent: #8a6400;
	--qh-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	box-sizing: border-box;
	color: var(--qh-ink);
	line-height: 1.5;
	margin: 1.5em 0;
}
.qh-calc *, .qh-tables * { box-sizing: border-box; }
.qh-calc {
	background: var(--qh-surface);
	border: 1px solid var(--qh-line);
	border-radius: 10px;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	overflow: hidden;
}
@media (max-width: 760px) { .qh-calc { grid-template-columns: minmax(0, 1fr); } }
.qh-inputs { padding: 20px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--qh-line); }
@media (max-width: 760px) { .qh-inputs { border-right: 0; border-bottom: 1px solid var(--qh-line); } }
.qh-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.qh-seg { display: inline-flex; background: var(--qh-field); border: 1px solid var(--qh-line); border-radius: 8px; padding: 3px; gap: 3px; }
.qh-seg button { font: 600 14px/1 inherit; font-family: inherit; color: var(--qh-muted); background: transparent; border: 0; border-radius: 6px; padding: 9px 12px; cursor: pointer; margin: 0; box-shadow: none; text-transform: none; letter-spacing: 0; }
.qh-seg button[aria-pressed="true"] { background: var(--qh-surface); color: var(--qh-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.qh-seg button:focus-visible { outline: 3px solid var(--qh-tape); outline-offset: 2px; }
.qh-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.qh-fields[hidden] { display: none !important; }
@media (max-width: 460px) { .qh-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qh-wide { grid-column: 1 / -1; }
.qh-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qh-f label { font-size: 14px; font-weight: 600; margin: 0; }
.qh-inp { display: flex; align-items: center; background: var(--qh-field); border: 1px solid var(--qh-line); border-radius: 8px; overflow: hidden; }
.qh-inp:focus-within { border-color: var(--qh-accent); box-shadow: 0 0 0 3px rgba(242, 183, 5, .35); }
.qh-calc .qh-inp input, .qh-calc .qh-inp select { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--qh-ink); font: 500 17px/1.2 var(--qh-mono); padding: 11px 10px; outline: none; box-shadow: none; margin: 0; height: auto; }
.qh-calc .qh-inp select { font-family: inherit; font-size: 15px; }
.qh-unit { font: 500 13px/1 var(--qh-mono); color: var(--qh-muted); padding-right: 10px; white-space: nowrap; }
.qh-hint, .qh-note, .qh-caption { font-size: 13px; color: var(--qh-muted); margin: 0; }
.qh-results { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.qh-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--qh-muted); }
.qh-big { display: flex; flex-direction: column; gap: 2px; }
.qh-n { font: 600 clamp(32px, 6vw, 46px)/1 var(--qh-mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qh-u { font-size: 14px; color: var(--qh-muted); }
.qh-vols { display: flex; gap: 16px; flex-wrap: wrap; font: 500 14px/1.3 var(--qh-mono); color: var(--qh-muted); font-variant-numeric: tabular-nums; }
.qh-vols b { color: var(--qh-ink); font-weight: 600; }
.qh-bags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qh-bag { border: 1px solid var(--qh-line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.qh-bag-k, .qh-bag-s { font-size: 12px; color: var(--qh-muted); }
.qh-bag-k { font-size: 13px; }
.qh-bag-v { font: 600 24px/1 var(--qh-mono); font-variant-numeric: tabular-nums; }
.qh-bag.qh-best { border-color: var(--qh-tape); box-shadow: inset 0 0 0 1px var(--qh-tape); }
.qh-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--qh-tape); color: var(--qh-ink); border-radius: 4px; padding: 2px 6px; width: max-content; }
.qh-how { font-size: 14px; color: var(--qh-muted); border-top: 1px dashed var(--qh-line); padding-top: 12px; margin: 0; }
.qh-how code { font-family: var(--qh-mono); color: var(--qh-ink); font-size: 13px; background: none; padding: 0; }
.qh-tables { display: flex; flex-direction: column; gap: 10px; }
.qh-tbl { overflow-x: auto; border: 1px solid var(--qh-line); border-radius: 10px; background: var(--qh-surface); }
.qh-tables table { border-collapse: collapse; width: 100%; min-width: 460px; margin: 0; font-variant-numeric: tabular-nums; border: 0; }
.qh-tables th, .qh-tables td { padding: 10px 14px; text-align: right; border: 0; border-bottom: 1px solid var(--qh-line); font-size: 14px; }
.qh-tables th:first-child, .qh-tables td:first-child { text-align: left; }
.qh-tables th { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--qh-muted); font-weight: 600; }
.qh-tables td { font-family: var(--qh-mono); }
.qh-tables tr:last-child td { border-bottom: 0; }
