:root {
  /* Modern Color Palette */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;
  
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Theme Tokens - Light Mode (Default) */
  --bg: #ffffff;
  --fg: #0b0f1a;
  --muted: #475569;
  --card: #f8fafc;
  --accent: #2563eb;
  
  /* Semantic Colors (for backward compatibility) */
  --fg-muted: var(--muted);
  --bg-secondary: var(--card);
  --border: var(--gray-200);
  --border-muted: var(--gray-100);
  
  /* Brand Colors - Grayscale */
  --brand: var(--gray-700);
  --brand-light: var(--gray-100);
  --brand-dark: var(--gray-800);
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: var(--gray-600);
  
  /* Modern Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  
  /* Dark Mode Variables */
  --dark-fg: #ffffff;
  --dark-fg-muted: #9aa4b2;
  --dark-bg: #0b0f1a;
  --dark-bg-secondary: #111827;
  --dark-border: #27272a;
  --dark-border-muted: #1a1a1a;
}

/* Dark Mode - Media query fallback */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--dark-bg);
    --fg: var(--dark-fg);
    --muted: #9aa4b2;
    --card: var(--dark-bg-secondary);
    --accent: #60a5fa;
    /* Semantic Colors (for backward compatibility) */
    --fg-muted: var(--muted);
    --bg-secondary: var(--card);
    --border: var(--dark-border);
    --border-muted: var(--dark-border-muted);
  }
}

/* Dark Mode - Class-based (preferred, overrides media query) */
.dark :root {
  --bg: var(--dark-bg) !important;
  --fg: var(--dark-fg) !important;
  --muted: #9aa4b2 !important;
  --card: var(--dark-bg-secondary) !important;
  --accent: #60a5fa !important;
  /* Semantic Colors (for backward compatibility) */
  --fg-muted: var(--muted) !important;
  --bg-secondary: var(--card) !important;
  --border: var(--dark-border) !important;
  --border-muted: var(--dark-border-muted) !important;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Global link styles - WCAG AA compliant */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

a:visited {
  color: var(--accent);
}

/* Force dark background if .dark class is present */
.dark body {
  background: var(--dark-bg) !important;
  color: var(--dark-fg) !important;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 3rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 4rem;
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 0 5rem;
  }
}

/* Modern Header */
header {
  position: relative;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

/* Force dark header when .dark class is present */
.dark header {
  background: var(--dark-bg) !important;
  border-bottom-color: var(--dark-border) !important;
}

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

@media (min-width: 640px) {
  .header-content {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (min-width: 1024px) {
  .header-content {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

@media (min-width: 1280px) {
  .header-content {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--gray-900);  /* Dark default for visibility on light background */
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

/* Light color for dark mode */
.dark .brand {
  color: var(--dark-fg) !important;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  background: var(--bg);
  padding: 0.125rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--gray-700);  /* Darker default for visibility on light background */
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Light colors for dark mode */
.dark .nav-link {
  color: var(--dark-fg-muted) !important;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--brand);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 0.75rem;
}

.nav-link:hover {
  color: var(--gray-100);
  background: var(--gray-800);
  transform: translateY(-1px);
}

.nav-link:hover::before {
  opacity: 0;
}

.nav-link.active {
  color: var(--gray-100);
  background: var(--gray-700);
  font-weight: 600;
}

.nav-link.active::before {
  opacity: 0;
}
/* Modern Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.75rem;
  scroll-margin-top: 6rem;
}

/* Section headers - consistent spacing and scroll margin */
h2, h3 {
  scroll-margin-top: 6rem;
}

section {
  margin-top: 2rem;
}

@media (max-width: 640px) {
  section {
    margin-top: 1.5rem;
  }
  
  h2, h3 {
    scroll-margin-top: 5rem;
  }
}

.card p {
  color: var(--fg-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn.primary {
  background: var(--brand);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn.secondary {
  background: var(--bg-secondary);
  color: var(--fg);
  border-color: var(--border);
}

.btn.secondary:hover {
  background: var(--border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Modern Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 100%);
  border-radius: 2rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, var(--brand-light) 0%, transparent 50%);
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--fg);
}

.hero p {
  font-size: 1.25rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid Layout */
.grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--fg-muted);
}

.btn{
  display:inline-flex;
  align-items:center;
  padding:12px 24px;
  border:1px solid var(--line);
  border-radius:12px;
  text-decoration:none;
  color:var(--fg);
  margin:4px;
  font-weight:500;
  transition:all 0.2s ease;
  box-shadow:var(--shadow);
}
.btn:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-lg);
  border-color:var(--brand);
}
.btn.primary{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}
.btn.primary:hover{
  background:#2563eb;
  transform:translateY(-1px);
}

/* Cards & Grid */
.card{
  border:1px solid var(--line);
  border-radius:16px;
  padding:24px;
  margin-top:16px;
  background:var(--bg);
  box-shadow:var(--shadow);
  transition:all 0.2s ease;
}
.card:hover{
  box-shadow:var(--shadow-lg);
  transform:translateY(-2px);
}

/* Footer */
.foot{
  border-top:1px solid var(--line);
  margin-top:40px;
  color:var(--muted);
}

/* Rolling log window */
.logbox{
  max-height:300px;
  overflow:auto;
  background:#0b1020;
  color:#d9e1ff;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.4;
}
.logbox pre{ margin:0; white-space:pre-wrap; word-break:break-word; }

/* Report area */
.reportbox{
  max-height:600px;
  overflow:auto;
}

/* Rolling log window (single canonical class) */
.log-window{
  max-height:300px;
  overflow:auto;
  background:#0f172a;
  color:#e2e8f0;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:13px;
  line-height:1.4;
  border-radius:10px;
  padding:12px;
  white-space:pre-wrap;
  word-break:break-word;
}
.log-window pre{ margin:0; white-space:pre-wrap; }



/* Article Styles */
.article {
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.7;
}

.article-header {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.article-header h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #e2e8f0;
  font-weight: 700;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.back-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: var(--card);
  border: 1px solid var(--border);
}

.back-link a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
  text-decoration: none;
}

.article-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #e2e8f0;
}

.article-content h2 {
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: #f1f5f9;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 0.5rem;
  font-weight: 600;
}

.article-content h3 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #f1f5f9;
  font-weight: 600;
}

.article-content p {
  margin-bottom: 1.5rem;
  margin-top: 0;
  text-align: justify;
  color: #e2e8f0;
}

.article-content .lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: var(--surface);
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow);
}

.article-content ul, .article-content ol {
  margin-bottom: 1.75rem;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.75rem;
}

.article-content strong {
  color: #f1f5f9;
  font-weight: 600;
}

/* Citation links */
.article-content .citation-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
  transition: all 0.2s ease;
}

.article-content .citation-link:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  text-decoration: underline;
}

/* Reference anchors */
.article-content .reference-anchor {
  color: var(--brand);
  font-weight: 600;
  margin-right: 8px;
}

.highlight-box {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.highlight-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #f1f5f9;
  font-weight: 700;
}

.highlight-box ul {
  margin-bottom: 0;
}

.highlight-box li {
  color: #cbd5e1;
}

.math-formula {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
  overflow-x: auto;
}

.math-formula .math {
  display: block;
  font-size: 1.1rem;
  line-height: 1.4;
}

.code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  padding: 0;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  position: relative;
}

.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #2d2d2d;
  border-bottom: 1px solid #3c3c3c;
  border-radius: 8px 8px 0 0;
}

.code-block::after {
  content: '● ● ●';
  position: absolute;
  top: 8px;
  left: 12px;
  color: #666;
  font-size: 12px;
  letter-spacing: 4px;
}

.code-block pre {
  margin: 0;
  padding: 2.5rem 1.5rem 1.5rem 1.5rem;
  white-space: pre;
  overflow-x: auto;
  background: transparent;
}

.code-block code {
  background: none;
  padding: 0;
  color: inherit;
  font-family: inherit;
}

/* Syntax highlighting for common keywords */
.code-block .keyword {
  color: #569cd6;
  font-weight: 600;
}

.code-block .string {
  color: #ce9178;
}

.code-block .number {
  color: #b5cea8;
}

.code-block .comment {
  color: #6a9955;
  font-style: italic;
}

.code-block .function {
  color: #dcdcaa;
}

.code-block .variable {
  color: #9cdcfe;
}

/* Python Window Styles */
.python-window {
  background: #1e1e1e;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.python-header {
  background: #2d2d2d;
  border-bottom: 1px solid #3c3c3c;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.python-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f56;
}

.dot.yellow {
  background: #ffbd2e;
}

.dot.green {
  background: #27ca3f;
}

.python-title {
  color: #d4d4d4;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: auto;
}

.python-content {
  padding: 1.5rem;
  overflow-x: auto;
}

.python-content pre {
  margin: 0;
  background: transparent;
  color: #d4d4d4;
}

.python-content code {
  background: none;
  padding: 0;
  color: inherit;
  font-family: inherit;
}

/* Python-specific syntax highlighting */
.python-window .comment {
  color: #6a9955;
  font-style: italic;
}

.python-window .keyword {
  color: #569cd6;
  font-weight: 600;
}

.python-window .string {
  color: #ce9178;
}

.python-window .number {
  color: #b5cea8;
}

.python-window .function {
  color: #dcdcaa;
}

.python-window .variable {
  color: #9cdcfe;
}

.python-window .operator {
  color: #d4d4d4;
}

.python-window .builtin {
  color: #4ec9b0;
}

/* Small screens */
@media (max-width:768px){
  .container {
    padding: 0 1rem;
  }
  .header-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero{ padding:48px 0 }
  .hero h1{ font-size:2.5rem }
  .hero p{ font-size:1.125rem }
  .brand span{ font-size:1.5rem }
  .brand img{ height:32px }
  .article-header h1{ font-size:2.5rem }
  .article-content{ font-size:1rem }
  .article-content h2{ font-size:1.75rem }
  .article-content h3{ font-size:1.25rem }
  .nav{ flex-direction:column; gap:4px }
  .nav-link{ text-align:center; padding:12px 16px }
}

/* Demo Mode Styles */
.demo-mode-notice {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.demo-mode-notice .notice-content h3 {
  color: #92400e;
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.demo-mode-notice .notice-content p {
  color: #78350f;
  margin: 0;
  font-size: 0.95rem;
}

/* Preset Datasets Styles */
.preset-datasets {
  margin: 30px 0;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.preset-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.preset-card:hover {
  border-color: var(--primary-400);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.preset-header h3 {
  color: var(--gray-900);
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.preset-header p {
  color: var(--gray-600);
  margin: 0 0 16px 0;
  font-size: 0.9rem;
}

.preset-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.preset-stats .stat {
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.preset-description p {
  color: var(--gray-600);
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.preset-action .btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-action .btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

/* Message Styles */
.message {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-weight: 500;
}

.message.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.message.info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* File loaded state */
.file-loaded {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
}

.file-loaded .upload-text {
  color: #166534 !important;
  font-weight: 600;
}

.file-loaded .file-info {
  color: #15803d !important;
}

/* Upload mode tabs */
.upload-mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #0ea5e9;
}

.tab-btn.active {
  color: #0ea5e9;
  border-bottom-color: #0ea5e9;
}

/* Sample file selector */
.sample-file-selector {
  margin-top: 1rem;
}

.sample-file-selector select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  background: white;
}

.sample-file-selector select:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.sample-download-btn {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.sample-download-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.sample-file-description {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Mobile responsive for tabs */
@media (max-width: 768px) {
  .upload-mode-tabs {
    flex-direction: column;
    gap: 0;
  }
  
  .tab-btn {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    border-left: 3px solid transparent;
    padding: 0.75rem 1rem;
  }
  
  .tab-btn.active {
    border-left-color: #0ea5e9;
    border-bottom-color: #e5e7eb;
  }
}

/* ============================================================================
   Launch3.0: Badges & Status Indicators
   ============================================================================ */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
}

.badge-pc-good { background-color: #10b981; color: white; }
.badge-pc-limited { background-color: #f59e0b; color: white; }
.badge-pc-none { background-color: #ef4444; color: white; }
.badge-sensitivity-ok { background-color: #10b981; color: white; }
.badge-sensitivity-warn { background-color: #f59e0b; color: white; }

.stress-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.375rem;
  margin: 0.5rem 0;
}

.stress-pass { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.stress-warn { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }
.stress-block { background: #fee2e2; color: #991b1b; border: 1px solid #ef4444; }
.stress-inconclusive { background: #e2e8f0; color: #475569; border: 1px solid #94a3b8; }
