/* Harlan Intelligence Phase 2+3 Styles */

/* ====== chat-css.css ====== */
/*
 * =========================================================
 * Phase 2.1 - Harlan Intelligence™ Chat Upgrade Styles
 * Supplements /berhe-site/harlan-intelligence.html
 * Uses existing CSS variables: --ivory, --dark, --teal,
 * --teal-dim, --serif, --sans, --muted, --border-dark,
 * --border-light, --white, --dark-900, --dark-800
 * =========================================================
 */

/* =========================================================
   1. SMART MODE TOGGLE
   Sits in the chat header, right-side of online indicator
   ========================================================= */

.chat-mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.chat-mode-label {
  font-size: 0.63rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.chat-mode-label.active {
  color: var(--teal);
}

/* Toggle pill */
.mode-toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.mode-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.mode-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.mode-toggle-switch input:checked + .mode-toggle-track {
  background: rgba(0, 180, 200, 0.22);
  border-color: rgba(0, 180, 200, 0.45);
}

.mode-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.22s ease;
  pointer-events: none;
}

.mode-toggle-switch input:checked ~ .mode-toggle-thumb {
  transform: translateX(16px);
  background: var(--teal);
}

/* Smart mode active - subtle glow on avatar */
.chat-avatar.smart-active {
  box-shadow: 0 0 0 3px rgba(0, 180, 200, 0.3),
    0 0 14px rgba(0, 180, 200, 0.18);
}

/* Smart mode banner - thin strip below header when smart mode on */
.smart-mode-banner {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.5rem;
  background: rgba(0, 180, 200, 0.06);
  border-bottom: 1px solid rgba(0, 180, 200, 0.12);
  font-size: 0.67rem;
  color: rgba(0, 180, 200, 0.75);
  font-family: var(--sans);
  letter-spacing: 0.04em;
  animation: msgFade 0.3s ease;
}

.smart-mode-banner.visible {
  display: flex;
}

.smart-mode-banner svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* =========================================================
   2. SAVE CONVERSATION BUTTON (in chat header)
   ========================================================= */

.chat-save-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.63rem;
  font-family: var(--sans);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.chat-save-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
}

.chat-save-btn.saved {
  border-color: rgba(34, 197, 94, 0.35);
  color: rgba(34, 197, 94, 0.75);
}

.chat-save-btn svg {
  flex-shrink: 0;
}

/* Save confirmation toast - appears briefly above the button */
.chat-save-toast {
  position: absolute;
  top: -2.2rem;
  right: 0;
  background: rgba(15, 14, 13, 0.92);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.67rem;
  color: rgba(34, 197, 94, 0.85);
  white-space: nowrap;
  pointer-events: none;
  animation: toastFade 2.2s ease forwards;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translateY(4px); }
  15% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* =========================================================
   3. RESUME MODAL OVERLAY
   Appears on page load when a saved conversation exists
   ========================================================= */

#resumeModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: modalBgIn 0.25s ease;
}

#resumeModal.visible {
  display: flex;
}

@keyframes modalBgIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.resume-modal-card {
  background: var(--dark-900, #161513);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 2.25rem 2rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  animation: modalCardIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
}

@keyframes modalCardIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.resume-modal-eyebrow {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  font-family: var(--sans);
  font-weight: 500;
  margin-bottom: 0.65rem;
}

.resume-modal-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.resume-modal-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-family: var(--sans);
}

.resume-modal-preview {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.77rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--sans);
  line-height: 1.65;
}

.resume-modal-preview strong {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.resume-modal-actions {
  display: flex;
  gap: 0.75rem;
}

.resume-modal-btn-primary {
  flex: 1;
  padding: 0.85rem 1rem;
  background: var(--teal);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.82rem;
  font-family: var(--sans);
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  letter-spacing: 0.03em;
}

.resume-modal-btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.resume-modal-btn-secondary {
  flex: 1;
  padding: 0.85rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  font-family: var(--sans);
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resume-modal-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
}

.resume-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.resume-modal-close:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   4. TYPING INDICATOR - Enhanced "Harlan is thinking..."
   Replaces the basic 3-dot version with a richer feel
   ========================================================= */

/* Enhanced typing bubble - same base classes as .chat-typing
   but adds the "Harlan is thinking..." label */
.chat-typing-enhanced {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-self: flex-start;
  animation: msgFade 0.3s ease;
  max-width: 200px;
}

.chat-typing-bubble {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.chat-typing-dots span {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  display: block;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.chat-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.36s; }

/* Ripple pulse behind dots */
.chat-typing-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 180, 200, 0.25);
  animation: typingPulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes typingPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.4); opacity: 0.25; }
}

.chat-thinking-label {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--sans);
  letter-spacing: 0.06em;
  padding-left: 0.25rem;
  animation: thinkingFade 1.8s ease-in-out infinite;
}

@keyframes thinkingFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* =========================================================
   5. MESSAGE TIMESTAMPS
   ========================================================= */

.chat-msg-timestamp {
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.2);
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-top: 0.2rem;
  /* Positioned below the message, aligned to its side */
}

.chat-msg-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  animation: msgFade 0.3s ease;
}

.chat-msg-wrap.bot-wrap {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-msg-wrap.user-wrap {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg-wrap .chat-msg.bot {
  align-self: unset;
}

.chat-msg-wrap .chat-msg.user {
  align-self: unset;
}

/* =========================================================
   6. SENTIMENT-AWARE / EMPATHETIC MODE STYLING
   Applies when distress keywords detected in PI cases
   ========================================================= */

/* Empathy mode: bot messages gain a warmer tint */
.chat-msg.bot.empathetic {
  background: rgba(255, 185, 100, 0.07);
  border-color: rgba(255, 185, 100, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

/* Soft amber left-border accent for empathetic messages */
.chat-msg.bot.empathetic::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: rgba(255, 185, 100, 0.45);
  border-radius: 2px;
}

.chat-msg.bot {
  position: relative; /* needed for ::before on empathetic */
}

/* Empathetic mode banner - thin strip below smart-mode banner */
.empathy-mode-banner {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.5rem;
  background: rgba(255, 185, 100, 0.05);
  border-bottom: 1px solid rgba(255, 185, 100, 0.1);
  font-size: 0.65rem;
  color: rgba(255, 185, 100, 0.6);
  font-family: var(--sans);
  letter-spacing: 0.04em;
  animation: msgFade 0.3s ease;
}

.empathy-mode-banner.visible {
  display: flex;
}

/* =========================================================
   7. MID-CONVERSATION SUMMARY CARDS
   Appear every 5-6 exchanges - "Here's what I understand so far"
   ========================================================= */

.chat-summary-card {
  background: rgba(0, 180, 200, 0.05);
  border: 1px solid rgba(0, 180, 200, 0.18);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  max-width: 100%;
  align-self: flex-start;
  animation: msgFade 0.35s ease;
  position: relative;
  overflow: hidden;
}

.chat-summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
  border-radius: 14px 14px 0 0;
}

.chat-summary-eyebrow {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  font-family: var(--sans);
  font-weight: 500;
  margin-bottom: 0.6rem;
  opacity: 0.85;
}

.chat-summary-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.85rem;
  line-height: 1.35;
}

.chat-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.chat-summary-list li {
  display: flex;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.55;
  font-family: var(--sans);
}

.chat-summary-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.5em;
  opacity: 0.7;
}

.chat-summary-list li strong {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.chat-summary-confirm {
  font-size: 0.8rem;
  color: rgba(0, 180, 200, 0.8);
  font-family: var(--sans);
  font-style: italic;
}

/* Confirm/edit action buttons inside summary card */
.chat-summary-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.chat-summary-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.73rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 400;
}

.chat-summary-btn.confirm {
  background: rgba(0, 180, 200, 0.15);
  border: 1px solid rgba(0, 180, 200, 0.35);
  color: var(--teal);
}

.chat-summary-btn.confirm:hover {
  background: rgba(0, 180, 200, 0.25);
}

.chat-summary-btn.edit {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
}

.chat-summary-btn.edit:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.65);
}

/* =========================================================
   8. QUICK-REPLY SUGGESTION CHIPS
   Appear below Harlan messages as tap targets
   ========================================================= */

.quick-reply-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-self: flex-start;
  max-width: 90%;
  animation: quickChipIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: -0.25rem; /* tuck up under the message */
}

@keyframes quickChipIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.quick-reply-chip {
  padding: 0.38rem 0.9rem;
  background: rgba(0, 180, 200, 0.07);
  border: 1px solid rgba(0, 180, 200, 0.22);
  border-radius: 100px;
  color: rgba(0, 180, 200, 0.8);
  font-size: 0.75rem;
  font-family: var(--sans);
  font-weight: 400;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.quick-reply-chip:hover {
  background: rgba(0, 180, 200, 0.15);
  border-color: rgba(0, 180, 200, 0.45);
  color: var(--teal);
  transform: translateY(-1px);
}

.quick-reply-chip:active {
  transform: scale(0.96);
}

/* Chips fade out when one is selected */
.quick-reply-container.dismissed {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* =========================================================
   9. INLINE INSIGHT CARDS
   Rich inline results (SOL warnings, statute notes, etc.)
   ========================================================= */

.chat-insight-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 2px solid var(--teal);
  border-radius: 0 12px 12px 0;
  padding: 0.85rem 1.1rem;
  max-width: 95%;
  align-self: flex-start;
  animation: msgFade 0.3s ease;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  font-family: var(--sans);
}

.chat-insight-card.urgent {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.chat-insight-eyebrow {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.chat-insight-card.urgent .chat-insight-eyebrow {
  color: #f59e0b;
}

.chat-insight-text {
  color: rgba(255, 255, 255, 0.65);
}

.chat-insight-text strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

/* =========================================================
   10. UPDATED CHAT HEADER LAYOUT
   Accommodates the extra controls (mode toggle, save btn)
   ========================================================= */

/* The existing .chat-header uses display:flex; align-items:center; gap:0.75rem
   We extend it to support wrapping on small viewports */
.chat-header {
  flex-wrap: nowrap;
  overflow: hidden;
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* On very small chat containers, hide the save button text */
@media (max-width: 480px) {
  .chat-save-btn .chat-save-label {
    display: none;
  }

  .chat-mode-label {
    display: none;
  }
}

/* =========================================================
   11. MESSAGE FADE ANIMATION (shared)
   Ensure msgFade is defined in case it's not on global scope
   ========================================================= */

@keyframes msgFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   12. FREE-TEXT INPUT UPGRADE
   When smart mode is on, the text input gets a subtle glow
   to signal "free text" is active
   ========================================================= */

.chat-text-input.smart-mode input {
  border-color: rgba(0, 180, 200, 0.25);
  background: rgba(0, 180, 200, 0.04);
}

.chat-text-input.smart-mode input:focus {
  border-color: rgba(0, 180, 200, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 180, 200, 0.1);
}

.chat-text-input.smart-mode input::placeholder {
  color: rgba(0, 180, 200, 0.3);
}

/* =========================================================
   13. CONVERSATION PROGRESS INDICATOR
   Thin progress rail at top of chatMessages area
   ========================================================= */

.chat-progress-rail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  border-radius: 0;
  pointer-events: none;
}

.chat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #00d4ec);
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0%;
}

#chatMessages {
  position: relative; /* enable the progress rail absolute positioning */
}

/* =========================================================
   14. RESPONSIVE ADJUSTMENTS
   ========================================================= */

@media (max-width: 600px) {
  .resume-modal-card {
    padding: 1.75rem 1.25rem;
    border-radius: 14px;
  }

  .resume-modal-actions {
    flex-direction: column;
  }

  .chat-summary-card {
    padding: 1rem 1.1rem;
  }
}


/* ====== analyzer-css.css ====== */
/* ==========================================================================
   PHASE 2.2 - Document Intelligence Suite
   CSS additions for the upgraded Contract Analyzer section.
   Uses existing CSS variables: --ivory, --dark, --dark-900, --dark-800,
   --muted, --teal, --teal-dim, --serif, --sans, --border-light, --border-dark
   Add these rules inside the existing <style> block, after the existing
   analyzer rules (approx. line 2962 in harlan-intelligence.html).
   ========================================================================== */


/* ==========================================================================
   TAB BAR  (Analyze | Compare | Clause Explorer)
   ========================================================================== */

.dis-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.dis-tabs::-webkit-scrollbar { display: none; }

.dis-tab {
  padding: 0.85rem 1.6rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
  user-select: none;
}
.dis-tab:hover {
  color: rgba(255, 255, 255, 0.65);
}
.dis-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* Tab panes */
.dis-tab-pane {
  display: none;
}
.dis-tab-pane.active {
  display: block;
  animation: fadeSlideIn 0.3s ease;
}

/* The outer wrapper replacing .analyzer-container */
.dis-suite {
  max-width: 960px;
  margin: 0 auto;
}


/* ==========================================================================
   ENHANCED UPLOAD PANEL  (Analyze tab)
   ========================================================================== */

/* Subtle upgrade indicator above the existing upload area */
.dis-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 500;
  margin-bottom: 1rem;
}
.dis-mode-label svg {
  width: 14px;
  height: 14px;
}


/* ==========================================================================
   COMPARE TAB  - two-panel side-by-side layout
   ========================================================================== */

.dis-compare-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.dis-compare-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.5rem;
}

.dis-compare-panel-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dis-compare-panel-label .panel-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 180, 200, 0.12);
  color: var(--teal);
}

.dis-compare-textarea {
  width: 100%;
  min-height: 180px;
  max-height: 320px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-family: var(--sans);
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
.dis-compare-textarea:focus {
  border-color: rgba(0, 180, 200, 0.4);
}
.dis-compare-textarea::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.dis-compare-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.2s ease;
}
.dis-compare-file-btn svg { width: 13px; height: 13px; }
.dis-compare-file-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(0, 180, 200, 0.05);
}

.dis-compare-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Synchronized scroll results grid */
.dis-compare-results {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.dis-compare-results.visible {
  display: grid;
  animation: fadeSlideIn 0.3s ease;
}

.dis-compare-result-col {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.25rem;
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.dis-compare-result-col::-webkit-scrollbar { width: 5px; }
.dis-compare-result-col::-webkit-scrollbar-track { background: transparent; }
.dis-compare-result-col::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.dis-compare-col-header {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--white, #fff);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Diff highlight classes */
.diff-added {
  background: rgba(34, 197, 94, 0.09);
  border-left: 3px solid #22c55e;
  padding-left: 0.6rem;
  border-radius: 0 6px 6px 0;
}
.diff-removed {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
  padding-left: 0.6rem;
  border-radius: 0 6px 6px 0;
}
.diff-modified {
  background: rgba(234, 179, 8, 0.08);
  border-left: 3px solid #eab308;
  padding-left: 0.6rem;
  border-radius: 0 6px 6px 0;
}
.diff-same {
  opacity: 0.55;
}


/* ==========================================================================
   CLAUSE ACCORDION  (Clause Explorer tab + Analyze results)
   ========================================================================== */

.dis-clause-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.dis-clause-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.dis-clause-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
.dis-clause-card.expanded {
  border-color: rgba(0, 180, 200, 0.2);
}

.dis-clause-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
}

.dis-clause-expand-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.3);
  transition: transform 0.25s ease, color 0.2s ease;
}
.dis-clause-card.expanded .dis-clause-expand-icon {
  transform: rotate(90deg);
  color: var(--teal);
}

.dis-clause-category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-liability    { background: #ef4444; }
.dot-ip           { background: #8b5cf6; }
.dot-term         { background: #3b82f6; }
.dot-payment      { background: #10b981; }
.dot-termination  { background: #f97316; }
.dot-nda          { background: #0ea5e9; }
.dot-indemnity    { background: #f43f5e; }
.dot-governing    { background: #6366f1; }
.dot-dispute      { background: #14b8a6; }
.dot-general      { background: rgba(255, 255, 255, 0.3); }

.dis-clause-title {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--sans);
}

/* Risk badge on clause header */
.dis-risk-badge {
  padding: 0.22rem 0.7rem;
  border-radius: 100px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.dis-risk-badge.risk-1,
.dis-risk-badge.risk-low    { background: rgba(34, 197, 94, 0.14); color: #22c55e; }
.dis-risk-badge.risk-2      { background: rgba(132, 204, 22, 0.14); color: #84cc16; }
.dis-risk-badge.risk-3,
.dis-risk-badge.risk-medium { background: rgba(234, 179, 8, 0.14); color: #eab308; }
.dis-risk-badge.risk-4      { background: rgba(249, 115, 22, 0.14); color: #f97316; }
.dis-risk-badge.risk-5,
.dis-risk-badge.risk-high   { background: rgba(239, 68, 68, 0.14); color: #ef4444; }

/* Numeric risk score chip */
.dis-risk-score {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.dis-risk-score.score-1 { background: rgba(34, 197, 94, 0.18); color: #22c55e; }
.dis-risk-score.score-2 { background: rgba(132, 204, 22, 0.18); color: #84cc16; }
.dis-risk-score.score-3 { background: rgba(234, 179, 8, 0.18);  color: #eab308; }
.dis-risk-score.score-4 { background: rgba(249, 115, 22, 0.18); color: #f97316; }
.dis-risk-score.score-5 { background: rgba(239, 68, 68, 0.18);  color: #ef4444; }

/* Clause accordion body */
.dis-clause-body {
  display: none;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeSlideIn 0.25s ease;
}
.dis-clause-card.expanded .dis-clause-body {
  display: block;
}

.dis-clause-original {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--sans);
  line-height: 1.7;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-style: italic;
  max-height: 140px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.dis-clause-section-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
  margin-top: 0.85rem;
}

/* Plain English toggle */
.dis-plain-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  margin-top: 0.6rem;
}
.dis-plain-toggle-track {
  width: 30px;
  height: 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.dis-plain-toggle-track::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transition: transform 0.2s ease, background 0.2s ease;
}
.dis-plain-toggle.on .dis-plain-toggle-track {
  background: var(--teal);
}
.dis-plain-toggle.on .dis-plain-toggle-track::after {
  transform: translateX(14px);
  background: #fff;
}
.dis-plain-toggle-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: var(--sans);
  transition: color 0.2s;
}
.dis-plain-toggle.on .dis-plain-toggle-label {
  color: var(--teal);
}

.dis-plain-english {
  display: none;
  background: rgba(0, 180, 200, 0.06);
  border: 1px solid rgba(0, 180, 200, 0.15);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.65;
  margin-top: 0.6rem;
  animation: fadeSlideIn 0.2s ease;
}
.dis-plain-english.visible {
  display: block;
}

.dis-clause-analysis-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
  font-weight: 300;
}

.dis-clause-recommendation {
  font-size: 0.78rem;
  color: var(--teal);
  line-height: 1.6;
  margin-top: 0.35rem;
  font-style: italic;
}


/* ==========================================================================
   INDUSTRY BENCHMARK BARS
   ========================================================================== */

.dis-benchmark-wrap {
  margin-top: 0.85rem;
}

.dis-benchmark-row {
  margin-bottom: 0.75rem;
}

.dis-benchmark-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-family: var(--sans);
}
.dis-benchmark-labels span:last-child {
  color: rgba(255, 255, 255, 0.55);
}

.dis-benchmark-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 100px;
  position: relative;
  overflow: visible;
}

.dis-benchmark-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--teal);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Industry standard marker line */
.dis-benchmark-standard {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
  transform: translateX(-50%);
}
.dis-benchmark-standard::after {
  content: 'Standard';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  font-family: var(--sans);
}

.dis-benchmark-verdict {
  font-size: 0.68rem;
  margin-top: 0.25rem;
  font-weight: 500;
}
.dis-benchmark-verdict.verdict-above { color: #ef4444; }
.dis-benchmark-verdict.verdict-below { color: #22c55e; }
.dis-benchmark-verdict.verdict-inline { color: var(--muted); }


/* ==========================================================================
   REDLINE SUGGESTION CARDS
   ========================================================================== */

.dis-redlines-section {
  margin-bottom: 2rem;
}

.dis-section-heading {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--white, #fff);
  margin-bottom: 0.4rem;
}
.dis-section-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-weight: 300;
  line-height: 1.55;
}

.dis-redline-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dis-redline-card {
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  border: 1px solid;
}
.dis-redline-card.redline-add {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
}
.dis-redline-card.redline-remove {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.18);
}
.dis-redline-card.redline-modify {
  background: rgba(234, 179, 8, 0.05);
  border-color: rgba(234, 179, 8, 0.18);
}

.dis-redline-type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}
.redline-add    .dis-redline-type { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.redline-remove .dis-redline-type { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.redline-modify .dis-redline-type { background: rgba(234, 179, 8, 0.12); color: #eab308; }

.dis-redline-type-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.redline-add    .dis-redline-type-dot { background: #22c55e; }
.redline-remove .dis-redline-type-dot { background: #ef4444; }
.redline-modify .dis-redline-type-dot { background: #eab308; }

.dis-redline-clause-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
  font-family: var(--sans);
}

.dis-redline-before,
.dis-redline-after {
  font-size: 0.75rem;
  line-height: 1.65;
  padding: 0.65rem 0.85rem;
  border-radius: 7px;
  font-family: var(--sans);
  margin-bottom: 0.5rem;
}
.dis-redline-before {
  background: rgba(239, 68, 68, 0.08);
  color: rgba(239, 68, 68, 0.85);
  text-decoration: line-through;
}
.dis-redline-after {
  background: rgba(34, 197, 94, 0.08);
  color: rgba(34, 197, 94, 0.9);
}
/* For add-only cards: only show "after" block */
.redline-add .dis-redline-before { display: none; }
/* For remove-only cards: only show "before" block */
.redline-remove .dis-redline-after { display: none; }

.dis-redline-rationale {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.55;
  font-weight: 300;
  margin-top: 0.5rem;
  font-style: italic;
}


/* ==========================================================================
   "WHAT WOULD I ADD?" - Recommended missing clauses
   ========================================================================== */

.dis-missing-section {
  margin-bottom: 2rem;
}

.dis-missing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.dis-missing-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s ease;
}
.dis-missing-card:hover {
  border-color: rgba(0, 180, 200, 0.2);
}

.dis-missing-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.dis-missing-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dis-missing-icon svg { width: 16px; height: 16px; }
.importance-critical    .dis-missing-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.importance-important   .dis-missing-icon { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.importance-recommended .dis-missing-icon { background: rgba(234, 179, 8, 0.12);  color: #eab308; }

.dis-missing-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--sans);
  line-height: 1.3;
}
.dis-missing-importance-tag {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-top: 0.2rem;
}
.importance-critical    .dis-missing-importance-tag { color: #ef4444; }
.importance-important   .dis-missing-importance-tag { color: #f97316; }
.importance-recommended .dis-missing-importance-tag { color: #eab308; }

.dis-missing-why {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  font-weight: 300;
}

.dis-missing-sample {
  display: none;
  background: rgba(0, 180, 200, 0.05);
  border: 1px solid rgba(0, 180, 200, 0.12);
  border-radius: 7px;
  padding: 0.7rem 0.85rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
  line-height: 1.6;
  margin-top: 0.6rem;
  animation: fadeSlideIn 0.2s ease;
}
.dis-missing-card.show-sample .dis-missing-sample {
  display: block;
}

.dis-missing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
  font-size: 0.68rem;
  color: var(--teal);
  cursor: pointer;
  user-select: none;
  font-family: var(--sans);
  transition: opacity 0.2s;
}
.dis-missing-toggle:hover { opacity: 0.75; }
.dis-missing-toggle svg { width: 12px; height: 12px; }


/* ==========================================================================
   EXPORT ROW
   ========================================================================== */

.dis-export-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 2rem;
}

.dis-export-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-right: 0.25rem;
  white-space: nowrap;
}

.dis-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: 7px;
  font-size: 0.75rem;
  font-family: var(--sans);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
  white-space: nowrap;
}
.dis-export-btn svg { width: 14px; height: 14px; }

.dis-export-btn.btn-pdf {
  background: rgba(0, 180, 200, 0.1);
  border-color: rgba(0, 180, 200, 0.25);
  color: var(--teal);
}
.dis-export-btn.btn-pdf:hover {
  background: rgba(0, 180, 200, 0.18);
  border-color: rgba(0, 180, 200, 0.45);
}

.dis-export-btn.btn-docx {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}
.dis-export-btn.btn-docx:hover {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.35);
}

.dis-export-btn.btn-share {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
}
.dis-export-btn.btn-share:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}


/* ==========================================================================
   OVERALL RISK METER  (summary bar at top of results)
   ========================================================================== */

.dis-risk-meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 0.85rem 0;
}

.dis-risk-segment {
  height: 5px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.4s ease;
}
.dis-risk-segment.filled-1 { background: #22c55e; }
.dis-risk-segment.filled-2 { background: #84cc16; }
.dis-risk-segment.filled-3 { background: #eab308; }
.dis-risk-segment.filled-4 { background: #f97316; }
.dis-risk-segment.filled-5 { background: #ef4444; }


/* ==========================================================================
   OVERVIEW STATS ROW  (quick metrics above clause list)
   ========================================================================== */

.dis-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.dis-stat-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.dis-stat-num {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--white, #fff);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}
.dis-stat-num.color-teal   { color: var(--teal); }
.dis-stat-num.color-green  { color: #22c55e; }
.dis-stat-num.color-yellow { color: #eab308; }
.dis-stat-num.color-red    { color: #ef4444; }

.dis-stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
}


/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.dis-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  font-family: var(--sans);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.25s ease;
  white-space: nowrap;
}
.dis-toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.dis-toast.toast-teal  { border-color: rgba(0, 180, 200, 0.3); }
.dis-toast.toast-teal svg { color: var(--teal); }
.dis-toast.toast-green { border-color: rgba(34, 197, 94, 0.3); }
.dis-toast.toast-green svg { color: #22c55e; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(10px); }
}
.dis-toast.leaving {
  animation: toastOut 0.25s ease forwards;
}


/* ==========================================================================
   LOADING SKELETON  (while analysis runs)
   ========================================================================== */

.dis-skeleton-wrap {
  display: none;
}
.dis-skeleton-wrap.visible {
  display: block;
  animation: fadeSlideIn 0.3s ease;
}

.dis-skeleton-bar {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.09) 40%,
    rgba(255,255,255,0.04) 80%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  margin-bottom: 0.6rem;
}
.dis-skeleton-bar.w-80 { width: 80%; }
.dis-skeleton-bar.w-60 { width: 60%; }
.dis-skeleton-bar.w-40 { width: 40%; }
.dis-skeleton-bar.h-tall { height: 80px; }

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.dis-analyzing-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--teal);
  margin-bottom: 1.25rem;
}
.dis-analyzing-label .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulseDot 1.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}


/* ==========================================================================
   COMPARE SUMMARY BANNER  (above clause diffs)
   ========================================================================== */

.dis-compare-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
.dis-compare-summary-item {
  text-align: center;
}
.dis-compare-summary-num {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--white, #fff);
  margin-bottom: 0.2rem;
}
.dis-compare-summary-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}


/* ==========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================== */

@media (max-width: 768px) {
  .dis-compare-panels,
  .dis-compare-results {
    grid-template-columns: 1fr;
  }
  .dis-missing-grid {
    grid-template-columns: 1fr;
  }
  .dis-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .dis-compare-summary {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .dis-export-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .dis-tab {
    padding: 0.7rem 1rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .dis-stats-row {
    grid-template-columns: 1fr;
  }
  .dis-compare-result-col {
    max-height: 400px;
  }
}


/* ====== tracker-css.css ====== */
/* =========================================================
   HARLAN INTELLIGENCE™ - LIVE CASE TRACKER
   Phase 2.3 Styles - tracker-css.css
   Uses existing site variables:
     --ivory, --dark, --dark-900, --dark-800,
     --muted, --teal, --teal-dim, --serif, --sans,
     --border-light, --border-dark, --white
   ========================================================= */

/* ─── LAYOUT TOKENS (scoped to tracker) ─────────────────── */
.tracker-root {
  --tr-radius-sm:   0.375rem;
  --tr-radius-md:   0.5rem;
  --tr-radius-lg:   0.75rem;
  --tr-radius-xl:   1rem;
  --tr-radius-full: 9999px;

  --tr-transition:  180ms cubic-bezier(0.16, 1, 0.3, 1);

  --tr-shadow-sm:   0 1px 3px rgba(15, 14, 13, 0.07);
  --tr-shadow-md:   0 4px 14px rgba(15, 14, 13, 0.09);
  --tr-shadow-lg:   0 12px 40px rgba(15, 14, 13, 0.13);

  /* Status colours */
  --tr-completed:   #2d7a2d;
  --tr-completed-bg:#e8f5e8;
  --tr-active:      var(--teal, #00b4c8);
  --tr-active-bg:   rgba(0, 180, 200, 0.08);
  --tr-upcoming:    #8a8681;
  --tr-upcoming-bg: rgba(138, 134, 129, 0.08);
  --tr-warn:        #c47b1a;
  --tr-warn-bg:     rgba(196, 123, 26, 0.09);
}

/* ─── SECTION TOGGLE CONTROLS ───────────────────────────── */
.tracker-tab-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.25rem;
  background: rgba(15, 14, 13, 0.04);
  border: 1px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-lg);
  width: fit-content;
}

.tracker-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: calc(var(--tr-radius-lg) - 2px);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted, #888);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--tr-transition), background var(--tr-transition);
  white-space: nowrap;
}

.tracker-tab-btn svg {
  flex-shrink: 0;
  transition: color var(--tr-transition);
}

.tracker-tab-btn:hover {
  color: var(--dark, #0f0e0d);
  background: rgba(15, 14, 13, 0.04);
}

.tracker-tab-btn.active {
  background: var(--white, #fff);
  color: var(--dark, #0f0e0d);
  box-shadow: var(--tr-shadow-sm);
}

.tracker-tab-btn.active svg {
  color: var(--teal, #00b4c8);
}

/* Portal lock icon badge on the button */
.tracker-tab-btn .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--teal, #00b4c8);
  color: #fff;
  border-radius: var(--tr-radius-full);
  font-size: 0.6rem;
  font-weight: 700;
  margin-left: 0.15rem;
}

/* ─── VIEW CONTAINERS ────────────────────────────────────── */
.tracker-view {
  display: none;
  animation: trackerFadeIn 0.28s ease forwards;
}

.tracker-view.active {
  display: block;
}

@keyframes trackerFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── CLIENT ACCESS PANEL (LOGIN) ───────────────────────── */
.tracker-access-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 3rem 2rem;
}

.tracker-access-card {
  width: 100%;
  max-width: 440px;
  background: var(--white, #fff);
  border: 1px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-xl);
  padding: 2.5rem;
  box-shadow: var(--tr-shadow-md);
  text-align: center;
}

.tracker-access-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--teal, #00b4c8), #0099aa);
  border-radius: var(--tr-radius-lg);
  margin: 0 auto 1.5rem;
  color: #fff;
}

.tracker-access-title {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.tracker-access-sub {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.83rem;
  color: var(--muted, #888);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.tracker-access-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.tracker-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tracker-input-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #888);
}

.tracker-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.9rem;
  color: var(--dark, #0f0e0d);
  background: var(--ivory, #fafaf9);
  transition: border-color var(--tr-transition), box-shadow var(--tr-transition);
  outline: none;
}

.tracker-input:focus {
  border-color: var(--teal, #00b4c8);
  box-shadow: 0 0 0 3px rgba(0, 180, 200, 0.12);
}

.tracker-input.error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.tracker-input-error {
  font-size: 0.78rem;
  color: #c0392b;
  font-family: var(--sans, 'Inter', sans-serif);
  display: none;
}

.tracker-input-error.visible {
  display: block;
}

.tracker-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: var(--dark, #0f0e0d);
  color: #fff;
  border: none;
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--tr-transition), transform var(--tr-transition), box-shadow var(--tr-transition);
  margin-top: 0.25rem;
}

.tracker-login-btn:hover {
  background: #1e1d1c;
  box-shadow: var(--tr-shadow-md);
  transform: translateY(-1px);
}

.tracker-login-btn:active {
  transform: translateY(0);
}

.tracker-login-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.tracker-login-btn .btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: trackerSpin 0.65s linear infinite;
  display: none;
}

.tracker-login-btn.loading .btn-spinner {
  display: inline-block;
}

.tracker-login-btn.loading .btn-label {
  display: none;
}

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

.tracker-demo-hint {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--tr-active-bg);
  border: 1px solid rgba(0, 180, 200, 0.2);
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  color: var(--muted, #888);
  text-align: center;
}

.tracker-demo-hint strong {
  color: var(--teal, #00b4c8);
  font-weight: 600;
}

.tracker-access-disclaimer {
  margin-top: 1.5rem;
  padding: 0 0.25rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: var(--muted, #888);
  line-height: 1.55;
  text-align: center;
}

/* ─── DASHBOARD HEADER ───────────────────────────────────── */
.tracker-dashboard {
  display: none;
}

.tracker-dashboard.visible {
  display: block;
  animation: trackerFadeIn 0.3s ease forwards;
}

.tracker-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light, #e2e0db);
  flex-wrap: wrap;
}

.tracker-dash-greeting {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  line-height: 1.2;
}

.tracker-dash-greeting span {
  color: var(--teal, #00b4c8);
}

.tracker-dash-meta {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  color: var(--muted, #888);
  margin-top: 0.2rem;
}

.tracker-dash-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tracker-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted, #888);
  background: transparent;
  cursor: pointer;
  transition: color var(--tr-transition), border-color var(--tr-transition), background var(--tr-transition);
}

.tracker-logout-btn:hover {
  color: var(--dark, #0f0e0d);
  border-color: var(--dark, #0f0e0d);
  background: rgba(15, 14, 13, 0.03);
}

/* ─── CASE CARDS GRID ────────────────────────────────────── */
.tracker-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tracker-case-card {
  background: var(--white, #fff);
  border: 1.5px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-xl);
  padding: 1.5rem;
  cursor: pointer;
  transition:
    border-color var(--tr-transition),
    box-shadow var(--tr-transition),
    transform var(--tr-transition);
  position: relative;
  overflow: hidden;
}

.tracker-case-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal, #00b4c8), #0099aa);
  opacity: 0;
  transition: opacity var(--tr-transition);
}

.tracker-case-card:hover {
  border-color: var(--teal, #00b4c8);
  box-shadow: var(--tr-shadow-md);
  transform: translateY(-2px);
}

.tracker-case-card:hover::before {
  opacity: 1;
}

.tracker-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tracker-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--tr-radius-md);
  flex-shrink: 0;
  color: #fff;
}

.tracker-card-icon.business { background: linear-gradient(135deg, #1a6b8a, #0d4f6b); }
.tracker-card-icon.estate   { background: linear-gradient(135deg, #2d7a2d, #1a5c1a); }
.tracker-card-icon.injury   { background: linear-gradient(135deg, #8a4a1a, #6b3310); }

.tracker-case-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: var(--tr-radius-full);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.tracker-case-status-badge.active {
  background: var(--tr-active-bg);
  color: #007a8c;
  border: 1px solid rgba(0, 180, 200, 0.25);
}

.tracker-case-status-badge.active::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--teal, #00b4c8);
  border-radius: 50%;
  animation: trackerPulse 1.8s ease-in-out infinite;
}

.tracker-case-status-badge.review {
  background: var(--tr-warn-bg);
  color: var(--tr-warn);
  border: 1px solid rgba(196, 123, 26, 0.2);
}

.tracker-case-status-badge.closing {
  background: var(--tr-completed-bg);
  color: var(--tr-completed);
  border: 1px solid rgba(45, 122, 45, 0.2);
}

@keyframes trackerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.85); }
}

.tracker-card-matter {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

.tracker-card-phase {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  color: var(--muted, #888);
  margin-bottom: 1rem;
}

.tracker-card-phase strong {
  color: var(--teal, #00b4c8);
  font-weight: 600;
}

/* Progress bar */
.tracker-progress-wrap {
  margin-bottom: 1rem;
}

.tracker-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.tracker-progress-text {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tracker-progress-pct {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
}

.tracker-progress-bar {
  height: 6px;
  background: rgba(15, 14, 13, 0.07);
  border-radius: var(--tr-radius-full);
  overflow: hidden;
}

.tracker-progress-fill {
  height: 100%;
  border-radius: var(--tr-radius-full);
  background: linear-gradient(90deg, var(--teal, #00b4c8), #0099aa);
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.tracker-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light, #e2e0db);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tracker-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: var(--muted, #888);
}

.tracker-card-meta-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.tracker-card-arrow {
  display: flex;
  align-items: center;
  color: var(--teal, #00b4c8);
  opacity: 0;
  transition: opacity var(--tr-transition), transform var(--tr-transition);
}

.tracker-case-card:hover .tracker-card-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ─── EMPTY STATE ────────────────────────────────────────── */
.tracker-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  border: 1.5px dashed var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-xl);
}

.tracker-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: rgba(0, 180, 200, 0.07);
  border-radius: var(--tr-radius-xl);
  color: var(--teal, #00b4c8);
  margin-bottom: 1.25rem;
}

.tracker-empty-title {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  margin-bottom: 0.5rem;
}

.tracker-empty-desc {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.83rem;
  color: var(--muted, #888);
  line-height: 1.6;
  max-width: 40ch;
}

/* ─── CASE DETAIL VIEW ───────────────────────────────────── */
.tracker-detail-view {
  display: none;
}

.tracker-detail-view.visible {
  display: block;
  animation: trackerFadeIn 0.28s ease forwards;
}

.tracker-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.tracker-back-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted, #888);
  background: transparent;
  cursor: pointer;
  transition: color var(--tr-transition), border-color var(--tr-transition);
}

.tracker-back-btn:hover {
  color: var(--dark, #0f0e0d);
  border-color: var(--dark, #0f0e0d);
}

.tracker-detail-title-block {
  flex: 1;
}

.tracker-detail-matter {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  line-height: 1.2;
}

.tracker-detail-matter-sub {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  color: var(--muted, #888);
  margin-top: 0.2rem;
}

/* Detail layout: two columns - main + sidebar */
.tracker-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

.tracker-detail-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tracker-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 1.5rem;
}

/* Panel cards inside detail */
.tracker-panel {
  background: var(--white, #fff);
  border: 1.5px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-xl);
  overflow: hidden;
}

.tracker-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light, #e2e0db);
  background: rgba(15, 14, 13, 0.015);
}

.tracker-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark, #0f0e0d);
}

.tracker-panel-title svg {
  color: var(--teal, #00b4c8);
}

.tracker-panel-body {
  padding: 1.25rem;
}

/* ─── TIMELINE / STEPPER ─────────────────────────────────── */
.tracker-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0.25rem;
}

.tracker-timeline-step {
  display: flex;
  gap: 1rem;
  position: relative;
}

/* Connector line */
.tracker-timeline-step:not(:last-child) .tracker-step-connector {
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border-light, #e2e0db);
}

.tracker-timeline-step.completed:not(:last-child) .tracker-step-connector {
  background: var(--tr-completed);
}

.tracker-timeline-step.active-step:not(:last-child) .tracker-step-connector {
  background: linear-gradient(
    to bottom,
    var(--teal, #00b4c8) 0%,
    var(--border-light, #e2e0db) 100%
  );
}

/* Step indicator dot */
.tracker-step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--border-light, #e2e0db);
  background: var(--white, #fff);
  color: var(--muted, #888);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 1;
  position: relative;
  transition: border-color var(--tr-transition), background var(--tr-transition), color var(--tr-transition);
}

.tracker-timeline-step.completed .tracker-step-dot {
  background: var(--tr-completed);
  border-color: var(--tr-completed);
  color: #fff;
}

.tracker-timeline-step.active-step .tracker-step-dot {
  background: var(--teal, #00b4c8);
  border-color: var(--teal, #00b4c8);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 180, 200, 0.18);
  animation: trackerStepPulse 2.2s ease-in-out infinite;
}

@keyframes trackerStepPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0, 180, 200, 0.18); }
  50%       { box-shadow: 0 0 0 7px rgba(0, 180, 200, 0.08); }
}

.tracker-timeline-step.upcoming .tracker-step-dot {
  background: var(--ivory, #fafaf9);
  border-color: rgba(15, 14, 13, 0.12);
  color: var(--muted, #888);
}

/* Step content */
.tracker-step-content {
  padding: 0.2rem 0 1.5rem;
  flex: 1;
  min-width: 0;
}

.tracker-step-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.tracker-step-title {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark, #0f0e0d);
  flex: 1;
}

.tracker-timeline-step.upcoming .tracker-step-title {
  color: var(--muted, #888);
}

.tracker-step-handler-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--tr-radius-full);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.tracker-step-handler-badge.ai {
  background: rgba(0, 180, 200, 0.1);
  color: #007a8c;
  border: 1px solid rgba(0, 180, 200, 0.2);
}

.tracker-step-handler-badge.attorney {
  background: rgba(15, 14, 13, 0.07);
  color: var(--dark, #0f0e0d);
  border: 1px solid rgba(15, 14, 13, 0.12);
}

.tracker-step-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.tracker-step-date {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: var(--muted, #888);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tracker-step-date.estimated {
  font-style: italic;
  opacity: 0.7;
}

.tracker-step-desc {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  color: var(--muted, #888);
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.tracker-timeline-step.upcoming .tracker-step-desc {
  opacity: 0.65;
}

.tracker-step-note {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 180, 200, 0.05);
  border-left: 3px solid var(--teal, #00b4c8);
  border-radius: 0 var(--tr-radius-sm) var(--tr-radius-sm) 0;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.77rem;
  color: var(--dark, #0f0e0d);
  line-height: 1.5;
  margin-top: 0.4rem;
}

/* ─── DOCUMENT UPLOAD DROPZONE ───────────────────────────── */
.tracker-dropzone {
  border: 2px dashed var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-lg);
  padding: 1.75rem;
  text-align: center;
  background: rgba(15, 14, 13, 0.015);
  transition:
    border-color var(--tr-transition),
    background var(--tr-transition);
  cursor: pointer;
  position: relative;
}

.tracker-dropzone:hover,
.tracker-dropzone.drag-over {
  border-color: var(--teal, #00b4c8);
  background: rgba(0, 180, 200, 0.04);
}

.tracker-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.tracker-dropzone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(0, 180, 200, 0.08);
  border-radius: var(--tr-radius-md);
  color: var(--teal, #00b4c8);
  margin: 0 auto 0.75rem;
}

.tracker-dropzone-title {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark, #0f0e0d);
  margin-bottom: 0.25rem;
}

.tracker-dropzone-sub {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: var(--muted, #888);
}

.tracker-dropzone-sub strong {
  color: var(--teal, #00b4c8);
  cursor: pointer;
}

/* Uploaded files list */
.tracker-uploaded-files {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tracker-file-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: var(--white, #fff);
  border: 1px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  color: var(--dark, #0f0e0d);
  animation: trackerFadeIn 0.2s ease forwards;
}

.tracker-file-icon {
  color: var(--teal, #00b4c8);
  flex-shrink: 0;
}

.tracker-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracker-file-size {
  font-size: 0.7rem;
  color: var(--muted, #888);
  white-space: nowrap;
}

/* ─── MESSAGES/NOTES SECTION ─────────────────────────────── */
.tracker-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.tracker-note-item {
  display: flex;
  gap: 0.75rem;
}

.tracker-note-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.tracker-note-avatar.attorney { background: linear-gradient(135deg, var(--dark, #0f0e0d), #2e2d2c); }
.tracker-note-avatar.ai       { background: linear-gradient(135deg, var(--teal, #00b4c8), #0099aa); }
.tracker-note-avatar.client   { background: linear-gradient(135deg, #6b7280, #4b5563); }

.tracker-note-bubble {
  flex: 1;
  min-width: 0;
}

.tracker-note-bubble-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.tracker-note-author {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark, #0f0e0d);
}

.tracker-note-time {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  color: var(--muted, #888);
}

.tracker-note-text {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  color: var(--dark, #0f0e0d);
  line-height: 1.55;
  background: rgba(15, 14, 13, 0.03);
  border: 1px solid var(--border-light, #e2e0db);
  border-radius: 0 var(--tr-radius-md) var(--tr-radius-md) var(--tr-radius-md);
  padding: 0.65rem 0.85rem;
}

/* Note input */
.tracker-note-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tracker-note-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.83rem;
  color: var(--dark, #0f0e0d);
  background: var(--white, #fff);
  outline: none;
  transition: border-color var(--tr-transition), box-shadow var(--tr-transition);
  resize: none;
  min-height: 42px;
  max-height: 120px;
}

.tracker-note-input:focus {
  border-color: var(--teal, #00b4c8);
  box-shadow: 0 0 0 3px rgba(0, 180, 200, 0.1);
}

.tracker-note-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  background: var(--teal, #00b4c8);
  color: #fff;
  border: none;
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--tr-transition), transform var(--tr-transition);
  white-space: nowrap;
}

.tracker-note-submit:hover {
  background: #009ab2;
  transform: translateY(-1px);
}

/* ─── SIDEBAR PANELS ─────────────────────────────────────── */

/* Progress summary */
.tracker-progress-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
}

.tracker-progress-ring-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.tracker-progress-ring {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.tracker-progress-ring svg {
  transform: rotate(-90deg);
}

.tracker-progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--dark, #0f0e0d);
}

.tracker-progress-info {
  flex: 1;
}

.tracker-progress-status-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark, #0f0e0d);
  margin-bottom: 0.2rem;
}

.tracker-progress-est {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: var(--muted, #888);
}

/* Key dates */
.tracker-key-dates {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tracker-date-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light, #e2e0db);
}

.tracker-date-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tracker-date-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--tr-radius-sm);
  flex-shrink: 0;
}

.tracker-date-icon-wrap.deadline { background: rgba(196, 123, 26, 0.1); color: var(--tr-warn); }
.tracker-date-icon-wrap.hearing  { background: rgba(26, 107, 138, 0.1); color: #1a6b8a; }
.tracker-date-icon-wrap.meeting  { background: rgba(0, 180, 200, 0.1);  color: var(--teal, #00b4c8); }
.tracker-date-icon-wrap.target   { background: rgba(45, 122, 45, 0.1);  color: var(--tr-completed); }

.tracker-date-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #888);
  margin-bottom: 0.1rem;
}

.tracker-date-value {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark, #0f0e0d);
}

.tracker-date-note {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  color: var(--muted, #888);
}

/* Case info panel */
.tracker-case-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tracker-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light, #e2e0db);
}

.tracker-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tracker-info-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tracker-info-value {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark, #0f0e0d);
  text-align: right;
}

/* ─── NOTIFICATION TOAST ─────────────────────────────────── */
#trackerToastContainer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.tracker-toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  background: var(--dark, #0f0e0d);
  color: #fff;
  border-radius: var(--tr-radius-lg);
  box-shadow: var(--tr-shadow-lg);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  pointer-events: auto;
  animation: trackerToastIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.tracker-toast.hiding {
  animation: trackerToastOut 0.24s ease forwards;
}

.tracker-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tracker-toast.success .tracker-toast-icon { background: rgba(45, 122, 45, 0.35); color: #6fce6f; }
.tracker-toast.info    .tracker-toast-icon { background: rgba(0, 180, 200, 0.25); color: var(--teal, #00b4c8); }
.tracker-toast.warn    .tracker-toast-icon { background: rgba(196, 123, 26, 0.3); color: #f0a442; }
.tracker-toast.error   .tracker-toast-icon { background: rgba(192, 57, 43, 0.3);  color: #f08070; }

.tracker-toast-message {
  flex: 1;
  line-height: 1.4;
}

@keyframes trackerToastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes trackerToastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ─── DISCLAIMER STRIP ───────────────────────────────────── */
.tracker-disclaimer-strip {
  margin-top: 1.5rem;
  padding: 0.85rem 1.1rem;
  background: rgba(15, 14, 13, 0.03);
  border: 1px solid var(--border-light, #e2e0db);
  border-radius: var(--tr-radius-md);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: var(--muted, #888);
  line-height: 1.6;
  display: flex;
  gap: 0.5rem;
}

.tracker-disclaimer-strip svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--muted, #888);
  opacity: 0.6;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .tracker-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tracker-detail-layout {
    grid-template-columns: 1fr;
  }

  .tracker-detail-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 600px) {
  .tracker-tab-bar {
    width: 100%;
    justify-content: stretch;
  }

  .tracker-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
  }

  .tracker-cases-grid {
    grid-template-columns: 1fr;
  }

  .tracker-access-card {
    padding: 1.75rem 1.25rem;
  }

  .tracker-dash-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tracker-detail-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .tracker-detail-matter {
    font-size: 1.15rem;
  }

  .tracker-note-form {
    flex-direction: column;
  }

  .tracker-note-submit {
    align-self: flex-end;
  }

  #trackerToastContainer {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .tracker-toast {
    max-width: 100%;
  }
}

/* ─── PRINT SAFETY ───────────────────────────────────────── */
@media print {
  .tracker-tab-bar,
  .tracker-logout-btn,
  .tracker-back-btn,
  .tracker-dropzone,
  .tracker-note-form,
  #trackerToastContainer {
    display: none !important;
  }
}


/* ====== demand-health-css.css ====== */
/* ==========================================================================
   Phase 3.1 + 3.2 - Demand Letter Generator & Legal Health Check
   Harlan Intelligence™ - The Berhe Law Firm, APC
   Uses existing CSS variables: --ivory, --dark, --dark-900, --dark-800,
   --muted, --teal, --teal-dim, --serif, --sans, --border-light, --border-dark
   ========================================================================== */


/* ==========================================================================
   SHARED: STEP WIZARD INFRASTRUCTURE
   ========================================================================== */

/* Step indicator bar at the top of any wizard */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  position: relative;
}

.wizard-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

/* Connector line between steps */
.wizard-step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 16px);
  width: calc(100% + 8px);
  height: 2px;
  background: var(--border-dark, rgba(255,255,255,0.12));
  z-index: 0;
}

.wizard-step-item.completed:not(:last-child)::after {
  background: var(--teal, #00b4c8);
}

.wizard-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 2px solid var(--border-dark, rgba(255,255,255,0.15));
  background: transparent;
  color: var(--muted, rgba(255,255,255,0.4));
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

/* Dark-bg wizard dots */
.dark-bg .wizard-step-dot {
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.35);
}

/* Light-bg wizard dots */
.ivory-bg .wizard-step-dot {
  border-color: rgba(15,14,13,0.18);
  color: rgba(15,14,13,0.35);
}

.wizard-step-item.active .wizard-step-dot {
  border-color: var(--teal, #00b4c8);
  background: var(--teal, #00b4c8);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0,180,200,0.18);
}

.wizard-step-item.completed .wizard-step-dot {
  border-color: var(--teal, #00b4c8);
  background: transparent;
  color: var(--teal, #00b4c8);
}

.wizard-step-item.completed .wizard-step-dot::before {
  content: '✓';
  font-size: 0.8rem;
  font-weight: 700;
}

.wizard-step-item.completed .wizard-step-dot span {
  display: none;
}

.wizard-step-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}

.dark-bg .wizard-step-label {
  color: rgba(255,255,255,0.35);
}

.ivory-bg .wizard-step-label {
  color: rgba(15,14,13,0.4);
}

.wizard-step-item.active .wizard-step-label {
  color: var(--teal, #00b4c8);
}

.wizard-step-item.completed .wizard-step-label {
  color: var(--teal, #00b4c8);
  opacity: 0.7;
}

/* Spacing between step items */
.wizard-steps .wizard-step-item {
  flex: 1;
  min-width: 70px;
  max-width: 120px;
}

/* Wizard panel - the content card for each step */
.wizard-panel {
  display: none;
  animation: wiz-fade-in 0.35s ease forwards;
}

.wizard-panel.active {
  display: block;
}

@keyframes wiz-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nav buttons row */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.wizard-nav .btn-back {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.65rem 1.4rem;
  border-radius: 4px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.dark-bg .wizard-nav .btn-back {
  color: rgba(255,255,255,0.55);
  border-color: rgba(255,255,255,0.18);
}

.dark-bg .wizard-nav .btn-back:hover {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.38);
}

.ivory-bg .wizard-nav .btn-back {
  color: rgba(15,14,13,0.5);
  border-color: rgba(15,14,13,0.2);
}

.ivory-bg .wizard-nav .btn-back:hover {
  color: rgba(15,14,13,0.8);
  border-color: rgba(15,14,13,0.4);
}

/* Validation error */
.wizard-error {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  color: #e85d5d;
  margin-top: 0.5rem;
  display: none;
}

.wizard-error.visible {
  display: block;
  animation: wiz-fade-in 0.2s ease;
}


/* ==========================================================================
   PHASE 3.1 - DEMAND LETTER GENERATOR (Tool 07)
   Dark-bg section
   ========================================================================== */

/* Situation type grid - Step 1 */
.demand-situation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.demand-situation-card {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.22s ease;
  background: rgba(255,255,255,0.03);
  position: relative;
}

.demand-situation-card:hover {
  border-color: rgba(0,180,200,0.4);
  background: rgba(0,180,200,0.05);
}

.demand-situation-card.selected {
  border-color: var(--teal, #00b4c8);
  background: rgba(0,180,200,0.09);
}

.demand-situation-card.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  font-size: 0.7rem;
  color: var(--teal, #00b4c8);
  font-weight: 700;
}

.demand-situation-icon {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
  display: block;
}

.demand-situation-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.88);
}

.demand-situation-sublabel {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Form fields - Steps 2-4 */
.demand-field-group {
  margin-bottom: 1.25rem;
}

.demand-field-label {
  display: block;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.5rem;
}

.demand-field-input,
.demand-field-textarea,
.demand-field-select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  color: rgba(255,255,255,0.9);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
}

.demand-field-input:focus,
.demand-field-textarea:focus,
.demand-field-select:focus {
  border-color: var(--teal, #00b4c8);
  background: rgba(0,180,200,0.04);
}

.demand-field-input::placeholder,
.demand-field-textarea::placeholder {
  color: rgba(255,255,255,0.22);
}

.demand-field-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.demand-field-select option {
  background: #1a1917;
  color: #fff;
}

.demand-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .demand-field-row {
    grid-template-columns: 1fr;
  }
}

.demand-field-hint {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* Outcome options - Step 4 */
.demand-outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.demand-outcome-chip {
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  text-align: center;
}

.demand-outcome-chip:hover {
  border-color: rgba(0,180,200,0.4);
  color: rgba(255,255,255,0.88);
}

.demand-outcome-chip.selected {
  border-color: var(--teal, #00b4c8);
  color: var(--teal, #00b4c8);
  background: rgba(0,180,200,0.07);
}

/* Amount input row */
.demand-amount-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.demand-amount-prefix {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.demand-amount-input {
  width: 160px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  color: rgba(255,255,255,0.9);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease;
  outline: none;
}

.demand-amount-input:focus {
  border-color: var(--teal, #00b4c8);
}

.demand-amount-input::placeholder {
  color: rgba(255,255,255,0.2);
}


/* ==========================================================================
   AI DRAFTING ANIMATION - Step 5 loader
   ========================================================================== */

.demand-drafting-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 2rem;
  text-align: center;
  gap: 1.5rem;
}

.demand-drafting-icon {
  width: 56px;
  height: 56px;
  position: relative;
}

/* Rotating ring */
.demand-drafting-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(0,180,200,0.15);
  border-top-color: var(--teal, #00b4c8);
  animation: draft-spin 0.9s linear infinite;
}

/* Inner pulse */
.demand-drafting-icon::after {
  content: '✍';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  animation: draft-pulse 1.4s ease-in-out infinite;
}

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

@keyframes draft-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.92); }
  50%       { opacity: 1;   transform: scale(1.08); }
}

.demand-drafting-title {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  font-weight: 700;
}

.demand-drafting-status {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
  min-height: 1.2em;
  transition: opacity 0.3s ease;
}

/* Animated typing dots */
.drafting-dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

.drafting-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal, #00b4c8);
  animation: dot-bounce 1.2s ease-in-out infinite;
}

.drafting-dots span:nth-child(2) { animation-delay: 0.2s; }
.drafting-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-5px); opacity: 1; }
}

/* Progress bar beneath the icon */
.demand-drafting-progress {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.demand-drafting-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal, #00b4c8) 0%, rgba(0,180,200,0.5) 100%);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}


/* ==========================================================================
   LETTER PREVIEW PANEL - firm letterhead styling
   ========================================================================== */

.demand-letter-wrapper {
  animation: wiz-fade-in 0.5s ease;
}

.demand-letter-preview {
  background: #fff;
  color: #1a1a1a;
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}

.demand-letter-preview::-webkit-scrollbar {
  width: 4px;
}
.demand-letter-preview::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 2px;
}

/* Firm letterhead strip at top of paper */
.letter-header {
  background: #0f0e0d;
  padding: 1.5rem 2.5rem 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.letter-firm-name {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.letter-firm-tagline {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 0.2rem;
}

.letter-firm-contact {
  text-align: right;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
}

.letter-firm-contact strong {
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* Teal accent bar below header */
.letter-header-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--teal, #00b4c8) 0%, transparent 100%);
}

/* Letter body - actual paper */
.letter-body {
  padding: 2rem 2.5rem 2.5rem;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.875rem;
  line-height: 1.8;
  color: #1a1a1a;
}

.letter-body p {
  margin: 0 0 1rem;
}

.letter-meta {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  color: #444;
  margin-bottom: 1.75rem;
}

.letter-meta .letter-date {
  margin-bottom: 1rem;
  color: #555;
}

.letter-meta .letter-recipient-block {
  line-height: 1.5;
}

.letter-re-line {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
  color: #111;
}

.letter-section-heading {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555;
  margin: 1.5rem 0 0.5rem;
}

.letter-closing {
  margin-top: 1.75rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
}

.letter-sig-name {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1rem;
  font-style: italic;
  color: #111;
  margin: 0.5rem 0 0.1rem;
}

.letter-sig-title {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: #555;
  letter-spacing: 0.04em;
}

/* EDIT mode - editable content */
.demand-letter-preview.edit-mode .letter-body {
  outline: none;
}

.demand-letter-preview.edit-mode {
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 2px var(--teal, #00b4c8), 0 2px 8px rgba(0,0,0,0.3);
}

/* Edit-mode banner */
.letter-edit-banner {
  display: none;
  background: rgba(0,180,200,0.12);
  border: 1px solid rgba(0,180,200,0.3);
  border-radius: 5px;
  padding: 0.65rem 1rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  color: var(--teal, #00b4c8);
  margin-bottom: 1rem;
  align-items: center;
  gap: 0.5rem;
}

.letter-edit-banner.visible {
  display: flex;
}

.letter-edit-banner::before {
  content: '✏️';
  font-size: 0.9rem;
}

/* Action bar below the preview */
.demand-letter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.demand-letter-action-group {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-letter-edit {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-letter-edit:hover {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.9);
}

.btn-letter-edit.active {
  border-color: var(--teal, #00b4c8);
  color: var(--teal, #00b4c8);
  background: rgba(0,180,200,0.07);
}

/* Pricing + CTA panel - Step 5 final state */
.demand-pricing-panel {
  background: rgba(0,180,200,0.06);
  border: 1px solid rgba(0,180,200,0.2);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.demand-pricing-left {}

.demand-pricing-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.35rem;
}

.demand-pricing-range {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.demand-pricing-note {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-top: 0.3rem;
}

.demand-pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.demand-pricing-features li {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demand-pricing-features li::before {
  content: '✓';
  color: var(--teal, #00b4c8);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Disclaimer block */
.demand-disclaimer {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid rgba(255,255,255,0.12);
  border-radius: 0 4px 4px 0;
}

.demand-disclaimer p {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.32);
  line-height: 1.7;
  margin: 0;
}

.demand-disclaimer strong {
  font-weight: 600;
  color: rgba(255,255,255,0.45);
}


/* ==========================================================================
   PHASE 3.2 - LEGAL HEALTH CHECK (Tool 08)
   Ivory-bg section
   ========================================================================== */

/* Progress bar at the top */
.health-progress-bar-wrap {
  margin-bottom: 2.5rem;
}

.health-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.health-progress-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(15,14,13,0.4);
}

.health-progress-fraction {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(15,14,13,0.55);
}

.health-progress-track {
  height: 4px;
  background: rgba(15,14,13,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.health-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal, #00b4c8) 0%, #00d4e8 100%);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Category label above each question */
.health-category-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal, #00b4c8);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.health-category-label::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--teal, #00b4c8);
  border-radius: 1px;
}

/* Question card */
.health-question-card {
  background: #fff;
  border: 1px solid rgba(15,14,13,0.08);
  border-radius: 10px;
  padding: 2rem 2.25rem;
  box-shadow: 0 2px 12px rgba(15,14,13,0.06), 0 0 0 0 transparent;
  position: relative;
  transition: box-shadow 0.25s ease;
  animation: wiz-fade-in 0.35s ease;
}

.health-question-card:hover {
  box-shadow: 0 4px 20px rgba(15,14,13,0.1);
}

.health-question-number {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(15,14,13,0.3);
  margin-bottom: 0.75rem;
}

.health-question-text {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  line-height: 1.4;
  margin-bottom: 1.75rem;
}

/* Yes / Not Sure / No answer buttons */
.health-answer-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.health-answer-btn {
  flex: 1;
  min-width: 90px;
  padding: 0.85rem 1rem;
  border-radius: 7px;
  border: 1.5px solid rgba(15,14,13,0.12);
  background: transparent;
  cursor: pointer;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(15,14,13,0.65);
  transition: all 0.22s ease;
  text-align: center;
  position: relative;
}

.health-answer-btn:hover {
  border-color: rgba(15,14,13,0.3);
  color: var(--dark, #0f0e0d);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15,14,13,0.08);
}

/* Yes = teal */
.health-answer-btn[data-value="yes"]:hover,
.health-answer-btn[data-value="yes"].selected {
  border-color: var(--teal, #00b4c8);
  color: var(--teal, #00b4c8);
  background: rgba(0,180,200,0.07);
}

/* Not Sure = amber */
.health-answer-btn[data-value="not_sure"]:hover,
.health-answer-btn[data-value="not_sure"].selected {
  border-color: #d4a017;
  color: #a07800;
  background: rgba(212,160,23,0.07);
}

/* No = red */
.health-answer-btn[data-value="no"]:hover,
.health-answer-btn[data-value="no"].selected {
  border-color: #e05c5c;
  color: #c03a3a;
  background: rgba(224,92,92,0.07);
}

.health-answer-btn.selected {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15,14,13,0.08);
}

/* Skip link */
.health-skip-link {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: rgba(15,14,13,0.3);
  text-decoration: underline;
  text-decoration-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  margin-top: 1.25rem;
  display: block;
}

.health-skip-link:hover {
  color: rgba(15,14,13,0.55);
  text-decoration-color: rgba(15,14,13,0.25);
}

/* Generating score overlay */
.health-generating-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 2rem;
  text-align: center;
  gap: 1.25rem;
}

.health-generating-title {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
}

.health-generating-subtitle {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  color: rgba(15,14,13,0.45);
  min-height: 1.2em;
}

.health-gen-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(0,180,200,0.15);
  border-top-color: var(--teal, #00b4c8);
  animation: draft-spin 0.85s linear infinite;
}

.health-gen-progress {
  width: 240px;
  height: 3px;
  background: rgba(15,14,13,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.health-gen-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal, #00b4c8), #00d4e8);
  border-radius: 2px;
  transition: width 0.5s ease;
  width: 0%;
}


/* ==========================================================================
   HEALTH SCORE RESULTS - circular gauge, categories, benchmarks
   ========================================================================== */

.health-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 760px) {
  .health-results-grid {
    grid-template-columns: 1fr;
  }
}

/* Overall score card with circular gauge */
.health-score-card {
  background: #fff;
  border: 1px solid rgba(15,14,13,0.08);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(15,14,13,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}

.health-gauge-wrap {
  position: relative;
  width: 140px;
  height: 140px;
}

.health-gauge-svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.health-gauge-bg {
  fill: none;
  stroke: rgba(15,14,13,0.07);
  stroke-width: 10;
}

.health-gauge-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1),
              stroke 0.5s ease;
  /* circumference of r=55 = 2π*55 ≈ 345.6 */
  stroke-dasharray: 345.6;
  stroke-dashoffset: 345.6; /* starts empty */
}

/* Color states for gauge fill */
.health-gauge-fill.score-red    { stroke: #e05c5c; }
.health-gauge-fill.score-yellow { stroke: #d4a017; }
.health-gauge-fill.score-green  { stroke: var(--teal, #00b4c8); }

.health-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.health-gauge-number {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  line-height: 1;
  transition: color 0.5s ease;
}

.health-gauge-number.score-red    { color: #c03a3a; }
.health-gauge-number.score-yellow { color: #a07800; }
.health-gauge-number.score-green  { color: var(--teal, #00b4c8); }

.health-gauge-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(15,14,13,0.35);
  margin-top: 1px;
}

.health-score-title {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
}

.health-score-grade {
  display: inline-block;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1.5px solid;
}

.health-score-grade.score-red {
  color: #c03a3a;
  border-color: #e05c5c;
  background: rgba(224,92,92,0.07);
}

.health-score-grade.score-yellow {
  color: #a07800;
  border-color: #d4a017;
  background: rgba(212,160,23,0.07);
}

.health-score-grade.score-green {
  color: #007a6e;
  border-color: var(--teal, #00b4c8);
  background: rgba(0,180,200,0.07);
}

/* Category scores card */
.health-categories-card {
  background: #fff;
  border: 1px solid rgba(15,14,13,0.08);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 12px rgba(15,14,13,0.06);
}

.health-categories-title {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(15,14,13,0.4);
  margin-bottom: 1.25rem;
}

.health-category-item {
  margin-bottom: 1.1rem;
}

.health-category-item:last-child {
  margin-bottom: 0;
}

.health-category-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}

.health-category-name {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(15,14,13,0.75);
}

.health-category-score {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(15,14,13,0.55);
}

.health-category-bar-track {
  height: 5px;
  background: rgba(15,14,13,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.health-category-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
}

.health-category-bar-fill.score-red    { background: #e05c5c; }
.health-category-bar-fill.score-yellow { background: #d4a017; }
.health-category-bar-fill.score-green  { background: var(--teal, #00b4c8); }

/* Benchmark comparison card */
.health-benchmark-card {
  background: #fff;
  border: 1px solid rgba(15,14,13,0.08);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 12px rgba(15,14,13,0.06);
  margin-bottom: 1.5rem;
}

.health-benchmark-title {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(15,14,13,0.4);
  margin-bottom: 1.25rem;
}

.health-benchmark-item {
  margin-bottom: 1.1rem;
}

.health-benchmark-item:last-child {
  margin-bottom: 0;
}

.health-benchmark-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.health-benchmark-category {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(15,14,13,0.65);
}

.health-benchmark-scores {
  display: flex;
  gap: 1rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
}

.health-benchmark-you {
  color: var(--teal, #00b4c8);
}

.health-benchmark-avg {
  color: rgba(15,14,13,0.35);
}

/* Dual bar track for benchmark */
.health-benchmark-dual {
  position: relative;
  height: 8px;
  background: rgba(15,14,13,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.health-benchmark-bar-avg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(15,14,13,0.14);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
}

.health-benchmark-bar-you {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--teal, #00b4c8);
  border-radius: 4px;
  transition: width 0.8s 0.15s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
  opacity: 0.85;
}

.health-benchmark-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
}

.health-benchmark-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  color: rgba(15,14,13,0.45);
}

.health-benchmark-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.health-benchmark-legend-dot.you { background: var(--teal, #00b4c8); }
.health-benchmark-legend-dot.avg { background: rgba(15,14,13,0.2); }

/* Priority action items */
.health-actions-card {
  background: #fff;
  border: 1px solid rgba(15,14,13,0.08);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 12px rgba(15,14,13,0.06);
  margin-bottom: 1.5rem;
}

.health-actions-title {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(15,14,13,0.4);
  margin-bottom: 1.25rem;
}

.health-action-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(15,14,13,0.06);
  align-items: flex-start;
  animation: wiz-fade-in 0.4s ease both;
}

.health-action-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.health-action-left {
  flex-shrink: 0;
  padding-top: 2px;
}

/* Severity badges */
.health-severity-badge {
  display: inline-block;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}

.health-severity-badge.critical {
  background: rgba(224,92,92,0.12);
  color: #c03a3a;
  border: 1px solid rgba(224,92,92,0.3);
}

.health-severity-badge.important {
  background: rgba(212,160,23,0.12);
  color: #8a6200;
  border: 1px solid rgba(212,160,23,0.3);
}

.health-severity-badge.recommended {
  background: rgba(0,180,200,0.1);
  color: #006f7a;
  border: 1px solid rgba(0,180,200,0.25);
}

.health-action-right {
  flex: 1;
  min-width: 0;
}

.health-action-title-text {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.health-action-desc {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  color: rgba(15,14,13,0.55);
  line-height: 1.55;
  margin-bottom: 0.3rem;
}

.health-action-cost {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(15,14,13,0.35);
  letter-spacing: 0.03em;
}

.health-action-cost::before {
  content: 'Est. cost: ';
  font-weight: 400;
}

/* Results CTA bar */
.health-results-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.5rem;
}

.btn-download-report {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  border: 1.5px solid rgba(15,14,13,0.2);
  background: transparent;
  color: rgba(15,14,13,0.7);
  cursor: pointer;
  transition: all 0.22s ease;
}

.btn-download-report:hover {
  border-color: rgba(15,14,13,0.4);
  color: var(--dark, #0f0e0d);
  background: rgba(15,14,13,0.04);
}

.btn-download-report svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.btn-restart-check {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: rgba(15,14,13,0.35);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  padding: 0;
  transition: all 0.2s ease;
}

.btn-restart-check:hover {
  color: rgba(15,14,13,0.6);
  text-decoration-color: rgba(15,14,13,0.25);
}

/* Health check disclaimer */
.health-disclaimer {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(15,14,13,0.03);
  border-left: 3px solid rgba(15,14,13,0.1);
  border-radius: 0 4px 4px 0;
}

.health-disclaimer p {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  color: rgba(15,14,13,0.38);
  line-height: 1.7;
  margin: 0;
}

.health-disclaimer strong {
  font-weight: 600;
  color: rgba(15,14,13,0.5);
}

/* "Start" intro panels for both tools */
.tool-start-panel {
  text-align: center;
  padding: 2.5rem 1.5rem 1rem;
}

.tool-start-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,180,200,0.1);
  border: 1px solid rgba(0,180,200,0.25);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal, #00b4c8);
  margin-bottom: 1.5rem;
}

.dark-bg .tool-start-panel h3 {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.ivory-bg .tool-start-panel h3 {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark, #0f0e0d);
  margin-bottom: 0.75rem;
}

.dark-bg .tool-start-panel p {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.ivory-bg .tool-start-panel p {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.88rem;
  color: rgba(15,14,13,0.5);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.tool-start-features {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.tool-start-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 80px;
}

.tool-start-feature-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.tool-start-feature-text {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dark-bg .tool-start-feature-text {
  color: rgba(255,255,255,0.35);
}

.ivory-bg .tool-start-feature-text {
  color: rgba(15,14,13,0.38);
}

/* Small empty state for no actions */
.health-no-actions {
  padding: 1.5rem;
  text-align: center;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.85rem;
  color: rgba(15,14,13,0.4);
}


/* ====== mediator-vault-css.css ====== */
/* ==========================================================================
   Harlan Intelligence™ - Phase 3.3 & 3.4
   AI Mediator / Dispute Resolution Screener + Document Vault
   mediator-vault-css.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   SHARED UTILITIES (for both tools)
   -------------------------------------------------------------------------- */

.mv-step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2.5rem;
  position: relative;
}

.mv-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-dark);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
  flex-shrink: 0;
}

.mv-step-dot.active {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--dark);
}

.mv-step-dot.completed {
  border-color: var(--teal);
  background: transparent;
  color: var(--teal);
}

.mv-step-dot.completed::after {
  content: "✓";
  font-size: 0.8rem;
}

.mv-step-dot.completed span {
  display: none;
}

.mv-step-line {
  flex: 1;
  height: 2px;
  background: var(--border-dark);
  position: relative;
  transition: background 0.3s;
}

.mv-step-line.completed {
  background: var(--teal);
}

.mv-step-label {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mv-step-label.active {
  color: var(--teal);
}

/* Shared form styles */
.mv-field-group {
  margin-bottom: 1.25rem;
}

.mv-field-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.dark-bg .mv-field-label {
  color: rgba(250, 250, 249, 0.5);
}

.mv-input,
.mv-textarea,
.mv-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.ivory-bg .mv-input,
.ivory-bg .mv-textarea,
.ivory-bg .mv-select {
  background: #fff;
  border-color: rgba(15, 14, 13, 0.15);
  color: var(--dark);
}

.mv-input:focus,
.mv-textarea:focus,
.mv-select:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(0, 180, 200, 0.04);
}

.mv-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.mv-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300b4c8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.mv-select option {
  background: var(--dark-900);
  color: #fff;
}

/* Step container */
.mv-step-panel {
  display: none;
  animation: mvFadeIn 0.35s ease;
}

.mv-step-panel.active {
  display: block;
}

@keyframes mvFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Navigation row */
.mv-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.mv-btn-back {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.mv-btn-back:hover {
  border-color: var(--muted);
  color: #fff;
}

.mv-btn-next {
  background: var(--teal);
  border: none;
  color: var(--dark);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.75rem;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: opacity 0.2s, transform 0.15s;
}

.mv-btn-next:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.mv-btn-analyze {
  background: var(--teal);
  border: none;
  color: var(--dark);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem 2.5rem;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 180, 200, 0.3);
}

.mv-btn-analyze:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 180, 200, 0.4);
}


/* ==========================================================================
   PHASE 3.3 - AI MEDIATOR / DISPUTE RESOLUTION SCREENER
   ========================================================================== */

/* ---- Two-party layout ---- */
.med-party-grid {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  gap: 0;
  align-items: start;
}

.med-party-col {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
}

.med-party-col.party-a {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.med-party-col.party-b {
  border-radius: 0 8px 8px 0;
  border-left: none;
}

.med-party-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 0;
  min-height: 160px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}

.med-party-divider-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(to bottom, transparent, var(--border-dark), var(--teal), var(--border-dark), transparent);
}

.med-party-divider-label {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  padding: 0.25rem 0;
}

.med-party-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.med-party-badge.badge-a {
  background: rgba(0, 180, 200, 0.12);
  color: var(--teal);
  border: 1px solid rgba(0, 180, 200, 0.25);
}

.med-party-badge.badge-b {
  background: rgba(180, 140, 0, 0.12);
  color: #c9a227;
  border: 1px solid rgba(200, 160, 0, 0.25);
}

/* ---- Dispute type selector ---- */
.med-dispute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.med-dispute-option {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: left;
}

.med-dispute-option:hover {
  border-color: rgba(0, 180, 200, 0.4);
  background: rgba(0, 180, 200, 0.05);
  transform: translateY(-1px);
}

.med-dispute-option.selected {
  border-color: var(--teal);
  background: rgba(0, 180, 200, 0.1);
}

.med-dispute-option-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.med-dispute-option-label {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

/* ---- Key facts grid ---- */
.med-facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ---- Loading / Analyzing state ---- */
.med-analyzing-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 4rem 2rem;
  text-align: center;
}

.med-analyzing-overlay.visible {
  display: flex;
  animation: mvFadeIn 0.4s ease;
}

.med-analyzing-spinner {
  position: relative;
  width: 72px;
  height: 72px;
}

.med-analyzing-spinner::before,
.med-analyzing-spinner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.med-analyzing-spinner::before {
  border-top-color: var(--teal);
  animation: spinA 1.2s linear infinite;
}

.med-analyzing-spinner::after {
  border-right-color: rgba(0, 180, 200, 0.3);
  animation: spinB 1.8s linear infinite reverse;
}

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

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

.med-analyzing-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
}

.med-analyzing-sub {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.6;
}

.med-analyzing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  margin: 0 3px;
  animation: dotPulse 1.4s ease infinite;
}

.med-analyzing-dots span:nth-child(2) { animation-delay: 0.2s; }
.med-analyzing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ---- Results section ---- */
.med-results {
  display: none;
  animation: mvFadeIn 0.5s ease;
}

.med-results.visible {
  display: block;
}

.med-results-section {
  margin-bottom: 2.5rem;
}

.med-results-section-title {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-dark);
}

/* ---- Issue identification cards ---- */
.med-issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.med-issue-card {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-left: 3px solid var(--teal);
  border-radius: 0 6px 6px 0;
  animation: mvFadeIn 0.4s ease both;
}

.med-issue-card:nth-child(1) { animation-delay: 0.05s; }
.med-issue-card:nth-child(2) { animation-delay: 0.1s; }
.med-issue-card:nth-child(3) { animation-delay: 0.15s; }
.med-issue-card:nth-child(4) { animation-delay: 0.2s; }
.med-issue-card:nth-child(5) { animation-delay: 0.25s; }

.med-issue-title {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.med-issue-desc {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- Applicable law ---- */
.med-law-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.med-law-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid var(--border-dark);
}

.med-law-code {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  white-space: nowrap;
  min-width: 80px;
}

.med-law-desc {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: rgba(250, 250, 249, 0.7);
  line-height: 1.5;
}

/* ---- Resolution path cards ---- */
.med-paths-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

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

@media (max-width: 540px) {
  .med-paths-grid {
    grid-template-columns: 1fr;
  }
}

.med-path-card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s, transform 0.2s;
  animation: mvFadeIn 0.5s ease both;
  position: relative;
  overflow: hidden;
}

.med-path-card:nth-child(1) { animation-delay: 0.1s; }
.med-path-card:nth-child(2) { animation-delay: 0.2s; }
.med-path-card:nth-child(3) { animation-delay: 0.3s; }
.med-path-card:nth-child(4) { animation-delay: 0.4s; }

.med-path-card.recommended {
  border-color: var(--teal);
  background: rgba(0, 180, 200, 0.06);
}

.med-path-card.recommended::before {
  content: "RECOMMENDED";
  position: absolute;
  top: 0;
  right: 0;
  background: var(--teal);
  color: var(--dark);
  font-family: var(--sans);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.6rem;
  border-radius: 0 10px 0 6px;
}

.med-path-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.med-path-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 180, 200, 0.1);
  border: 1px solid rgba(0, 180, 200, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.med-path-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.med-path-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.med-path-meta-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.med-path-meta-value {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(250, 250, 249, 0.9);
}

/* ---- Success likelihood indicator ---- */
.med-success-bar {
  margin-top: 0.25rem;
}

.med-success-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.med-success-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.med-success-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), rgba(0, 180, 200, 0.6));
  transition: width 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.med-success-pct {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
}

/* ---- Pros/Cons ---- */
.med-pros-cons {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-dark);
}

.med-pro,
.med-con {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.73rem;
  line-height: 1.4;
}

.med-pro { color: rgba(100, 220, 180, 0.9); }
.med-con { color: rgba(250, 180, 120, 0.9); }

.med-pro::before { content: "+"; font-weight: 700; flex-shrink: 0; }
.med-con::before { content: "-"; font-weight: 700; flex-shrink: 0; }

/* ---- Cost/Timeline comparison table ---- */
.med-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.med-comparison-table th {
  padding: 0.6rem 1rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border-dark);
  background: rgba(255, 255, 255, 0.02);
}

.med-comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(250, 250, 249, 0.85);
  vertical-align: middle;
}

.med-comparison-table tr:last-child td {
  border-bottom: none;
}

.med-comparison-table tr.recommended-row td {
  background: rgba(0, 180, 200, 0.06);
  color: #fff;
}

.med-table-cost-low { color: rgba(100, 220, 180, 0.9); }
.med-table-cost-mid { color: rgba(255, 210, 100, 0.9); }
.med-table-cost-high { color: rgba(255, 140, 100, 0.9); }

/* ---- Recommended path highlight ---- */
.med-recommendation-card {
  padding: 2rem;
  background: rgba(0, 180, 200, 0.07);
  border: 1px solid rgba(0, 180, 200, 0.3);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: mvFadeIn 0.6s ease both;
  animation-delay: 0.5s;
}

.med-rec-eyebrow {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
}

.med-rec-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.med-rec-rationale {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: rgba(250, 250, 249, 0.75);
  line-height: 1.7;
  max-width: 680px;
}

.med-rec-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 180, 200, 0.2);
}

.med-rec-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.med-rec-stat-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 180, 200, 0.7);
}

.med-rec-stat-value {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

/* ---- Rule 1.18 disclaimer ---- */
.med-disclaimer {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-left: 3px solid rgba(0, 180, 200, 0.4);
  border-radius: 0 6px 6px 0;
}

.med-disclaimer p {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ---- CTA bar ---- */
.med-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.med-cta-text {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: rgba(250, 250, 249, 0.75);
}

.med-cta-text strong {
  color: #fff;
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

/* ---- Responsive party grid ---- */
@media (max-width: 720px) {
  .med-party-grid {
    grid-template-columns: 1fr;
  }

  .med-party-divider {
    flex-direction: row;
    min-height: auto;
    padding: 0.75rem 1.5rem;
  }

  .med-party-divider-line {
    width: 100%;
    height: 1px;
    flex: 1;
    background: linear-gradient(to right, transparent, var(--border-dark), var(--teal), var(--border-dark), transparent);
  }

  .med-party-divider-label {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .med-party-col.party-a {
    border-radius: 8px 8px 0 0;
    border-right: 1px solid var(--border-dark);
    border-bottom: none;
  }

  .med-party-col.party-b {
    border-radius: 0 0 8px 8px;
    border-left: 1px solid var(--border-dark);
    border-top: none;
  }

  .med-facts-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   PHASE 3.4 - DOCUMENT VAULT
   ========================================================================== */

/* ---- Login panel ---- */
.vault-login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.vault-login-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid rgba(15, 14, 13, 0.1);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.vault-login-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.vault-login-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), rgba(0, 180, 200, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

.vault-login-logo-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.vault-login-logo-sub {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.vault-login-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.vault-login-sub {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.vault-login-field {
  margin-bottom: 1rem;
}

.vault-login-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.vault-login-input {
  width: 100%;
  border: 1px solid rgba(15, 14, 13, 0.15);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--dark);
  transition: border-color 0.2s;
  box-sizing: border-box;
  background: #fafaf9;
}

.vault-login-input:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}

.vault-login-btn {
  width: 100%;
  background: var(--teal);
  border: none;
  color: var(--dark);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
  transition: opacity 0.2s, transform 0.15s;
}

.vault-login-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.vault-login-error {
  display: none;
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(220, 80, 60, 0.08);
  border: 1px solid rgba(220, 80, 60, 0.25);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: #c94040;
}

.vault-login-error.visible {
  display: block;
}

.vault-login-hint {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 14, 13, 0.08);
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ---- Vault Dashboard ---- */
.vault-dashboard {
  display: none;
  animation: mvFadeIn 0.4s ease;
}

.vault-dashboard.visible {
  display: block;
}

/* ---- Expiration alert banner ---- */
.vault-alert-banner {
  display: none;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: rgba(255, 200, 60, 0.07);
  border: 1px solid rgba(255, 200, 60, 0.3);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  animation: mvFadeIn 0.4s ease;
}

.vault-alert-banner.visible {
  display: flex;
}

.vault-alert-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.vault-alert-text {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--dark);
  line-height: 1.5;
}

.vault-alert-text strong {
  display: block;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--dark);
}

.vault-alert-list {
  margin: 0;
  padding: 0 0 0 1rem;
}

.vault-alert-list li {
  color: rgba(15, 14, 13, 0.75);
  font-size: 0.78rem;
}

/* ---- Annual review reminder ---- */
.vault-review-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(120deg, rgba(0, 180, 200, 0.06) 0%, rgba(0, 180, 200, 0.02) 100%);
  border: 1px solid rgba(0, 180, 200, 0.2);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.vault-review-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 180, 200, 0.1);
  border: 1px solid rgba(0, 180, 200, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.vault-review-text {
  flex: 1;
}

.vault-review-title {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.15rem;
}

.vault-review-sub {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.vault-review-btn {
  background: var(--teal);
  border: none;
  color: var(--dark);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.vault-review-btn:hover { opacity: 0.85; }

/* ---- Toolbar: Search + Filters + View Toggle ---- */
.vault-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.vault-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.vault-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.vault-search-input {
  width: 100%;
  border: 1px solid rgba(15, 14, 13, 0.15);
  border-radius: 8px;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--dark);
  background: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.vault-search-input:focus {
  outline: none;
  border-color: var(--teal);
}

.vault-search-input::placeholder { color: var(--muted); }

/* Filter chips */
.vault-filter-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.vault-chip {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(15, 14, 13, 0.15);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}

.vault-chip:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.vault-chip.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--dark);
}

/* View toggle */
.vault-view-toggle {
  display: flex;
  border: 1px solid rgba(15, 14, 13, 0.15);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.vault-view-btn {
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}

.vault-view-btn.active {
  background: var(--teal);
  color: var(--dark);
}

/* ---- Upload dropzone ---- */
.vault-upload-zone {
  border: 2px dashed rgba(15, 14, 13, 0.2);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(0, 180, 200, 0.02);
  transition: border-color 0.25s, background 0.25s;
  cursor: pointer;
  margin-bottom: 1.5rem;
  position: relative;
}

.vault-upload-zone:hover,
.vault-upload-zone.dragover {
  border-color: var(--teal);
  background: rgba(0, 180, 200, 0.06);
}

.vault-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.vault-upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
  color: var(--muted);
}

.vault-upload-label {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.vault-upload-label span {
  color: var(--teal);
  text-decoration: underline;
  cursor: pointer;
}

.vault-upload-hint {
  font-family: var(--sans);
  font-size: 0.73rem;
  color: var(--muted);
}

/* Upload progress bar */
.vault-upload-progress {
  display: none;
  margin-top: 1rem;
}

.vault-upload-progress.visible {
  display: block;
  animation: mvFadeIn 0.3s ease;
}

.vault-upload-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.vault-upload-progress-name {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--dark);
  font-weight: 600;
}

.vault-upload-progress-pct {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--teal);
  font-weight: 700;
}

.vault-upload-progress-track {
  height: 6px;
  background: rgba(15, 14, 13, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.vault-upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), rgba(0, 180, 200, 0.7));
  border-radius: 3px;
  width: 0%;
  transition: width 0.25s ease;
}

/* ---- Dashboard layout: Sidebar + Main ---- */
.vault-dashboard-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.75rem;
  align-items: start;
}

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

/* ---- Category sidebar ---- */
.vault-sidebar {
  position: sticky;
  top: 1rem;
}

.vault-sidebar-title {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 0.6rem;
  border-bottom: 1px solid rgba(15, 14, 13, 0.08);
  margin-bottom: 0.5rem;
}

.vault-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.vault-sidebar-item:hover {
  background: rgba(0, 180, 200, 0.06);
  color: var(--dark);
}

.vault-sidebar-item.active {
  background: rgba(0, 180, 200, 0.1);
  color: var(--teal);
  font-weight: 600;
}

.vault-sidebar-item-icon {
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.vault-sidebar-item-label {
  flex: 1;
}

.vault-sidebar-count {
  background: rgba(15, 14, 13, 0.08);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.vault-sidebar-item.active .vault-sidebar-count {
  background: rgba(0, 180, 200, 0.15);
  color: var(--teal);
}

/* ---- Document grid view ---- */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.vault-grid.hidden { display: none; }

/* ---- Document card (grid) ---- */
.vault-doc-card {
  background: #fff;
  border: 1px solid rgba(15, 14, 13, 0.1);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  position: relative;
  animation: mvFadeIn 0.35s ease both;
}

.vault-doc-card:hover {
  border-color: rgba(0, 180, 200, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.vault-doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.vault-doc-icon.pdf   { background: rgba(220, 60, 60, 0.08); }
.vault-doc-icon.docx  { background: rgba(60, 120, 220, 0.08); }
.vault-doc-icon.image { background: rgba(120, 200, 100, 0.08); }
.vault-doc-icon.other { background: rgba(180, 140, 0, 0.08); }

.vault-doc-name {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vault-doc-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: auto;
}

.vault-doc-category {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.vault-doc-date {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
}

/* Expiration badges */
.vault-expiry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  width: fit-content;
}

.vault-expiry-badge.expired {
  background: rgba(220, 60, 60, 0.1);
  color: #c94040;
  border: 1px solid rgba(220, 60, 60, 0.2);
}

.vault-expiry-badge.expiring {
  background: rgba(255, 200, 60, 0.12);
  color: #a07800;
  border: 1px solid rgba(255, 200, 60, 0.3);
}

.vault-expiry-badge.current {
  background: rgba(60, 200, 120, 0.1);
  color: #238a50;
  border: 1px solid rgba(60, 200, 120, 0.2);
}

.vault-expiry-badge::before {
  content: "●";
  font-size: 0.55rem;
}

/* Card actions */
.vault-doc-actions {
  display: flex;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.vault-doc-card:hover .vault-doc-actions {
  opacity: 1;
}

.vault-doc-action {
  flex: 1;
  padding: 0.4rem 0;
  border: 1px solid rgba(15, 14, 13, 0.12);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.vault-doc-action:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(0, 180, 200, 0.04);
}

.vault-doc-action.delete:hover {
  border-color: #c94040;
  color: #c94040;
  background: rgba(220, 60, 60, 0.04);
}

/* ---- Document list view ---- */
.vault-list {
  display: none;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(15, 14, 13, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.vault-list.visible {
  display: flex;
}

.vault-list-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: rgba(15, 14, 13, 0.03);
  border-bottom: 1px solid rgba(15, 14, 13, 0.08);
}

.vault-list-header-cell {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.vault-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(15, 14, 13, 0.06);
  align-items: center;
  transition: background 0.15s;
  cursor: pointer;
}

.vault-list-row:last-child { border-bottom: none; }

.vault-list-row:hover {
  background: rgba(0, 180, 200, 0.03);
}

.vault-list-name-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.vault-list-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.vault-list-doc-name {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-list-cell {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
}

.vault-list-actions {
  display: flex;
  gap: 0.35rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.vault-list-row:hover .vault-list-actions {
  opacity: 1;
}

.vault-list-action {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(15, 14, 13, 0.12);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.vault-list-action:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.vault-list-action.delete:hover {
  border-color: #c94040;
  color: #c94040;
}

/* ---- Empty state ---- */
.vault-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 0.75rem;
}

.vault-empty.visible {
  display: flex;
}

.vault-empty-icon {
  font-size: 2.5rem;
  opacity: 0.3;
}

.vault-empty-title {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}

.vault-empty-sub {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- Document detail modal ---- */
.vault-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 13, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.vault-modal-overlay.visible {
  display: flex;
  animation: mvFadeIn 0.25s ease;
}

.vault-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  animation: mvSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mvSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.vault-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid rgba(15, 14, 13, 0.08);
  gap: 1rem;
}

.vault-modal-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.vault-modal-file-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.vault-modal-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.vault-modal-category {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.vault-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(15, 14, 13, 0.12);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.vault-modal-close:hover {
  background: rgba(15, 14, 13, 0.06);
}

.vault-modal-body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vault-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(15, 14, 13, 0.06);
}

.vault-modal-row:last-of-type { border-bottom: none; }

.vault-modal-row-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.vault-modal-row-value {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  text-align: right;
}

.vault-modal-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem 1.75rem 1.75rem;
  border-top: 1px solid rgba(15, 14, 13, 0.08);
}

.vault-modal-btn {
  flex: 1;
  padding: 0.7rem;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s;
}

.vault-modal-btn.primary {
  background: var(--teal);
  border: none;
  color: var(--dark);
}

.vault-modal-btn.secondary {
  background: transparent;
  border: 1px solid rgba(15, 14, 13, 0.15);
  color: var(--dark);
}

.vault-modal-btn.danger {
  background: transparent;
  border: 1px solid rgba(220, 60, 60, 0.3);
  color: #c94040;
}

.vault-modal-btn:hover { opacity: 0.85; }

/* ---- Vault disclaimer ---- */
.vault-disclaimer {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 14, 13, 0.04);
  border: 1px solid rgba(15, 14, 13, 0.08);
  border-left: 3px solid rgba(0, 180, 200, 0.4);
  border-radius: 0 6px 6px 0;
}

.vault-disclaimer p {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ---- Vault logout bar ---- */
.vault-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(15, 14, 13, 0.08);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.vault-topbar-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.vault-topbar-greeting {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
}

.vault-topbar-sub {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
}

.vault-logout-btn {
  background: transparent;
  border: 1px solid rgba(15, 14, 13, 0.15);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.vault-logout-btn:hover {
  border-color: #c94040;
  color: #c94040;
}

/* ---- Confirm delete overlay ---- */
.vault-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 13, 0.5);
  backdrop-filter: blur(3px);
  z-index: 9100;
  align-items: center;
  justify-content: center;
}

.vault-confirm-overlay.visible {
  display: flex;
}

.vault-confirm-box {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  animation: mvSlideUp 0.25s ease;
}

.vault-confirm-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.vault-confirm-sub {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.vault-confirm-actions {
  display: flex;
  gap: 0.75rem;
}

.vault-confirm-cancel {
  flex: 1;
  padding: 0.65rem;
  border: 1px solid rgba(15, 14, 13, 0.15);
  border-radius: 6px;
  background: transparent;
  color: var(--dark);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.vault-confirm-delete {
  flex: 1;
  padding: 0.65rem;
  border: none;
  border-radius: 6px;
  background: #c94040;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.vault-confirm-delete:hover { opacity: 0.85; }


/* ====== newdocs-css.css ====== */
/* =====================================================
   PHASE 3.5 - NEW DOCUMENT TYPES: ADDITIONAL CSS
   The Berhe Law Firm - Harlan Intelligence™
   =====================================================

   These styles supplement the existing document card and
   intake form CSS. The existing .doc-card, .doc-card-icon,
   .form-section, .form-row, .form-group, .form-label,
   .form-input, .form-select, .form-textarea, .form-checkbox-group,
   and .form-checkbox rules already cover the majority of styling.
   Only true additions are defined here.
   ===================================================== */


/* =====================================================
   1. NEW DOCUMENT CARD ICON TINTS
   Each new doc type gets a subtle icon container color
   so the grid reads as visually distinct while staying
   on-brand (teal/dark palette).
   ===================================================== */

/* Employment Agreement - briefcase icon */
.doc-card[data-doc="employment"] .doc-card-icon {
  color: var(--teal);
}

/* Partnership Agreement - handshake icon */
.doc-card[data-doc="partnership"] .doc-card-icon {
  color: var(--teal);
}

/* Commercial Lease Review - building icon */
.doc-card[data-doc="lease"] .doc-card-icon {
  color: var(--teal);
}

/* Terms of Service / Privacy Policy - shield-doc icon */
.doc-card[data-doc="tos"] .doc-card-icon {
  color: var(--teal);
}

/* Prenuptial Agreement - scale/rings icon */
.doc-card[data-doc="prenup"] .doc-card-icon {
  color: var(--teal);
}


/* =====================================================
   2. PRENUP DUAL-PARTY LAYOUT
   Side-by-side columns for Party A / Party B sections.
   On mobile they stack. The .prenup-party-grid wraps
   both .prenup-party-col blocks.
   ===================================================== */

.prenup-party-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.prenup-party-col {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--teal);
  padding: 1.75rem 1.5rem 1.5rem;
}

.prenup-party-col-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 1rem;
}

@media (max-width: 680px) {
  .prenup-party-grid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================
   3. PARTNER DETAILS DYNAMIC ROWS
   Similar to LLC member groups - shows/hides partner
   rows based on selected number of partners.
   ===================================================== */

.partner-field-group {
  display: none;
}

.partner-field-group.visible {
  display: block;
}


/* =====================================================
   4. BENEFITS / DATA COLLECTION CHECKBOX GRID
   Multi-column checkbox layout for benefits (Employment)
   and data collection (ToS/Privacy Policy) checkboxes.
   ===================================================== */

.form-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem 1.5rem;
  margin-bottom: 1.25rem;
}

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

.form-checkbox-grid .form-checkbox-group {
  margin-bottom: 0;
}


/* =====================================================
   5. LEASE REVIEW FILE UPLOAD FIELD
   Styled file input for uploading the lease document.
   ===================================================== */

.form-file-input {
  display: block;
  width: 100%;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--dark);
  background: var(--white);
  border: 1px dashed var(--border-light);
  padding: 1.1rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
}

.form-file-input:hover,
.form-file-input:focus {
  border-color: var(--teal);
  background: rgba(0,180,200,0.03);
}

.form-file-hint {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 300;
  margin-top: 0.4rem;
  line-height: 1.5;
}


/* =====================================================
   6. BINARY RADIO TOGGLE (Yes / No fields)
   Used for Employment non-compete, IP assignment, etc.
   Renders as two pill-style buttons instead of a <select>.
   ===================================================== */

.form-toggle-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-light);
  overflow: hidden;
  width: fit-content;
}

.form-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.form-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  border-right: 1px solid var(--border-light);
  min-width: 5rem;
  text-align: center;
}

.form-toggle-label:last-of-type {
  border-right: none;
}

.form-toggle-input:checked + .form-toggle-label {
  background: var(--teal);
  color: var(--dark);
  font-weight: 500;
}

.form-toggle-input:focus + .form-toggle-label {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}


/* =====================================================
   7. SECTION CALLOUT NOTE
   Subtle info strip for California-specific notices
   inside a form section (e.g., at-will employment note,
   community property prenup note).
   ===================================================== */

.form-section-note {
  background: rgba(0,180,200,0.06);
  border-left: 3px solid var(--teal);
  padding: 0.85rem 1.1rem;
  font-size: 0.8rem;
  color: var(--dark-800);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.form-section-note strong {
  font-weight: 500;
  color: var(--dark);
}


/* =====================================================
   8. RESPONSIVE ADJUSTMENTS FOR NEW CARDS
   The existing cards-grid handles most responsive
   behavior. These rules handle edge cases for the
   expanded 10-card grid.
   ===================================================== */

/* Ensure icons in new cards scale correctly */
.doc-card[data-doc="employment"] .doc-card-icon svg,
.doc-card[data-doc="partnership"] .doc-card-icon svg,
.doc-card[data-doc="lease"] .doc-card-icon svg,
.doc-card[data-doc="tos"] .doc-card-icon svg,
.doc-card[data-doc="prenup"] .doc-card-icon svg {
  width: 100%;
  height: 100%;
  stroke-linecap: round;
  stroke-linejoin: round;
}


