/* Home preview tool (js/visualizer.js). Uses the site's colours, with fallbacks for the admin panel. */
.hv { --hv-surface: var(--surface, #fff); --hv-bg: var(--surface-2, #edf1e8); --hv-ink: var(--ink, #17201a); --hv-muted: var(--muted, #5a665c); --hv-line: var(--line, #dde4d7); --hv-accent: var(--accent, #ffc20e); --hv-on-accent: var(--on-accent, #1f1a05); --hv-green: var(--accent-ink, #4b7612); }
.hv [hidden] { display: none !important; }
.hv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .hv-grid { grid-template-columns: 1fr; } }
.hv-stage { background: #0a0f0b; border-radius: 12px; overflow: hidden; position: relative; }
.hv-scroll { overflow: hidden; aspect-ratio: 3 / 2; }
.hv-scroll.hv-zoomed { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.hv .hv-scroll.hv-zoomed canvas.hv-draw { touch-action: pan-x pan-y; }
.hv .hv-scroll canvas { max-width: none; }
.hv-stage .hv-over-z { top: auto; bottom: 56px; right: 10px; flex-wrap: nowrap; }
.hv-stage .hv-over-z .hv-chip { width: 40px; height: 40px; padding: 0; font-size: 22px; line-height: 40px; text-align: center; }
.hv-stage .hv-over-z { display: none; }
.hv-stage[data-tab="line"] .hv-over-z, .hv-stage[data-tab="height"] .hv-over-z { display: flex; }
.hv canvas { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.hv canvas.hv-edit { touch-action: none; cursor: crosshair; }
.hv-hint { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(10,15,11,.82); color: #f1f4ee; font-size: 13px; line-height: 1.4; padding: 8px 11px; border-radius: 6px; pointer-events: none; }
.hv-split { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; font-size: 13px; color: var(--hv-muted); }
.hv-split input { flex: 1 1 160px; min-width: 0; accent-color: var(--hv-accent); }
.hv-small { font-size: 12.5px; color: var(--hv-muted); margin: 8px 0 0; }
.hv-rail { background: var(--hv-surface); border: 1px solid var(--hv-line); border-radius: 12px; padding: 14px; display: grid; gap: 16px; min-width: 0; color: var(--hv-ink); }
.hv-rail section { display: grid; gap: 8px; }
.hv-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--hv-bg); padding: 4px; border-radius: 8px; }
.hv-tabs button { font: 600 13px/1.2 inherit; font-family: inherit; border: 0; border-radius: 6px; padding: 8px 4px; background: transparent; color: var(--hv-muted); cursor: pointer; }
.hv-tabs button[aria-selected="true"] { background: var(--hv-surface); color: var(--hv-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.hv-tabs .n { display: block; font-size: 11px; color: var(--hv-green); }
.hv-lbl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--hv-muted); }
.hv-note { font-size: 13px; color: var(--hv-muted); margin: 0; }
.hv-row, .hv-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.hv-acts { margin-top: 10px; }
.hv-btn { font: 600 13px/1.2 inherit; font-family: inherit; border: 1px solid var(--hv-line); background: var(--hv-surface); color: var(--hv-ink); border-radius: 999px; padding: 8px 13px; cursor: pointer; }
.hv-btn:hover { border-color: var(--hv-muted); }
.hv-btn:disabled { opacity: .7; cursor: default; }
.hv-primary { background: var(--hv-accent); color: var(--hv-on-accent); border-color: var(--hv-accent); }
.hv-file { position: relative; overflow: hidden; }
.hv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hv-btn:focus-visible, .hv-tabs button:focus-visible, .hv-file:focus-within, .hv select:focus-visible { outline: 3px solid var(--focus, #2b6fd6); outline-offset: 2px; }
.hv select { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--hv-line); border-radius: 6px; background: var(--hv-surface); color: var(--hv-ink); flex: 1 1 180px; min-width: 0; }
.hv input[type=range] { width: 100%; accent-color: var(--hv-accent); }
.hv-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--hv-muted); margin-top: -4px; }
.hv-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hv-sw { font: 500 12px/1.2 inherit; font-family: inherit; border: 1px solid var(--hv-line); background: var(--hv-surface); color: var(--hv-ink); border-radius: 8px; padding: 6px 4px; cursor: pointer; display: grid; gap: 4px; justify-items: center; }
.hv-sw[aria-pressed="true"] { border-color: var(--hv-ink); box-shadow: inset 0 0 0 1px var(--hv-ink); }
.hv-dots { display: flex; gap: 3px; }
.hv-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.hv-facts { margin: 6px 0 0; border-top: 1px solid var(--hv-line); }
.hv-facts div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hv-line); font-size: 14px; }
.hv-facts dt { color: var(--hv-muted); }
.hv-facts dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.hv-top { margin-bottom: 10px; }
.hv-tabs-2 { grid-template-columns: repeat(2, 1fr); }
.hv canvas.hv-draw { touch-action: pan-y; cursor: crosshair; }
.hv-over { position: absolute; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.hv-over-l { left: 10px; }
.hv-over-r { right: 10px; justify-content: flex-end; }
.hv-chip { font: 600 13px/1.2 inherit; font-family: inherit; border: 0; border-radius: 999px; padding: 9px 14px; background: rgba(10,15,11,.82); color: #f1f4ee; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.hv-chip-go { background: var(--hv-accent); color: var(--hv-on-accent); }
.hv-chip:focus-visible { outline: 3px solid var(--focus, #2b6fd6); outline-offset: 2px; }
.hv-stage .hv-over [data-act], .hv-stage .hv-over [data-goto] { display: none; }
.hv-stage[data-tab="line"] .hv-over [data-act], .hv-stage[data-tab="line"] .hv-over [data-goto="night"] { display: inline-block; }
.hv-stage[data-tab="night"] .hv-over [data-goto="line"] { display: inline-block; }
@media (max-width: 600px) { .hv-hint { font-size: 12px; padding: 6px 9px; bottom: 8px; left: 8px; right: 8px; } .hv-over { top: 8px; } .hv-chip { padding: 7px 11px; font-size: 12px; } }
@media (max-width: 600px) { .hv-stage .hv-over-z { bottom: 46px; right: 8px; } .hv-stage .hv-over-z .hv-chip { width: 34px; height: 34px; line-height: 34px; font-size: 19px; } }
