/* ── Cyber Scorecard Plugin Styles ── */

.csc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 640px;
  margin: 2rem auto;
  background: #0f1117;
  border: 1px solid #1e2535;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  color: #e2e8f0;
  box-sizing: border-box;
}

.csc-hidden { display: none !important; }

/* ── Header ── */
.csc-header { text-align: center; margin-bottom: 2rem; }
.csc-shield-icon { margin-bottom: 1rem; }
.csc-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.csc-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

/* ── Fields ── */
.csc-field {
  margin-bottom: 1.25rem;
}
.csc-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.csc-req { color: #3b82f6; }

.csc-field input {
  width: 100%;
  background: #1a2035;
  border: 1px solid #2a3550;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #f1f5f9;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.csc-field input:focus { border-color: #3b82f6; }
.csc-field input::placeholder { color: #3a4a6a; }
.csc-field-err {
  font-size: 0.78rem;
  color: #f87171;
  margin-top: 0.3rem;
  display: block;
  min-height: 1rem;
}

/* ── Buttons ── */
.csc-btn-primary {
  width: 100%;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}
.csc-btn-primary:hover { background: #2563eb; }
.csc-btn-primary:active { transform: scale(0.98); }
.csc-btn-primary:disabled { background: #1e3a6e; color: #4a6090; cursor: not-allowed; }

.csc-btn-ghost {
  background: transparent;
  color: #64748b;
  border: 1px solid #2a3550;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.csc-btn-ghost:hover { border-color: #3b82f6; color: #93c5fd; }
.csc-btn-ghost:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Progress ── */
.csc-progress-bar-wrap {
  background: #1a2035;
  border-radius: 999px;
  height: 4px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.csc-progress-bar {
  height: 100%;
  background: #3b82f6;
  border-radius: 999px;
  transition: width 0.35s ease;
  width: 0%;
}
.csc-progress-label {
  font-size: 0.78rem;
  color: #4a6090;
  text-align: right;
  margin: 0 0 1.75rem;
}

/* ── Question card ── */
.csc-question-card {
  background: #131824;
  border: 1px solid #1e2d45;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.csc-q-number {
  font-size: 0.72rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.csc-q-text {
  font-size: 1rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  font-weight: 500;
}

/* ── Answer options ── */
.csc-options { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.csc-option {
  flex: 1;
  min-width: 90px;
  background: #1a2035;
  border: 1px solid #2a3550;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
  user-select: none;
}
.csc-option:hover { border-color: #3b82f6; color: #bfdbfe; }
.csc-option.selected-yes  { background: #1e3a5f; border-color: #3b82f6; color: #93c5fd; }
.csc-option.selected-somewhat { background: #2d2a12; border-color: #ca8a04; color: #fde68a; }
.csc-option.selected-no  { background: #2d1515; border-color: #dc2626; color: #fca5a5; }
.csc-option-score { font-size: 0.72rem; opacity: 0.65; margin-top: 3px; display: block; }

/* ── Nav ── */
.csc-nav { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.csc-nav .csc-btn-primary { width: auto; flex: 1; }
.csc-nav-hint { font-size: 0.78rem; color: #3a4a6a; text-align: center; margin: 0.5rem 0 0; }

/* ── Results ── */
.csc-result-header { text-align: center; margin-bottom: 2rem; }
.csc-score-ring {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  background: #131824;
  border: 3px solid #3b82f6;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  margin-bottom: 1.25rem;
}
.csc-score-ring.ring-moderate { border-color: #ca8a04; }
.csc-score-ring.ring-high     { border-color: #dc2626; }

.csc-score-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1;
}
.csc-score-den {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}
.csc-result-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #f1f5f9;
}
.csc-result-title.strong   { color: #4ade80; }
.csc-result-title.moderate { color: #fbbf24; }
.csc-result-title.high     { color: #f87171; }
.csc-result-desc { font-size: 0.88rem; color: #64748b; margin: 0; line-height: 1.6; }

/* ── Breakdown ── */
.csc-breakdown { margin-bottom: 1.75rem; }
.csc-breakdown-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #1a2035;
  font-size: 0.82rem;
}
.csc-breakdown-row:last-child { border-bottom: none; }
.csc-breakdown-label { flex: 1; color: #94a3b8; }
.csc-breakdown-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.pill-yes      { background: #1e3a5f; color: #93c5fd; }
.pill-somewhat { background: #2d2a12; color: #fde68a; }
.pill-no       { background: #2d1515; color: #fca5a5; }

/* ── Legend ── */
.csc-risk-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.csc-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: #64748b; }
.csc-legend-dot  { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.csc-dot-strong   { background: #4ade80; }
.csc-dot-moderate { background: #fbbf24; }
.csc-dot-high     { background: #f87171; }

.csc-retake { display: block; margin: 0 auto; }
.csc-mc-status {
  text-align: center;
  font-size: 0.78rem;
  color: #3a4a6a;
  margin-top: 0.75rem;
  min-height: 1rem;
}

@media (max-width: 480px) {
  .csc-wrap { padding: 1.5rem 1rem; }
  .csc-options { flex-direction: column; }
  .csc-nav { flex-direction: column; }
}
