/* ============================================================
   ap-confidence-system.css — Sprint 9G: Academic Confidence System™
   ============================================================ */

/* ── Confidence Card (plan view) ── */

.acs-card {
  background: #fff;
  border: 1px solid var(--color-border, #E2E8F0);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 20px;
}

.acs-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.acs-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
}

.acs-card__subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text, #334155);
  margin: 0;
}

/* Score display */

.acs-score {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.acs-score__ring {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.acs-score__ring svg {
  transform: rotate(-90deg);
}

.acs-score__ring circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.acs-score__ring .ring-track {
  stroke: var(--color-border, #E2E8F0);
}

.acs-score__ring .ring-fill {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.acs-score__val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--color-text, #334155);
}

.acs-score__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acs-score__level {
  font-size: 14px;
  font-weight: 700;
}

.acs-score__desc {
  font-size: 12px;
  color: var(--color-text-muted, #64748B);
}

/* Factor list */

.acs-factors {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.acs-factor {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #F8FAFC;
  transition: background 0.15s;
}

.acs-factor--present {
  background: #F0FDF4;
}

.acs-factor--absent {
  background: #F8FAFC;
  opacity: 0.6;
}

.acs-factor__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.acs-factor--present .acs-factor__check {
  background: #D1FAE5;
  color: #059669;
}

.acs-factor--absent .acs-factor__check {
  background: #E2E8F0;
  color: #94A3B8;
}

.acs-factor__body {
  flex: 1;
  min-width: 0;
}

.acs-factor__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #334155);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.acs-factor__detail {
  font-size: 12px;
  color: var(--color-text-muted, #64748B);
  line-height: 1.5;
}

/* Review section */

.acs-review {
  border-top: 1px solid var(--color-border, #E2E8F0);
  padding-top: 16px;
  margin-top: 4px;
}

.acs-review__head {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.acs-review__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.acs-review__col-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.acs-review__col-title--strengths { color: #059669; }
.acs-review__col-title--improvements { color: #D97706; }

.acs-review__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acs-review__list li {
  font-size: 12px;
  color: var(--color-text, #334155);
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}

.acs-review__list--strengths li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: 700;
}

.acs-review__list--improvements li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #D97706;
  font-weight: 700;
}

.acs-review__empty {
  font-size: 12px;
  color: var(--color-text-muted, #64748B);
  font-style: italic;
}

/* Human review alert within confidence card */

.acs-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #92400E;
  line-height: 1.5;
}

.acs-alert__icon { flex-shrink: 0; margin-top: 1px; }

/* ── Dashboard confidence widget ── */

.acs-dash {
  background: #fff;
  border: 1px solid var(--color-border, #E2E8F0);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.acs-dash__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.acs-dash__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #334155);
}

.acs-dash__badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.acs-dash__badge--high   { background: #D1FAE5; color: #059669; }
.acs-dash__badge--medium { background: #FEF3C7; color: #92400E; }
.acs-dash__badge--low    { background: #F1F5F9; color: #64748B; }

.acs-dash__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.acs-dash__score-num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.acs-dash__score-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.acs-dash__score-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted, #64748B);
}

.acs-dash__score-sub {
  font-size: 12px;
  color: var(--color-text-muted, #64748B);
}

.acs-dash__bar-wrap {
  height: 6px;
  background: var(--color-border, #E2E8F0);
  border-radius: 3px;
  margin-bottom: 14px;
  overflow: hidden;
}

.acs-dash__bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.acs-dash__engines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.acs-dash__engine {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  background: #F1F5F9;
  color: var(--color-text, #334155);
}

.acs-dash__engine--active {
  background: #EFF6FF;
  color: var(--color-primary, #1E3A8A);
  font-weight: 600;
}

.acs-dash__footer {
  font-size: 12px;
  color: var(--color-text-muted, #64748B);
  border-top: 1px solid var(--color-border, #E2E8F0);
  padding-top: 10px;
}

.acs-dash__link {
  color: var(--color-cta, #2563EB);
  text-decoration: none;
  font-weight: 600;
}

.acs-dash__link:hover { text-decoration: underline; }
