/* ============================================================
 * LEC Home Theater Calculator — scoped under .htc-root.
 * Independent from the main calculator's .lpc-root styles.
 * ============================================================ */

.htc-root {
	--htc-bg: #0A0A0B;
	--htc-card: #0D0D0F;
	--htc-ink: #F5F0E8;
	--htc-ink-muted: #9C9489;
	--htc-accent: #C9A96E;
	--htc-accent-soft: rgba(201, 169, 110, 0.08);
	--htc-border: rgba(245, 240, 232, 0.08);
	--htc-border-strong: rgba(245, 240, 232, 0.18);
	--htc-ease: cubic-bezier(0.4, 0, 0.2, 1);

	background: var(--htc-bg);
	color: var(--htc-ink);
	font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	position: relative;
}
.htc-root, .htc-root *, .htc-root *::before, .htc-root *::after { box-sizing: border-box; }
.htc-root button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.htc-root input, .htc-root textarea { font: inherit; color: inherit; }

/* Top progress bar */
.htc-root .htc-progress-wrap {
	position: sticky; top: 0; z-index: 10;
	height: 2px;
	background: var(--htc-border);
}
.htc-root .htc-progress-bar {
	height: 100%;
	width: 15%;
	background: var(--htc-accent);
	transition: width 0.6s var(--htc-ease);
}

/* Step container */
.htc-root .htc-step {
	display: none;
	padding: 36px 0 80px;
	animation: htcFadeUp 0.48s var(--htc-ease) both;
}
.htc-root .htc-step.htc-step-active { display: block; }
@keyframes htcFadeUp {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}

.htc-root .htc-shell {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 clamp(20px, 4vw, 60px);
}
.htc-root .htc-shell-narrow { max-width: 580px; padding: 0 clamp(20px, 4vw, 40px); }
.htc-root .htc-shell-medium { max-width: 660px; padding: 0 clamp(20px, 4vw, 40px); }
.htc-root .htc-shell-wide   { max-width: 900px; padding: 0 clamp(20px, 4vw, 40px); }

.htc-root .htc-step-head { margin-bottom: 36px; }
.htc-root .htc-eyebrow {
	font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
	color: var(--htc-accent); opacity: 0.8;
	margin: 0 0 14px;
}
.htc-root .htc-h1 {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(32px, 4vw, 54px);
	font-weight: 400;
	color: var(--htc-ink);
	margin: 0;
	line-height: 1.1;
}
.htc-root .htc-h2 {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(28px, 3.5vw, 44px);
	font-weight: 400;
	margin: 0 0 10px;
	line-height: 1.15;
}
.htc-root .htc-desc {
	font-size: 13px;
	color: var(--htc-ink); opacity: 0.82;
	margin: 0; line-height: 1.7;
}
.htc-root .htc-label {
	display: block;
	font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase;
	color: var(--htc-ink); opacity: 0.8;
	margin-bottom: 13px;
}
.htc-root .htc-label-hint {
	font-style: italic; font-weight: 300; font-size: 9px;
	color: var(--htc-ink); opacity: 0.35;
	letter-spacing: 0.05em;
}
.htc-root .htc-input-label {
	display: block;
	font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
	color: var(--htc-ink); opacity: 0.78;
	margin-bottom: 9px;
}
.htc-root .htc-note {
	font-size: 11px; font-style: italic;
	color: var(--htc-ink); opacity: 0.28;
	margin: 10px 0 0;
}
.htc-root .htc-helper {
	font-size: 11px;
	color: var(--htc-ink); opacity: 0.65;
	margin: 8px 0 0;
}
.htc-root .htc-helper-center { text-align: center; opacity: 0.35; }

/* Chips */
.htc-root .htc-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.htc-root .htc-chip {
	background: transparent;
	border: 1px solid var(--htc-border-strong);
	color: var(--htc-ink); opacity: 0.82;
	font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
	padding: 10px 16px;
	transition: all 0.18s var(--htc-ease);
	display: inline-flex; flex-direction: row; align-items: center;
	gap: 8px;
}
.htc-root .htc-chip:hover { border-color: rgba(245, 240, 232, 0.45); color: var(--htc-ink); opacity: 1; }
.htc-root .htc-chip.htc-on {
	border-color: rgba(201, 169, 110, 0.6);
	color: var(--htc-accent);
	background: var(--htc-accent-soft);
	opacity: 1;
}
.htc-root .htc-chip-stack {
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	text-align: left;
}
.htc-root .htc-chip .htc-chip-main { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; }
.htc-root .htc-chip .htc-chip-sub  { font-size: 9px; letter-spacing: 0.06em; color: var(--htc-ink); opacity: 0.55; text-transform: uppercase; font-weight: 300; }
.htc-root .htc-chip.htc-on .htc-chip-sub { color: var(--htc-accent); opacity: 0.55; }

.htc-root .htc-pitch-rec {
	font-size: 11px; font-style: italic;
	color: var(--htc-accent); opacity: 0.7;
	margin: 10px 0 0;
}

/* Step 1 grid */
.htc-root .htc-s1-grid {
	display: flex;
	flex-direction: column-reverse;
	gap: 36px;
}
@media (min-width: 860px) {
	.htc-root .htc-s1-grid {
		display: grid;
		grid-template-columns: minmax(320px, 400px) 1fr;
		gap: 64px;
		align-items: start;
	}
	.htc-root .htc-s1-col-right { position: sticky; top: 32px; }
}
.htc-root .htc-s1-col-left { display: flex; flex-direction: column; gap: 36px; }
.htc-root .htc-field { display: flex; flex-direction: column; }

/* Diagram (SVG + animated lines, person inside SVG) */
.htc-root .htc-diagram-frame {
	border: 1px solid var(--htc-border);
	background: var(--htc-card);
	padding: 4px;
}
.htc-root .htc-diagram-svg {
	width: 100%;
	display: block;
	color: var(--htc-accent);
}
/* Native CSS transitions on the SVG geometry properties — browsers handle
 * interpolation directly, which is dramatically smoother (and synchronized)
 * compared to running per-element WAAPI keyframes. Modern Chrome/Firefox/
 * Safari all expose x/y/width/height/cx/cy/r/x1..y2/rx/ry as transitionable
 * CSS properties on their respective SVG elements. */
.htc-root .htc-diagram-svg rect,
.htc-root .htc-diagram-svg line,
.htc-root .htc-diagram-svg circle,
.htc-root .htc-diagram-svg text,
.htc-root .htc-diagram-svg pattern,
.htc-root .htc-diagram-svg g {
	transition:
		x        0.62s cubic-bezier(.22,1,.36,1),
		y        0.62s cubic-bezier(.22,1,.36,1),
		width    0.62s cubic-bezier(.22,1,.36,1),
		height   0.62s cubic-bezier(.22,1,.36,1),
		cx       0.62s cubic-bezier(.22,1,.36,1),
		cy       0.62s cubic-bezier(.22,1,.36,1),
		r        0.62s cubic-bezier(.22,1,.36,1),
		x1       0.62s cubic-bezier(.22,1,.36,1),
		y1       0.62s cubic-bezier(.22,1,.36,1),
		x2       0.62s cubic-bezier(.22,1,.36,1),
		y2       0.62s cubic-bezier(.22,1,.36,1),
		rx       0.62s cubic-bezier(.22,1,.36,1),
		ry       0.62s cubic-bezier(.22,1,.36,1),
		transform 0.62s cubic-bezier(.22,1,.36,1),
		opacity  0.32s ease-out;
}
/* Snap-then-fade hatch: the JS toggles this class for the first paint of
 * each element so initial geometry doesn't try to morph from (0,0,0,0). */
.htc-root .htc-diagram-svg .htc-instant {
	transition: none !important;
}
.htc-root.htc-no-anim .htc-diagram-svg rect,
.htc-root.htc-no-anim .htc-diagram-svg line,
.htc-root.htc-no-anim .htc-diagram-svg circle,
.htc-root.htc-no-anim .htc-diagram-svg text,
.htc-root.htc-no-anim .htc-diagram-svg pattern,
.htc-root.htc-no-anim .htc-diagram-svg g {
	transition: none;
}

.htc-root .htc-diagram-spec {
	padding: 14px 16px 16px;
	border-top: 1px solid var(--htc-border);
	font-size: 10px;
	letter-spacing: 0.1em;
	color: var(--htc-ink); opacity: 0.48;
	text-transform: uppercase;
	line-height: 1.9;
	text-align: center;
}

/* Buttons */
.htc-root .htc-primary-btn {
	background: var(--htc-accent);
	color: var(--htc-bg);
	font-size: 11px; font-weight: 600;
	letter-spacing: 0.2em; text-transform: uppercase;
	padding: 20px 24px;
	width: 100%;
	transition: background 0.2s, opacity 0.2s;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	white-space: nowrap;
}
.htc-root .htc-primary-btn:hover { background: #dbbe87; }
.htc-root .htc-primary-btn.htc-locked { opacity: 0.32; pointer-events: none; }
.htc-root .htc-primary-btn .htc-btn-arrow { transition: transform 0.2s var(--htc-ease); }
.htc-root .htc-primary-btn:hover .htc-btn-arrow { transform: translateX(3px); }

.htc-root .htc-secondary-btn {
	background: transparent;
	border: 1px solid rgba(201, 169, 110, 0.3);
	color: var(--htc-accent);
	font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
	padding: 14px 20px;
	width: 100%;
	margin-top: 14px;
	transition: background 0.2s var(--htc-ease);
}
.htc-root .htc-secondary-btn:hover { background: rgba(201, 169, 110, 0.08); }

.htc-root .htc-back-btn {
	background: transparent;
	border: 1px solid var(--htc-border-strong);
	color: rgba(245, 240, 232, 0.4);
	font-size: 18px; line-height: 1;
	width: 52px; min-width: 52px;
	transition: all 0.2s var(--htc-ease);
	display: flex; align-items: center; justify-content: center;
}
.htc-root .htc-back-btn:hover {
	border-color: rgba(245, 240, 232, 0.28);
	color: rgba(245, 240, 232, 0.7);
}

.htc-root .htc-nav-row {
	display: flex; gap: 12px; align-items: stretch; margin-top: 36px;
}
.htc-root .htc-nav-row .htc-primary-btn { flex: 1; }

/* Inputs */
.htc-root .htc-form { display: flex; flex-direction: column; gap: 18px; }
.htc-root .htc-input {
	width: 100%;
	background: rgba(245, 240, 232, 0.04) !important;
	border: 1px solid rgba(245, 240, 232, 0.1) !important;
	color: var(--htc-ink) !important;
	font-size: 16px !important;
	padding: 15px 17px !important;
	outline: none !important;
	transition: border-color 0.2s !important;
	border-radius: 0 !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	line-height: 1.4 !important;
}
.htc-root .htc-input:focus {
	border-color: rgba(201, 169, 110, 0.4) !important;
	background: rgba(245, 240, 232, 0.05) !important;
}
.htc-root .htc-input::placeholder { color: var(--htc-ink); opacity: 0.42; }
.htc-root .htc-textarea { resize: none; min-height: 96px; }

/* Trust strip */
.htc-root .htc-trust {
	display: flex; align-items: center; gap: 12px;
	margin-top: 24px;
}
.htc-root .htc-avatars { display: flex; }
.htc-root .htc-av {
	width: 30px; height: 30px; border-radius: 50%;
	font-size: 10px; font-weight: 600;
	color: rgba(245, 240, 232, 0.7);
	display: flex; align-items: center; justify-content: center;
	border: 1.5px solid rgba(245, 240, 232, 0.08);
	flex-shrink: 0;
	margin-left: -8px;
}
.htc-root .htc-av:first-child { margin-left: 0; }
.htc-root .htc-av-1 { background: #5C4A2A; }
.htc-root .htc-av-2 { background: #3D4A5C; }
.htc-root .htc-av-3 { background: #2A4A3D; }
.htc-root .htc-av-4 { background: #4A2A3D; }
.htc-root .htc-trust-text { font-size: 12px; color: rgba(245, 240, 232, 0.82); line-height: 1.4; }
.htc-root .htc-trust-text strong { color: var(--htc-ink); font-weight: 500; }

/* Step 3 */
.htc-root .htc-q-block { margin-bottom: 32px; }

/* Step 4 — price reveal */
.htc-root .htc-price {
	font-family: 'Playfair Display', Georgia, serif;
	font-style: italic;
	font-size: clamp(56px, 9vw, 100px);
	font-weight: 400;
	color: var(--htc-accent);
	line-height: 1;
	letter-spacing: -0.02em;
	margin-bottom: 12px;
}
.htc-root .htc-price-pitch {
	font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
	color: rgba(245, 240, 232, 0.55);
	margin: 0 0 10px;
}
.htc-root .htc-spec-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--htc-border);
	margin-bottom: 40px;
}
@media (max-width: 640px) { .htc-root .htc-spec-grid { grid-template-columns: repeat(2, 1fr); } }
.htc-root .htc-spec-cell { background: var(--htc-card); padding: 18px 20px; }
.htc-root .htc-spec-cell-label {
	font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase;
	color: rgba(245, 240, 232, 0.48);
	margin: 0 0 5px;
}
.htc-root .htc-spec-cell-value {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 18px;
	color: var(--htc-ink);
	margin: 0;
	font-weight: 400;
	line-height: 1.2;
}
.htc-root .htc-divider {
	border: none;
	border-top: 1px solid var(--htc-border);
	margin: 0 0 36px;
}

.htc-root .htc-act-grid {
	display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 580px) { .htc-root .htc-act-grid { grid-template-columns: 1fr; } }
.htc-root .htc-act-card {
	border: 1px solid var(--htc-border-strong); padding: 28px;
}
.htc-root .htc-act-card.htc-act-emphasis {
	border-color: rgba(201, 169, 110, 0.22);
	background: rgba(201, 169, 110, 0.03);
}
.htc-root .htc-act-eyebrow {
	font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
	color: rgba(245, 240, 232, 0.48); margin: 0 0 14px;
}
.htc-root .htc-act-eyebrow.htc-accent { color: var(--htc-accent); opacity: 0.6; margin-bottom: 8px; }
.htc-root .htc-deposit-amt {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 22px; font-weight: 400;
	color: var(--htc-ink); margin: 0 0 10px;
}
.htc-root .htc-act-desc {
	font-size: 12px; color: rgba(245, 240, 232, 0.82); margin: 0 0 22px; line-height: 1.65;
}
.htc-root .htc-msg-ok { font-size: 11px; color: rgba(201, 169, 110, 0.7); margin: 10px 0 0; font-style: italic; }

.htc-root .htc-restart { margin-top: 36px; text-align: center; }
.htc-root .htc-restart button {
	background: transparent; border: none;
	font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
	color: rgba(245, 240, 232, 0.18);
	padding: 8px;
	transition: color 0.2s var(--htc-ease);
}
.htc-root .htc-restart button:hover { color: rgba(245, 240, 232, 0.4); }

/* Sticky CTA */
.htc-root .htc-sticky-cta {
	position: fixed;
	bottom: 20px; right: 20px;
	z-index: 9999;
	background: var(--htc-ink);
	color: var(--htc-bg);
	font-size: 10px; font-weight: 600;
	letter-spacing: 0.2em; text-transform: uppercase;
	border: none;
	padding: 12px 24px;
	white-space: nowrap;
	opacity: 1; transform: translateY(0); pointer-events: auto;
	transition: opacity 0.35s var(--htc-ease), transform 0.35s var(--htc-ease), background 0.2s;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.htc-root .htc-sticky-cta:hover { background: #ffffff; transform: translateY(-2px); }
.htc-root .htc-sticky-cta.htc-cta-hidden {
	opacity: 0; transform: translateY(16px); pointer-events: none;
}
@media (max-width: 500px) {
	.htc-root .htc-sticky-cta { bottom: 14px; right: 12px; padding: 11px 20px; font-size: 9px; }
	.htc-root .htc-primary-btn { font-size: 10px; letter-spacing: 0.12em; padding: 18px 16px; }
	.htc-root .htc-back-btn { width: 48px; min-width: 48px; }
}
