/* PACS — Whole-house paint estimator. Loaded on the homepage only. Every rule is scoped to
   .calc-modes, .hx (the estimator) or #hx-sheet (its printout), so nothing else on the site changes. */

/* ---------- Calculator mode switch ---------- */
.calc-modes {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-width: 660px; margin: -16px 0 26px;
	padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.calc-modes button {
	display: flex; align-items: center; gap: 14px; padding: 13px 18px; border: 0; border-radius: 3px; background: transparent;
	text-align: left; color: var(--muted); transition: background-color .35s var(--ease), color .35s var(--ease);
}
.calc-modes button:hover { color: var(--ink); background: var(--paper); }
.calc-modes svg { width: 30px; height: 30px; flex: none; }
.calc-modes strong { display: block; font-size: 1rem; line-height: 1.2; color: inherit; }
.calc-modes small { display: block; font-size: .78rem; font-weight: 500; line-height: 1.35; opacity: .8; }
.calc-modes button[aria-selected="true"] { background: var(--ink); color: #fff; }
.calc-modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
	.calc-modes { margin-top: -8px; }
	.calc-modes button { padding: 11px 12px; gap: 10px; }
	.calc-modes svg { width: 24px; height: 24px; }
	.calc-modes small { display: none; }
}

/* ---------- Layout ---------- */
.hx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 22px; align-items: start; }
.hx-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hx-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 30px 30px; }
.hx-step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.hx-no {
	width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
	background: var(--ink); color: #fff; font-weight: 700; font-size: .9rem;
}
.hx-step-head h3 { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; line-height: 1.1; }
.hx-label { display: block; margin-bottom: 10px; font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.hx-row { margin-bottom: 22px; }
.hx-row:last-child { margin-bottom: 0; }
.hx-row-top { margin-top: 4px; }
.hx-hint { margin: 0 0 16px; color: var(--muted); font-size: .92rem; }

/* Pills (radio buttons) */
.hx-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-pills button {
	min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 2px; background: #fff;
	font-weight: 600; font-size: .88rem; color: var(--ink-2); transition: all .25s var(--ease);
}
.hx-pills button:hover { border-color: var(--ink); }
.hx-pills button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.hx-pills small { margin-left: 4px; font-size: .74rem; font-weight: 500; opacity: .75; }
.hx-pills-sm button { min-height: 38px; padding: 0 13px; font-size: .84rem; }

/* Plot size */
.hx-size { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.hx-round {
	width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%;
	border: 1px solid var(--line); background: #fff; font-size: 1.5rem; line-height: 1; transition: border-color .25s, transform .2s;
}
.hx-round:hover { border-color: var(--ink); }
.hx-round:active { transform: scale(.94); }
.hx-size-box {
	flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 10px;
	padding: 0 6px 6px; border-bottom: 2px solid var(--ink); cursor: text;
}
.hx-size-box input {
	width: 100%; max-width: 5.2ch; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--ink);
	font-family: var(--serif); font-weight: 600; font-size: clamp(2.8rem, 5vw, 3.7rem); line-height: 1; text-align: right;
	-moz-appearance: textfield; appearance: textfield;
}
.hx-size-box input:focus { outline: none; }
.hx-size-box:focus-within { border-color: var(--accent); }
.hx-size-box input::-webkit-outer-spin-button, .hx-size-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hx-size-unit { font-weight: 700; font-size: 1rem; color: var(--muted); white-space: nowrap; }
.hx-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.hx-chip {
	min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px dashed #CFC8BC; background: transparent;
	font-weight: 700; font-size: .82rem; color: var(--ink-2); transition: all .25s var(--ease);
}
.hx-chip small { font-weight: 500; color: var(--muted); }
.hx-chip:hover { border-style: solid; border-color: var(--ink); }
.hx-chip.is-on { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink, #fff); }
.hx-chip.is-on small { color: inherit; opacity: .8; }

/* Floors */
.hx-floors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hx-floors button {
	display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px;
	border: 1px solid var(--line); border-radius: var(--r); background: #fff; font-weight: 600; font-size: .8rem; color: var(--ink-2);
	transition: border-color .25s, box-shadow .25s;
}
.hx-floors svg { width: 40px; height: 44px; }
.hx-floors rect { fill: #DAD4CA; transition: fill .3s var(--ease); }
.hx-floors path { stroke: #B9B2A6; stroke-width: 1.5; }
.hx-floors button:hover { border-color: var(--ink); }
.hx-floors button[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.hx-floors button[aria-checked="true"] rect { fill: var(--accent); }

.hx-derived { margin: 18px 0 0; padding: 12px 14px; background: var(--paper); border-radius: 2px; font-size: .9rem; color: var(--ink-2); }

/* Fine-tune */
.hx-fine { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.hx-fine summary {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
	font-weight: 700; font-size: .86rem; color: var(--ink-2);
}
.hx-fine summary::-webkit-details-marker { display: none; }
.hx-fine summary::before {
	content: "+"; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%;
	font-weight: 500; transition: transform .3s var(--ease);
}
.hx-fine[open] summary::before { transform: rotate(45deg); }
.hx-fine-body { padding-top: 18px; }

/* New / repaint */
.hx-jobs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.hx-jobs button {
	display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 12px 14px; text-align: left;
	border: 1px solid var(--line); border-radius: var(--r); background: #fff; transition: border-color .25s, box-shadow .25s;
}
.hx-jobs button:hover { border-color: var(--ink); }
.hx-jobs button[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.hx-job-art { width: 100%; height: auto; margin-bottom: 8px; border-radius: 2px; }
.hx-job-fresh { fill: var(--accent); }
.hx-jobs strong { font-size: .98rem; }
.hx-jobs span { font-size: .82rem; line-height: 1.4; color: var(--muted); }

/* Parts of the house */
.hx-parts { display: flex; flex-direction: column; gap: 10px; }
.hx-part {
	--part: #CCCCCC; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
	transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.hx-part:not(.is-on) { background: var(--paper); }
.hx-part.is-hl { border-color: var(--ink); }
.hx-part-head {
	width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
	border: 0; background: transparent; text-align: left; color: var(--ink);
}
.hx-part-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hx-part-ico {
	width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%;
	background: #fff; box-shadow: inset 0 0 0 3px var(--line); transition: box-shadow .4s var(--ease);
}
.hx-part.is-on .hx-part-ico { box-shadow: inset 0 0 0 5px var(--part), 0 0 0 1px rgba(0, 0, 0, .06); }
.hx-ico { width: 21px; height: 21px; }
.hx-part:not(.is-on) .hx-ico { opacity: .55; }
.hx-part-text { flex: 1; min-width: 0; }
.hx-part-text strong { display: block; font-size: 1rem; line-height: 1.3; }
.hx-part-area { display: block; font-size: .84rem; color: var(--muted); }
.hx-switch { position: relative; width: 44px; height: 26px; flex: none; border-radius: 13px; background: #D4CEC3; transition: background-color .3s var(--ease); }
.hx-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.hx-part.is-on .hx-switch { background: var(--ink); }
.hx-part.is-on .hx-switch span { transform: translateX(18px); }
.hx-part-body { padding: 0 16px 16px 76px; }
.hx-part-body:empty { display: none; }

.hx-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hx-pick-row {
	display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 10px; text-align: left;
	border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); transition: border-color .25s;
}
.hx-pick-row:hover:not(:disabled), .hx-pick-row[aria-expanded="true"] { border-color: var(--ink); }
.hx-pick-row:disabled { cursor: default; }
.hx-pick-img, .hx-prod-img, .hx-item-img { display: grid; place-items: center; flex: none; }
.hx-pick-img { width: 38px; height: 38px; }
.hx-pick-img img, .hx-prod-img img, .hx-item-img img { width: 100%; height: 100%; object-fit: contain; }
.is-raw img { mix-blend-mode: multiply; }
.is-blank { background: linear-gradient(90deg, #A9ADB4, #EEF0F2 38%, #C4C8CE 70%, #9EA3AA); border-radius: 3px 3px 5px 5px; transform: scale(.6, .7); }
.hx-pick-sw { width: 36px; height: 36px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); transition: background-color .4s var(--ease); }
.hx-pick-text { flex: 1; min-width: 0; line-height: 1.2; }
.hx-pick-text small { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hx-pick-text strong { display: -webkit-box; font-size: .86rem; line-height: 1.25; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hx-chev { width: 8px; height: 8px; flex: none; margin: 0 4px 4px 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .3s var(--ease), margin .3s; }
[aria-expanded="true"] > .hx-chev { transform: rotate(-135deg); margin: 4px 4px 0 0; }

.hx-drawer { margin-top: 10px; animation: hxDrawer .35s var(--ease) both; }
@keyframes hxDrawer { from { opacity: 0; transform: translateY(-6px); } }
.hx-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.hx-prod {
	display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 12px;
	border: 1px solid var(--line); border-radius: 3px; background: #fff; text-align: center;
	font-weight: 600; font-size: .8rem; line-height: 1.25; color: var(--ink); transition: border-color .25s, transform .25s var(--ease);
}
.hx-prod small { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hx-prod:hover { border-color: var(--ink); transform: translateY(-2px); }
.hx-prod[aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.hx-prod-img { width: 66px; height: 66px; }
.hx-swatches {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 7px;
	max-height: 200px; overflow-y: auto; padding: 5px; overscroll-behavior: contain;
}
.hx-sw {
	aspect-ratio: 1; min-height: 32px; border: 0; border-radius: 50%; background: var(--sw);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); transition: transform .2s var(--ease), box-shadow .2s;
}
.hx-sw:hover { transform: scale(1.14); }
.hx-sw[aria-selected="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.hx-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.hx-counts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 12px; }
.hx-count { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: .9rem; }
.hx-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.hx-stepper button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; font-size: 1.2rem; line-height: 1; transition: background-color .2s; }
.hx-stepper button:hover { background: var(--paper); }
.hx-stepper output { min-width: 2.4ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.hx-part-tip { margin: 10px 0 0; font-size: .84rem; color: var(--muted); }

/* ---------- Estimate panel ---------- */
.hx-side { position: sticky; top: calc(var(--header-h) + 16px); min-width: 0; }
.hx-side-inner {
	max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
}
.hx-visual { position: relative; background: linear-gradient(180deg, #F8F6F2, #EEE9E1); }
.hx-house { width: 100%; height: auto; display: block; }
.hx-visual-tag {
	position: absolute; left: 14px; top: 14px; margin: 0; max-width: calc(100% - 28px);
	display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
	background: rgba(255, 255, 255, .9); box-shadow: 0 2px 10px rgba(18, 20, 24, .08); font-size: .8rem; line-height: 1.3;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hx-result { padding: 24px 28px 28px; }
.hx-total-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 18px; flex-wrap: wrap; margin-bottom: 18px; }
.hx-total { margin: 0; font-weight: 700; font-size: clamp(3rem, 5.2vw, 4.2rem); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.hx-total small { font-size: 1rem; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.hx-tins { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hx-tins li { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 2px; background: var(--paper); font-size: .86rem; }
.hx-tins strong { font-size: 1rem; }

.hx-bar { display: flex; gap: 2px; height: 12px; overflow: hidden; border-radius: 999px; background: var(--paper-2); }
.hx-bar span { flex-grow: 0; flex-shrink: 1; min-width: 4px; background: var(--seg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); transition: flex-basis .6s var(--ease), background-color .6s var(--ease); }
.hx-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); }
.hx-legend li { display: flex; align-items: center; gap: 6px; cursor: default; }
.hx-legend b { color: var(--ink); font-weight: 700; }
.hx-dot { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); vertical-align: middle; }

.hx-list-title { margin: 26px 0 8px; font-family: var(--serif); font-size: 1.55rem; font-weight: 500; }
.hx-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hx-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hx-item-img-link { display: block; }
.hx-item-img { width: 52px; height: 52px; }
.hx-item-name { margin: 0; font-weight: 700; font-size: .95rem; line-height: 1.25; }
.hx-item-name a { text-decoration: none; }
.hx-item-name a:hover { text-decoration: underline; }
.hx-item-name small { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hx-item-meta { margin: 3px 0 7px; font-size: .8rem; line-height: 1.5; color: var(--muted); }
.hx-item-meta .hx-dot { margin: -2px 5px 0 0; }
.hx-role { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 2px; background: var(--paper-2); font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.hx-item-tins { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .84rem; font-weight: 700; }
.hx-item-tins li { display: flex; align-items: center; gap: 7px; }
.hx-item-l { margin: 0; text-align: right; white-space: nowrap; font-size: .8rem; color: var(--muted); }
.hx-item-l strong { display: block; font-size: 1.35rem; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.hx-empty { margin: 0; padding: 18px; background: var(--paper); text-align: center; color: var(--muted); }

/* Tins */
.hx-tin { position: relative; display: inline-block; flex: none; border-radius: 2px 2px 4px 4px; background: linear-gradient(90deg, #A9ADB4, #EEF0F2 38%, #C4C8CE 70%, #9EA3AA); }
.hx-tin::before { content: ""; position: absolute; left: 0; right: 0; top: 32%; bottom: 20%; background: var(--tin, #B8541E); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.hx-tin::after { content: ""; position: absolute; left: -1px; right: -1px; top: -2px; height: 3px; border-radius: 2px; background: #8E939A; }
.hx-tin-drum { width: 22px; height: 28px; }
.hx-tin-gallon { width: 17px; height: 21px; }
.hx-tin-quarter { width: 12px; height: 14px; }
.hx-tin-litre { width: 12px; height: 15px; }

/* Actions */
.hx-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.hx-send label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.hx-send select { min-height: 46px; font-size: .92rem; }
.hx-actions-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hx-actions-2 .btn { width: 100%; padding: 0 .8em; }
.hx-note { margin-top: 16px; }

/* ---------- The drawing ---------- */
.hx-house .hx-f-out, .hx-house .hx-f-out-d, .hx-house .hx-f-in, .hx-house .hx-f-in-d, .hx-house .hx-f-ceil, .hx-house .hx-f-door,
.hx-house .hx-f-roof, .hx-house .hx-f-bound, .hx-house .hx-f-bound-d, .hx-house .hx-f-metal { transition: fill .6s var(--ease); }
.hx-f-out { fill: var(--c-out); }
.hx-f-out-d { fill: var(--c-out-d); }
.hx-f-in { fill: var(--c-in); }
.hx-f-in-d { fill: var(--c-in-d); }
.hx-f-ceil { fill: var(--c-ceil); }
.hx-f-door { fill: var(--c-door); }
.hx-door-lines { fill: none; stroke: var(--c-door-d); stroke-width: 1.2; transition: stroke .6s var(--ease); }
.hx-f-roof { fill: var(--c-roof); }
.hx-gloss { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: calc(var(--roof-gloss, 0) * .85); transition: opacity .6s var(--ease); }
.hx-f-bound { fill: var(--c-bound); }
.hx-f-bound-d { fill: var(--c-bound-d); }
.hx-metal path { fill: none; stroke: var(--c-metal); stroke-width: 1.8; transition: stroke .6s var(--ease); }
.hx-metal rect[fill="none"] { stroke: var(--c-metal); stroke-width: 1.6; transition: stroke .6s var(--ease); }
.hx-f-metal { fill: var(--c-metal); }
.hx-house .hx-g { transition: opacity .35s var(--ease), filter .35s var(--ease); }
.hx-house.has-hl .hx-g:not(.is-hl) { opacity: .3; }
.hx-house .hx-g.is-hl { filter: drop-shadow(0 0 5px rgba(232, 97, 26, .7)); }
.hx-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: hxGrow .7s var(--ease) both; }
@keyframes hxGrow { from { transform: scaleY(.88); opacity: .5; } }

/* ---------- Phone dock ---------- */
.hx-dock {
	position: fixed; left: 12px; right: 92px; bottom: 16px; z-index: 89; display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 9px 9px 9px 16px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
	font-size: .84rem; animation: hxDock .4s var(--ease) both;
}
@keyframes hxDock { from { opacity: 0; transform: translateY(20px); } }
.hx-dock-total { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hx-dock-total strong { font-size: 1.05rem; }
.hx-dock-btn { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #fff); font-weight: 700; font-size: .82rem; text-decoration: none; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 1023px) {
	.hx { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.hx-side, .hx-side-inner { display: contents; }
	.hx-visual { order: -1; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
	.hx-main { order: 1; }
	.hx-result { order: 2; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); scroll-margin-top: calc(var(--header-h) + 12px); }
}
@media (min-width: 1024px) { .hx-dock { display: none !important; } }
@media (max-width: 640px) {
	.hx-step { padding: 22px 18px 24px; }
	.hx-step-head { margin-bottom: 18px; }
	.hx-step-head h3 { font-size: 1.5rem; }
	.hx-round { width: 46px; height: 46px; }
	.hx-size-box input { font-size: 2.6rem; }
	.hx-part-head { padding: 12px 12px; gap: 12px; }
	.hx-part-ico { width: 42px; height: 42px; }
	.hx-part-body { padding: 0 12px 14px; }
	.hx-pick { grid-template-columns: minmax(0, 1fr); }
	.hx-result { padding: 20px 16px 22px; }
	.hx-item { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; }
	.hx-item-img { width: 44px; height: 44px; }
	.hx-actions-2 { grid-template-columns: minmax(0, 1fr); }
	.hx-visual-tag { left: 10px; top: 10px; font-size: .74rem; }
}
@media (prefers-reduced-motion: reduce) {
	.hx-drawer, .hx-grow, .hx-dock { animation: none; }
}

/* ---------- Colour Studio: shade cards ---------- */
.studio-card { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.studio-card label { font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.studio-card .select-wrap { flex: 1; min-width: 0; }
.studio-card select { min-height: 46px; font-size: .92rem; font-weight: 600; }
.swatches { max-height: 560px; overflow-y: auto; overscroll-behavior: contain; padding: 6px 6px 6px 4px; scrollbar-width: thin; }
.swatches .swatch { align-content: start; align-self: start; }
.swatches .swatch-chip { width: 100%; }
.swatch-name small { display: block; margin-top: 1px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 760px) { .swatches { max-height: 430px; } .studio-card { flex-direction: column; align-items: stretch; gap: 6px; } }

/* ---------- Colour Studio: where each saved shade goes ---------- */
.palette-details { margin-top: 14px; }
.palette-details .pd-hint { margin: 0 0 8px; font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.palette-details .pd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.palette-details .pd-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); }
.palette-details .pd-chip { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.palette-details .pd-name { margin: 0 0 6px; font-weight: 700; font-size: .9rem; line-height: 1.3; }
.palette-details .pd-name small { font-weight: 600; font-size: .72rem; color: var(--muted); }
.palette-details .pd-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.palette-details .select-wrap { display: block; }
.palette-details .select-wrap::after { right: 12px; width: 6px; height: 6px; }
.palette-details select { min-height: 38px; padding: 6px 28px 6px 10px; font-size: .82rem; background: #fff; }
.palette-details .pd-note { margin: 6px 0 0; font-size: .78rem; line-height: 1.4; color: var(--accent); }

/* ---------- Printout (Save as PDF) ---------- */
#hx-sheet { display: none; }
@media print {
	@page { margin: 14mm; }
	html.hx-printing body { background: #fff !important; }
	html.hx-printing body > *:not(#hx-sheet) { display: none !important; }
	html.hx-printing #hx-sheet { display: block !important; color: #111; font-family: var(--sans); font-size: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	#hx-sheet .hx-sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 8px; margin-bottom: 16px; border-bottom: 2px solid #111; }
	#hx-sheet .hx-sheet-head strong { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: .14em; }
	#hx-sheet .hx-sheet-head span { font-size: 11px; color: #555; }
	#hx-sheet .hx-sheet-top { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: center; margin-bottom: 18px; }
	#hx-sheet .hx-sheet-art svg { width: 100%; height: auto; border: 1px solid #ddd; }
	#hx-sheet .hx-sheet-k { margin: 0 0 4px; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #666; }
	#hx-sheet .hx-sheet-v { margin: 0 0 14px; font-size: 13px; line-height: 1.5; }
	#hx-sheet .hx-sheet-big { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
	#hx-sheet .hx-sheet-table { width: 100%; border-collapse: collapse; font-size: 11px; }
	#hx-sheet th { padding: 6px; border-bottom: 1.5px solid #111; text-align: left; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #555; }
	#hx-sheet td { padding: 7px 6px; border-bottom: 1px solid #ddd; vertical-align: top; }
	#hx-sheet tr { break-inside: avoid; }
	#hx-sheet .hx-dot { margin-right: 5px; }
	#hx-sheet .hx-sheet-note { margin-top: 14px; font-size: 9.5px; color: #666; }
}
