/* ==========================================================================
   CatalogIQ widget + assessment form
   Scoped with .ciq- prefix. All colors run through --ciq-* variables so the
   same components can render in two themes:
     .ciq            -> dark CatalogIQ brand theme (form + thank-you pages)
     .ciq.ciq--light -> site palette, blends into the home page (promo widget)
   ========================================================================== */
.ciq {
  /* Dark CatalogIQ brand theme (default) */
  --ciq-bg: #0f1217;
  --ciq-panel: #171b22;
  --ciq-accent: #f5a623;
  --ciq-accent-soft: #f0b44a;
  --ciq-on-accent: #1a1200;
  --ciq-accent-shadow: rgba(245, 166, 35, .5);
  --ciq-line: #2a2f38;
  --ciq-track: #262b33;
  --ciq-text: #e8eaed;
  --ciq-strong: #ffffff;
  --ciq-muted: #9aa1ac;
  --ciq-shadow: 0 24px 60px -30px rgba(0, 0, 0, .55);
  --ciq-border-w: 0px;
}

/* Light theme: site palette, understated so it blends with the home cards */
.ciq.ciq--light {
  --ciq-bg: #ffffff;
  --ciq-panel: #f8fafc;
  --ciq-accent: #4f6ef7;         /* site brand blue */
  --ciq-accent-soft: #3e5be6;
  --ciq-on-accent: #ffffff;
  --ciq-accent-shadow: rgba(79, 110, 247, .28);
  --ciq-line: #e5e7eb;           /* site border */
  --ciq-track: #e9edf3;
  --ciq-text: #2f3a55;           /* site ink */
  --ciq-strong: #111827;
  --ciq-muted: #6b7280;          /* site muted */
  --ciq-shadow: 0 14px 34px -22px rgba(20, 30, 60, .18);
  --ciq-border-w: 1px;
}

/* ---- Home promo band ---- */
.ciq-band {
  background: var(--ciq-bg);
  color: var(--ciq-text);
  border: var(--ciq-border-w) solid var(--ciq-line);
  border-radius: 22px;
  padding: 48px;
  box-shadow: var(--ciq-shadow);
  overflow: hidden;
}

/* Disclosure label that sits ABOVE the card (outside the box) */
.ciq-sponsored {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 1.24rem;
  font-weight: 400;
  color: #9ca3af;
  margin: 0 0 14px 6px;
}

.ciq-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 44px;
  align-items: center;
}

.ciq-logo {
  display: block;
  height: 60px;
  width: auto;
  margin: 0 0 22px;
}

.ciq-kicker {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ciq-accent);
  margin: 0 0 18px;
}

.ciq-headline {
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 18px;
  color: var(--ciq-strong);
}
.ciq-headline .ciq-accent { color: var(--ciq-accent); }

.ciq-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ciq-muted);
  max-width: 52ch;
  margin: 0 0 28px;
}

.ciq-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.ciq-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ciq-accent);
  color: var(--ciq-on-accent);
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 26px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 24px -12px var(--ciq-accent-shadow);
}
.ciq-btn:hover { background: var(--ciq-accent-soft); transform: translateY(-1px); }

.ciq-link {
  color: var(--ciq-text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.ciq-link:hover { color: var(--ciq-strong); border-color: var(--ciq-accent); }

/* ---- Score panel (gauge) ---- */
.ciq-panel {
  background: var(--ciq-panel);
  border: 1px solid var(--ciq-line);
  border-radius: 18px;
  padding: 28px 30px;
}

.ciq-gauge {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.ciq-gauge svg { width: 200px; height: 200px; }
.ciq-gauge-track { fill: none; stroke: var(--ciq-track); stroke-width: 14; }
.ciq-gauge-arc {
  fill: none;
  stroke: var(--ciq-accent);
  stroke-width: 14;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 100px 100px;
}
.ciq-gauge-num { fill: var(--ciq-strong); font-size: 46px; font-weight: 800; }
.ciq-gauge-den { fill: var(--ciq-muted); font-size: 15px; font-weight: 600; }

.ciq-panel-label {
  text-align: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .68rem;
  color: var(--ciq-muted);
  margin: 4px 0 2px;
}
.ciq-panel-state {
  text-align: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--ciq-accent);
  margin: 0 0 20px;
}

.ciq-subindex { margin-top: 16px; }
.ciq-subindex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: .92rem;
}
.ciq-subindex-name { display: flex; align-items: center; gap: 10px; color: var(--ciq-text); }
.ciq-badge {
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  border: 1px solid var(--ciq-line);
  border-radius: 5px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--ciq-muted);
}
.ciq-subindex-score { color: var(--ciq-accent); font-weight: 700; }
.ciq-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--ciq-track);
  overflow: hidden;
  margin-bottom: 18px;
}
.ciq-bar-fill { height: 100%; border-radius: 999px; background: var(--ciq-accent); }

.ciq-risk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ciq-line);
  padding-top: 16px;
  font-size: .9rem;
  color: var(--ciq-muted);
}
.ciq-risk-val { color: var(--ciq-accent); font-weight: 700; }
.ciq-tag {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--ciq-muted);
  border: 1px solid var(--ciq-line);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 10px;
}

/* ---- Assessment form page (uses dark theme) ---- */
.ciq-form-wrap { background: var(--ciq-bg); color: var(--ciq-text); }
.ciq-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.ciq-form-card {
  background: var(--ciq-panel);
  border: 1px solid var(--ciq-line);
  border-radius: 18px;
  padding: 34px;
}
.ciq-field { margin-bottom: 20px; }
.ciq-field label {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ciq-text);
  margin-bottom: 8px;
}
.ciq-field .ciq-req { color: var(--ciq-accent); }
.ciq-field input,
.ciq-field textarea {
  width: 100%;
  background: var(--ciq-bg);
  border: 1px solid var(--ciq-line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ciq-strong);
  font: inherit;
  transition: border-color .15s ease;
}
.ciq-field input:focus,
.ciq-field textarea:focus { outline: none; border-color: var(--ciq-accent); }
.ciq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ciq-note { font-size: .82rem; color: var(--ciq-muted); margin-top: 14px; }
.ciq-error {
  background: #fdf4e3;
  border: 1px solid #e6bd5a;
  color: #8a5a12;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: .9rem;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .ciq-band { padding: 32px; }
  .ciq-grid,
  .ciq-form-grid { grid-template-columns: 1fr; gap: 32px; }
  .ciq-headline { font-size: clamp(1.8rem, 7vw, 2.4rem); }
}
