/* ═══════════════════════════════════════════════════════════════════════════
   Intelligent Code Review Coach — Main Stylesheet
   Clean modern light theme
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Variables ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ibm-blue: #0F62FE;
  --ibm-blue-hover: #0353E9;
  --ibm-blue-light: #EEF4FF;
  --ibm-gray-10: #F7F8FA;
  --ibm-gray-20: #E5E7EB;
  --ibm-gray-30: #C6C6C6;
  --ibm-gray-50: #8D8D8D;
  --ibm-gray-70: #525252;
  --ibm-gray-90: #262626;
  --ibm-gray-100: #1F2328;
  --critical: #DA1E28;
  --critical-bg: #FFF1F1;
  --high: #FF832B;
  --high-bg: #FFF6EC;
  --medium: #F1C21B;
  --medium-bg: #FFFAEB;
  --low: #42BE65;
  --low-bg: #DEFBE6;
  --none: #42BE65;
  --success: #24A148;
  --text: #1F2328;
  --text-secondary: #57606a;
  --text-muted: #8D8D8D;
  --border: #E5E7EB;
  --surface: #F7F8FA;
  --white: #FFFFFF;
  --header-height: 60px;
  --font-sans: -apple-system, "Segoe UI", system-ui, 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: var(--ibm-gray-10);
  line-height: 1.6;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--white);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 28px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  gap: 2px;
  margin-left: 16px;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-btn:hover { color: var(--text); background: var(--ibm-gray-10); }
.nav-btn.active { color: var(--ibm-blue); font-weight: 500; background: var(--ibm-blue-light); }

.watsonx-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
}

.watsonx-badge .badge-label { color: var(--text-secondary); }
.watsonx-badge.live .badge-label { color: #1a7f37; }
.watsonx-badge.demo .badge-label { color: #8a6300; }

.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ibm-gray-30);
  animation: pulse 2s infinite;
}
.watsonx-badge.live .badge-dot { background: var(--low); }
.watsonx-badge.demo .badge-dot { background: var(--medium); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Main Layout ─────────────────────────────────────────────────────────────── */
.app-main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  padding: 28px 32px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  margin-top: calc(var(--header-height) + 0px);
}

.view { display: none; }
.view.active, .view:not(.hidden) { display: block; }

.view-header {
  margin-bottom: 24px;
}

.view-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.view-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── Review Layout ───────────────────────────────────────────────────────────── */
.review-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .review-layout { grid-template-columns: 1fr; }
}

/* ── Panel ───────────────────────────────────────────────────────────────────── */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input-actions {
  display: flex;
  gap: 8px;
}

.filename-bar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.filename-bar input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filename-bar input:focus {
  border-color: var(--ibm-blue);
  box-shadow: 0 0 0 3px rgba(15,98,254,.1);
}

/* ── Code Editor ─────────────────────────────────────────────────────────────── */
.code-editor-wrapper {
  display: flex;
  height: 420px;
  overflow: hidden;
}

.line-numbers {
  min-width: 44px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ibm-gray-30);
  text-align: right;
  overflow: hidden;
  user-select: none;
  line-height: 1.6;
  white-space: pre;
}

.code-editor {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  border: none;
  outline: none;
  resize: none;
  padding: 14px 16px;
  color: var(--text);
  background: var(--white);
  tab-size: 2;
}

.code-editor::placeholder { color: var(--ibm-gray-30); }

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.input-footer input {
  font-family: var(--font-sans);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
  color: var(--text);
}
.input-footer input:focus {
  border-color: var(--ibm-blue);
  box-shadow: 0 0 0 3px rgba(15,98,254,.1);
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--text);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: var(--ibm-gray-90); }

.btn-secondary {
  background: var(--white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface); border-color: var(--ibm-gray-50); }

.btn-sm { font-size: 12px; padding: 4px 10px; }
.btn-ghost { background: transparent; border: none; color: var(--ibm-blue); padding: 4px 8px; }
.btn-ghost:hover { background: var(--ibm-blue-light); }

/* ── Empty State ─────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  gap: 12px;
  min-height: 300px;
}

.empty-state h3 { font-size: 17px; font-weight: 500; color: var(--text-secondary); }
.empty-state p { color: var(--text-secondary); max-width: 360px; }
.muted { color: var(--text-muted); font-size: 12px; }

/* ── Loading State ────────────────────────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
  text-align: center;
}

.spinner {
  width: 36px; height: 36px;
  border: 2.5px solid var(--ibm-gray-20);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ── Review Results ────────────────────────────────────────────────────────────── */
.results-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.verdict-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.risk-badge.critical { background: var(--critical-bg); color: var(--critical); border: 1px solid rgba(218,30,40,.2); }
.risk-badge.high { background: var(--high-bg); color: var(--high); border: 1px solid rgba(255,131,43,.2); }
.risk-badge.medium { background: var(--medium-bg); color: #8a6300; border: 1px solid rgba(241,194,27,.3); }
.risk-badge.low { background: var(--low-bg); color: #1a7f37; border: 1px solid rgba(66,190,101,.2); }
.risk-badge.none { background: var(--low-bg); color: #1a7f37; border: 1px solid rgba(66,190,101,.2); }

.merge-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.merge-badge.block { background: var(--critical-bg); color: var(--critical); }
.merge-badge.changes-required { background: var(--high-bg); color: var(--high); }
.merge-badge.changes-suggested { background: var(--medium-bg); color: #8a6300; }
.merge-badge.approve { background: var(--low-bg); color: #1a7f37; }

.stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
}

.stat-chip.critical { background: var(--critical-bg); color: var(--critical); }
.stat-chip.high { background: var(--high-bg); color: var(--high); }
.stat-chip.medium { background: var(--medium-bg); color: #8a6300; }
.stat-chip.low { background: var(--low-bg); color: #1a7f37; }
.stat-chip.total { background: var(--ibm-blue-light); color: var(--ibm-blue); }

/* ── Tabs ──────────────────────────────────────────────────────────────────────── */
.results-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  background: var(--white);
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 10px 16px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--text); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Findings List ────────────────────────────────────────────────────────────── */
.findings-list {
  list-style: none;
  overflow-y: auto;
  max-height: 500px;
}

.finding-item {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.finding-item:last-child { border-bottom: none; }
.finding-item:hover { background: var(--surface); }

.finding-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
}

.severity-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.severity-dot.critical { background: var(--critical); }
.severity-dot.high { background: var(--high); }
.severity-dot.medium { background: var(--medium); }
.severity-dot.low { background: var(--low); }

.finding-info { flex: 1; min-width: 0; }
.finding-title { font-size: 13px; font-weight: 600; color: var(--text); }
.finding-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.finding-category {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.finding-expand { margin-left: auto; color: var(--text-muted); font-size: 18px; line-height: 1; }

.finding-body {
  display: none;
  padding: 0 16px 14px 36px;
  font-size: 13px;
  color: var(--text-secondary);
}

.finding-body.open { display: block; }

.finding-description { margin-bottom: 8px; }

.finding-snippet {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 8px 0;
  overflow-x: auto;
  white-space: pre;
}

.finding-suggestion {
  background: var(--ibm-blue-light);
  border-left: 3px solid var(--ibm-blue);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: var(--ibm-gray-90);
  margin-top: 8px;
}

.finding-fix-area {
  margin-top: 10px;
}

.finding-fix-result {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 12px;
}

/* ── AI Summary ────────────────────────────────────────────────────────────────── */
.ai-summary-tab {
  padding: 20px;
  overflow-y: auto;
  max-height: 560px;
}

.ai-summary-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.ai-summary-content h2 { font-size: 17px; font-weight: 600; margin: 16px 0 8px; color: var(--text); }
.ai-summary-content h3 { font-size: 15px; font-weight: 600; margin: 14px 0 6px; }
.ai-summary-content p { margin-bottom: 10px; }
.ai-summary-content ul, .ai-summary-content ol { padding-left: 20px; margin-bottom: 10px; }
.ai-summary-content li { margin-bottom: 4px; }
.ai-summary-content code { font-family: var(--font-mono); font-size: 12px; background: var(--surface); border: 1px solid var(--border); padding: 2px 5px; border-radius: 4px; }
.ai-summary-content pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; overflow-x: auto; margin-bottom: 12px; }
.ai-summary-content pre code { background: none; padding: 0; border: none; }
.ai-summary-content strong { font-weight: 600; }
.ai-summary-content hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.ai-summary-content blockquote { border-left: 3px solid var(--border); padding-left: 12px; color: var(--text-secondary); }

.ai-analysis-tab {
  padding: 20px;
  overflow-y: auto;
  max-height: 560px;
}

/* ── History ─────────────────────────────────────────────────────────────────── */
.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.history-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.history-card:hover { box-shadow: var(--shadow-md); border-color: var(--ibm-gray-50); }

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.history-card-filename {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.history-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.history-card-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Toast ───────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.2s ease;
  max-width: 360px;
  border: 1px solid var(--border);
}

.toast.success { background: #DEFBE6; color: #1a7f37; border-color: rgba(66,190,101,.25); }
.toast.error { background: var(--critical-bg); color: var(--critical); border-color: rgba(218,30,40,.2); }
.toast.info { background: var(--white); color: var(--text); }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(8px); } }

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.meta-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.meta-info span { display: flex; align-items: center; gap: 4px; }

.no-findings {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
  color: var(--text-secondary);
}

.no-findings .icon { font-size: 48px; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--ibm-gray-20); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ibm-gray-30); }

/* ── Complexity & Readability Tab ────────────────────────────────────────────── */
.complexity-tab {
  padding: 20px;
  overflow-y: auto;
  max-height: 580px;
}

.complexity-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-secondary);
}

/* 2-column grid; readability card spans full width */
.cpx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.cpx-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.cpx-card-full {
  grid-column: 1 / -1;
}

.cpx-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.cpx-card-icon { font-size: 17px; line-height: 1; }

.cpx-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.cpx-overall-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ibm-blue);
  background: var(--ibm-blue-light);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15,98,254,.15);
}

.cpx-explanation {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Per-function table */
.cpx-fn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 4px;
}

.cpx-fn-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cpx-fn-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

.cpx-fn-table tr:last-child td { border-bottom: none; }
.cpx-fn-table tr:hover td { background: var(--surface); }

.cpx-fn-name code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: none;
  border: none;
  padding: 0;
}

.cpx-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ibm-blue);
  background: var(--ibm-blue-light);
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
}

.cpx-fn-note { color: var(--text-secondary); font-size: 12px; }

/* Grade badge */
.cpx-grade {
  font-size: 16px;
  font-weight: 800;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}

.cpx-grade.grade-a { background: var(--low-bg); color: #1a7f37; border: 1px solid rgba(66,190,101,.25); }
.cpx-grade.grade-b { background: #e6f4ff; color: #0550ae; border: 1px solid rgba(15,98,254,.2); }
.cpx-grade.grade-c { background: var(--medium-bg); color: #8a6300; border: 1px solid rgba(241,194,27,.3); }
.cpx-grade.grade-d { background: var(--high-bg); color: #b35900; border: 1px solid rgba(255,131,43,.25); }
.cpx-grade.grade-f { background: var(--critical-bg); color: var(--critical); border: 1px solid rgba(218,30,40,.2); }

/* Readability score ring */
.cpx-readability-body { display: flex; flex-direction: column; gap: 14px; }

.cpx-score-wrap {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.cpx-score-ring {
  position: relative;
  width: 72px; height: 72px;
  flex-shrink: 0;
}

.cpx-score-ring svg {
  width: 72px; height: 72px;
  transform: rotate(-90deg);
}

.cpx-ring-track {
  fill: none;
  stroke: var(--ibm-gray-20);
  stroke-width: 3;
}

.cpx-ring-fill {
  fill: none;
  stroke: var(--ibm-blue);
  stroke-width: 3;
  stroke-linecap: round;
  /* dasharray set inline: "score, 100" on a r=15.9 circle (circumference ≈ 100) */
  transition: stroke-dasharray 0.6s ease;
}

/* Colour the fill based on score via CSS: override stroke colour using grade context */
.cpx-card-full:has(.grade-a) .cpx-ring-fill { stroke: var(--low); }
.cpx-card-full:has(.grade-b) .cpx-ring-fill { stroke: var(--ibm-blue); }
.cpx-card-full:has(.grade-c) .cpx-ring-fill { stroke: var(--medium); }
.cpx-card-full:has(.grade-d) .cpx-ring-fill { stroke: var(--high); }
.cpx-card-full:has(.grade-f) .cpx-ring-fill { stroke: var(--critical); }

.cpx-score-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* Strengths / improvements lists */
.cpx-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .cpx-lists { grid-template-columns: 1fr; }
}

.cpx-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cpx-list li {
  font-size: 13px;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.cpx-pro {
  background: var(--low-bg);
  color: #1a7f37;
}

.cpx-con {
  background: var(--ibm-blue-light);
  color: #0550ae;
}
