:root{
  --bg:#0b0b12;
  --panel:#12131b;
  --panel-2:#171926;
  --panel-3:#1d2030;
  --line:#2d3248;
  --text:#f5f7ff;
  --muted:#a7afc7;
  --purple:#8b5cf6;
  --purple-2:#6d28d9;
  --yellow:#f4d35e;
  --white:#ffffff;
  --shadow:0 0 0 1px rgba(139,92,246,.18), 0 12px 40px rgba(0,0,0,.35), 0 0 22px rgba(139,92,246,.12);
  --radius:18px;
}

/* LIGHT MODE */
body.light-mode {
  --bg:#f2f4f8;
  --panel:#ffffff;
  --panel-2:#f7f8fc;
  --panel-3:#eef0f6;
  --line:#dde0ee;
  --text:#1a1d2e;
  --muted:#5a6080;
  --purple:#7c3aed;
  --purple-2:#6d28d9;
  --yellow:#d4a012;
  --white:#ffffff;
  --shadow:0 0 0 1px rgba(124,58,237,.10), 0 4px 20px rgba(0,0,0,.06);
}

body.light-mode {
  background: #f2f4f8 !important;
  color: var(--text) !important;
}

/* No black anywhere in light mode */
body.light-mode * { color: inherit; }
body.light-mode .cw-card { background: #ffffff !important; border-color: #dde0ee !important; color: #1a1d2e; }
body.light-mode .cw-muted-box { background: #f7f8fc !important; border-color: #dde0ee !important; }
body.light-mode .cw-input { background: #eef0f6 !important; color: #1a1d2e !important; border-color: #dde0ee !important; }
body.light-mode .cw-select { background: #eef0f6 !important; color: #1a1d2e !important; border-color: #dde0ee !important; }
body.light-mode .cw-btn-dark { background: #eef0f6 !important; color: #1a1d2e !important; border-color: #dde0ee !important; }
body.light-mode .cw-btn-purple { background: #7c3aed !important; color: #ffffff !important; }
body.light-mode .cw-empty { color: #5a6080 !important; }
body.light-mode .cw-small { color: #5a6080 !important; }
body.light-mode .cw-muted { color: #5a6080 !important; }
body.light-mode .cw-article-title { color: #1a1d2e !important; }
body.light-mode .cw-section-subtitle { color: #5a6080 !important; }
body.light-mode .cw-label { color: #5a6080 !important; }
body.light-mode .cw-title { color: #1a1d2e !important; }
body.light-mode .cw-phase-panel-title { color: #1a1d2e !important; }
body.light-mode .cw-chip { background: #eef0f6 !important; color: #5a6080 !important; border-color: #dde0ee !important; }
body.light-mode .cw-chip.active { background: #7c3aed !important; color: #ffffff !important; border-color: #7c3aed !important; }
body.light-mode .cw-status { color: #5a6080 !important; }
body.light-mode .cw-status.ok { color: #059669 !important; }
body.light-mode .cw-hero-title { color: #1a1d2e !important; }
body.light-mode .cw-hero-sub { color: #5a6080 !important; }
body.light-mode .cw-progress-bar { background: #dde0ee !important; }

/* Sidebar in light mode */
body.light-mode #cw-sidebar { background: #ffffff !important; border-color: #dde0ee !important; }
body.light-mode #cw-sidebar .cw-card { background: #f7f8fc !important; }
body.light-mode #cw-sidebar .cw-muted-box { background: #eef0f6 !important; }

/* Inline dark backgrounds in JS-generated HTML */
body.light-mode [style*="background:#0f1117"] { background: #eef0f6 !important; color: #1a1d2e !important; }
body.light-mode [style*="background: #0f1117"] { background: #eef0f6 !important; color: #1a1d2e !important; }
body.light-mode [style*="background:#1a1d27"] { background: #f7f8fc !important; color: #1a1d2e !important; }
body.light-mode [style*="background:#12131b"] { background: #ffffff !important; color: #1a1d2e !important; }
body.light-mode [style*="background:#13151f"] { background: #ffffff !important; color: #1a1d2e !important; }
body.light-mode [style*="background:#1f2937"] { background: #eef0f6 !important; color: #1a1d2e !important; }
body.light-mode [style*="background:#374151"] { background: #dde0ee !important; color: #1a1d2e !important; }
body.light-mode [style*="color:#f9fafb"] { color: #1a1d2e !important; }
body.light-mode [style*="color:#e5e7eb"] { color: #1a1d2e !important; }
body.light-mode [style*="color:#9ca3af"] { color: #5a6080 !important; }
body.light-mode [style*="color:#6b7280"] { color: #5a6080 !important; }
body.light-mode [style*="border:1px solid #2d3148"] { border-color: #dde0ee !important; }
body.light-mode [style*="border:1px solid #374151"] { border-color: #dde0ee !important; }
body.light-mode [style*="border-color:#374151"] { border-color: #dde0ee !important; }

/* Score bars in light mode */
body.light-mode .score-bar-track { background: #dde0ee !important; }
body.light-mode .score-bar-val { color: #1a1d2e !important; }
body.light-mode .score-bar-label { color: #5a6080 !important; }

/* Competition panel in light mode */
body.light-mode .comp-panel { background: #f7f8fc !important; border-color: #dde0ee !important; }
body.light-mode .comp-row { background: #eef0f6 !important; border-color: #dde0ee !important; }
body.light-mode .comp-domain { color: #1a1d2e !important; }
body.light-mode .comp-title { color: #5a6080 !important; }
body.light-mode .comp-panel-title { color: #5a6080 !important; }

/* Theme toggle in light mode */
body.light-mode .theme-toggle { background: #ffffff !important; border-color: #dde0ee !important; color: #5a6080 !important; }

/* THEME TOGGLE BUTTON */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 9999;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--purple); color: var(--text); }

/* SCORE BADGE */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.score-high { background: #065f46; color: #6ee7b7; }
.score-mid { background: #78350f; color: #fcd34d; }
.score-low { background: #4c1d95; color: #c4b5fd; }
.score-none { background: #1f2937; color: #9ca3af; }

/* COMPETITION PANEL */
.comp-panel {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}
.comp-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.comp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 6px;
}
.comp-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.comp-domain { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.comp-title { font-size: 11px; color: var(--muted); }
.comp-link { font-size: 11px; color: var(--purple); text-decoration: none; }
.comp-link:hover { text-decoration: underline; }
.comp-has-content { display: flex; align-items: center; gap: 4px; font-size: 11px; }
.comp-has-yes { color: #6ee7b7; }
.comp-has-no { color: #f87171; }

/* SCORING BARS */
.score-bar-wrap { margin-top: 12px; }
.score-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.score-bar-label { font-size: 11px; color: var(--muted); width: 100px; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 6px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; }
.score-bar-fill.green { background: #059669; }
.score-bar-fill.yellow { background: #d97706; }
.score-bar-fill.purple { background: var(--purple); }
.score-bar-val { font-size: 11px; font-weight: 700; color: var(--text); width: 32px; text-align: right; }

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  background:
    radial-gradient(circle at top right, rgba(139,92,246,.14), transparent 28%),
    radial-gradient(circle at top left, rgba(244,211,94,.06), transparent 22%),
    linear-gradient(180deg,#0a0b11 0%, #0d0f16 100%);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

body{
  min-height:100vh;
}

.ai-dashboard-topbar{
  width:100%;
  padding:18px 22px 0;
}

.ai-dashboard-client-picker{
  width:320px;
  max-width:100%;
}

.ai-dashboard-client-picker label{
  display:block;
  margin:0 0 8px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.ai-dashboard-client-picker select{
  width:100%;
  height:48px;
  border-radius:12px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)), var(--panel);
  color:var(--text);
  padding:0 14px;
  font-size:14px;
  font-weight:700;
  box-shadow:var(--shadow);
}

.dashboard-shell{
  width:100%;
  padding:18px 22px 28px;
}

#npj-ai-dashboard-root,
#ai-dashboard-root{
  width:100%;
}

.card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)),
    var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}

.muted-box,
.check-item,
.article-card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01)),
    var(--panel-2);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
}

h1,h2,h3{
  margin:0 0 10px;
  color:var(--white);
  line-height:1.1;
}

h1{font-size:34px;font-weight:900;letter-spacing:-.03em}
h2{font-size:24px;font-weight:850;letter-spacing:-.02em}
h3{font-size:20px;font-weight:850;letter-spacing:-.02em}

.label{
  font-size:13px;
  font-weight:800;
  color:var(--muted);
  margin:0 0 8px;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.small{
  font-size:14px;
  line-height:1.5;
  color:var(--muted);
}

.mini-title{
  font-size:15px;
  font-weight:800;
  color:var(--white);
  margin:0 0 8px;
}

.article-title{
  font-size:18px;
  font-weight:850;
  line-height:1.25;
  margin:0 0 8px;
  color:var(--white);
}

.input,
.select,
.code{
  width:100%;
  background:var(--panel-3);
  border:1px solid #343a54;
  color:var(--white);
  border-radius:13px;
  padding:14px 16px;
  font-size:15px;
  line-height:1.4;
  outline:none;
  transition:.18s ease;
}

.input:focus,
.select:focus{
  border-color:rgba(139,92,246,.8);
  box-shadow:0 0 0 3px rgba(139,92,246,.14), 0 0 18px rgba(139,92,246,.12);
}

.code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  overflow:auto;
  color:#d8def8;
}

.btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.btn{
  min-height:48px;
  border:none;
  border-radius:12px;
  padding:12px 18px;
  font-size:14px;
  font-weight:850;
  letter-spacing:.01em;
  cursor:pointer;
  transition:.18s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn-dark{
  background:linear-gradient(180deg, #1b1d29, #11131d);
  color:var(--white);
  border:1px solid #313751;
  box-shadow:0 0 18px rgba(139,92,246,.08);
}

.btn-gray{
  background:linear-gradient(180deg, #2a2f43, #202538);
  color:var(--white);
  border:1px solid #39405c;
}

.btn-red{
  background:linear-gradient(180deg, #7c3aed, #5b21b6);
  color:#fff;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 0 18px rgba(139,92,246,.2);
}

.btn-green{
  background:linear-gradient(180deg, #4b5563, #374151);
  color:#fff;
  border:1px solid #586174;
}

.status{
  margin-top:12px;
  font-size:14px;
  line-height:1.45;
}

.status.ok{color:#a7f3d0}
.status.warn{color:#f4d35e}
.status.muted{color:var(--muted)}

.grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.check-list{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.phase-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:14px 0;
}

.phase-chip{
  border:none;
  border-radius:999px;
  padding:10px 14px;
  background:#23283b;
  color:#d8def8;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  border:1px solid #353c58;
}

.phase-chip.active{
  background:linear-gradient(180deg, #8b5cf6, #6d28d9);
  color:#fff;
  box-shadow:0 0 18px rgba(139,92,246,.25);
  border-color:transparent;
}

.phase-bars{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin:8px 0 10px;
}

.phase-bar{
  height:12px;
  border-radius:999px;
  background:#23283b;
  border:1px solid #343a54;
}

.phase-red,
.phase-yellow,
.phase-blue,
.phase-green{
  background:linear-gradient(90deg, #8b5cf6, #6d28d9);
  box-shadow:0 0 14px rgba(139,92,246,.24);
  border-color:transparent;
}

.phase-text{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}

table{
  width:100%;
  border-collapse:collapse;
}

th,td{
  padding:10px 8px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:14px;
}

th{
  color:#cfd6f6;
  font-weight:800;
}

/* ================================
   CONTENT BUILD PANEL
================================ */

#content-build-panel{
  margin-top:24px;
  width:100%;
}

.content-build-panel,
.ai-content-build-panel{
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)),
    var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:20px;
}

.content-build-header,
.ai-content-build-header{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.content-build-header h2,
.ai-content-build-header h2{
  margin:0 0 6px;
}

.content-build-header p,
.ai-content-build-header p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

.cluster-progress-badge,
.ai-cluster-badge{
  background:linear-gradient(180deg, #8b5cf6, #6d28d9);
  color:#fff;
  border-radius:999px;
  padding:10px 14px;
  font-size:13px;
  font-weight:900;
  align-self:flex-start;
  box-shadow:0 0 18px rgba(139,92,246,.25);
}

.content-build-grid,
.ai-content-build-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.content-build-field,
.ai-content-field{
  background:var(--panel-2);
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
}

.content-build-field label,
.ai-content-field label{
  display:block;
  margin:0 0 7px;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.content-build-field strong,
.ai-content-field strong{
  color:var(--white);
  font-size:14px;
  line-height:1.4;
}

.content-build-field input,
.ai-content-field input{
  width:100%;
  background:var(--panel-3);
  border:1px solid #343a54;
  color:var(--white);
  border-radius:10px;
  padding:10px 12px;
  font-size:14px;
  font-weight:800;
}

.fase-row,
.ai-fase-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:16px 0 20px;
}

.fase-btn,
.ai-fase-btn{
  min-height:48px;
  border-radius:12px;
  border:1px solid #353c58;
  background:#23283b;
  color:#d8def8;
  padding:12px 14px;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
  transition:.18s ease;
}

.fase-btn:hover,
.ai-fase-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(139,92,246,.7);
}

.fase-btn.active,
.ai-fase-btn.active{
  background:linear-gradient(180deg, #8b5cf6, #6d28d9);
  color:#fff;
  border-color:transparent;
  box-shadow:0 0 18px rgba(139,92,246,.25);
}

.fase-btn.metrics,
.ai-fase-btn.metrics{
  border-color:rgba(244,211,94,.45);
  color:#f4d35e;
}

.fase-btn.metrics.active,
.ai-fase-btn.metrics.active{
  background:linear-gradient(180deg, #f4d35e, #b89422);
  color:#11131d;
}

.article-opportunity-grid,
.ai-article-list{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.article-opportunity-card,
.ai-article-card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01)),
    var(--panel-2);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:100%;
}

.article-opportunity-card h3,
.ai-article-card h3{
  margin:0;
  color:var(--white);
  font-size:18px;
  line-height:1.25;
  font-weight:900;
}

.article-meta,
.ai-article-meta{
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.article-meta strong,
.ai-article-meta strong{
  color:#d8def8;
}

.verify-url-input,
.ai-verify-input{
  width:100%;
  background:var(--panel-3);
  border:1px solid #343a54;
  color:var(--white);
  border-radius:10px;
  padding:11px 12px;
  font-size:13px;
  outline:none;
}

.verify-url-input:focus,
.ai-verify-input:focus{
  border-color:rgba(139,92,246,.8);
  box-shadow:0 0 0 3px rgba(139,92,246,.14);
}

.article-actions,
.ai-card-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:auto;
}

.article-actions button,
.ai-card-actions button{
  min-height:42px;
  border-radius:10px;
  border:1px solid #353c58;
  background:#23283b;
  color:#fff;
  padding:10px 12px;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}

.article-actions button:hover,
.ai-card-actions button:hover{
  transform:translateY(-1px);
}

.article-actions .secondary,
.ai-card-actions .secondary{
  background:linear-gradient(180deg, #1b1d29, #11131d);
}

.article-actions .verify,
.ai-card-actions .verify{
  background:linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-color:transparent;
}

.metrics-panel,
.ai-metrics-box{
  background:
    linear-gradient(180deg, rgba(244,211,94,.06), rgba(255,255,255,.01)),
    var(--panel-2);
  border:1px solid rgba(244,211,94,.28);
  border-radius:16px;
  padding:18px;
}

.metrics-panel h3,
.ai-metrics-box h3{
  margin:0 0 10px;
  color:#f4d35e;
}

.metrics-panel p,
.ai-metrics-box p{
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 1200px){
  .content-build-grid,
  .ai-content-build-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .article-opportunity-grid,
  .ai-article-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 980px){
  .grid-2{
    grid-template-columns:1fr;
  }

  .dashboard-shell,
  .ai-dashboard-topbar{
    padding-left:14px;
    padding-right:14px;
  }

  #npj-ai-dashboard-root > div,
  #ai-dashboard-root > div{
    grid-template-columns:1fr !important;
  }
}

@media (max-width: 700px){
  h1{font-size:28px}
  h2{font-size:22px}

  .content-build-grid,
  .ai-content-build-grid,
  .article-opportunity-grid,
  .ai-article-list,
  .fase-row,
  .ai-fase-row{
    grid-template-columns:1fr;
  }

  .phase-bars{
    grid-template-columns:repeat(4,1fr);
  }
}
/* ================================================================
   LIGHT MODE REDESIGN — professional cool palette, no purple, no
   bubble/pill radius, smaller buttons. Dark mode untouched, so
   everything below is scoped strictly under body.light-mode and
   overrides the shared/dark rules above with !important, following
   the pattern already established in this file.
================================================================ */

/* Core palette: this alone fixes every rule elsewhere in the file
   that correctly references var(--purple)/var(--purple-2) rather
   than a hardcoded hex value. */
body.light-mode {
  --bg:#f7f9fb;
  --panel:#ffffff;
  --panel-2:#f4f6f9;
  --panel-3:#eceef3;
  --line:#dde1e8;
  --text:#131722;
  --muted:#5c6478;
  --purple:#0c8599;   /* accent: deep teal, replaces purple sitewide */
  --purple-2:#075e66; /* pressed/deep state of the accent */
  --yellow:#b8860b;
  --white:#131722;
  --shadow:0 1px 2px rgba(19,23,34,.04), 0 1px 0 rgba(19,23,34,.02);
  --radius:10px;
}

/* Base surface: flat cool off-white, no purple/yellow radial glow. */
body.light-mode {
  background: #f7f9fb !important;
}

/* Update the two existing hardcoded-hex overrides to the new accent. */
body.light-mode .cw-btn-purple { background: #0c8599 !important; color: #ffffff !important; }
body.light-mode .cw-chip.active { background: #0c8599 !important; color: #ffffff !important; border-color: #0c8599 !important; }

/* ---- Hardcoded purple → accent, everywhere it wasn't using the variable ---- */

body.light-mode .btn-red {
  background: #0c8599 !important;
  border-color: transparent !important;
  box-shadow: 0 1px 2px rgba(19,23,34,.06) !important;
}

body.light-mode .phase-chip.active {
  background: #0c8599 !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

body.light-mode .phase-red,
body.light-mode .phase-yellow,
body.light-mode .phase-blue,
body.light-mode .phase-green {
  background: #0c8599 !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

body.light-mode .cluster-progress-badge,
body.light-mode .ai-cluster-badge {
  background: #0c8599 !important;
  box-shadow: none !important;
}

body.light-mode .fase-btn.active,
body.light-mode .ai-fase-btn.active {
  background: #0c8599 !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

body.light-mode .fase-btn:hover,
body.light-mode .ai-fase-btn:hover {
  border-color: #0c8599 !important;
}

body.light-mode .article-actions .verify,
body.light-mode .ai-card-actions .verify {
  background: #0c8599 !important;
  border-color: transparent !important;
}

body.light-mode .input:focus,
body.light-mode .select:focus,
body.light-mode .verify-url-input:focus,
body.light-mode .ai-verify-input:focus {
  border-color: #0c8599 !important;
  box-shadow: 0 0 0 3px rgba(12,133,153,.14) !important;
}

/* ---- Radius: kill the bubble/pill shapes, light mode only ---- */

body.light-mode .card,
body.light-mode .content-build-panel,
body.light-mode .ai-content-build-panel {
  border-radius: 10px !important;
  box-shadow: var(--shadow) !important;
}

body.light-mode .muted-box,
body.light-mode .check-item,
body.light-mode .article-card,
body.light-mode .article-opportunity-card,
body.light-mode .ai-article-card,
body.light-mode .content-build-field,
body.light-mode .ai-content-field {
  border-radius: 8px !important;
}

body.light-mode .input,
body.light-mode .select,
body.light-mode .code,
body.light-mode .content-build-field input,
body.light-mode .ai-content-field input {
  border-radius: 6px !important;
}

body.light-mode .btn,
body.light-mode .fase-btn,
body.light-mode .ai-fase-btn,
body.light-mode .article-actions button,
body.light-mode .ai-card-actions button {
  border-radius: 6px !important;
}

body.light-mode .phase-chip,
body.light-mode .cluster-progress-badge,
body.light-mode .ai-cluster-badge,
body.light-mode .score-badge {
  border-radius: 6px !important;
}

body.light-mode .theme-toggle {
  border-radius: 8px !important;
}

/* ---- Smaller buttons, light mode only ---- */

body.light-mode .btn {
  min-height: 36px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body.light-mode .fase-btn,
body.light-mode .ai-fase-btn {
  min-height: 36px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
}

body.light-mode .phase-chip {
  padding: 7px 12px !important;
  font-size: 12px !important;
}

body.light-mode .article-actions button,
body.light-mode .ai-card-actions button {
  min-height: 34px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
}

/* ---- Score badges: cool, muted status colors instead of dark-glow chips ---- */

body.light-mode .score-high { background: #dcf5ea !important; color: #0a6b45 !important; }
body.light-mode .score-mid  { background: #fdf0d5 !important; color: #92400e !important; }
body.light-mode .score-low  { background: #e6eef2 !important; color: #0c8599 !important; }
body.light-mode .score-none { background: #eceef3 !important; color: #5c6478 !important; }

/* ---- Headings/text: cool ink instead of pure white/near-black defaults ---- */

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode .mini-title,
body.light-mode .article-title,
body.light-mode th,
body.light-mode .article-opportunity-card h3,
body.light-mode .ai-article-card h3,
body.light-mode .content-build-field strong,
body.light-mode .ai-content-field strong {
  color: #131722 !important;
}

body.light-mode .comp-domain,
body.light-mode .article-meta strong,
body.light-mode .ai-article-meta strong {
  color: #131722 !important;
}

/* ================================================================
   LIGHT MODE REDESIGN — round 2. The panel with STATE/PRIMARY KEYWORD/
   Find-Analyze-Set-Engage is rendered by an embedded <style> block
   inside ai-dashboard.js itself, using .cw-* classes that are
   completely separate from the .phase-*/.btn/.muted-box classes
   targeted in round 1 above. Confirmed by reading that embedded
   block directly rather than guessing class names again.
================================================================ */

body.light-mode .cw-chip {
  border-radius: 6px !important;
  background: #f4f6f9 !important;
  border-color: #dde1e8 !important;
  color: #5c6478 !important;
}

body.light-mode .cw-phase-red    { background: #0c8599 !important; }
body.light-mode .cw-phase-yellow { background: #3fa5b3 !important; }
body.light-mode .cw-phase-blue   { background: #6fbfca !important; }
/* .cw-phase-green stays its existing green - that's a real status
   color (complete/success), not part of the purple accent family. */

body.light-mode .cw-phase-bar {
  background: #eceef3 !important;
}

/* ================================================================
   LIGHT MODE REDESIGN — round 3. NPJ CRM / Blog Manager / Page
   Manager launcher buttons are injected by separate scripts
   (npj-crm.js, npj-blog-manager.js, npj-page-manager.js) with
   hardcoded dark inline styles and zero theme awareness. Targeting
   by ID with !important overrides the inline style without touching
   those scripts directly.
================================================================ */

/* Launcher buttons now use class="cw-btn cw-btn-dark" directly in
   their source files, matching View Reports exactly - no override
   needed here anymore. (Old teal ID-based override removed.) */

/* ================================================================
   LIGHT MODE REDESIGN — round 4. Structural pass, HubSpot-style
   reference: dark sidebar card, soft-shadow white cards with no
   heavy borders, generous spacing. This .cw-sidebar-card class was
   added directly in ai-dashboard.js on the specific card that holds
   the AI Dashboard nav/buttons - it's the same .cw-card class as
   every other card on the page, so it had no way to be targeted
   distinctly before that JS change.
================================================================ */

body.light-mode .cw-sidebar-card {
  background-color: #0a0e14 !important;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(56,189,248,.18), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(56,189,248,.10), transparent 45%),
    repeating-linear-gradient(115deg, rgba(56,189,248,.05) 0px, rgba(56,189,248,.05) 1px, transparent 1px, transparent 46px),
    repeating-linear-gradient(25deg, rgba(56,189,248,.04) 0px, rgba(56,189,248,.04) 1px, transparent 1px, transparent 58px) !important;
  border: 1px solid rgba(56,189,248,.15) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03) !important;
}

body.light-mode .cw-sidebar-card h2.cw-title,
body.light-mode .cw-sidebar-card .mini-title {
  color: #ffffff !important;
}

body.light-mode .cw-sidebar-card .cw-btn-dark {
  background: transparent !important;
  color: #ffffff !important;
  border: none !important;
}

body.light-mode .cw-sidebar-card .cw-muted-box {
  background: transparent !important;
  border: none !important;
}

body.light-mode .cw-sidebar-card .cw-section-subtitle,
body.light-mode .cw-sidebar-card .cw-empty,
body.light-mode .cw-sidebar-card .cw-status,
body.light-mode .cw-sidebar-card .cw-label {
  color: rgba(255,255,255,.55) !important;
}

/* ---- General cards: soft elevation instead of heavy borders ---- */

body.light-mode .cw-card {
  border: none !important;
  box-shadow: 0 1px 3px rgba(19,23,34,.06), 0 1px 2px rgba(19,23,34,.04) !important;
  border-radius: 10px !important;
  padding: 24px !important;
}

body.light-mode .cw-muted-box {
  border: none !important;
  background: #f4f6f9 !important;
  border-radius: 8px !important;
}

body.light-mode body {
  background: #0a0e14 !important;
}

/* ================================================================
   Page editor's own Close button (#cw-close-page-editor) uses
   background:#1f2937 inline, which a pre-existing light-mode rule
   ([style*="background:#1f2937"]) swaps to near-white without
   touching the white text color - producing white-on-white. Targeted
   ID override restores proper contrast, matching the same red Close
   convention already used elsewhere in this file.
================================================================ */
body.light-mode #cw-close-page-editor {
  background: #991b1b !important;
  color: #fff !important;
}

body.light-mode .cw-dashboard {
  background: #0a0e14 !important;
}

body.light-mode .dashboard-shell,
body.light-mode html {
  background: #0a0e14 !important;
}

/* ================================================================
   Techy sidebar button hover treatment, matching craigweatherly.com's
   own nav signature: cyan (#38bdf8) hover color + cyan-to-purple
   gradient accent, animated in on hover.
================================================================ */
body.light-mode .cw-sidebar-card .cw-btn-dark {
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease !important;
}

body.light-mode .cw-sidebar-card .cw-btn-dark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #38bdf8, #8b5cf6);
  transform: scaleY(0);
  transition: transform 0.25s ease;
}

body.light-mode .cw-sidebar-card .cw-btn-dark:hover {
  background: rgba(56,189,248,.08) !important;
  color: #38bdf8 !important;
  padding-left: 20px !important;
}

body.light-mode .cw-sidebar-card .cw-btn-dark:hover::before {
  transform: scaleY(1);
}

body.light-mode #cw-npj-crm-btn:hover,
body.light-mode #cw-blog-manager-btn:hover,
body.light-mode #cw-npj-page-manager-btn:hover,
body.light-mode #cw-swamp-page-manager-fixed-btn:hover,
body.light-mode #cw-sidebar-dashboard-btn:hover {
  color: #38bdf8 !important;
}

body.light-mode .cw-sidebar-card .cw-btn-dark,
body.light-mode .cw-sidebar-card .cw-btn {
  text-align: left !important;
  padding-left: 16px !important;
}
body.light-mode .cw-sidebar-card .cw-btn-dark:hover {
  padding-left: 22px !important;
}

