/* ============================================
   Contour Tool — Icon Strip + Floating Panels
   ============================================ */

/* Prevent page scroll — lock everything to viewport */
html.ct-no-scroll, html.ct-no-scroll body,
html.ct-no-scroll .main-content,
html.ct-no-scroll .container-fluid,
html.ct-no-scroll .container-fluid > * {
  overflow: hidden !important;
  min-height: 0 !important;
  max-height: 100vh !important;
}
html.ct-no-scroll .container-fluid { padding-bottom: 0 !important; }

/* ---- Dropzone ---- */
.ct-dz { border: 1.5px dashed #d0d0d0; border-radius: 10px; padding: 14px 8px; cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; }
.ct-dz:hover, .ct-dz.dz-drag-hover { border-color: #744c54; background: rgba(116,76,84,.04); }
.dark-version .ct-dz { border-color: #444; }
.dark-version .ct-dz:hover { border-color: #9b6b73; background: rgba(155,107,115,.06); }
.ct-dz .dz-preview { display: flex; align-items: center; gap: 5px; width: 100%; }
.ct-dz .dz-preview .dz-filename { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contour-dz-msg { pointer-events: none; width: 100%; }

/* ---- Icon Strip (left edge) ---- */
.ct-strip {
  width: 44px;
  min-width: 44px;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  gap: 4px;
  z-index: 20;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;            /* prevent the stray horizontal scrollbar */
  scrollbar-width: thin;         /* Firefox */
}
/* Chrome/Safari: thin vertical scrollbar, no horizontal one. */
.ct-strip::-webkit-scrollbar { width: 4px; height: 0; }
.ct-strip::-webkit-scrollbar-thumb { background: rgba(116,76,84,0.25); border-radius: 2px; }
.dark-version .ct-strip { border-color: #333; }
.dark-version .ct-strip::-webkit-scrollbar-thumb { background: rgba(155,107,115,0.25); }

.ct-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: #777;
  transition: all .15s;
  position: relative;
  flex-shrink: 0;
}
.ct-icon:hover { background: rgba(116,76,84,.08); color: #744c54; }
.ct-icon.active { background: rgba(116,76,84,.12); color: #744c54; }
.ct-icon.active::after {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px;
  background: #744c54;
  border-radius: 0 3px 3px 0;
}
.ct-icon i { font-size: 20px; }
.dark-version .ct-icon { color: #888; }
.dark-version .ct-icon:hover, .dark-version .ct-icon.active { color: #d4a0a8; background: rgba(155,107,115,.12); }
.dark-version .ct-icon.active::after { background: #d4a0a8; }

/* ---- Dock Panel ---- */
.ct-panels {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: 0 solid #eee;
  transition: width .2s ease, min-width .2s ease, border-width .2s ease;
  position: relative;
}
.ct-panels.open {
  width: 220px;
  min-width: 220px;
  border-right-width: 1px;
  overflow-y: auto;
}
.dark-version .ct-panels { border-color: #333; background: #202020; color: #d0d0d0; }
.ct-panel {
  width: 220px;
  padding: 14px;
  font-size: 12px;
  display: none;
  animation: ctPanelIn .15s ease;
  box-sizing: border-box;
}
.ct-panel.active { display: block; }
.dark-version .ct-panel { color: #d0d0d0; }
@keyframes ctPanelIn { from { opacity: 0; } to { opacity: 1; } }

.ct-panel-head {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: #888; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.dark-version .ct-panel-head { color: #aaa; }
.ct-panel-close { cursor: pointer; font-size: 16px; line-height: 1; color: #aaa; }
.ct-panel-close:hover { color: #744c54; }
.dark-version .ct-panel-close:hover { color: #d4a0a8; }

.ct-label { font-size: 11px; font-weight: 600; color: #888; display: block; margin-bottom: 3px; }
.dark-version .ct-label { color: #aaa; }
.ct-select {
  width: 100%; padding: 5px 8px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 11.5px; background: #fff; color: #333;
  /* Recolour the OS-native dropdown highlight (Bootstrap default is bright blue). */
  accent-color: #744c54;
}
.ct-select option { background: #fff; color: #333; }
.ct-select option:checked,
.ct-select option:hover { background: #744c54; color: #fff; }

.dark-version .ct-select {
  background: rgba(255,255,255,.06);
  border-color: #444;
  color: #ddd;
  /* Tell Chromium/Firefox to use the dark palette for the dropdown popup. */
  color-scheme: dark;
  accent-color: #9b6b73;
}
/* Match the contour panel's #202020 so the popup blends in instead of
   inheriting Material Dashboard's #1a1a2e (the navy tint the user flagged). */
.dark-version .ct-select option { background: #202020; color: #ddd; }
.dark-version .ct-select option:disabled { color: #666; }
.dark-version .ct-select option:checked,
.dark-version .ct-select option:hover { background: #9b6b73; color: #fff; }
.ct-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; border-radius: 3px; background: #ddd; outline: none; margin: 6px 0;
}
.dark-version .ct-slider { background: #444; }
.ct-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #744c54; cursor: pointer; }
.ct-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #744c54; cursor: pointer; border: none; }

.ct-check { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; margin: 4px 0; }
.ct-check input { accent-color: #744c54; }

/* 2D/3D toggle */
.contour-dim-btn {
  flex: 1; padding: 5px 0; border: 1px solid #ccc; background: #f5f5f5;
  font-size: 11px; font-weight: 700; color: #666; cursor: pointer; transition: all .15s; text-align: center;
}
.contour-dim-btn:first-child { border-radius: 6px 0 0 6px; }
.contour-dim-btn:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.dark-version .contour-dim-btn { border-color: #444; color: #999; background: #2a2a2a; }
.contour-dim-btn.active { background: #744c54; color: #fff; border-color: #744c54; }

/* ---- Main viz area ---- */
.contour-main { flex: 1; position: relative; min-width: 0; overflow: hidden; background: #fff; }
#contour-viz { width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; }
/* Match Material Dashboard's `.card` dark colour so the empty area around
   the plot SVG is one continuous surface with the rest of the card. */
.dark-version .contour-main { background: #202020; }
.dark-version #contour-viz { background: #202020; }

/* ---- Toolbar (hidden — using sidebar panels now) ---- */
.contour-toolbar { display: none; }

/* ---- Plot wrapper ---- */
.contour-plot-wrapper { border-radius: 4px; overflow: hidden; background: #fff; position: relative; }
/* Match Material Dashboard's `.card` dark colour to keep the chrome consistent. */
.dark-version .contour-plot-wrapper { background: #202020; }
/* Defensive: some Material Dashboard utility CSS adds borders to canvas /
   svg in certain layouts. Remove them so the only "frame" the user can see
   is the one drawn intentionally by the renderer (which the View panel's
   Frame toggle controls). */
.contour-plot-wrapper > canvas,
.contour-plot-wrapper > svg { border: 0 !important; outline: 0; box-shadow: none !important; }

/* ---- Zoom + North controls ---- */
.contour-viz-controls {
  position: absolute; bottom: 10px; right: 10px; z-index: 20;
  display: flex; flex-direction: column; gap: 4px;
}
.contour-viz-btn {
  width: 30px; height: 30px; border: 1px solid #ddd; border-radius: 6px;
  background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; color: #555; transition: all .15s;
}
.dark-version .contour-viz-btn { background: rgba(32,32,32,.9); border-color: #444; color: #aaa; }
.contour-viz-btn:hover { background: #744c54; color: #fff; border-color: #744c54; }
.contour-north-arrow {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #744c54;
  border: 1px solid #ddd; border-radius: 6px; background: rgba(255,255,255,.92);
}
.dark-version .contour-north-arrow { background: rgba(32,32,32,.9); border-color: #444; }

/* ---- Tooltip ---- */
.contour-tooltip {
  position: absolute; padding: 5px 8px; background: rgba(0,0,0,.8); color: #fff;
  border-radius: 5px; font-size: 11px; pointer-events: none; z-index: 100; white-space: nowrap;
}

/* ---- Note ---- */
.contour-note {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  padding: 6px 12px; border-radius: 6px; font-size: 11px; z-index: 10;
  background: #fef3c7; border: 1px solid #fbbf24; color: #92400e; white-space: nowrap;
}
.dark-version .contour-note { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.3); color: #fbbf24; }

/* ---- Dimension Toggle ---- */
.ct-toggle-group { display: flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1px solid #ddd; }
.dark-version .ct-toggle-group { border-color: #444; }
.ct-toggle {
  flex: 1; padding: 6px 0; border: none; background: #f5f5f5; color: #888;
  font-size: 11px; font-weight: 600; cursor: pointer; transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.dark-version .ct-toggle { background: #2a2a2a; color: #777; }
.ct-toggle.active { background: #744c54; color: #fff; }

/* ---- Switch List ---- */
.ct-switch-list { display: flex; flex-direction: column; gap: 6px; }
.ct-switch-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #555; }
.dark-version .ct-switch-row { color: #aaa; }

.ct-mini-switch { position: relative; width: 30px; height: 16px; display: inline-block; flex-shrink: 0; }
.ct-mini-switch input { opacity: 0; width: 0; height: 0; }
.ct-mini-switch span {
  position: absolute; inset: 0; background: #ccc; border-radius: 16px; cursor: pointer; transition: .2s;
}
.ct-mini-switch span::before {
  content: ''; position: absolute; width: 12px; height: 12px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.ct-mini-switch input:checked + span { background: #744c54; }
.ct-mini-switch input:checked + span::before { transform: translateX(14px); }
.dark-version .ct-mini-switch span { background: #555; }

/* ---- Fullpage overlay (Theory / References) ---- */
.ct-fullpage {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 30;
  overflow-y: auto;
  animation: ctFpIn .2s ease;
}
@keyframes ctFpIn { from { opacity: 0; } to { opacity: 1; } }
.dark-version .ct-fullpage { background: #202020; color: #d0d0d0; }
.ct-fullpage-inner { padding: 32px 40px; max-width: 720px; position: relative; }
.ct-fp-close {
  position: absolute; top: 20px; right: 20px;
  font-size: 24px; color: #aaa; cursor: pointer; line-height: 1; transition: color .15s;
}
.ct-fp-close:hover { color: #744c54; }
.ct-fp-content { font-size: 13.5px; line-height: 1.7; color: #555; }
.dark-version .ct-fp-content { color: #bbb; }
.ct-fp-content h6 { color: #333; font-size: 14px; }
.dark-version .ct-fp-content h6 { color: #ddd; }
.ct-fp-content ul { padding-left: 20px; margin: 8px 0; }
.ct-fp-content li { margin-bottom: 4px; }
.ct-fp-note {
  padding: 12px 16px; border-radius: 8px; font-size: 12.5px;
  background: #f8f5f0; border-left: 3px solid #744c54; color: #666;
}
.dark-version .ct-fp-note { background: rgba(116,76,84,.1); color: #aaa; }

/* ---- Data panel (post-Generate file summary) ---- */
.ct-data-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  background: #fafafa;
}
.dark-version .ct-data-card {
  background: rgba(255,255,255,.04);
  border-color: #383838;
}
.ct-data-fline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ct-data-ficon {
  font-size: 22px;
  color: #744c54;
  flex-shrink: 0;
  margin-top: 1px;
}
.ct-data-fbody { min-width: 0; flex: 1; }
.ct-data-fname {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  line-height: 1.3;
}
.dark-version .ct-data-fname { color: #ddd; }
.ct-data-meta {
  font-size: 10.5px;
  color: #888;
  margin-top: 2px;
  line-height: 1.3;
}

/* ---- NSPT chip picker ---- */
.ct-nspt {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ct-nspt-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ct-nspt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ct-nspt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: 11.5px;
  color: #555;
  transition: all .12s;
  user-select: none;
  white-space: nowrap;
}
.ct-nspt-chip:hover {
  border-color: rgba(116,76,84,.55);
  color: #744c54;
}
.ct-nspt-chip.active {
  background: #744c54;
  border-color: #744c54;
  color: #fff;
  box-shadow: 0 1px 3px rgba(116,76,84,.25);
}
.ct-nspt-chip-add {
  border-style: dashed;
  color: #888;
}
.ct-nspt-chip-add:hover { border-color: #744c54; }
.dark-version .ct-nspt-chip { background: rgba(255,255,255,.04); border-color: #444; color: #ccc; }
.dark-version .ct-nspt-chip.active { background: #9b6b73; border-color: #9b6b73; }

.ct-nspt-add {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ct-nspt-add input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 11.5px;
  background: #fff;
}
.ct-nspt-add input[type="number"]:focus {
  outline: 0;
  border-color: #744c54;
  box-shadow: 0 0 0 2px rgba(116,76,84,.15);
}
.dark-version .ct-nspt-add input[type="number"] {
  background: rgba(255,255,255,.06);
  border-color: #444;
  color: #ddd;
}
.ct-nspt-add .ct-nspt-add-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  background: #744c54;
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.ct-nspt-add .ct-nspt-add-btn:hover { background: #5d3c43; }
.ct-nspt-add .ct-nspt-add-btn:disabled { background: #c8b5b9; cursor: not-allowed; }
.ct-nspt-empty {
  font-size: 11px;
  color: #999;
  font-style: italic;
}

/* ---- Categorized Layer Panel ---- */
.ct-layer-cat { margin-bottom: 6px; }
.ct-layer-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; padding: 4px 0; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px; color: #888; user-select: none;
}
.ct-layer-cat-head span { display: flex; align-items: center; gap: 3px; }
.ct-cat-chevron { transition: transform .2s; }
.ct-layer-cat.collapsed .ct-cat-chevron { transform: rotate(-90deg); }
.ct-layer-cat.collapsed .ct-layer-cat-body { display: none; }
.ct-layer-cat-body { padding-left: 4px; }
.ct-layer-radio {
  display: flex; align-items: center; gap: 6px; padding: 3px 4px; margin: 1px 0;
  border-radius: 5px; cursor: pointer; font-size: 11.5px; transition: background .1s;
}
.ct-layer-radio:hover { background: rgba(116,76,84,.06); }
.ct-layer-radio input { accent-color: #744c54; margin: 0; flex-shrink: 0; }
.ct-layer-radio span { line-height: 1.3; }

/* ---- Axes ---- */
.x-axis path, .x-axis line, .y-axis path, .y-axis line { stroke: #ccc; }
.dark-version .x-axis path, .dark-version .x-axis line, .dark-version .y-axis path, .dark-version .y-axis line { stroke: #444; }

/* ============================================
   Setup Wizard — full-screen takeover
   Sits over .contour-main until Generate succeeds, then is hidden.
   ============================================ */
.ct-wizard {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 25;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 22px;
  overflow-y: auto;
}
.dark-version .ct-wizard { background: #202020; }

/* ── Stepper bar ── */
.ct-wiz-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: 0 auto 32px;
  width: 100%;
  max-width: 720px;
}
.ct-wiz-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #aaa;
  position: relative;
  user-select: none;
}
.ct-wiz-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: #e8e8e8;
  z-index: 0;
}
.dark-version .ct-wiz-step:not(:last-child)::after { background: #3a3a3a; }
.ct-wiz-step.completed:not(:last-child)::after { background: #28a745; }

.ct-wiz-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eee;
  color: #999;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: all .2s;
}
.ct-wiz-num .material-symbols-rounded { font-size: 16px; display: none; }
.dark-version .ct-wiz-num { background: #2c2c3a; color: #aaa; }

.ct-wiz-step.active .ct-wiz-num {
  background: #744c54;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(116,76,84,.16);
}
.ct-wiz-step.active { color: #744c54; font-weight: 600; }

.ct-wiz-step.completed .ct-wiz-num { background: #28a745; color: #fff; }
.ct-wiz-step.completed .ct-wiz-num .material-symbols-rounded { display: inline; }
.ct-wiz-step.completed .ct-wiz-num .num { display: none; }
.ct-wiz-step.completed { color: #28a745; cursor: pointer; }

/* ── Form holder ── */
.ct-wiz-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Pane area ── */
.ct-wiz-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  min-height: 0;
}
.ct-wiz-pane {
  display: none;
  width: 100%;
  max-width: 640px;
  text-align: center;
}
.ct-wiz-pane.active { display: block; animation: ctWizFade .25s ease; }
@keyframes ctWizFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.ct-wiz-pane h4 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #2c2c2c;
}
.dark-version .ct-wiz-pane h4 { color: #e8e8e8; }
.ct-wiz-sub {
  color: #888;
  font-size: 13.5px;
  margin: 0 auto 26px;
  max-width: 480px;
  line-height: 1.5;
}
.dark-version .ct-wiz-sub { color: #aaa; }

/* ── Step 1: big dropzone ── */
.ct-wiz-dz {
  border: 2px dashed #d0d0d0;
  border-radius: 14px;
  padding: 38px 20px;
  cursor: pointer;
  transition: all .2s;
  background: #fafafa;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ct-wiz-dz:hover, .ct-wiz-dz.dz-drag-hover {
  border-color: #744c54;
  background: rgba(116,76,84,.04);
}
.ct-wiz-dz .material-symbols-rounded {
  font-size: 44px;
  color: #c4c4c4;
  margin-bottom: 8px;
}
.ct-wiz-dz h5 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #444;
}
.ct-wiz-dz small { color: #888; font-size: 12px; }
.dark-version .ct-wiz-dz { background: #2a2a2a; border-color: #444; }
.dark-version .ct-wiz-dz h5 { color: #ddd; }
.ct-wiz-dz .dz-preview .dz-filename {
  font-weight: 600;
  color: #28a745;
  word-break: break-all;
}

.ct-wiz-fileswitch {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12.5px;
}
.ct-wiz-fileswitch a {
  color: #744c54;
  text-decoration: none;
}
.ct-wiz-fileswitch a:hover { text-decoration: underline; }

/* ── Step 2 / 6: large tile row ── */
.ct-wiz-tile-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.ct-wiz-tile {
  flex: 1 1 180px;
  max-width: 220px;
  border: 2px solid #e3e3e3;
  background: #fff;
  border-radius: 12px;
  padding: 22px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all .15s;
  text-align: center;
  font: inherit;
  color: inherit;
}
.ct-wiz-tile .material-symbols-rounded {
  font-size: 36px;
  color: #aaa;
  transition: color .15s;
}
.ct-wiz-tile span.t-label {
  font-size: 14px;
  font-weight: 600;
  color: #444;
}
.ct-wiz-tile small {
  font-size: 11.5px;
  color: #888;
  line-height: 1.35;
}
.ct-wiz-tile:hover { border-color: rgba(116,76,84,.4); }
.ct-wiz-tile.active {
  border-color: #744c54;
  background: rgba(116,76,84,.04);
  box-shadow: 0 4px 12px rgba(116,76,84,.08);
}
.ct-wiz-tile.active .material-symbols-rounded { color: #744c54; }
.dark-version .ct-wiz-tile { background: #2a2a2a; border-color: #383838; }
.dark-version .ct-wiz-tile span.t-label { color: #ddd; }

/* ── Step 3: method cards grid ── */
.ct-wiz-method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  text-align: left;
}
.ct-wiz-method {
  border: 2px solid #e3e3e3;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  display: block;
  transition: all .15s;
  background: #fff;
  position: relative;
}
.ct-wiz-method input { position: absolute; opacity: 0; pointer-events: none; }
.ct-wiz-method:hover { border-color: rgba(116,76,84,.4); }
.ct-wiz-method.active {
  border-color: #744c54;
  background: rgba(116,76,84,.04);
}
.ct-wiz-method .name {
  font-size: 13.5px;
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
  color: #444;
}
.ct-wiz-method small {
  font-size: 11.5px;
  color: #888;
  line-height: 1.4;
}
.dark-version .ct-wiz-method { background: #2a2a2a; border-color: #383838; }
.dark-version .ct-wiz-method .name { color: #ddd; }

/* ── Step 4: color ramp swatches ── */
.ct-wiz-ramp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.ct-wiz-ramp {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 6px 6px 5px;
  cursor: pointer;
  transition: all .15s;
  background: #fff;
}
.ct-wiz-ramp:hover { background: rgba(116,76,84,.05); }
.ct-wiz-ramp.active {
  border-color: #744c54;
  background: rgba(116,76,84,.04);
}
.ct-wiz-ramp-swatch {
  height: 26px;
  border-radius: 5px;
  margin-bottom: 6px;
  position: relative;
}
.ct-wiz-ramp.active .ct-wiz-ramp-swatch::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.ct-wiz-ramp-name {
  font-size: 11px;
  color: #555;
  text-align: center;
  text-transform: capitalize;
}
.dark-version .ct-wiz-ramp { background: #2a2a2a; }
.dark-version .ct-wiz-ramp-name { color: #aaa; }

/* ── Step 5: sliders ── */
.ct-wiz-slider-block {
  margin: 0 auto 20px;
  text-align: left;
  max-width: 460px;
}
.ct-wiz-slider-block label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}
.ct-wiz-slider-block strong { color: #744c54; }
.ct-wiz-slider-block input[type="range"] {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  background: #ddd;
  border-radius: 4px;
  outline: none;
}
.ct-wiz-slider-block input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #744c54;
  cursor: pointer;
}
.ct-wiz-slider-block input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #744c54;
  cursor: pointer;
  border: 0;
}
.dark-version .ct-wiz-slider-block label { color: #ccc; }
.dark-version .ct-wiz-slider-block input[type="range"] { background: #444; }

/* ── Step 7: review grid ── */
.ct-wiz-review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  text-align: left;
  max-width: 520px;
  margin: 0 auto 26px;
}
.ct-wiz-review {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: #f7f7f7;
  border-radius: 8px;
}
.ct-wiz-review-key {
  font-size: 10.5px;
  text-transform: uppercase;
  color: #888;
  letter-spacing: .04em;
  font-weight: 600;
}
.ct-wiz-review-val {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  word-break: break-word;
}
.dark-version .ct-wiz-review { background: #2a2a2a; }
.dark-version .ct-wiz-review-val { color: #ddd; }

/* Big primary CTA on step 7 */
.ct-wiz-generate {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 32px;
  background: #744c54;
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ct-wiz-generate:hover { background: #5d3c43; }
.ct-wiz-generate:disabled { opacity: .6; cursor: not-allowed; }
.ct-wiz-generate .material-symbols-rounded { font-size: 18px; }

/* ── Footer (Back / Next buttons) ── */
.ct-wiz-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid rgba(0,0,0,.06);
  flex-shrink: 0;
}
.dark-version .ct-wiz-footer { border-top-color: rgba(255,255,255,.06); }
.ct-wiz-footer .btn {
  font-size: 13px;
  padding: 8px 20px;
  min-width: 110px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ct-wiz-back {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
}
.ct-wiz-back:hover { background: #f5f5f5; }
.ct-wiz-next {
  background: #744c54;
  color: #fff;
  border: 1px solid #744c54;
}
.ct-wiz-next:hover { background: #5d3c43; border-color: #5d3c43; }
.ct-wiz-next:disabled { background: #c8b5b9; border-color: #c8b5b9; cursor: not-allowed; }

/* Skip link in bottom-right */
.ct-wiz-skip {
  position: absolute;
  bottom: 18px;
  right: 28px;
  font-size: 11.5px;
  color: #888;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.12);
  padding: 4px 12px;
  border-radius: 6px;
  background: #fff;
  transition: all .15s;
}
.ct-wiz-skip:hover {
  color: #744c54;
  border-color: #744c54;
}
.dark-version .ct-wiz-skip { background: #2a2a2a; color: #aaa; border-color: #444; }
