/* HomeVision — dark product visualizer theme */
:root {
  --primary: #3b82f6;
  --accent: #38bdf8;
  --slate: #e2e8f0;
  --muted: #94a3b8;
  --surface: #111827;
  --surface-2: #1a2234;
  --surface-3: #243044;
  --bg: #0b0f17;
  --border: #2a3548;
  --text: #e8eef8;
  --text-dim: #9aa8bd;
  --chip-border: rgba(255,255,255,0.12);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h4 {
  letter-spacing: -0.025em;
}

h1, h2, h3, h4 {
  font-weight: bold;
}

/* Top bar exact */
.top-bar {
  background-color: #000 !important;
  color: #fff;
  font-size: 12px;
}

/* Header / Navbar */
header {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary) !important;
  text-decoration: none;
  padding: 0.25rem 0;
  letter-spacing: -0.01em;
}

/* Premium Hero */
.hero-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
  padding-top: 2.25rem;
  padding-bottom: 1.5rem;
}

.hero-section h1 {
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .hero-section h1 { font-size: 2.65rem; }
}

/* Modern Step Indicator */
.step-indicator {
  padding: 0.75rem 0 1rem;
  position: relative;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 78px;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--muted);
  transition: all .2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.step.active .step-circle {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.12);
}

.step.completed .step-circle {
  border-color: #16a34a;
  background: #16a34a;
  color: white;
}

.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 8px;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 700;
}

.step-line {
  flex: 1;
  height: 2.5px;
  background: var(--border);
  margin-top: 16px;
  min-width: 18px;
  max-width: 82px;
  position: relative;
  top: -1px;
}

.step.completed + .step-line {
  background: #16a34a;
}

/* Ultra-premium cards */
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Dropzone — very modern */
.dropzone {
  background: #fff;
  border: 2px dashed #999 !important;
  min-height: 200px;
}

.dropzone.dragover {
  background: #f0f9ff;
  border-color: var(--primary) !important;
  transform: scale(1.005);
}

.dz-content {
  transition: opacity .15s ease;
}



/* Extremely nice material swatches */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.swatch:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.08);
}

.swatch.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
  position: relative;
}

.swatch.selected::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.swatch span {
  display: block;
  height: 56px;
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.swatch .keep {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
}

.swatch span:not(.keep) {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.swatch {
  font-size: 0.72rem;
  font-weight: 500;
  color: #334155;
  padding: 6px 8px 8px;
  text-align: center;
  line-height: 1.15;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Hero */
.hero-section {
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
  border-bottom: 1px solid #e9ecef;
}

/* Step indicator */
.step-indicator {
  padding: 0.5rem 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  opacity: 0.55;
  transition: all .2s ease;
}

.step.active {
  opacity: 1;
}

.step.completed .step-circle {
  background: #198754;
  color: white;
  border-color: #198754;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: #fff;
  color: #495057;
}

.step.active .step-circle {
  border-color: var(--primary);
  color: var(--primary);
  background: #e7f1ff;
}

.step-label {
  font-size: 0.75rem;
  margin-top: 6px;
  font-weight: 600;
  color: #495057;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #dee2e6;
  margin-top: 15px;
  min-width: 24px;
  max-width: 70px;
}

/* Dropzone */
.dropzone {
  background: #fff;
  transition: all 0.2s ease;
  border-color: #ced4da !important;
  min-height: 220px;
}

.dropzone.dragover {
  background: #f0f7ff;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.upload-preview img {
  border: 1px solid #dee2e6;
  max-width: 100%;
  height: auto;
}

/* Swatches - modern look */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.swatch {
  border: 2px solid #d0d0d0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: #fff;
  transition: all .1s ease;
  min-height: 36px;
  color: #222;
}

.swatch:hover {
  border-color: #999;
  background: #f9f9f9;
}

.swatch.selected {
  border-color: #0356fc;
  background: #eef5ff;
  box-shadow: 0 0 0 2px rgba(3, 86, 252, 0.18);
}

.swatch span {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.1);
}

.swatch .keep {
  width: auto;
  height: auto;
  border: none;
  font-weight: 600;
  color: #495057;
  padding-left: 2px;
}

/* Comparison */
/* Comparison area — very clean and modern */
.comparison-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 10px -3px rgb(15 23 42 / 0.06);
}

.comparison-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}

/* Buttons - premium feel */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  letter-spacing: -.01em;
  border-radius: 10px;
  padding-top: .55rem;
  padding-bottom: .55rem;
}

.btn-primary:hover {
  background: #1e40af;
  border-color: #1e40af;
}

.btn-success {
  border-radius: 10px;
  font-weight: 600;
}

.btn-outline-secondary, .btn-outline-primary {
  border-radius: 10px;
  font-weight: 500;
}

/* Loading — styled via .hv-loading / .hv-loading-card (dark) */

/* Alerts */
#verifyResult .alert {
  border-radius: 12px;
  border-width: 1px;
}

/* Misc polish */
.text-muted {
  color: var(--muted) !important;
}

.small {
  font-size: 0.8125rem;
}

/* Simple loading spinner (legacy / generate) */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0356fc;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---- Upload preview + AI analyze overlay ---- */
.upload-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.preview-stage {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  line-height: 0;
  animation: previewIn 0.35s ease-out;
}

@keyframes previewIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.preview-img {
  max-height: 620px;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  transition: filter 0.45s ease, opacity 0.45s ease;
}

/* Greyed-out analyzing state — keep fully centered */
.upload-preview.is-analyzing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.upload-preview.is-analyzing .preview-stage {
  margin-left: auto;
  margin-right: auto;
}
.upload-preview.is-analyzing .preview-img {
  filter: grayscale(0.55) brightness(0.72) contrast(0.95);
  opacity: 0.92;
  /* avoid scale() — it visually shifts large images off-center */
  transform: none;
}

.analyze-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    160deg,
    rgba(15, 23, 42, 0.45) 0%,
    rgba(3, 86, 252, 0.35) 50%,
    rgba(15, 23, 42, 0.5) 100%
  );
  border-radius: 6px;
  z-index: 2;
  animation: overlayFadeIn 0.35s ease-out;
}

.analyze-overlay[hidden] {
  display: none !important;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.analyze-overlay-inner {
  text-align: center;
  color: #fff;
  padding: 20px 28px;
  width: min(360px, 86%);
  max-width: 360px;
  line-height: 1.35;
}

.analyze-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-right-color: rgba(0, 255, 255, 0.85);
  animation: spin 0.85s linear infinite;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
}

.analyze-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.analyze-sub {
  font-size: 12px;
  opacity: 0.92;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.analyze-pulse-bar {
  height: 3px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.analyze-pulse-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 45%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, #fff 35%, #00ffff 50%, #fff 65%, transparent 100%);
  animation: pulseBar 1.6s linear infinite;
}

@keyframes pulseBar {
  0%   { left: -45%; }
  100% { left: 100%; }
}

.upload-preview.is-analyzing #removeUploadBtn,
.upload-preview.is-analyzing .remove-photo-btn {
  opacity: 0.45;
  pointer-events: none;
}

.upload-preview.is-analyzing #uploadPreviewLabel,
.upload-preview.is-analyzing .upload-preview-label {
  color: #0356fc;
  font-weight: 600;
}

/* ---- Workspace: photo docks top-right, options take main area ---- */
.hv-workspace {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.upload-preview {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  box-sizing: border-box;
  width: 100%;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.45s ease,
    box-shadow 0.45s ease,
    opacity 0.35s ease;
}

.upload-preview-label {
  margin-bottom: 6px;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.remove-photo-btn {
  margin-top: 10px;
  padding: 4px 14px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

/* Options layout after verify: menu left, photo bucket top-right */
.hv-workspace.is-options-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  grid-template-rows: auto;
  gap: 14px 16px;
  align-items: start;
  animation: workspaceSettle 0.4s ease-out;
}

@keyframes workspaceSettle {
  from { opacity: 0.92; }
  to { opacity: 1; }
}

.hv-workspace.is-options-mode .customize-panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  animation: optionsSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes optionsSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hv-workspace.is-options-mode .upload-preview,
.upload-preview.is-docked {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 12px;
  width: 148px;
  max-width: 148px;
  padding: 8px;
  margin: 0;
  text-align: center;
  border: 1px solid #d0d7e2;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
  z-index: 3;
  animation: dockToBucket 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dockToBucket {
  0% {
    opacity: 0.85;
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hv-workspace.is-options-mode .upload-preview-label,
.upload-preview.is-docked .upload-preview-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0356fc;
  margin-bottom: 6px;
}

.hv-workspace.is-options-mode .preview-stage,
.upload-preview.is-docked .preview-stage {
  width: 100%;
  display: block;
  box-shadow: none;
  animation: none;
}

.hv-workspace.is-options-mode .preview-img,
.upload-preview.is-docked .preview-img {
  max-height: 110px;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  filter: none;
  opacity: 1;
  transform: none;
}

.hv-workspace.is-options-mode .remove-photo-btn,
.upload-preview.is-docked .remove-photo-btn {
  margin-top: 8px;
  width: 100%;
  padding: 5px 6px;
  font-size: 11px;
}

.customize-panel {
  border: 1px solid #e0e0e0;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ---- Product cards: Roof vs Siding vs Trim ---- */
.customize-heading {
  margin-bottom: 14px;
}
.customize-heading strong {
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
  color: #111;
}
.customize-hint {
  margin: 0;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}
.product-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 14px 12px;
  background: #fafbfc;
  border-left: 4px solid #94a3b8;
}
.product-card--roof {
  border-left-color: #0356fc;
  background: linear-gradient(180deg, #f5f9ff 0%, #fafbfc 48%);
}
.product-card--siding {
  border-left-color: #0d9488;
  background: linear-gradient(180deg, #f2fbfa 0%, #fafbfc 48%);
}
.product-card--trim {
  border-left-color: #a16207;
  background: linear-gradient(180deg, #fffbeb 0%, #fafbfc 55%);
}
.product-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.product-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: #0356fc;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}
.product-badge--siding { background: #0d9488; }
.product-badge--trim { background: #a16207; font-size: 14px; }
.product-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.product-card-sub {
  margin: 3px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}
.product-card-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 3px solid #64748b;
  border-radius: 6px;
}
.optional-tag {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.product-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.product-fields--single {
  grid-template-columns: 1fr;
  max-width: 320px;
}
.field--full {
  grid-column: 1 / -1;
}
.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.field-label-row .field-label {
  margin-bottom: 0;
}
.color-chosen {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gauge-pills {
  display: flex;
  gap: 6px;
}
.gauge-pill {
  flex: 1;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid #3d4d66;
  background: #0f1623;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.gauge-pill:hover:not(:disabled) {
  border-color: #60a5fa;
  color: #fff;
}
.gauge-pill.is-on {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}
.gauge-pill:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}
.gauge-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: #7c8ca3;
  line-height: 1.35;
}
.field.is-locked .color-chosen {
  color: #7c8ca3 !important;
  font-weight: 500;
}
.swatch-grid.is-locked {
  pointer-events: none;
  min-height: 28px;
}
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 8px;
}
.swatch-group {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c8ca3;
  padding-top: 6px;
}
.swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  position: relative;
}
.swatch:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 6px 14px rgba(0, 0, 0, 0.28);
}
.swatch.is-on {
  border-color: #fff;
  box-shadow: 0 0 0 2px #3b82f6, inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.swatch--keep {
  background:
    linear-gradient(135deg, transparent 46%, #64748b 46%, #64748b 54%, transparent 54%),
    #1a2333;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}
.swatch--print {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
@media (max-width: 640px) {
  .product-fields--roof,
  .product-fields--siding {
    grid-template-columns: 1fr;
  }
}
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.field-select {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}
.field-select:focus {
  outline: 2px solid rgba(3, 86, 252, 0.35);
  border-color: #0356fc;
}
.field-link {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  color: #0356fc;
  text-decoration: none;
}
.field-link:hover { text-decoration: underline; }

/* Checkbox row (snow stops, etc.) */
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #2a3548);
  background: rgba(15, 23, 42, 0.35);
  cursor: pointer;
  user-select: none;
}
.field-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #3b82f6;
  cursor: pointer;
}
.field-check-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.field-check-title {
  font-size: 13px;
  font-weight: 700;
  color: #e8eef8;
}
.field-check-sub {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}
.field-textarea {
  width: 100%;
  height: 52px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 8px;
  box-sizing: border-box;
  resize: vertical;
}

/* Color dropdown with chip previews */
.color-select {
  position: relative;
}
.color-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}
.color-select-trigger:hover {
  border-color: #94a3b8;
}
.color-select.is-open .color-select-trigger {
  border-color: #0356fc;
  outline: 2px solid rgba(3, 86, 252, 0.25);
}
.color-chip {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.08);
}
.color-select-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.color-select-caret {
  color: #64748b;
  font-size: 11px;
}
.color-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  max-height: 220px;
  overflow-y: auto;
}
.color-select-menu--tall {
  max-height: 320px;
}
.color-select-menu[hidden] {
  display: none !important;
}
.color-select-menu li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  color: #0f172a;
}
.color-select-menu li.color-select-group {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  padding: 10px 10px 4px;
  margin-top: 2px;
  cursor: default;
  pointer-events: none;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0;
}
.color-select-menu li.color-select-group:first-of-type,
.color-select-menu li[role="option"].is-selected + li.color-select-group {
  border-top: none;
}
.color-select-menu li:hover:not(.color-select-group) {
  background: #f1f5f9;
}
.color-select-menu li.is-selected:not(.color-select-group) {
  background: #e8f0fe;
  font-weight: 600;
}

.customize-notes {
  margin-top: 14px;
}
.customize-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.btn-generate {
  padding: 10px 22px;
  background: linear-gradient(to right, #055dfe, #044dfe);
  color: #fff;
  border: 0;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-reset {
  padding: 9px 14px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
}
.customize-foot {
  font-size: 11px;
  color: #777;
  margin: 8px 0 0;
}

@media (max-width: 640px) {
  .product-fields {
    grid-template-columns: 1fr;
  }
  .product-fields--single {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .hv-workspace.is-options-mode {
    grid-template-columns: 1fr;
  }
  .hv-workspace.is-options-mode .upload-preview,
  .upload-preview.is-docked {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    top: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 10px 12px;
  }
  .hv-workspace.is-options-mode .customize-panel {
    grid-row: 2;
  }
  .hv-workspace.is-options-mode .preview-stage {
    width: 96px;
    flex-shrink: 0;
  }
  .hv-workspace.is-options-mode .preview-img {
    max-height: 72px;
  }
  .hv-workspace.is-options-mode .upload-preview-label {
    margin-bottom: 2px;
  }
  .hv-workspace.is-options-mode .remove-photo-btn {
    width: auto;
    margin-top: 4px;
  }
  .hv-workspace.is-options-mode .upload-preview .preview-stage + .remove-photo-btn {
    margin-left: auto;
  }
}

/* Responsive */
@media (max-width: 576px) {
  .step-label { font-size: 0.65rem; }
  .option-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .hero-section h1 { font-size: 1.85rem; }
}

/* ==========================================================================
   New South Metals brand theme (chrome) — matches newsouthmetals.com
   ========================================================================== */
:root {
  --nsm-blue: #0356fc;
  --nsm-blue-light: #0593fe;
  --nsm-blue-dark: #044dfe;
  --nsm-cyan: #00ffff;
  --nsm-gradient: linear-gradient(to right, #0593fe 0%, #0356fc 100%);
  --nsm-gradient-btn: linear-gradient(to right, #055dfe 0%, #044dfe 100%);
}

/* Top utility bar */
.nsm-topbar {
  background: #000;
  color: #fff;
  font-size: 12px;
  padding: 5px 0;
}
.nsm-topbar a { color: #fff; text-decoration: none; }
.nsm-topbar a:hover { color: var(--nsm-cyan); }
.nsm-topbar-fb { display: inline-flex; align-items: center; gap: 6px; }
.nsm-topbar-msg { text-align: right; }
.nsm-topbar-msg a { font-weight: 700; white-space: nowrap; }

/* Logo band */
.nsm-header {
  background: #000;
  padding: 12px 0;
  border-bottom: 3px solid var(--nsm-blue);
}
.nsm-brand { display: inline-block; padding: 0; margin: 0; }
.nsm-brand img { height: 60px; width: auto; display: block; }

/* Primary navigation */
.nsm-navbar {
  background-image: var(--nsm-gradient);
  padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.nsm-navbar .navbar-nav .nav-link {
  color: #fff;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 12px 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background .15s ease, color .15s ease;
}
.nsm-navbar .navbar-nav .nav-link:hover,
.nsm-navbar .navbar-nav .nav-link:focus {
  background: rgba(0,0,0,0.18);
  color: var(--nsm-cyan);
}
.nsm-nav-cta { background: rgba(0,0,0,0.28); }
.nsm-badge {
  display: inline-block;
  background: var(--nsm-cyan);
  color: #002;
  font-size: 0.58rem;
  font-weight: 800;
  border-radius: 3px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 3px;
  letter-spacing: 0.04em;
}
.nsm-navbar .navbar-toggler { border-color: rgba(255,255,255,0.55); }

/* Brand buttons (pill + blue gradient like NSM) */
.nsm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  transition: transform .12s ease, filter .12s ease;
}
.nsm-btn:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }
.nsm-btn-primary, .nsm-btn-call {
  background:
    var(--nsm-gradient-btn) padding-box,
    var(--nsm-gradient) border-box;
  color: #fff;
}
.nsm-btn-ghost { background: transparent; border-color: #fff; color: #fff; }
.nsm-btn-ghost:hover { background: rgba(255,255,255,0.12); }
.nsm-btn-lg { padding: 13px 34px; font-size: 1.05rem; }

/* Hero */
.nsm-hero {
  background:
    linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.74)),
    url('/img/pole-barn.jpg') center/cover no-repeat, #000;
  color: #fff;
  text-align: center;
  padding: 48px 0 52px;
}
.nsm-hero-logo-link {
  display: block;
  width: min(760px, 92%);
  margin: 0 auto;
}
.nsm-hero-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5));
}

/* Metal Vision hero: pregenerated before/after slider behind the logo */
.mv-hero {
  position: relative;
  background: #07090e;
  overflow: hidden;
}
.mv-hero-stage {
  position: relative;
  width: 100%;
  height: clamp(240px, 42vw, 420px);
  container-type: inline-size;
}
.mv-hero-compare {
  position: absolute;
  inset: 0;
  animation: mv-hero-dim 3.2s ease-out forwards;
}
.mv-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.mv-hero-before-clip {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 14%;
  overflow: hidden;
  animation: mv-hero-wipe 5s ease-in-out 1 forwards;
}
.mv-hero-photo--before {
  width: 100cqi;
  max-width: none;
  height: 100%;
}
.mv-hero-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14%;
  width: 0;
  z-index: 2;
  animation: mv-hero-handle 5s ease-in-out 1 forwards;
}
.mv-hero-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}
.mv-hero-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--nsm-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.45);
}
.mv-hero-badge {
  position: absolute;
  z-index: 5;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.mv-hero-badge--before {
  left: 16px;
  bottom: 16px;
  background: #111827;
  color: #fff;
}
.mv-hero-badge--after {
  right: 16px;
  top: 16px;
  background: var(--nsm-blue);
  color: #fff;
}
.mv-hero-logo-link {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  background: radial-gradient(ellipse at center, rgba(7, 9, 14, 0.28) 0%, rgba(7, 9, 14, 0.08) 42%, transparent 68%);
}
.mv-hero-logo {
  width: min(420px, 72vw);
  height: auto;
  display: block;
  opacity: 0;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.55));
  animation: mv-hero-logo-fade 1.4s ease-out forwards;
}
@keyframes mv-hero-logo-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes mv-hero-wipe {
  0%   { width: 14%; }
  30%  { width: 76%; }
  58%  { width: 30%; }
  82%  { width: 50%; }
  100% { width: 50%; }
}
@keyframes mv-hero-handle {
  0%   { left: 14%; }
  30%  { left: 76%; }
  58%  { left: 30%; }
  82%  { left: 50%; }
  100% { left: 50%; }
}
@keyframes mv-hero-dim {
  0%   { opacity: 1; }
  100% { opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .mv-hero-before-clip,
  .mv-hero-handle,
  .mv-hero-compare,
  .mv-hero-logo {
    animation: none !important;
  }
  .mv-hero-before-clip { width: 50%; }
  .mv-hero-handle { left: 50%; }
  .mv-hero-compare { opacity: 0.55; }
  .mv-hero-logo { opacity: 1; }
}
@media (max-width: 640px) {
  .mv-hero-stage { height: 220px; }
  .mv-hero-handle-knob { width: 36px; height: 36px; margin: -18px 0 0 -18px; font-size: 14px; }
  .mv-hero-badge--after { top: auto; bottom: 16px; }
}

/* Section heading accent */
.nsm-section-title {
  font-weight: 800;
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 30px;
}
.nsm-section-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  background: var(--nsm-gradient);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* Product cards */
.nsm-product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 4px 14px rgba(15,23,42,0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nsm-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15,23,42,0.12);
}
.nsm-product-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.nsm-product-card .nsm-product-body { padding: 18px 20px 22px; }
.nsm-product-card h4 { color: var(--nsm-blue); font-weight: 800; margin-bottom: 8px; }

/* Footer */
.nsm-footer {
  background: #0a0a0a;
  color: #cbd5e1;
  border-top: 4px solid var(--nsm-blue);
  padding: 40px 0 22px;
  font-size: 0.9rem;
  margin-top: 44px;
}
.nsm-footer a { color: #cbd5e1; text-decoration: none; }
.nsm-footer a:hover { color: var(--nsm-cyan); }
.nsm-footer-logo { height: 52px; margin-bottom: 14px; }
.nsm-footer-addr { line-height: 1.7; margin: 0; }
.nsm-footer-h {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.nsm-footer-links { list-style: none; padding: 0; margin: 0; line-height: 2; }
.nsm-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.nsm-footer-note { color: #64748b; }

/* Generate button disabled state */
#generateBtn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.25); }

/* Anchor offset so the nav/hero don't cover the visualizer */
#visualizer { scroll-margin-top: 16px; }

/* Small screens */
@media (max-width: 767px) {
  .nsm-topbar-msg { text-align: left; width: 100%; margin-top: 3px; }
  .nsm-brand img { height: 46px; }
  .nsm-navbar .navbar-nav .nav-link { padding: 10px 6px; }
}

/* ==========================================================================
   Dark theme — visualizer, upload, product cards, controls
   ========================================================================== */
main {
  background: var(--bg);
  color: var(--text);
  min-height: 40vh;
}

.hv-panel {
  max-width: 1100px;
  margin: 20px auto;
  padding: 16px 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  background: transparent;
  color: var(--text);
}
.hv-brand {
  margin: 6px 0 16px;
}
.hv-brand-logo {
  display: block;
  width: min(460px, 100%);
  height: auto;
}
.hv-panel-lead {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-dim);
  max-width: 40rem;
  line-height: 1.55;
}
@media (max-width: 640px) {
  .hv-brand-logo { width: min(320px, 100%); }
}
.hv-panel-meta {
  margin-bottom: 15px;
  font-size: 12px;
  color: #7c8ca3;
}
.hv-block {
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}
.hv-block-title {
  font-size: 15px;
  color: #f8fafc;
  font-weight: 700;
}
.hv-muted {
  color: var(--text-dim);
  font-size: 12px;
}
.hv-photo-tip {
  margin: 12px 0 4px;
  padding: 10px 12px 11px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-left: 3px solid #3b82f6;
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  font-size: 12.5px;
  line-height: 1.45;
}
.hv-photo-tip-label {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}
.hv-photo-tip p {
  margin: 0;
  color: #b6c2d1;
}
.hv-photo-tip strong {
  color: #e2e8f0;
  font-weight: 700;
}
.hv-dropzone {
  border: 2px dashed #3d4d66;
  padding: 28px 18px;
  text-align: center;
  margin: 12px 0;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.hv-dropzone:hover,
.hv-dropzone.dragover {
  border-color: #3b82f6;
  background: #151e2e;
}
.hv-dropzone .dz-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #e8eef8;
}
.dz-arrow {
  width: 40px;
  height: 26px;
  color: #fff;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.dz-sample {
  width: 92px;
  height: 60px;
  object-fit: cover;
  object-position: center 42%;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  pointer-events: none;
}
.dz-copy {
  color: #e8eef8;
  letter-spacing: -0.01em;
}
.browse-files-label {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  background: var(--nsm-blue);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  margin: 0;
  font-weight: 700;
  color: #fff;
  vertical-align: middle;
}
.browse-files-label:hover {
  background: var(--nsm-blue-dark);
  color: #fff;
}
@media (max-width: 640px) {
  .hv-dropzone .dz-content {
    flex-direction: column;
    gap: 10px;
  }
  .dz-copy {
    text-align: center;
  }
}

.upload-preview {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text);
}
.upload-preview-label {
  color: var(--text-dim) !important;
}
.remove-photo-btn {
  background: var(--surface-3) !important;
  border: 1px solid #4b5d78 !important;
  color: #e2e8f0 !important;
}
.remove-photo-btn:hover {
  border-color: #60a5fa !important;
}

.preview-img {
  border-color: #334155 !important;
}
.hv-workspace.is-options-mode .upload-preview,
.upload-preview.is-docked {
  background: linear-gradient(180deg, #151d2c 0%, #111827 100%) !important;
  border-color: #334155 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}
.hv-workspace.is-options-mode .upload-preview-label,
.upload-preview.is-docked .upload-preview-label {
  color: #60a5fa !important;
}

.customize-panel {
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35) !important;
  color: var(--text);
}
.customize-heading strong {
  color: #f8fafc !important;
}
.customize-hint {
  color: var(--text-dim) !important;
}

.product-card {
  border: 1px solid var(--border) !important;
  background: var(--surface-2) !important;
}
.product-card--roof {
  border-left-color: #3b82f6 !important;
  background: linear-gradient(180deg, #12203a 0%, #151d2c 55%) !important;
}
.product-card--siding {
  border-left-color: #14b8a6 !important;
  background: linear-gradient(180deg, #0f2926 0%, #151d2c 55%) !important;
}
.product-card--trim {
  border-left-color: #eab308 !important;
  background: linear-gradient(180deg, #2a2310 0%, #151d2c 55%) !important;
}
.product-card-title {
  color: #f1f5f9 !important;
}
.product-card-sub {
  color: #8b9bb3 !important;
}
.optional-tag {
  color: #64748b !important;
}
.field-label {
  color: #94a3b8 !important;
}
.field-select {
  background: #0f1623 !important;
  border-color: #3d4d66 !important;
  color: #e8eef8 !important;
}
.field-select:focus {
  border-color: #3b82f6 !important;
  outline-color: rgba(59, 130, 246, 0.4) !important;
}
.field-select option {
  background: #111827;
  color: #e8eef8;
}
.color-chosen {
  color: #e2e8f0 !important;
}
.gauge-hint {
  color: #7c8ca3 !important;
}
.field-link {
  color: #60a5fa !important;
}
.field-textarea {
  background: #0f1623 !important;
  border-color: #3d4d66 !important;
  color: #e8eef8 !important;
}
.field-textarea::placeholder {
  color: #64748b;
}

.color-select-trigger {
  background: #0f1623 !important;
  border-color: #3d4d66 !important;
  color: #e8eef8 !important;
}
.color-select-trigger:hover {
  border-color: #64748b !important;
}
.color-select.is-open .color-select-trigger {
  border-color: #3b82f6 !important;
  outline-color: rgba(59, 130, 246, 0.35) !important;
}
.color-select-caret {
  color: #94a3b8 !important;
}
.color-select-menu {
  background: #151d2c !important;
  border-color: #3d4d66 !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55) !important;
}
.color-select-menu li {
  color: #e8eef8 !important;
}
.color-select-menu li.color-select-group {
  color: #7c8ca3 !important;
  border-top-color: rgba(148, 163, 184, 0.2) !important;
  background: transparent !important;
}
.color-select-menu li:hover:not(.color-select-group) {
  background: #1e2a3f !important;
}
.color-select-menu li.is-selected:not(.color-select-group) {
  background: rgba(59, 130, 246, 0.22) !important;
}
.color-chip {
  border-color: var(--chip-border) !important;
}

.btn-reset {
  background: var(--surface-3) !important;
  border: 1px solid #4b5d78 !important;
  color: #e2e8f0 !important;
}
.btn-reset:hover {
  border-color: #60a5fa !important;
}
.customize-foot {
  color: #7c8ca3 !important;
}

.hv-compare {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.hv-compare-col {
  flex: 1;
  min-width: 280px;
}
.hv-compare-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dim);
}
.hv-compare-img {
  width: 100%;
  max-height: 520px;
  height: auto;
  display: block;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0a0e16;
}
.hv-compare-img--result {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.hv-preview-note {
  margin: 10px 0 0;
  padding: 0 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #94a3b8;
  max-width: 52rem;
}
.hv-compare-actions {
  margin-top: 10px;
  font-size: 13px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.hv-link {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
}
.hv-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* ---- Result mode: options collapse next to photo bucket ---- */
.hv-workspace.is-result-mode {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 12px 14px;
  align-items: start;
  margin-bottom: 14px;
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.hv-workspace.is-result-mode .upload-preview.is-docked {
  grid-column: 2;
  grid-row: 1;
}
.hv-workspace.is-result-mode .customize-panel {
  grid-column: 1;
  grid-row: 1;
  padding: 12px 14px !important;
  max-height: none;
  overflow: hidden;
  animation: optionsCollapse 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes optionsCollapse {
  from { opacity: 0.6; transform: translateY(18px) scale(1.02); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hv-workspace.is-result-mode .customize-heading,
.hv-workspace.is-result-mode .product-cards,
.hv-workspace.is-result-mode .customize-actions,
.hv-workspace.is-result-mode .customize-foot {
  display: none !important;
}
.hv-workspace.is-result-mode .options-summary {
  display: block !important;
}
.options-summary[hidden] {
  display: none !important;
}
.options-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.options-summary-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.options-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #1a2436;
  border: 1px solid #334155;
  color: #e2e8f0;
}
.selection-chip--roof { border-color: rgba(59,130,246,0.5); background: rgba(59,130,246,0.12); }
.selection-chip--siding { border-color: rgba(20,184,166,0.5); background: rgba(20,184,166,0.12); }
.selection-chip--trim { border-color: rgba(234,179,8,0.45); background: rgba(234,179,8,0.1); }
.selection-chip .chip-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.btn-reset--sm {
  padding: 4px 10px !important;
  font-size: 11px !important;
}

/* ---- Before/After comparison slider ---- */
.hv-result-block {
  position: relative;
}
.hv-result-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.hv-result-tip {
  font-size: 12px;
  color: #7c8ca3;
}
.comparison-wrap {
  margin-top: 4px;
}
.compare-slider {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.compare-slider.is-locked {
  cursor: default;
}
.compare-slider:not(.is-locked) {
  cursor: ew-resize;
}
.compare-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0a0e16;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  line-height: 0;
  min-height: 200px;
}
.compare-layer {
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.compare-layer--after {
  width: 100%;
  height: auto;
  max-height: 620px;
  vertical-align: top;
}
.compare-before-clip {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  z-index: 2;
  /* No CSS transition while dragging — JS sets width every frame.
     will-change helps GPU during intro tween. */
  will-change: width;
}
.compare-before-clip.is-animating {
  /* hint browser during smooth intro; still driven by rAF */
  will-change: width;
}
.compare-layer--before {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--stage-w, 100%);
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: left top;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  z-index: 4;
  transform: translateX(-50%);
  pointer-events: auto;
  will-change: left;
  touch-action: none;
}
.compare-handle.is-animating {
  will-change: left;
}
.compare-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255,255,255,0.15), #fff, rgba(255,255,255,0.15));
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.55);
}
.compare-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  border: 2px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.compare-slider:not(.is-locked) .compare-handle:hover .compare-handle-knob,
.compare-slider:not(.is-locked) .compare-handle:active .compare-handle-knob {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 0 5px rgba(59, 130, 246, 0.35);
}
.compare-badge {
  position: absolute;
  top: 12px;
  z-index: 3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.compare-badge--before {
  left: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.12);
}
.compare-badge--after {
  right: 12px;
  background: rgba(29, 78, 216, 0.75);
  color: #fff;
  border: 1px solid rgba(147, 197, 253, 0.35);
}

/* Intro guide animation */
.compare-intro {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: radial-gradient(ellipse at center, rgba(15,23,42,0.35) 0%, rgba(15,23,42,0.08) 70%, transparent 100%);
  pointer-events: none;
  animation: introFadeIn 0.35s ease-out;
}
.compare-intro[hidden] {
  display: none !important;
}
.compare-intro.is-fading {
  animation: introFadeOut 0.45s ease-out forwards;
}
@keyframes introFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes introFadeOut {
  to { opacity: 0; }
}
.compare-intro-arrows {
  display: flex;
  align-items: center;
  gap: 56px;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.intro-arrow--left {
  animation: nudgeLeft 1.1s ease-in-out infinite;
}
.intro-arrow--right {
  animation: nudgeRight 1.1s ease-in-out infinite;
}
@keyframes nudgeLeft {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(-14px); opacity: 1; }
}
@keyframes nudgeRight {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(14px); opacity: 1; }
}
.compare-intro-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 16px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

/* Generate loading — large dark-theme spinner */
.hv-loading {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 36px 16px 40px;
  min-height: 220px;
  box-sizing: border-box;
}
.hv-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  padding: 28px 24px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #151d2c 0%, #0f1623 100%);
  border: 1px solid #2a3548;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}
.hv-loading-spinner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid rgba(148, 163, 184, 0.22);
  border-top-color: #60a5fa;
  border-right-color: #22d3ee;
  animation: spin 0.85s linear infinite;
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.25);
  flex-shrink: 0;
}
.hv-loading-title {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.01em;
}
.hv-loading-status {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
  min-height: 1.4em;
}
.hv-loading-wait {
  font-size: 13px;
  font-weight: 500;
  color: #d7e0ea;
  line-height: 1.45;
  max-width: 24em;
  text-wrap: pretty;
}
.hv-loading-bar {
  width: 100%;
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
  position: relative;
}
.hv-loading-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 45%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, #3b82f6 35%, #22d3ee 50%, #3b82f6 65%, transparent 100%);
  animation: pulseBar 1.6s linear infinite;
}

@media (max-width: 720px) {
  .hv-workspace.is-result-mode {
    grid-template-columns: 1fr !important;
  }
  .hv-workspace.is-result-mode .upload-preview.is-docked {
    grid-column: 1;
    grid-row: 1;
  }
  .hv-workspace.is-result-mode .customize-panel {
    grid-column: 1;
    grid-row: 2;
  }
  .compare-handle-knob {
    width: 40px;
    height: 40px;
  }
}

/* Footer dark polish */
.nsm-footer {
  background: #05070c !important;
  border-top-color: #1d4ed8 !important;
  color: #94a3b8 !important;
}
.nsm-section-title {
  color: #e2e8f0;
}

/* Form controls / general dark inputs */
input, select, textarea, button {
  color-scheme: dark;
}

