/* =============================================================================
   RE-AI Help System Styles
   ============================================================================= */

:root {
  --help-primary: #2563eb;
  --help-secondary: #64748b;
  --help-success: #10b981;
  --help-warning: #f59e0b;
  --help-danger: #ef4444;
  --help-hot: #dc2626;
  --help-warm: #f97316;
  --help-cold: #3b82f6;
  --help-bg: #ffffff;
  --help-bg-alt: #f8fafc;
  --help-border: #e2e8f0;
  --help-text: #1e293b;
  --help-text-light: #64748b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--help-text);
  background-color: var(--help-bg-alt);
}

/* =============================================================================
   Navigation
   ============================================================================= */

.help-nav {
  background-color: var(--help-bg);
  border-bottom: 1px solid var(--help-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.help-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--help-primary);
  text-decoration: none;
}

.help-nav-links {
  display: flex;
  gap: 1.5rem;
}

.help-nav-links a {
  color: var(--help-text-light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.help-nav-links a:hover {
  color: var(--help-primary);
  background-color: var(--help-bg-alt);
}

.help-nav-links a.active {
  color: var(--help-primary);
  background-color: #dbeafe;
  font-weight: 600;
}

.btn-back {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--help-primary);
  color: white;
  text-decoration: none;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-back:hover {
  background-color: #1d4ed8;
  transform: translateX(-2px);
}

/* =============================================================================
   Layout
   ============================================================================= */

.help-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
}

.help-sidebar {
  position: sticky;
  top: 90px;
  height: fit-content;
  background-color: var(--help-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--help-border);
}

.help-sidebar h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--help-text);
}

.help-toc {
  list-style: none;
}

.help-toc li {
  margin-bottom: 0.5rem;
}

.help-toc a {
  color: var(--help-text-light);
  text-decoration: none;
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.help-toc a:hover {
  color: var(--help-primary);
  background-color: var(--help-bg-alt);
}

.help-content {
  background-color: var(--help-bg);
  border-radius: 0.5rem;
  padding: 3rem;
  border: 1px solid var(--help-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.help-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--help-text);
}

.help-intro {
  font-size: 1.125rem;
  color: var(--help-text-light);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* =============================================================================
   Sections
   ============================================================================= */

.help-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--help-border);
}

.help-section:last-of-type {
  border-bottom: none;
}

.help-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--help-text);
  scroll-margin-top: 100px;
}

.help-section h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--help-text);
}

.help-section h4 {
  font-size: 1.125rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--help-text);
}

.help-section p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.help-section ul, .help-section ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.help-section li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* =============================================================================
   Callout Boxes
   ============================================================================= */

.help-note, .help-tip, .help-warning, .help-info-box {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.help-note {
  background-color: #eff6ff;
  border-left-color: var(--help-primary);
  color: #1e40af;
}

.help-tip {
  background-color: #d1fae5;
  border-left-color: var(--help-success);
  color: #065f46;
}

.help-warning {
  background-color: #fef3c7;
  border-left-color: var(--help-warning);
  color: #92400e;
}

.help-info-box {
  background-color: #f0f9ff;
  border-left-color: var(--help-cold);
}

.help-warning-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.help-mistake {
  padding: 1rem;
  background-color: #fef2f2;
  border-left: 3px solid var(--help-danger);
  border-radius: 0.375rem;
}

.help-mistake strong:first-child {
  color: var(--help-danger);
}

.help-mistake p {
  margin-top: 0.5rem;
  margin-bottom: 0;
  color: #059669;
}

/* =============================================================================
   Examples
   ============================================================================= */

.help-example {
  background-color: #f8fafc;
  border: 1px solid var(--help-border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.help-example h4 {
  margin-top: 0;
  color: var(--help-primary);
}

.help-example-small {
  background-color: #f1f5f9;
  padding: 0.75rem;
  border-radius: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* =============================================================================
   Tables
   ============================================================================= */

.help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.help-table thead {
  background-color: var(--help-bg-alt);
}

.help-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--help-border);
  color: var(--help-text);
}

.help-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--help-border);
}

.help-table tbody tr:hover {
  background-color: var(--help-bg-alt);
}

/* =============================================================================
   Stats Grid
   ============================================================================= */

.help-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.help-stat {
  background-color: var(--help-bg-alt);
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--help-border);
}

.help-stat strong {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--help-primary);
}

.help-stat p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--help-text-light);
}

/* =============================================================================
   Motivation Cards
   ============================================================================= */

.help-motivation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.help-motivation-card {
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid;
  text-align: center;
}

.help-motivation-card.hot {
  background-color: #fef2f2;
  border-color: var(--help-hot);
}

.help-motivation-card.warm {
  background-color: #fff7ed;
  border-color: var(--help-warm);
}

.help-motivation-card.cold {
  background-color: #eff6ff;
  border-color: var(--help-cold);
}

.help-motivation-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.help-motivation-card h3 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

.help-motivation-card ul {
  text-align: left;
  margin: 1rem 0;
}

.help-motivation-card p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

/* =============================================================================
   Grade Cards
   ============================================================================= */

.help-grade-table {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.help-grade-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 2px solid;
  align-items: start;
}

.help-grade-letter {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background-color: white;
}

.help-grade-details h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
}

.help-grade-details ul {
  margin: 0.75rem 0;
}

.help-grade-details p {
  margin: 0.75rem 0 0 0;
  font-weight: 600;
}

.help-grade-row.grade-a {
  background-color: #ecfdf5;
  border-color: #059669;
}

.help-grade-row.grade-a .help-grade-letter {
  color: #059669;
}

.help-grade-row.grade-b {
  background-color: #dbeafe;
  border-color: #2563eb;
}

.help-grade-row.grade-b .help-grade-letter {
  color: #2563eb;
}

.help-grade-row.grade-c {
  background-color: #fef9c3;
  border-color: #ca8a04;
}

.help-grade-row.grade-c .help-grade-letter {
  color: #ca8a04;
}

.help-grade-row.grade-d {
  background-color: #fed7aa;
  border-color: #ea580c;
}

.help-grade-row.grade-d .help-grade-letter {
  color: #ea580c;
}

.help-grade-row.grade-f {
  background-color: #fee2e2;
  border-color: #dc2626;
}

.help-grade-row.grade-f .help-grade-letter {
  color: #dc2626;
}

/* =============================================================================
   Watchlist Status Cards
   ============================================================================= */

.help-watchlist-statuses {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.help-status-item {
  padding: 1rem;
  background-color: var(--help-bg-alt);
  border-left: 4px solid var(--help-primary);
  border-radius: 0.375rem;
}

.help-status-item strong {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--help-text);
}

.help-status-item p {
  margin: 0.25rem 0;
  color: var(--help-text-light);
}

/* =============================================================================
   Workflow Steps
   ============================================================================= */

.help-workflow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.help-workflow-step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
  padding: 1.25rem;
  background-color: var(--help-bg-alt);
  border-radius: 0.5rem;
  border: 1px solid var(--help-border);
}

.help-workflow-number {
  width: 50px;
  height: 50px;
  background-color: var(--help-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.help-workflow-content h4 {
  margin: 0 0 0.75rem 0;
  color: var(--help-text);
}

.help-workflow-content ul {
  margin: 0;
  padding-left: 1.25rem;
}

.help-workflow-content li {
  margin-bottom: 0.25rem;
}

/* =============================================================================
   Steps List
   ============================================================================= */

.help-steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}

.help-steps li {
  counter-increment: step-counter;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 3rem;
}

.help-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background-color: var(--help-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.help-steps li strong {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--help-text);
}

.help-steps li p {
  margin: 0.25rem 0;
  color: var(--help-text-light);
}

/* =============================================================================
   Filter Cards
   ============================================================================= */

.help-filter-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.help-filter-item {
  padding: 1.25rem;
  background-color: #f8fafc;
  border-radius: 0.5rem;
  border: 1px solid var(--help-border);
}

.help-filter-item strong {
  display: block;
  font-size: 1.125rem;
  color: var(--help-primary);
  margin-bottom: 0.5rem;
}

.help-filter-item > p {
  margin: 0.5rem 0;
  color: var(--help-text-light);
}

.help-filter-item ul {
  margin: 0.75rem 0 0 0;
}

/* =============================================================================
   Daily Tips Cards
   ============================================================================= */

.help-daily-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.help-tip-card {
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.help-tip-card strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.help-tip-card ul {
  margin: 0;
  padding-left: 1.25rem;
}

.help-tip-card li {
  margin-bottom: 0.5rem;
  opacity: 0.95;
}

/* =============================================================================
   Tips List
   ============================================================================= */

.help-tips-list {
  list-style: none;
  padding-left: 0;
}

.help-tips-list > li {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--help-bg-alt);
  border-left: 4px solid var(--help-success);
  border-radius: 0.375rem;
}

.help-tips-list strong {
  display: block;
  font-size: 1.125rem;
  color: var(--help-text);
  margin-bottom: 0.5rem;
}

.help-tips-list p {
  margin: 0;
  color: var(--help-text-light);
}

/* =============================================================================
   Related Pages
   ============================================================================= */

.help-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--help-border);
}

.help-related h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.help-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.help-related-card {
  display: block;
  padding: 1.5rem;
  background-color: var(--help-bg-alt);
  border: 1px solid var(--help-border);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
}

.help-related-card:hover {
  border-color: var(--help-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.help-related-card h3 {
  margin: 0 0 0.5rem 0;
  color: var(--help-primary);
  font-size: 1.25rem;
}

.help-related-card p {
  margin: 0;
  color: var(--help-text-light);
}

/* =============================================================================
   Footer
   ============================================================================= */

.help-footer {
  background-color: var(--help-bg);
  border-top: 1px solid var(--help-border);
  padding: 2rem;
  text-align: center;
  margin-top: 3rem;
  color: var(--help-text-light);
}

.help-footer p {
  margin: 0.5rem 0;
}

.help-footer a {
  color: var(--help-primary);
  text-decoration: none;
}

.help-footer a:hover {
  text-decoration: underline;
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

@media (max-width: 1024px) {
  .help-container {
    grid-template-columns: 1fr;
  }
  
  .help-sidebar {
    position: static;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .help-nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .help-nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .help-container {
    padding: 1rem;
  }
  
  .help-content {
    padding: 1.5rem;
  }
  
  .help-content h1 {
    font-size: 2rem;
  }
  
  .help-section h2 {
    font-size: 1.5rem;
  }
  
  .help-motivation-grid,
  .help-daily-tips,
  .help-related-grid {
    grid-template-columns: 1fr;
  }
  
  .help-grade-row {
    grid-template-columns: 1fr;
  }
  
  .help-grade-letter {
    margin: 0 auto;
  }
}

@media print {
  .help-nav,
  .help-sidebar,
  .help-related,
  .help-footer {
    display: none;
  }
  
  .help-container {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  
  .help-content {
    box-shadow: none;
    border: none;
  }
}

