/* ============================================================
   Redwood Privacy — Component Styles
   ============================================================ */

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

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

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  border-color: var(--blue-600);
}
.btn-primary:hover:not(:disabled) {
  background: var(--blue-700);
  border-color: var(--blue-700);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--blue-400);
  color: var(--blue-600);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-sm  { padding: 7px 14px; font-size: var(--text-xs); }
.btn-lg  { padding: 13px 28px; font-size: var(--text-base); }
.btn-xl  { padding: 16px 36px; font-size: var(--text-lg); }

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav.scrolled {
  background: rgba(242, 245, 250, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-6);
}

/* ── Logo — real image ───────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}

/* Shield logo icon */
.nav-logo-img,
.sidebar-logo-img {
  height: 32px;
  width: auto;
  max-height: 32px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

/* Wordmark alongside the icon */
.nav-logo-text,
.sidebar-logo-text {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
}
.nav-logo-text span,
.sidebar-logo-text span { color: var(--green-600, #16a34a); }

/* Sidebar logo container */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}

/* Legacy SVG mark — still used in vault/report mock cards */
.nav-logo-mark {
  width: 34px; height: 34px;
  background: var(--blue-600);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark svg { width: 18px; height: 18px; }

.nav-logo-text {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-left: var(--space-3);
}
.nav-logo-text span { color: var(--blue-600); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link-active { color: var(--blue-600) !important; font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: background var(--transition-fast);
}
.nav-hamburger:hover { background: var(--bg-hover); }
.nav-hamburger svg { width: 24px; height: 24px; fill: currentColor; }

/* ── Mobile Menu ─────────────────────────────────────────────── */
.mobile-menu {
  position: fixed; top: 64px; left: 0; right: 0;
  background: rgba(242, 245, 250, 0.98);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: calc(var(--z-overlay) - 1);
  transform: translateY(-6px); opacity: 0; pointer-events: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.mobile-menu-inner {
  padding: var(--space-4) var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.mobile-nav-link {
  padding: var(--space-3); border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: all var(--transition-fast);
  min-height: 44px; display: flex; align-items: center;
}
.mobile-nav-link:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* ── Modals ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 54, 0.45);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.22s ease both;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-close {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: none; border: none;
  font-size: 20px; line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body { padding: var(--space-6); }

/* ── Toasts ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
}

.toast-success { border-left: 3px solid var(--status-safe); }
.toast-error   { border-left: 3px solid var(--status-danger); }
.toast-warning { border-left: 3px solid var(--status-warn); }
.toast-info    { border-left: 3px solid var(--blue-500); }

.toast-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-success .toast-icon { color: var(--status-safe); }
.toast-error   .toast-icon { color: var(--status-danger); }
.toast-warning .toast-icon { color: var(--status-warn); }
.toast-info    .toast-icon { color: var(--blue-500); }

.toast-message { font-size: var(--text-sm); color: var(--text-primary); line-height: 1.5; flex: 1; }

.toast-close {
  background: none; border: none;
  color: var(--text-muted); font-size: 16px;
  cursor: pointer; padding: 0; line-height: 1;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}
.toast-close:hover { color: var(--text-primary); }

/* ── Password toggle ─────────────────────────────────────────── */
.pw-toggle-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); transition: color var(--transition-fast);
  padding: 4px; line-height: 1; display: flex; align-items: center;
}
.pw-toggle-btn:hover { color: var(--text-secondary); }

/* ── Eyebrow / pill badge ────────────────────────────────────── */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 14px;
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--blue-600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-500);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

/* ── Stat cards ──────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card:hover::after { transform: scaleX(1); }

.stat-card .stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-card .stat-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-card .stat-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Responsive nav ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links  { display: none; }
  .nav-hamburger { display: flex; }
  #nav-register-btn { display: none !important; }
  
  .btn-sm { min-height: 44px; display: flex; align-items: center; justify-content: center; }
}

/* ── Watchlist Track Button ──────────────────────────────────── */
.btn-track {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-track:hover {
  background: var(--bg-hover);
  color: var(--blue-600);
}

.btn-track.tracked {
  color: var(--blue-600);
}

.btn-track.tracked:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

/* ── Score Row & Grade Ring ──────────────────────────────────── */
.card-score-row { display: flex; align-items: center; gap: var(--space-4); }
.grade-ring-wrap { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.grade-ring { transform: rotate(-90deg); }
.ring-track-sm { fill: none; stroke: var(--border-subtle); stroke-width: 7; }
.ring-fill-sm { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.9s ease; }
.ring-center-sm { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-num { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; font-family: 'JetBrains Mono', monospace; }
.score-denom { font-size: 9px; color: var(--text-muted); font-weight: 500; }
.grade-badge-lg { font-size: var(--text-3xl); font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.grade-a { color: #22c55e; } .grade-b { color: #84cc16; } .grade-c { color: #f59e0b; } .grade-d { color: #f97316; } .grade-f { color: #ef4444; }

/* ============================================================
   Phase 1 UX Enhancements:
   1. Privacy Nutrition Strip (CMU CyLab Pattern + Redundant Encoding)
   2. Bold Lead-In Chunking (.ux-lead-tag)
   3. Inline Plain-English Jargon Tooltips (.jargon-term)
   ============================================================ */

/* ── 1. Privacy Nutrition Strip (Full 4-Column Grid) ─────────── */
.privacy-nutrition-strip {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.nutrition-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.nutrition-strip-title-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nutrition-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nutrition-strip-title {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.nutrition-strip-caption {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.nutrition-cell {
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nutrition-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.nutrition-cell.tier-good {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.24);
}

.nutrition-cell.tier-warn {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.26);
}

.nutrition-cell.tier-danger {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.24);
}

.nutrition-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.nutrition-cat-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nutrition-cat-icon {
  font-size: 13px;
  line-height: 1;
}

.nutrition-status-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.nutrition-status-tag.tier-good {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.nutrition-status-tag.tier-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.nutrition-status-tag.tier-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.nutrition-headline {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.nutrition-subtext {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Compact Nutrition Pills (for cards) */
.nutrition-strip-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nutrition-pill-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  line-height: 1.2;
}

.nutrition-pill-mini.tier-good {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.24);
}

.nutrition-pill-mini.tier-warn {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.25);
}

.nutrition-pill-mini.tier-danger {
  background: rgba(239, 68, 68, 0.09);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.22);
}

/* ── 2. Bold Lead-In Micro-Headers (F-Pattern Scannability) ──── */
.ux-lead-tag {
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ── 3. Inline Plain-English Jargon Tooltips (W3C COGA) ──────── */
.jargon-term {
  position: relative;
  display: inline;
  color: var(--blue-700, #1d4ed8);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(37, 99, 235, 0.65);
  text-underline-offset: 3px;
  cursor: help;
  border-radius: 3px;
  padding: 0 2px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.jargon-term:hover,
.jargon-term:focus-visible {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--blue-800, #1e40af);
  outline: none;
}

.jargon-term::after {
  content: attr(data-term) ": " attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 280px;
  padding: 9px 12px;
  background: #0f172a;
  color: #f8fafc;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 9999;
  white-space: normal;
}

.jargon-term:hover::after,
.jargon-term:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── 4. ToS Modal "10-Second Bottom Line" Action Callout ─────── */
.tos-bottomline-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-left: 4px solid var(--blue-600);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tos-bottomline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tos-bottomline-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-700, #1d4ed8);
}

.tos-bottomline-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.tos-action-bridge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: var(--blue-600);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.tos-action-bridge-btn:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

.tos-dossier-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.tos-dossier-link-btn:hover {
  color: var(--blue-600);
  border-color: var(--blue-400);
}

@media (max-width: 960px) {
  .nutrition-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .nutrition-grid {
    grid-template-columns: 1fr;
  }
  .jargon-term::after {
    left: 0;
    transform: translateX(0) translateY(4px);
    max-width: 230px;
  }
  .jargon-term:hover::after,
  .jargon-term:focus-visible::after {
    transform: translateX(0) translateY(0);
  }
}

/* ============================================================
   Phase 3 UX Enhancements:
   1. 3-Bucket Grouped Factor Rubric (Miller's Law Chunking)
   2. Redundant Grade Encoding Pills (WCAG 2.2 SC 1.4.1)
   ============================================================ */

.factor-bucket-group {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.factor-bucket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.factor-bucket-title-wrap {
  flex: 1;
  min-width: 180px;
}

.factor-bucket-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 2px 0;
  letter-spacing: -0.01em;
}

.factor-bucket-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.factor-bucket-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.factor-bucket-weight {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.factor-bucket-score {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
}

.factor-bucket-score.tier-good,
.factor-status-word.tier-good,
.grade-redundant-pill.tier-good {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.24);
}

.factor-bucket-score.tier-warn,
.factor-status-word.tier-warn,
.grade-redundant-pill.tier-warn {
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.factor-bucket-score.tier-danger,
.factor-status-word.tier-danger,
.grade-redundant-pill.tier-danger {
  background: rgba(239, 68, 68, 0.11);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.factor-bucket-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.factor-status-word {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-grade-stack {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.grade-icon-badge {
  position: relative;
  width: 36px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.grade-icon-badge.grade-a { color: #16a34a; }
.grade-icon-badge.grade-b { color: #65a30d; }
.grade-icon-badge.grade-c { color: #d97706; }
.grade-icon-badge.grade-d { color: #ea580c; }
.grade-icon-badge.grade-f { color: #dc2626; }

.grade-icon-svg {
  width: 36px;
  height: 40px;
  display: block;
}

.grade-icon-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: currentColor;
}

.card-grade-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.card-grade-eyebrow {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1;
}

.grade-redundant-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  white-space: nowrap;
}



