/* ============================================================
   Semantic Keyword Cluster Visualizer v1.9.5
   IntentiveSEO brand · #FF914C · Poppins
   Theme-proof: all interactive elements use !important or
   high-specificity .scv-wrapper selectors to beat WP themes.
   ============================================================ */

/* ── Font ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── Design tokens ── */
.scv-wrapper {
  --a:     #FF914C;   /* accent */
  --ad:    #e07332;   /* accent dark */
  --al:    #fff4ed;   /* accent light */
  --am:    #ffd9bf;   /* accent mid */
  --bg:    #ffffff;
  --bg2:   #f8f9fb;
  --bg3:   #f0f2f5;
  --bd:    #e4e6ea;   /* border */
  --bd2:   #c8cdd6;   /* border strong */
  --t:     #1a1d23;   /* text */
  --t2:    #5a6172;
  --t3:    #9aa0ad;
  --r:     16px;
  --ri:    10px;
  --font:  'Poppins', -apple-system, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono','Fira Code',monospace;
  --sh:    0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shl:   0 8px 28px rgba(0,0,0,.12);

  font-family:   var(--font) !important;
  color:         var(--t);
  background:    var(--bg);
  border-radius: var(--r);
  border:        1px solid var(--bd);
  box-shadow:    var(--sh);
  overflow:      hidden;
  max-width:     100%;
  position:      relative;
}

/* ── Hard reset inside wrapper ── */
.scv-wrapper *, .scv-wrapper *::before, .scv-wrapper *::after {
  box-sizing: border-box;
  font-family: var(--font);
}

/* CRITICAL: [hidden] attribute must ALWAYS hide — beats any display rule */
/* This prevents the loading overlay from showing on page load */
.scv-wrapper [hidden],
.scv-wrapper .scv-loading[hidden],
.scv-wrapper .scv-phase[hidden],
.scv-wrapper .scv-tab-panel[hidden],
.scv-wrapper .scv-discovery-panel[hidden],
.scv-wrapper .scv-error[hidden],
.scv-wrapper .scv-results[hidden] {
  display:none !important;
}

/* Loading overlay — hidden by default, shown only when JS removes [hidden] */
.scv-wrapper .scv-loading { display:none !important; }
.scv-wrapper .scv-loading:not([hidden]) {
  display:flex !important;
  position:absolute; inset:0;
  background:rgba(255,255,255,.93); backdrop-filter:blur(4px);
  flex-direction:column; align-items:center;
  justify-content:center; gap:14px; z-index:100;
  font-size:.9rem; color:var(--t2); font-weight:500;
}

.scv-wrapper h2,.scv-wrapper h3,.scv-wrapper h4,
.scv-wrapper p,.scv-wrapper ul,.scv-wrapper li { margin:0; padding:0; }
.scv-wrapper ul { list-style:none; }

/* ── Nuclear reset: every button/input inside wrapper ──────── */
/* This beats WP themes that style `button {}` or `.entry-content button {}` */
.scv-wrapper button,
.scv-wrapper input[type="text"],
.scv-wrapper input[type="range"],
.scv-wrapper textarea {
  -webkit-appearance: none !important;
  appearance:         none !important;
  font-family:        var(--font) !important;
  outline:            none;
}
.scv-wrapper button {
  display:        inline-flex !important;
  align-items:    center !important;
  justify-content:center !important;
  cursor:         pointer !important;
  border:         none !important;
  background:     transparent !important;
  padding:        0 !important;
  margin:         0 !important;
  text-decoration:none !important;
  line-height:    1 !important;
  color:          inherit !important;
  font-weight:    inherit !important;
  font-size:      inherit !important;
  border-radius:  0 !important;
  box-shadow:     none !important;
}

@keyframes scv-spin    { to { transform:rotate(360deg); } }
@keyframes scv-fadein  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ============================================================
   HEADER
   ============================================================ */
.scv-wrapper .scv-header {
  display:flex; align-items:center; gap:14px;
  padding:18px 24px 16px;
  border-bottom:1px solid var(--bd);
  background:var(--bg);
  flex-wrap:wrap;
}
.scv-wrapper .scv-header-icon {
  flex-shrink:0; width:44px; height:44px;
  background:var(--al); border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  color:var(--a);
}
.scv-wrapper .scv-header-icon svg { width:22px; height:22px; }
.scv-wrapper .scv-header-text { flex:1; min-width:0; }
.scv-wrapper .scv-title    { font-size:1.08rem; font-weight:700; color:var(--t); line-height:1.2; letter-spacing:-.01em; }
.scv-wrapper .scv-subtitle { font-size:.77rem; font-weight:400; color:var(--t2); margin-top:2px; }

/* Step indicators */
.scv-wrapper .scv-steps { display:flex; align-items:center; gap:0; flex-shrink:0; }
.scv-wrapper .scv-step  { display:flex; align-items:center; gap:7px; opacity:.3; transition:opacity .2s; }
.scv-wrapper .scv-step.scv-step-active    { opacity:1; }
.scv-wrapper .scv-step.scv-step-completed { opacity:.65; }
.scv-wrapper .scv-step-dot {
  width:22px; height:22px; border-radius:50%;
  border:2px solid var(--bd2); background:var(--bg);
  flex-shrink:0; transition:all .2s; display:block;
}
.scv-wrapper .scv-step-active .scv-step-dot,
.scv-wrapper .scv-step-completed .scv-step-dot { border-color:var(--a); background:var(--a); }
.scv-wrapper .scv-step-label { font-size:.7rem; font-weight:600; color:var(--t3); white-space:nowrap; }
.scv-wrapper .scv-step-active .scv-step-label    { color:var(--a); font-weight:700; }
.scv-wrapper .scv-step-completed .scv-step-label { color:var(--t2); }
.scv-wrapper .scv-step-line {
  width:28px; height:2px; background:var(--bd);
  border-radius:99px; margin:0 4px; flex-shrink:0;
}
.scv-wrapper .scv-step-completed + .scv-step-line,
.scv-wrapper .scv-step-active    + .scv-step-line { background:var(--a); }

/* ============================================================
   BUTTON SYSTEM
   All buttons here override the nuclear reset above.
   Must re-declare every property explicitly.
   ============================================================ */

/* ── Primary CTA — solid orange pill ── */
.scv-wrapper button.scv-btn-primary {
  display:         inline-flex !important;
  align-items:     center !important;
  justify-content: center !important;
  gap:             8px !important;
  font-family:     var(--font) !important;
  font-size:       .88rem !important;
  font-weight:     600 !important;
  padding:         12px 28px !important;
  border-radius:   999px !important;
  border:          none !important;
  background:      var(--a) !important;
  color:           #ffffff !important;
  cursor:          pointer !important;
  white-space:     nowrap !important;
  line-height:     1 !important;
  box-shadow:      0 3px 12px rgba(255,145,76,.38) !important;
  transition:      background .18s, box-shadow .18s, transform .1s !important;
  text-decoration: none !important;
}
.scv-wrapper button.scv-btn-primary:hover {
  background:  var(--ad) !important;
  box-shadow:  0 5px 18px rgba(255,145,76,.52) !important;
  transform:   translateY(-1px) !important;
}
.scv-wrapper button.scv-btn-primary:active  { transform:scale(.97) !important; }
.scv-wrapper button.scv-btn-primary:disabled { opacity:.42 !important; cursor:not-allowed !important; transform:none !important; }

/* ── Ghost — outlined pill ── */
.scv-wrapper button.scv-btn-ghost {
  display:         inline-flex !important;
  align-items:     center !important;
  gap:             6px !important;
  font-family:     var(--font) !important;
  font-size:       .82rem !important;
  font-weight:     600 !important;
  padding:         9px 18px !important;
  border-radius:   999px !important;
  border:          1.5px solid var(--bd2) !important;
  background:      var(--bg) !important;
  color:           var(--t2) !important;
  cursor:          pointer !important;
  line-height:     1 !important;
  white-space:     nowrap !important;
  transition:      all .18s !important;
  box-shadow:      none !important;
}
.scv-wrapper button.scv-btn-ghost:hover {
  background: var(--bg2) !important;
  color:      var(--t) !important;
  border-color: var(--t3) !important;
}

/* ── Small ghost (header actions) ── */
.scv-wrapper button.scv-btn-sm {
  font-size:  .76rem !important;
  padding:    7px 15px !important;
}

/* ── Danger ghost ── */
.scv-wrapper button.scv-btn-danger {
  color:        #e53935 !important;
  border-color: #ffcdd2 !important;
}
.scv-wrapper button.scv-btn-danger:hover {
  background: #fff5f5 !important;
  border-color: #e53935 !important;
}

/* ── XS export buttons ── */
.scv-wrapper button.scv-btn-xs {
  display:         inline-flex !important;
  align-items:     center !important;
  gap:             5px !important;
  font-family:     var(--font) !important;
  font-size:       .74rem !important;
  font-weight:     600 !important;
  padding:         6px 14px !important;
  border-radius:   999px !important;
  border:          1.5px solid var(--bd2) !important;
  background:      var(--bg) !important;
  color:           var(--t2) !important;
  cursor:          pointer !important;
  white-space:     nowrap !important;
  line-height:     1 !important;
  transition:      all .15s !important;
  box-shadow:      none !important;
}
.scv-wrapper button.scv-btn-xs:hover {
  border-color: var(--a) !important;
  color:        var(--a) !important;
  background:   var(--al) !important;
}

/* ── Pill TABS (active = orange fill, inactive = outline) ── */
.scv-wrapper button.scv-tab {
  display:         inline-flex !important;
  align-items:     center !important;
  gap:             6px !important;
  font-family:     var(--font) !important;
  font-size:       .8rem !important;
  font-weight:     600 !important;
  padding:         9px 18px !important;
  border-radius:   999px !important;
  border:          1.5px solid var(--bd2) !important;
  background:      var(--bg) !important;
  color:           var(--t2) !important;
  cursor:          pointer !important;
  white-space:     nowrap !important;
  line-height:     1 !important;
  transition:      all .2s !important;
  box-shadow:      none !important;
}
.scv-wrapper button.scv-tab:hover {
  border-color: var(--a) !important;
  color:        var(--a) !important;
  background:   var(--al) !important;
}
.scv-wrapper button.scv-tab.scv-tab-active {
  background:   var(--a) !important;
  color:        #ffffff !important;
  border-color: var(--a) !important;
  box-shadow:   0 3px 10px rgba(255,145,76,.3) !important;
}

/* ── Expand buttons (Google/Related/Questions) ── */
.scv-wrapper button.scv-expand-btn {
  display:         inline-flex !important;
  align-items:     center !important;
  gap:             7px !important;
  font-family:     var(--font) !important;
  font-size:       .82rem !important;
  font-weight:     600 !important;
  padding:         9px 20px !important;
  border-radius:   999px !important;
  cursor:          pointer !important;
  white-space:     nowrap !important;
  line-height:     1 !important;
  transition:      all .18s !important;
  box-shadow:      none !important;
}
.scv-wrapper button.scv-expand-btn--google {
  border: 1.5px solid var(--a) !important;
  background: var(--al) !important;
  color: var(--a) !important;
}
.scv-wrapper button.scv-expand-btn--google:hover,
.scv-wrapper button.scv-expand-btn--google.is-active {
  background: var(--a) !important; color:#fff !important;
  box-shadow: 0 3px 10px rgba(255,145,76,.35) !important;
}
.scv-wrapper button.scv-expand-btn--blue {
  border: 1.5px solid #4078f2 !important;
  background: #eef2ff !important; color: #4078f2 !important;
}
.scv-wrapper button.scv-expand-btn--blue:hover,
.scv-wrapper button.scv-expand-btn--blue.is-active {
  background:#4078f2 !important; color:#fff !important;
  box-shadow:0 3px 10px rgba(64,120,242,.3) !important;
}
.scv-wrapper button.scv-expand-btn--purple {
  border: 1.5px solid #7c3aed !important;
  background: #f5f3ff !important; color: #7c3aed !important;
}
.scv-wrapper button.scv-expand-btn--purple:hover,
.scv-wrapper button.scv-expand-btn--purple.is-active {
  background:#7c3aed !important; color:#fff !important;
  box-shadow:0 3px 10px rgba(124,58,237,.3) !important;
}

/* ── Preset buttons (Granular / Balanced / Broad) ── */
.scv-wrapper button.scv-preset-btn {
  display:         flex !important;
  flex-direction:  column !important;
  align-items:     center !important;
  gap:             4px !important;
  padding:         13px 10px !important;
  font-family:     var(--font) !important;
  cursor:          pointer !important;
  border:          1.5px solid var(--bd2) !important;
  border-radius:   10px !important;
  background:      var(--bg2) !important;
  transition:      all .18s !important;
  box-shadow:      none !important;
  color:           var(--t) !important;
  width:           100% !important;
}
.scv-wrapper button.scv-preset-btn:hover {
  border-color: var(--a) !important;
  background:   var(--al) !important;
}
.scv-wrapper button.scv-preset-btn.scv-preset-btn--active {
  background:   var(--al) !important;
  border-color: var(--a) !important;
  box-shadow:   0 0 0 3px rgba(255,145,76,.15) !important;
}
.scv-wrapper .scv-preset-label { font-size:.82rem; font-weight:700; color:var(--t); }
.scv-wrapper .scv-preset-sub   { font-size:.68rem; color:var(--t2); text-align:center; }
.scv-wrapper button.scv-preset-btn--active .scv-preset-label { color:var(--a); }

/* ── Discovery panel internal buttons ── */
.scv-wrapper button.scv-dp-sel-all,
.scv-wrapper button.scv-dp-sel-none {
  display:      inline-flex !important;
  font-family:  var(--font) !important;
  font-size:    .72rem !important;
  font-weight:  600 !important;
  padding:      5px 12px !important;
  border-radius:999px !important;
  border:       1.5px solid var(--bd2) !important;
  background:   var(--bg) !important;
  color:        var(--t2) !important;
  cursor:       pointer !important;
  line-height:  1 !important;
  transition:   all .15s !important;
  box-shadow:   none !important;
}
.scv-wrapper button.scv-dp-sel-all:hover,
.scv-wrapper button.scv-dp-sel-none:hover {
  border-color: var(--a) !important; color:var(--a) !important;
}
.scv-wrapper button.scv-dp-add-btn {
  display:      inline-flex !important;
  align-items:  center !important;
  font-family:  var(--font) !important;
  font-size:    .8rem !important;
  font-weight:  600 !important;
  padding:      8px 20px !important;
  border-radius:999px !important;
  border:       none !important;
  background:   var(--a) !important;
  color:        #fff !important;
  cursor:       pointer !important;
  line-height:  1 !important;
  white-space:  nowrap !important;
  box-shadow:   0 2px 8px rgba(255,145,76,.3) !important;
  transition:   all .18s !important;
}
.scv-wrapper button.scv-dp-add-btn:hover   { background:var(--ad) !important; }
.scv-wrapper button.scv-dp-add-btn:disabled { opacity:.4 !important; cursor:not-allowed !important; }
.scv-wrapper button.scv-dp-add-seed-btn {
  display:     inline-flex !important;
  font-family: var(--font) !important;
  font-size:   .76rem !important;
  font-weight: 600 !important;
  padding:     6px 14px !important;
  border-radius:8px !important;
  border:      1.5px solid var(--bd2) !important;
  background:  var(--bg3) !important;
  color:       var(--t2) !important;
  cursor:      pointer !important;
  line-height: 1 !important;
  transition:  all .15s !important;
  box-shadow:  none !important;
}
.scv-wrapper button.scv-dp-add-seed-btn:hover { border-color:var(--a) !important; color:var(--a) !important; background:var(--al) !important; }

/* ── API buttons on cluster cards ── */
.scv-wrapper button.scv-api-btn {
  display:      inline-flex !important;
  align-items:  center !important;
  gap:          5px !important;
  font-family:  var(--font) !important;
  font-size:    .69rem !important;
  font-weight:  600 !important;
  padding:      5px 12px !important;
  border-radius:999px !important;
  border:       1.5px solid var(--bd2) !important;
  background:   var(--bg) !important;
  color:        var(--t2) !important;
  cursor:       pointer !important;
  transition:   all .15s !important;
  line-height:  1 !important;
  white-space:  nowrap !important;
  box-shadow:   none !important;
}
.scv-wrapper button.scv-api-btn:hover { color:var(--a) !important; border-color:var(--a) !important; }

/* ── Intent pill tabs in discovery panels ── */
.scv-wrapper button.scv-dp-intent-tab {
  display:      inline-flex !important;
  font-family:  var(--font) !important;
  font-size:    .7rem !important;
  font-weight:  600 !important;
  padding:      5px 12px !important;
  border-radius:999px !important;
  border:       1.5px solid var(--bd2) !important;
  background:   var(--bg) !important;
  color:        var(--t3) !important;
  cursor:       pointer !important;
  white-space:  nowrap !important;
  line-height:  1 !important;
  transition:   all .15s !important;
  box-shadow:   none !important;
}
.scv-wrapper button.scv-dp-intent-tab:hover { color:var(--a) !important; border-color:var(--a) !important; }
.scv-wrapper button.scv-dp-intent-tab.scv-dp-intent-tab-active {
  background:var(--a) !important; color:#fff !important; border-color:var(--a) !important;
}

/* ── Close buttons — theme-proof ── */
.scv-wrapper button.scv-dp-close,
.scv-wrapper button.scv-enrich-close {
  display:      inline-flex !important;
  align-items:  center !important;
  justify-content:center !important;
  width:        28px !important; height:28px !important;
  padding:      0 !important;
  border-radius:8px !important;
  border:       1.5px solid var(--bd) !important;
  background:   var(--bg2) !important;
  color:        var(--t3) !important;
  font-size:    14px !important;
  cursor:       pointer !important;
  flex-shrink:  0 !important;
  box-shadow:   none !important;
  line-height:  1 !important;
  transition:   all .15s !important;
  min-width:    0 !important;
  margin:       0 !important;
}
.scv-wrapper button.scv-dp-close:hover,
.scv-wrapper button.scv-enrich-close:hover { color:var(--t) !important; background:var(--bg3) !important; }
.scv-wrapper button.scv-dp-close { align-self:flex-start !important; }
.scv-wrapper button.scv-enrich-close { margin-left:auto !important; }

/* ── Fetch button inside dp panel ── */
.scv-wrapper button.scv-dp-fetch-btn {
  display:      inline-flex !important;
  align-items:  center !important;
  font-family:  var(--font) !important;
  font-size:    .82rem !important;
  font-weight:  600 !important;
  padding:      9px 22px !important;
  border-radius:999px !important;
  border:       none !important;
  background:   var(--a) !important;
  color:        #fff !important;
  cursor:       pointer !important;
  line-height:  1 !important;
  white-space:  nowrap !important;
  box-shadow:   0 2px 8px rgba(255,145,76,.3) !important;
  transition:   all .18s !important;
}
.scv-wrapper button.scv-dp-fetch-btn:hover   { background:var(--ad) !important; }
.scv-wrapper button.scv-dp-fetch-btn:disabled { opacity:.5 !important; cursor:not-allowed !important; }

/* ============================================================
   INPUT FIELDS (textarea, text inputs)
   ============================================================ */
.scv-wrapper .scv-textarea {
  width:100%; min-height:160px;
  padding:12px 14px;
  font-size:.84rem !important;
  font-family:var(--mono) !important;
  line-height:1.7;
  color:var(--t); background:var(--bg);
  border:1.5px solid var(--bd2) !important;
  border-radius:10px !important;
  resize:vertical; outline:none;
  transition:border-color .18s, box-shadow .18s;
  display:block;
}
.scv-wrapper .scv-textarea:focus {
  border-color:var(--a) !important;
  box-shadow:0 0 0 4px rgba(255,145,76,.13) !important;
}
.scv-wrapper .scv-textarea::placeholder { color:var(--t3); font-size:.8rem; }
.scv-wrapper .scv-textarea--flash {
  border-color:var(--a) !important;
  box-shadow:0 0 0 4px rgba(255,145,76,.2) !important;
}

.scv-wrapper .scv-dp-input {
  flex:1; padding:8px 13px;
  font-size:.83rem !important; font-family:var(--font) !important;
  color:var(--t); background:var(--bg);
  border:1.5px solid var(--bd2) !important;
  border-radius:8px !important; outline:none;
  transition:border-color .18s, box-shadow .18s;
  display:block; width:100%;
}
.scv-wrapper .scv-dp-input:focus { border-color:var(--a) !important; box-shadow:0 0 0 3px rgba(255,145,76,.1) !important; }
.scv-wrapper .scv-dp-input-sm { padding:6px 11px !important; font-size:.79rem !important; }

/* Range inputs */
.scv-wrapper input[type="range"] {
  -webkit-appearance:none !important; appearance:none !important;
  height:6px !important; background:var(--bg3) !important;
  border-radius:99px !important; border:none !important;
  outline:none !important; cursor:pointer !important;
  accent-color:var(--a) !important;
  padding:0 !important; margin:0 !important;
}
.scv-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance:none !important;
  width:18px !important; height:18px !important;
  border-radius:50% !important;
  background:var(--a) !important; cursor:pointer !important;
  border:2px solid #fff !important;
  box-shadow:0 1px 4px rgba(0,0,0,.2) !important;
}
.scv-wrapper input[type="range"]::-moz-range-thumb {
  width:18px !important; height:18px !important;
  border-radius:50% !important;
  background:var(--a) !important; cursor:pointer !important;
  border:2px solid #fff !important;
  box-shadow:0 1px 4px rgba(0,0,0,.2) !important;
}

/* Checkbox accent */
.scv-wrapper input[type="checkbox"] {
  accent-color:var(--a) !important;
  width:15px !important; height:15px !important;
  cursor:pointer !important;
}

/* ============================================================
   ERROR / LOADING
   ============================================================ */
.scv-wrapper .scv-error {
  margin:12px 24px;
  padding:11px 16px 11px 14px;
  background:#fff5f5; border:1px solid #fecaca;
  border-left:4px solid #ef4444;
  border-radius:10px;
  color:#b91c1c; font-size:.8rem; font-weight:500;
}
.scv-wrapper .scv-spinner {
  width:40px; height:40px;
  border:3px solid var(--bd);
  border-top-color:var(--a);
  border-radius:50%;
  animation:scv-spin .7s linear infinite;
}

/* ============================================================
   PHASE 1 — BUILD
   ============================================================ */
.scv-wrapper .scv-build-body { padding:24px 24px 0; }

.scv-wrapper .scv-input-top {
  display:flex; align-items:baseline;
  justify-content:space-between; margin-bottom:10px;
}
.scv-wrapper .scv-label {
  font-size:.7rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.07em; color:var(--t2);
}
.scv-wrapper .scv-label-hint {
  font-weight:400; font-size:.72rem; color:var(--t3);
  text-transform:none; letter-spacing:0; margin-left:6px;
}
.scv-wrapper .scv-kw-counter { font-size:.72rem; font-family:var(--mono); color:var(--t3); }
.scv-wrapper .scv-kw-counter.scv-counter-warn { color:#ef4444; font-weight:700; }

/* Progress */
.scv-wrapper .scv-progress-row { display:flex; align-items:center; gap:12px; margin-top:10px; }
.scv-wrapper .scv-kw-progress { flex:1; height:5px; background:var(--bg3); border-radius:99px; overflow:hidden; }
.scv-wrapper .scv-kw-progress-bar { height:100%; width:0; background:var(--a); border-radius:99px; transition:width .35s, background .3s; }
.scv-wrapper .scv-kw-progress-bar.scv-progress-ready { background:#22c55e; }
.scv-wrapper .scv-kw-progress-hint { font-size:.7rem; color:var(--t3); white-space:nowrap; flex-shrink:0; font-weight:500; }
.scv-wrapper .scv-kw-progress-hint.scv-progress-hint-ready { color:#22c55e; font-weight:700; }

.scv-wrapper .scv-util-row { display:flex; gap:8px; padding:10px 0 18px; }

/* Expand section */
.scv-wrapper .scv-expand-section { border-top:1px solid var(--bd); }
.scv-wrapper .scv-expand-header {
  display:flex; align-items:center; gap:10px;
  padding:14px 24px 10px; background:var(--bg2);
}
.scv-wrapper .scv-expand-title {
  display:flex; align-items:center; gap:7px;
  font-size:.7rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.07em; color:var(--t2);
}
.scv-wrapper .scv-expand-hint { font-size:.72rem; color:var(--t3); margin-left:auto; }
.scv-wrapper .scv-expand-btns { display:flex; gap:8px; padding:0 24px 16px; background:var(--bg2); flex-wrap:wrap; }

/* Build footer */
.scv-wrapper .scv-build-footer {
  display:flex; align-items:center; gap:14px;
  padding:14px 24px 18px;
  border-top:1px solid var(--bd); background:var(--bg);
}
.scv-wrapper .scv-build-footer-hint { flex:1; font-size:.74rem; color:var(--t3); margin:0; }
.scv-wrapper button.scv-btn-continue {
  font-size:.9rem !important;
  padding:13px 32px !important;
  gap:8px !important;
  flex-shrink:0 !important;
}

/* ============================================================
   PHASE 2 — ANALYZE
   ============================================================ */
.scv-wrapper .scv-analyze-summary {
  display:flex; align-items:center; gap:16px;
  padding:20px 24px; border-bottom:1px solid var(--bd);
  background:var(--bg2);
}
.scv-wrapper .scv-analyze-summary-icon { font-size:1.8rem; flex-shrink:0; }
.scv-wrapper .scv-analyze-summary-text { flex:1; }
.scv-wrapper .scv-analyze-kw-count { display:block; font-size:1.2rem; font-weight:800; color:var(--t); }
.scv-wrapper .scv-analyze-kw-sub   { display:block; font-size:.74rem; color:var(--t2); margin-top:4px; }

.scv-wrapper .scv-threshold-card { padding:24px; border-bottom:1px solid var(--bd); }
.scv-wrapper .scv-threshold-card-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:20px;
}
.scv-wrapper .scv-threshold-title { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--t2); margin-bottom:5px; }
.scv-wrapper .scv-threshold-subtitle { font-size:.76rem; color:var(--t2); line-height:1.55; max-width:400px; }
.scv-wrapper .scv-threshold-badge { font-size:2rem; font-weight:800; color:var(--a); line-height:1; flex-shrink:0; }
.scv-wrapper .scv-threshold-presets { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:20px; }
.scv-wrapper .scv-threshold-range-input {
  width:100% !important; display:block !important; margin-bottom:6px !important;
  height:6px !important; cursor:pointer !important;
}
.scv-wrapper .scv-threshold-ticks { display:flex; justify-content:space-between; }
.scv-wrapper .scv-threshold-ticks span { font-size:.63rem; color:var(--t3); font-weight:500; }
.scv-wrapper .scv-threshold-desc-text {
  margin:14px 0 0; font-size:.78rem; color:var(--t2);
  background:var(--al); border-radius:10px;
  padding:10px 14px; border-left:3px solid var(--a);
}
.scv-wrapper .scv-analyze-footer { display:flex; align-items:center; gap:16px; padding:18px 24px 22px; }
.scv-wrapper button.scv-btn-run { font-size:.92rem !important; padding:14px 36px !important; }
.scv-wrapper .scv-analyze-footer-hint { font-size:.74rem; color:var(--t3); }

/* ============================================================
   PHASE 3 — EXPLORE / RESULTS
   ============================================================ */
.scv-wrapper .scv-results { animation:scv-fadein .3s ease; }

.scv-wrapper .scv-stats-bar { display:flex; border-bottom:1px solid var(--bd); background:var(--bg2); }
.scv-wrapper .scv-stat {
  flex:1; display:flex; flex-direction:column; align-items:center;
  padding:16px 8px; border-right:1px solid var(--bd); text-align:center;
}
.scv-wrapper .scv-stat:last-child { border-right:none; }
.scv-wrapper .scv-stat-val { font-size:1.5rem; font-weight:800; color:var(--a); line-height:1; }
.scv-wrapper .scv-stat-lbl { font-size:.64rem; color:var(--t3); margin-top:5px; text-transform:uppercase; letter-spacing:.06em; font-weight:600; }

/* Results toolbar with pill tabs */
.scv-wrapper .scv-results-toolbar {
  display:flex; align-items:center; gap:0;
  padding:12px 20px 12px 12px;
  border-bottom:1px solid var(--bd); background:var(--bg2);
}
.scv-wrapper .scv-tabs { display:flex; gap:6px; flex:1; flex-wrap:wrap; }
.scv-wrapper .scv-results-actions { display:flex; gap:8px; flex-shrink:0; margin-left:12px; }

/* Fan / topical map */
.scv-wrapper .scv-fan-controls {
  display:flex; align-items:center; gap:14px;
  padding:10px 20px; border-bottom:1px solid var(--bd); background:var(--bg2);
}
.scv-wrapper .scv-graph-ctrl-label { display:flex; align-items:center; gap:8px; font-size:.74rem; color:var(--t2); font-weight:500; }
.scv-wrapper .scv-fan-container { background:var(--bg); }
.scv-wrapper .scv-fan-svg { display:block; width:100%; }
.scv-wrapper .scv-legend { display:flex; flex-wrap:wrap; gap:8px 18px; padding:14px 20px; border-bottom:1px solid var(--bd); }
.scv-wrapper .scv-legend-item { display:flex; align-items:center; gap:7px; font-size:.73rem; color:var(--t2); }
.scv-wrapper .scv-legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.scv-wrapper .scv-legend-count { font-size:.64rem; color:var(--t3); background:var(--bg3); border:1px solid var(--bd); border-radius:99px; padding:1px 6px; font-family:var(--mono); }

/* Cluster grid */
.scv-wrapper .scv-clusters-toolbar { padding:12px 20px 6px; }
.scv-wrapper .scv-clusters-hint {
  display:flex; align-items:flex-start; gap:8px; font-size:.77rem; color:var(--t2);
  background:var(--al); border:1px solid rgba(255,145,76,.25);
  border-radius:10px; padding:10px 14px; line-height:1.55;
}
.scv-wrapper .scv-cluster-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px; padding:18px 20px; }
.scv-wrapper .scv-cluster-card {
  background:var(--bg); border:1px solid var(--bd);
  border-top:3px solid var(--c-color,var(--a));
  border-radius:10px; overflow:hidden;
  transition:box-shadow .2s, transform .15s;
}
.scv-wrapper .scv-cluster-card:hover { box-shadow:var(--shl); transform:translateY(-2px); }
.scv-wrapper .scv-cluster-card-header { display:flex; align-items:flex-start; gap:8px; padding:12px 14px; border-bottom:1px solid var(--bd); background:var(--bg2); }
.scv-wrapper .scv-cluster-badge { width:22px; height:22px; border-radius:50%; color:#fff; font-size:.68rem; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.scv-wrapper .scv-cluster-name { flex:1; font-size:.81rem; font-weight:700; color:var(--t); word-break:break-word; line-height:1.35; }
.scv-wrapper .scv-cluster-count { font-size:.69rem; color:var(--t3); white-space:nowrap; flex-shrink:0; margin-top:2px; font-family:var(--mono); }
.scv-wrapper .scv-kw-list { padding:10px 14px; display:flex; flex-direction:column; gap:4px; }
.scv-wrapper .scv-kw-list li { font-size:.76rem; color:var(--t2); padding:2px 0; border-bottom:1px dashed var(--bd); line-height:1.45; }
.scv-wrapper .scv-kw-list li:last-child { border-bottom:none; }
.scv-wrapper .scv-api-bar { display:flex; gap:6px; padding:8px 14px; border-top:1px solid var(--bd); background:var(--bg2); flex-wrap:wrap; }

/* Enrich panels */
.scv-wrapper .scv-enrich-panel { border-top:1px solid var(--bd); background:var(--bg2); animation:scv-fadein .2s ease; }
.scv-wrapper .scv-enrich-loading { display:flex; align-items:center; gap:8px; padding:10px 14px; font-size:.75rem; color:var(--t3); }
.scv-wrapper .scv-enrich-spinner { width:13px; height:13px; border:2px solid var(--bd2); border-top-color:var(--a); border-radius:50%; animation:scv-spin .6s linear infinite; flex-shrink:0; }
.scv-wrapper .scv-enrich-error  { padding:9px 14px; font-size:.75rem; color:#ef4444; }
.scv-wrapper .scv-enrich-empty  { padding:9px 14px; font-size:.75rem; color:var(--t3); font-style:italic; }
.scv-wrapper .scv-enrich-header { display:flex; align-items:flex-start; gap:8px; padding:10px 14px 8px; border-bottom:1px solid var(--bd); background:var(--bg); }
.scv-wrapper .scv-enrich-icon   { font-size:.9rem; flex-shrink:0; margin-top:1px; }
.scv-wrapper .scv-enrich-title  { font-size:.77rem; font-weight:700; color:var(--t); }
.scv-wrapper .scv-enrich-sub    { font-size:.67rem; color:var(--t3); margin-top:2px; }
.scv-wrapper .scv-wiki-body     { display:flex; gap:10px; padding:10px 14px; align-items:flex-start; }
.scv-wrapper .scv-wiki-thumb    { width:56px; height:56px; object-fit:cover; border-radius:8px; flex-shrink:0; border:1px solid var(--bd); }
.scv-wrapper .scv-wiki-extract  { font-size:.76rem; color:var(--t2); line-height:1.58; }
.scv-wrapper a.scv-wiki-link    { font-size:.71rem; font-weight:600; color:var(--a); text-decoration:none; }
.scv-wrapper a.scv-wiki-link:hover { text-decoration:underline; }
.scv-wrapper .scv-enrich-footer { display:flex; align-items:center; justify-content:space-between; padding:8px 14px; border-top:1px solid var(--bd); flex-wrap:wrap; gap:6px; }
.scv-wrapper .scv-enrich-source-note { font-size:.65rem; color:var(--t3); font-style:italic; }

/* Page plan */
.scv-wrapper .scv-page-plan { padding:18px 20px; display:flex; flex-direction:column; gap:12px; }
.scv-wrapper .scv-page-card { background:var(--bg2); border:1px solid var(--bd); border-left:4px solid var(--p-color,var(--a)); border-radius:10px; padding:15px 18px; transition:box-shadow .2s; }
.scv-wrapper .scv-page-card:hover { box-shadow:var(--sh); }
.scv-wrapper .scv-page-card-head { display:flex; align-items:flex-start; gap:12px; }
.scv-wrapper .scv-page-num { width:27px; height:27px; border-radius:50%; background:var(--bg3); color:var(--t2); font-size:.72rem; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.scv-wrapper .scv-page-title-area h4 { font-size:.88rem; font-weight:700; color:var(--t); margin-bottom:5px; }
.scv-wrapper .scv-page-meta { font-size:.73rem; color:var(--t2); display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.scv-wrapper .scv-page-type-badge { display:inline-block; padding:2px 9px; border-radius:999px; font-size:.66rem; font-weight:700; }
.scv-wrapper .scv-page-type-pillar-page     { background:#fff7ed; color:#c2410c; }
.scv-wrapper .scv-page-type-cluster-page    { background:#eff6ff; color:#1d4ed8; }
.scv-wrapper .scv-page-type-supporting-post { background:#f0fdf4; color:#166534; }
.scv-wrapper .scv-page-supporting { margin-top:12px; }
.scv-wrapper .scv-supporting-label { font-size:.69rem; font-weight:700; color:var(--t3); text-transform:uppercase; letter-spacing:.06em; display:block; margin-bottom:7px; }
.scv-wrapper .scv-supporting-tags { display:flex; flex-wrap:wrap; gap:5px; }
.scv-wrapper .scv-tag { display:inline-block; padding:3px 10px; background:var(--bg3); border:1px solid var(--bd); border-radius:999px; font-size:.71rem; color:var(--t2); }

/* Export bar */
.scv-wrapper .scv-export-bar { display:flex; align-items:center; gap:8px; padding:12px 20px; background:var(--bg2); border-top:1px solid var(--bd); flex-wrap:wrap; }
.scv-wrapper .scv-export-label { font-size:.69rem; font-weight:700; color:var(--t3); text-transform:uppercase; letter-spacing:.06em; margin-right:4px; }

/* Discovery panel */
.scv-wrapper .scv-discovery-panel { border-top:1px solid var(--bd); background:var(--bg); animation:scv-fadein .2s ease; }
.scv-wrapper .scv-dp-header { display:flex; align-items:flex-start; gap:11px; padding:14px 20px 12px; border-bottom:1px solid var(--bd); background:var(--bg2); }
.scv-wrapper .scv-dp-icon { font-size:1rem; flex-shrink:0; margin-top:2px; }
.scv-wrapper .scv-dp-title-wrap { flex:1; min-width:0; }
.scv-wrapper .scv-dp-title { font-size:.87rem; font-weight:700; color:var(--t); }
.scv-wrapper .scv-dp-sub { margin:3px 0 0; font-size:.73rem; color:var(--t2); line-height:1.5; }
.scv-wrapper .scv-dp-seeds-area { padding:12px 20px 10px; border-bottom:1px solid var(--bd); background:var(--bg2); }
.scv-wrapper .scv-dp-seeds-label { display:block; font-size:.68rem; font-weight:700; color:var(--t3); text-transform:uppercase; letter-spacing:.07em; margin-bottom:9px; }
.scv-wrapper .scv-dp-seed-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.scv-wrapper .scv-seed-chip { display:inline-flex; align-items:center; gap:5px; padding:5px 13px; background:var(--bg); border:1.5px solid var(--a); border-radius:999px; font-size:.74rem; font-weight:600; color:var(--a); cursor:pointer; user-select:none; transition:all .15s; }
.scv-wrapper .scv-seed-chip input { display:none; }
.scv-wrapper .scv-seed-chip:has(input:not(:checked)) { border-color:var(--bd2); color:var(--t3); background:var(--bg3); text-decoration:line-through; }
.scv-wrapper .scv-seed-chip--custom { border-color:#7c3aed; color:#7c3aed; }
.scv-wrapper .scv-dp-custom-row { display:flex; gap:7px; align-items:center; }
.scv-wrapper .scv-dp-fetch-row { display:flex; align-items:center; justify-content:space-between; padding:10px 20px; border-bottom:1px solid var(--bd); gap:10px; flex-wrap:wrap; }
.scv-wrapper .scv-dp-prefix-note { font-size:.68rem; color:var(--t3); font-style:italic; }
.scv-wrapper .scv-dp-results { padding:0; }
.scv-wrapper .scv-dp-loading { display:flex; align-items:center; gap:9px; padding:15px 20px; font-size:.76rem; color:var(--t3); }
.scv-wrapper .scv-enrich-spinner { width:13px; height:13px; border:2px solid var(--bd2); border-top-color:var(--a); border-radius:50%; animation:scv-spin .6s linear infinite; flex-shrink:0; }
.scv-wrapper .scv-dp-empty { padding:14px 20px; font-size:.76rem; color:var(--t3); font-style:italic; }
.scv-wrapper .scv-dp-error { padding:12px 20px; font-size:.76rem; color:#ef4444; }
.scv-wrapper .scv-dp-source-note { padding:8px 20px 4px; font-size:.7rem; color:var(--t3); font-style:italic; }
.scv-wrapper .scv-dp-intent-tabs { display:flex; gap:5px; padding:10px 20px 6px; flex-wrap:wrap; border-bottom:1px solid var(--bd); background:var(--bg2); }
.scv-wrapper .scv-dp-checklist { display:flex; flex-direction:column; }
.scv-wrapper .scv-dc-row { display:flex; align-items:center; gap:10px; padding:9px 20px; cursor:pointer; transition:background .1s; user-select:none; }
.scv-wrapper .scv-dc-row:hover:not(.scv-dc-row--added) { background:var(--bg2); }
.scv-wrapper .scv-dc-row--added { opacity:.4; cursor:default; }
.scv-wrapper .scv-dc-text { font-size:.81rem; color:var(--t2); line-height:1.4; flex:1; }
.scv-wrapper .scv-dc-row--added .scv-dc-text::after { content:' ✓'; color:#22c55e; font-weight:700; }
.scv-wrapper .scv-dc-intent-badge, .scv-wrapper .scv-dc-badge { display:inline-block; font-size:.62rem; font-weight:700; padding:2px 7px; border-radius:999px; white-space:nowrap; flex-shrink:0; margin-left:auto; }
.scv-wrapper .scv-dp-footer { display:flex; align-items:center; justify-content:space-between; padding:12px 20px; border-top:1.5px solid var(--bd); background:var(--bg2); gap:8px; flex-wrap:wrap; }
.scv-wrapper .scv-dp-footer-left { display:flex; align-items:center; gap:8px; }
.scv-wrapper .scv-dp-sel-count { font-size:.71rem; color:var(--t3); font-family:var(--mono); }
.scv-wrapper .scv-dm-group { border-bottom:1px solid var(--bd); }
.scv-wrapper .scv-dm-group:last-child { border-bottom:none; }
.scv-wrapper .scv-dm-group-header { display:flex; align-items:center; gap:8px; padding:9px 20px 7px; background:var(--bg2); border-bottom:1px solid var(--bd); }
.scv-wrapper .scv-dm-group-label { font-size:.76rem; font-weight:600; color:var(--t); flex:1; }
.scv-wrapper .scv-dm-group-label em { font-style:normal; color:var(--a); }
.scv-wrapper .scv-dm-group-count { font-size:.68rem; color:var(--t3); background:var(--bg3); padding:2px 8px; border-radius:999px; }

/* Misc */
.scv-wrapper .scv-branding { text-align:center; padding:9px; font-size:.69rem; color:var(--t3); background:var(--bg2); border-top:1px solid var(--bd); }
.scv-wrapper .scv-branding a { color:var(--t3); text-decoration:none; }
.scv-wrapper .scv-branding a:hover { color:var(--a); text-decoration:underline; }

/* ── Responsive ── */
@media (max-width:640px) {
  .scv-wrapper .scv-header,.scv-wrapper .scv-build-body,
  .scv-wrapper .scv-analyze-summary,.scv-wrapper .scv-threshold-card,
  .scv-wrapper .scv-analyze-footer,.scv-wrapper .scv-build-footer { padding-left:16px; padding-right:16px; }
  .scv-wrapper .scv-expand-btns,.scv-wrapper .scv-expand-header { padding-left:16px; padding-right:16px; }
  .scv-wrapper .scv-cluster-grid { grid-template-columns:1fr; }
  .scv-wrapper .scv-threshold-presets { gap:8px; }
  .scv-wrapper .scv-stats-bar { flex-wrap:wrap; }
  .scv-wrapper .scv-stat { min-width:50%; }
  .scv-wrapper .scv-results-toolbar { flex-wrap:wrap; padding:10px 14px; }
  .scv-wrapper .scv-results-actions { margin-left:0; }
}
