:root {
  --primary: #0d9488;
  --primary-light: #14b8a6;
  --primary-dark: #0f766e;
  --accent: #06b6d4;
  --bg: #f0fdf4;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --green: #27ae60;
  --yellow: #f1c40f;
  --orange: #e67e22;
  --red: #e74c3c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}

.page-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.hero {
  text-align: center;
  padding: 40px 20px 30px;
}

.hero-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.3);
}

.hero h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero .subtitle {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero .description {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto;
  text-align: justify;
}

.feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px 24px;
  max-width: 600px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(13, 148, 136, 0.08);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13, 148, 136, 0.25);
}

.feature-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow);
}

.feature-card .icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.4;
}

.actions {
  padding: 0 20px 30px;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--primary);
  border: 1.5px solid rgba(13, 148, 136, 0.2);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.04);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-hero-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.3);
}

.detail-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.detail-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.detail-desc {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.5;
}

.detail-text {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
  text-align: justify;
}

.detail-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 400px;
}

.detail-table thead {
  background: #f1f5f9;
}

.detail-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  border-bottom: 2px solid #e2e8f0;
}

.detail-table td {
  padding: 10px 12px;
  color: var(--text);
  border-bottom: 1px solid #f1f5f9;
  line-height: 1.5;
}

.detail-table tbody tr:nth-child(even) {
  background: #fafcfe;
}

.detail-table tbody tr:hover {
  background: #f0fdf4;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
}

.workflow-note {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1.5px solid rgba(13, 148, 136, 0.15);
}

.workflow-note-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.workflow-note p {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group .hint {
  font-weight: 400;
  color: var(--text-light);
  font-size: 12px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #f8fafc;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 40px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(240, 253, 244, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(13, 148, 136, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

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

.loading-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #cbd5e1;
  transition: color 0.3s, transform 0.3s;
}

.loading-step .step-indicator {
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.loading-step.active {
  color: var(--primary);
  font-weight: 600;
  transform: translateX(4px);
}

.loading-step.active .step-indicator {
  color: var(--primary);
  animation: stepPulse 1s ease-in-out infinite;
}

.loading-step.completed {
  color: var(--text);
}

.loading-step.completed .step-indicator {
  color: var(--green);
}

@keyframes stepPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.dashboard-header {
  text-align: center;
  margin-bottom: 16px;
}

.dashboard-tag {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.25);
}

.gauge-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 24px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.gauge-container {
  position: relative;
  width: 200px;
  height: 120px;
  margin: 0 auto 8px;
}

.gauge-svg {
  width: 100%;
  height: 100%;
}

.gauge-score-inner {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.gauge-number {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text);
}

.gauge-percent {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-light);
}

.gauge-level {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.gauge-subtitle {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

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

.param-card {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.param-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.param-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.param-label {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.param-score-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  margin-bottom: 2px;
}

.param-card .score {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.param-card .max {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

.param-card .value {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
  transition: width 0.8s ease;
}

.rec-card {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.rec-card:last-child {
  margin-bottom: 0;
}

.rec-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.rec-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.rec-content p {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  text-align: justify;
}

.classification-table {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.ct-header {
  display: grid;
  grid-template-columns: 1fr 1.6fr 0.4fr auto;
  gap: 8px;
  padding: 12px 16px;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}

.ct-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr 0.4fr auto;
  gap: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  border-top: 1px solid #f1f5f9;
  align-items: center;
  transition: background 0.3s ease;
}

.ct-row:nth-child(even) {
  background: #fafcfe;
}

.ct-row--active {
  background: #f0fdf4 !important;
}

.ct-marker {
  min-width: 72px;
  text-align: right;
}

.ct-current-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  background: #dcfce7;
  color: #166534;
  white-space: nowrap;
  animation: fadeSlideUp 0.3s ease;
}

.ct-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  margin: 0 auto;
}

.ct-green { background: var(--green); }
.ct-yellow { background: var(--yellow); }
.ct-orange { background: var(--orange); }
.ct-red { background: var(--red); }

.level-meaning {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lm-item {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #f1f5f9;
}

.lm-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.lm-green { background: rgba(39, 174, 96, 0.12); color: var(--green); }
.lm-yellow { background: rgba(241, 196, 15, 0.15); color: #b8930a; }
.lm-orange { background: rgba(230, 126, 34, 0.12); color: var(--orange); }
.lm-red { background: rgba(231, 76, 60, 0.12); color: var(--red); }

.lm-item p {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
  text-align: justify;
}

.academic-note {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px dashed rgba(13, 148, 136, 0.25);
}

.academic-note-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.academic-note p {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.6;
  font-style: italic;
  text-align: justify;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-inner {
  display: flex;
  max-width: 600px;
  width: 100%;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 8px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 500;
  transition: color 0.2s;
  gap: 4px;
}

.nav-item.active { color: var(--primary); }
.nav-item:hover { color: var(--primary); }

.nav-icon {
  font-size: 20px;
}

.about-section {
  margin-bottom: 16px;
}

.about-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-section p,
.about-section li {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
  text-align: justify;
}

.about-section ul {
  list-style: none;
  padding: 0;
}

.about-section li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.about-section li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(13, 148, 136, 0.1);
  color: var(--primary);
}

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.result-actions .btn {
  flex: 1;
}

.hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 32px; }
  .page-container { padding: 24px; }
}

/* ═══════════════════════════════════════════
   NEW ESGE STYLES
═══════════════════════════════════════════ */

/* ── Tab Bar ─────────────────────────────── */
.tab-bar {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  padding: 12px 20px 0;
  gap: 6px;
}

.tab-btn {
  flex: 1;
  padding: 10px 6px;
  border: none;
  background: #f1f5f9;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 -2px 8px rgba(13,148,136,0.08);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Assess Header ───────────────────────── */
.assess-header {
  text-align: center;
  padding: 24px 0 20px;
}

.assess-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.assess-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.assess-header p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  text-align: justify;
}

/* ── Dimension Groups ────────────────────── */
.dim-group {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border-left: 4px solid;
}

.dim-group.dim-E  { border-color: #16a34a; }
.dim-group.dim-S  { border-color: #0284c7; }
.dim-group.dim-G  { border-color: #7c3aed; }
.dim-group.dim-Ec { border-color: #b45309; }

.dim-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dim-label span { font-size: 16px; }

/* ── Form Enhancements ───────────────────── */
.input-with-unit {
  display: flex;
  align-items: center;
  gap: 0;
}

.input-with-unit .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  flex: 1;
}

.unit-tag {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 12px;
  height: 48px;
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
}

.badge-benefit {
  background: rgba(22,163,74,0.1);
  color: #16a34a;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
}

.badge-cost {
  background: rgba(220,38,38,0.1);
  color: #dc2626;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
}

.btn-full { width: 100%; margin-top: 8px; }

.card-subtitle {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Dimension Score Cards ───────────────── */
.dim-scores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto 16px;
  padding: 0 20px;
}

.dim-score-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid;
}

.dim-score-card.dim-score-E  { border-color: #16a34a; }
.dim-score-card.dim-score-S  { border-color: #0284c7; }
.dim-score-card.dim-score-G  { border-color: #7c3aed; }
.dim-score-card.dim-score-Ec { border-color: #b45309; }

.ds-icon  { font-size: 22px; margin-bottom: 4px; }
.ds-label { font-size: 11px; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.ds-value { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 6px; }

.ds-bar-bg   { height: 5px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.ds-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; width: 0%; }

/* ── Normalised Values Table ─────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  background: #f8fafc;
  padding: 10px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-light);
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: var(--text);
  white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafcfe; }

.small-table { font-size: 11px; }
.small-table td, .small-table th { padding: 8px 10px; }

.mini-bar-bg   { height: 5px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.mini-bar-fill { height: 100%; border-radius: 3px; }

.dim-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
}
.dim-tag-E  { background: rgba(22,163,74,0.1);  color: #16a34a; }
.dim-tag-S  { background: rgba(2,132,199,0.1);  color: #0284c7; }
.dim-tag-G  { background: rgba(124,58,237,0.1); color: #7c3aed; }
.dim-tag-Ec { background: rgba(180,83,9,0.1);   color: #b45309; }

/* ── Sensitivity Analysis ────────────────── */
.sensitivity-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sensitivity-controls .form-control { flex: 1; min-width: 200px; }

.sensitivity-btns {
  display: flex;
  gap: 8px;
}

.btn-sense {
  padding: 0 18px;
  height: 48px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-sense:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-up   { background: rgba(22,163,74,0.12);  color: #16a34a; }
.btn-down { background: rgba(220,38,38,0.12);  color: #dc2626; }

.sensitivity-result {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 0;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.sense-result-inner { padding: 16px; }

.sense-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.sense-dir {
  background: rgba(13,148,136,0.1);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  margin-left: 6px;
}

.sense-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.sense-row span { color: var(--text-light); }
.sense-row strong { font-weight: 600; }

.sense-note {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}

.sense-type {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-light);
  font-style: italic;
}

/* ── Dataset Stats ───────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
}

.dim-avg-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.dim-avg-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.da-icon  { font-size: 18px; margin-bottom: 4px; }
.da-label { font-size: 9px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.da-val   { font-size: 14px; font-weight: 800; }

/* ── Class Badges in Dataset Table ──────── */
.cls-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.cls-vhigh { background: rgba(27,143,76,0.12);  color: #1B8F4C; }
.cls-high  { background: rgba(126,217,87,0.15); color: #4a9e25; }
.cls-mod   { background: rgba(245,158,11,0.12); color: #d97706; }
.cls-low   { background: rgba(230,126,34,0.12); color: #e67e22; }
.cls-vlow  { background: rgba(231,76,60,0.12);  color: #e74c3c; }

/* ── ML Demo ─────────────────────────────── */
.loading-mini {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  padding: 16px 0;
}

.pred-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pred-id    { font-size: 13px; font-weight: 600; color: var(--text); }
.pred-score { font-size: 28px; font-weight: 800; }
.pred-cls   { padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }

.pred-dims { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-chip   { background: #f8fafc; border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; border: 1px solid #e2e8f0; }

/* ── Feature Importance Chart ────────────── */
.fi-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.fi-rank {
  width: 28px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-align: center;
}

.fi-info { flex: 1; }

.fi-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fi-bar-bg   { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.fi-bar-fill { height: 100%; border-radius: 4px; transition: width 1s ease; }

.fi-val {
  width: 52px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

/* ── Gauge number size tweak for 0.000 ───── */
.gauge-number {
  font-size: 40px !important;
  letter-spacing: -1px !important;
}

/* ═══════════════════════════════════════════
   ESGE HOME CARDS
═══════════════════════════════════════════ */

.esge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border-bottom: 3px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.esge-card-top {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2px;
}

.esge-dim-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  letter-spacing: 0.3px;
}

.badge-E  { background: #16a34a; }
.badge-S  { background: #0284c7; }
.badge-G  { background: #7c3aed; }
.badge-Ec { background: #b45309; font-size: 8px; }

.esge-E  { border-bottom-color: transparent; }
.esge-S  { border-bottom-color: transparent; }
.esge-G  { border-bottom-color: transparent; }
.esge-Ec { border-bottom-color: transparent; }

.esge-card-active.esge-E  { border-bottom-color: #16a34a; background: rgba(22,163,74,0.04); }
.esge-card-active.esge-S  { border-bottom-color: #0284c7; background: rgba(2,132,199,0.04); }
.esge-card-active.esge-G  { border-bottom-color: #7c3aed; background: rgba(124,58,237,0.04); }
.esge-card-active.esge-Ec { border-bottom-color: #b45309; background: rgba(180,83,9,0.04); }

.card-expand-hint {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

/* ── Dimension Expand Panel ──────────────── */
.dim-expand-panel {
  max-width: 600px;
  margin: 0 auto 16px;
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.dim-panel-inner {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.dim-panel-header {
  font-size: 14px;
  font-weight: 700;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dim-panel-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Indicator Rows ──────────────────────── */
.ind-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s;
}

.ind-row:hover { background: #fafcfe; }
.ind-row:last-of-type { border-bottom: 1px solid #f1f5f9; }

.ind-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ind-body { flex: 1; }

.ind-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ind-note {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.5;
}

.ind-unit {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 4px;
  white-space: nowrap;
}

.dim-panel-btn {
  width: calc(100% - 32px);
  margin: 14px 16px;
  box-shadow: none;
}

/* ── Clickable indicator rows ────────────────── */
.ind-row-clickable {
  cursor: pointer;
  user-select: none;
}

.ind-row-clickable:hover {
  background: #f1f5f9;
}

.ind-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.ind-expand-arrow {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1;
  transition: transform 0.25s, color 0.2s;
}

.arrow-open {
  color: var(--primary);
  transform: rotate(90deg);
}

/* ── Indicator detail panel ──────────────────── */
.ind-detail-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: #fafcfe;
  border-top: 0px solid transparent;
}

.ind-detail-open {
  max-height: 800px;
  border-top: 1px solid #e2e8f0;
}

.ind-detail-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ind-detail-desc {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.65;
  text-align: justify;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: 10px;
  border-left: 3px solid var(--primary);
}

.ind-detail-section { display: flex; flex-direction: column; gap: 8px; }

.ind-detail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
}

/* ── Gradient legend bar ─────────────────────── */
.legend-bar-wrap { display: flex; flex-direction: column; gap: 4px; }

.legend-bar {
  height: 10px;
  border-radius: 6px;
  width: 100%;
}

.legend-bar-ends {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-light);
  font-weight: 500;
}

/* ── Scale chips ─────────────────────────────── */
.scale-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.scale-chip {
  flex: 1;
  min-width: 52px;
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.scale-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.scale-chip-range {
  font-size: 9px;
  color: var(--text-light);
  font-weight: 600;
  line-height: 1.2;
}

.scale-chip-label {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

/* ── Input row inside detail panel ──────────── */
.ind-input-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.ind-input {
  flex: 1;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
  font-size: 14px !important;
}

.ind-input-unit {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 12px;
  height: 48px;
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Live classification chip ────────────────── */
.ind-chip-highlight { min-height: 0; margin-top: 6px; }

.chip-hl-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s;
}



/* ═══════════════════════════════════════════════════
   DIMENSION PANEL SCORE SECTION
═══════════════════════════════════════════════════ */
.dim-panel-score {
  margin: 0 16px 4px;
  border-radius: 12px;
  overflow: hidden;
}

/* Pending state */
.dps-pending {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
}

.dps-pending-text {
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
  margin-top: 8px;
}

.dps-progress-bg {
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.dps-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

/* Result state */
.dps-result {
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dps-result-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dps-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dps-result-val {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.dps-result-cls {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.dps-bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.dps-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(.22,1,.36,1);
}

/* Card hint — completed state */
.hint-done {
  font-weight: 700;
  color: #16a34a;
}

/* ═══════════════════════════════════════════════════
   OVERALL SUMMARY SECTION
═══════════════════════════════════════════════════ */
.overall-summary-wrap {
  padding: 0 16px 8px;
  animation: fadeSlideUp 0.5s ease both;
}

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

/* Banner */
.overall-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  color: #fff;
}

.overall-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.overall-banner-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1px;
}

.overall-banner-sub {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
}

/* Dimension score strip */
.dim-score-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.dss-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.dss-icon { font-size: 18px; }

.dss-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.dss-val {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.dss-cls {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  text-align: center;
  line-height: 1.4;
}

/* Overall gauge card */
.overall-gauge-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid #e2e8f0;
}

.og-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.og-score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.og-score {
  font-size: 42px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
}

.og-cls-pill {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid transparent;
}

.og-bar-bg {
  height: 8px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.og-bar-fill {
  height: 100%;
  border-radius: 8px;
  width: 0%;
  transition: width 0.8s cubic-bezier(.22,1,.36,1);
}

/* Interpretation */
.overall-interp {
  background: #f8fafc;
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 13px 15px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-align: justify;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Responsive: stack dim strip on very small screens */
@media (max-width: 340px) {
  .dim-score-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════
   SAVE BUTTON & CONFIRMATION
═══════════════════════════════════════════════════ */
.dim-save-row {
  margin: 0 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dsave-status-wrap {
  min-height: 22px;
  text-align: center;
}

.dsave-ok {
  font-size: 12px;
  font-weight: 700;
  animation: fadeSlideUp 0.3s ease;
}

.btn-save-dim {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  font-family: inherit;
}

.btn-save-dim:hover {
  opacity: 0.82;
}

.btn-save-dim:active {
  opacity: 0.65;
}

/* Card hint — saved state */
.hint-saved {
  font-weight: 600;
  color: #0284c7;
  font-size: 11px;
}

/* ═══════════════════════════════════════════════════
   TOAST NOTIFICATION
═══════════════════════════════════════════════════ */
.esge-toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s, transform 0.28s;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.esge-toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════
   ASSESS PAGE — PRE-FILL BANNER
═══════════════════════════════════════════════════ */
.prefill-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #f0fdf4, #e0f2fe);
  border: 1.5px solid #a7f3d0;
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 18px;
  animation: fadeSlideUp 0.4s ease;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.prefill-banner--fading {
  opacity: 0;
}

.prefill-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.prefill-title {
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 4px;
}

.prefill-dims {
  font-size: 11px;
  color: #0284c7;
  font-weight: 600;
}

.prefill-clear-btn {
  flex-shrink: 0;
  background: none;
  border: 1.5px solid #0d9488;
  color: #0d9488;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.prefill-clear-btn:hover {
  background: #0d9488;
  color: #fff;
}

/* ═══════════════════════════════════════════════════
   WEIGHT SUMMARY CARD
═══════════════════════════════════════════════════ */
.ws-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

@media (max-width: 380px) {
  .ws-grid { grid-template-columns: 1fr; }
}

.ws-dim-block {
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
}

.ws-dim-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.ws-dim-wt-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: auto;
}

.ws-ind-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
}

.ws-ind-row:last-child { border-bottom: none; }

.ws-ind-name {
  color: var(--text-secondary);
  flex: 1;
}

.ws-ind-wt {
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ═══════════════════════════════════════════════════
   COMPARISON CARD
═══════════════════════════════════════════════════ */
.cmp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 8px;
}

.cmp-col {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  background: #f8fafc;
  border-radius: 12px;
}

.cmp-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.cmp-val {
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.cmp-cls {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  margin-top: 6px;
  display: inline-block;
}

.cmp-diff {
  text-align: center;
  flex-shrink: 0;
  width: 58px;
}

.cmp-arrow {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.cmp-diff-val {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cmp-diff-label {
  font-size: 9px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════
   DATASET GENERATION CONTROLS
═══════════════════════════════════════════════════ */
.gen-card { margin-bottom: 16px; }

.gen-source-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gen-src-btn {
  flex: 1;
  min-width: 130px;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}

.gen-src-btn.active {
  border-color: var(--primary);
  background: #f0fdfa;
  color: var(--primary);
}

.gen-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.gen-size-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.gen-size-btn {
  padding: 8px 14px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
}

.gen-size-btn.active {
  border-color: var(--primary);
  background: #f0fdfa;
  color: var(--primary);
}

.btn-generate {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), #0369a1);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  letter-spacing: 0.3px;
}

.btn-generate:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-generate:disabled { opacity: .6; cursor: not-allowed; }

.gen-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.gen-status--info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.gen-status--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.gen-status--error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.gen-export-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-export {
  padding: 10px 18px;
  border: 2px solid #0284c7;
  background: #f0f9ff;
  color: #0284c7;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
}

.btn-export:hover { background: #e0f2fe; }

.gen-source-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: #f1f5f9;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  margin-left: auto;
}

/* Classification chips in table */
.cls-chip {
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.cls-chip-very-high { background: #d1fae5; color: #1B8F4C; }
.cls-chip-high      { background: #f0fdf0; color: #4a9e25; }
.cls-chip-moderate  { background: #fef9c3; color: #a16207; }
.cls-chip-low       { background: #ffedd5; color: #c2410c; }
.cls-chip-very-low  { background: #fee2e2; color: #b91c1c; }

/* ═══════════════════════════════════════════════════
   MONTE CARLO SIMULATION
═══════════════════════════════════════════════════ */

/* Summary stat grid */
.mc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

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

.mc-stat-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.mc-stat-icon { font-size: 18px; margin-bottom: 4px; }

.mc-stat-val {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}

.mc-stat-lbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Histogram */
.mc-histogram {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 130px;
  padding: 0 2px 24px;
  margin: 10px 0 4px;
  position: relative;
  overflow: hidden;
}

.mc-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  cursor: default;
  position: relative;
}

.mc-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  transition: opacity .2s;
}

.mc-bar-wrap:hover .mc-bar { opacity: .75; }

.mc-bar-tick {
  position: absolute;
  bottom: 0;
  font-size: 7px;
  color: var(--text-light);
  transform: rotate(-60deg) translateX(-50%);
  transform-origin: top left;
  white-space: nowrap;
  left: 50%;
  top: calc(100% - 20px);
}

.mc-hist-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.mc-legend-item {
  font-size: 10px;
  font-weight: 700;
  color: var(--lc);
  display: flex;
  align-items: center;
  gap: 4px;
}

.mc-legend-item::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--lc);
  flex-shrink: 0;
}

/* Class distribution rows */
.cls-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}

.cls-bar-row:last-child { border-bottom: none; }

.cls-bar-label {
  width: 80px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.cls-bar-bg {
  flex: 1;
  height: 12px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}

.cls-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .6s ease;
}

.cls-bar-count {
  width: 90px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
}

/* Dimension sensitivity rows */
.mc-dim-row {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 8px;
}

.mc-dim-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mc-dim-icon { font-size: 16px; flex-shrink: 0; }

.mc-dim-name {
  font-size: 13px;
  font-weight: 800;
  flex: 1;
}

.mc-dim-badges { display: flex; gap: 5px; flex-wrap: wrap; }

.mc-dim-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
}

.mc-dim-badge--var    { background: #fef3c7; color: #92400e; }
.mc-dim-badge--contrib{ background: #dbeafe; color: #1e40af; }

.mc-dim-metric {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.mc-dm-label {
  width: 50px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  flex-shrink: 0;
}

.mc-dm-track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.mc-dm-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .7s ease;
}

.mc-dm-val {
  width: 58px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Interpretation card */
.mc-interp-card { background: linear-gradient(135deg, #f0fdfa, #e0f2fe); }

.mc-interp-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: justify;
}

/* ═══════════════════════════════════════════════════
   TORNADO CHART SENSITIVITY ANALYSIS
═══════════════════════════════════════════════════ */

/* Baseline note banner */
.tc-baseline-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  color: #1e40af;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.5;
}

.tc-btn-row { display: flex; gap: 8px; }

/* Summary grid */
.tc-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.tc-sum-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}

.tc-sum-icon  { font-size: 18px; margin-bottom: 6px; }
.tc-sum-val   { font-size: 14px; font-weight: 900; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.tc-sum-lbl   { font-size: 9px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }

.tc-sum-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

.tc-sum-cls-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Chart scrollable wrapper (mobile) */
.tc-chart-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

/* Chart container */
.tc-chart {
  min-width: 340px;
  width: 100%;
  padding: 8px 0 24px;
}

/* Axis row */
.tc-axis-row {
  display: flex;
  align-items: flex-end;
  margin-bottom: 4px;
}

.tc-axis-bottom { margin-top: 4px; margin-bottom: 0; align-items: flex-start; }

.tc-label-col {
  width: 160px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .tc-label-col { width: 110px; }
}

.tc-axis {
  flex: 1;
  height: 20px;
  position: relative;
}

.tc-tick {
  position: absolute;
  font-size: 9px;
  color: var(--text-light);
  transform: translateX(-50%);
  top: 4px;
}

/* Chart row */
.tc-row {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid #f1f5f9;
  padding: 4px 0;
}

.tc-row:last-of-type { border-bottom: none; }

.tc-row-label {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 8px;
}

@media (max-width: 480px) {
  .tc-row-label { width: 110px; }
}

.tc-rank {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-light);
}

.tc-ind-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.3;
}

.tc-dim-tag {
  font-size: 8px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 8px;
  align-self: flex-start;
}

/* Bar area */
.tc-bar-area {
  flex: 1;
  height: 20px;
  position: relative;
  background: #f8fafc;
  border-radius: 4px;
}

.tc-baseline-line {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #1e293b;
  border-radius: 1px;
  z-index: 3;
}

.tc-bar-left, .tc-bar-right {
  position: absolute;
  top: 3px;
  height: 14px;
  border-radius: 3px;
  z-index: 2;
  transition: width .5s ease, left .5s ease;
}

.tc-span-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  font-weight: 800;
  color: #1e293b;
  z-index: 4;
  white-space: nowrap;
  pointer-events: none;
}

/* Baseline tick on bottom axis */
.tc-baseline-label {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  white-space: nowrap;
}

/* Dimension legend */
.tc-dim-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.tc-legend-item {
  font-size: 10px;
  font-weight: 700;
  color: var(--dc);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tc-legend-item::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--dc);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   URBAN PLANNING SCENARIO ANALYSIS
═══════════════════════════════════════════════════ */

/* Scenario preview chips */
.sc-scenarios-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sc-prev-chip {
  font-size: 10px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 20px;
}

/* Baseline note */
.sc-baseline-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  color: #1e40af;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Cards scroll row */
.sc-cards-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.sc-cards-row {
  display: flex;
  gap: 10px;
  min-width: 680px;
  padding: 4px 2px;
}

/* Individual scenario card */
.sc-card {
  flex: 1;
  min-width: 155px;
  border-radius: 12px;
  padding: 12px 10px;
}

.sc-card-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.sc-card-icon  { font-size: 16px; }
.sc-card-name  { font-size: 10px; font-weight: 800; flex: 1; line-height: 1.3; }
.sc-delta      { font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; }

.sc-si-row     { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sc-si-val     { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.sc-si-cls     { font-size: 8px; font-weight: 800; padding: 2px 6px; border-radius: 8px; }

/* Dim mini bars */
.sc-dims { margin-bottom: 8px; }

.sc-dim-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.sc-dim-mini-lbl {
  width: 18px;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
}

.sc-dim-mini-track {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.sc-dim-mini-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s ease;
}

.sc-dim-mini-val {
  width: 36px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Changed indicator list */
.sc-changed-list { border-top: 1px solid #e2e8f050; padding-top: 6px; }

.sc-change-row {
  font-size: 9px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Bar chart ─────────────────────── */
.sc-bar-chart { padding: 8px 0 4px; }

.sc-bars {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  height: 160px;
  padding-bottom: 40px;
}

.sc-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.sc-bar-val {
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.sc-bar-track {
  flex: 1;
  width: 100%;
  background: #f1f5f9;
  border-radius: 8px 8px 0 0;
  position: relative;
  overflow: visible;
}

.sc-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 8px 8px 0 0;
  transition: height .6s ease;
}

.sc-bar-baseline {
  position: absolute;
  left: -4px;
  right: -4px;
  height: 2px;
  background: #1e293b;
  border-radius: 1px;
  z-index: 3;
}

.sc-bar-lbl {
  margin-top: 6px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

.sc-bar-legend { margin-top: 8px; text-align: center; }

/* ── Outcome summary grid ──────────── */
.sc-outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.sc-sum-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}

.sc-sum-icon { font-size: 20px; margin-bottom: 4px; }
.sc-sum-name { font-size: 10px; font-weight: 800; margin-bottom: 4px; line-height: 1.3; }
.sc-sum-val  { font-size: 13px; font-weight: 900; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.sc-sum-lbl  { font-size: 9px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; }

.sc-sum-card--detail {
  text-align: left;
  padding: 14px 14px;
}

.sc-sum-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.sc-sum-card-header .sc-sum-icon { font-size: 16px; margin-bottom: 0; }
.sc-sum-card-header .sc-sum-lbl  { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; }

.sc-sum-card--detail .sc-sum-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  text-align: left;
}

.sc-sum-rows {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  margin-bottom: 10px;
}

.sc-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 11px;
}

.sc-sum-row--delta {
  border-top: 1px dashed #e2e8f0;
  margin-top: 3px;
  padding-top: 5px;
}

.sc-sum-row-lbl {
  color: var(--text-light);
  font-weight: 600;
}

.sc-sum-row-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.sc-sum-cls {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

/* ── Dimension delta strip ─────────── */
.sc-dim-delta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}

.sc-dim-delta-row:last-child { border-bottom: none; }

.sc-dim-delta-lbl {
  width: 110px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
}

.sc-dim-delta-cells {
  display: flex;
  gap: 6px;
  flex: 1;
}

.sc-dim-cell {
  flex: 1;
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
}

.sc-dim-cell-sc {
  font-size: 8px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-dim-cell-val {
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* ── Interpretation items ──────────── */
.sc-interp-item {
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  background: #f8fafc;
  margin-bottom: 8px;
}

.sc-interp-item:last-child { margin-bottom: 0; }

.sc-interp-header {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.sc-interp-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: justify;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   RANDOM FOREST — Feature Importance
═══════════════════════════════════════════════════════════ */

.rf-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.rf-metric-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  border-top: 3px solid #0d9488;
}

.rf-metric-val {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 2px;
}

.rf-metric-lbl {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.rf-metric-sub {
  font-size: 10px;
  color: var(--text-light);
}

.rf-top-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  padding: 8px 12px;
  background: #f0fdfa;
  border-radius: 8px;
  border: 1px solid #99f6e4;
}

/* ═══════════════════════════════════════════════════════════
   POLICY RECOMMENDATION ENGINE
═══════════════════════════════════════════════════════════ */

.rec-card {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.rec-card:last-child { border-bottom: none; }

.rec-num-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rec-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.rec-icon {
  font-size: 22px;
  line-height: 1;
}

.rec-content { flex: 1; min-width: 0; padding-right: 2px; }

.rec-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.rec-title-row h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.rec-dim-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.rec-content p {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: justify;
}

.rec-benefit-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 11px;
  flex-wrap: wrap;
}

.rec-benefit-label {
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  padding-top: 1px;
}

.rec-benefit-text {
  color: var(--primary);
  font-weight: 600;
  font-size: 11px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   ESGE DIMENSION COMPARISON CHART (Scenario Analysis)
═══════════════════════════════════════════════════════════ */

.sc-dim-bar-chart { padding: 4px 0; }

/* ── New legend ───────────────────────────────────── */
.sc-dim-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-bottom: 18px;
}

.sc-dim-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.sc-dim-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sc-dim-legend-icon { font-size: 13px; flex-shrink: 0; }

.sc-dim-legend-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Horizontal bar groups ───────────────────────── */
.sc-dim-hbar-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sc-dim-hbar-group {
  background: #fafcfe;
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #f1f5f9;
}

.sc-dim-hbar-group-lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-left: 8px;
  margin-bottom: 12px;
}

.sc-dim-hbar-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-dim-hbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-dim-hbar-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sc-dim-hbar-track {
  flex: 1;
  height: 14px;
  background: #e2e8f0;
  border-radius: 7px;
  overflow: hidden;
}

.sc-dim-hbar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.sc-dim-hbar-val {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .rf-metrics-row { grid-template-columns: repeat(2, 1fr); }
  .sc-dim-legend { grid-template-columns: 1fr 1fr; gap: 6px 8px; }
  .sc-dim-legend-item { font-size: 10px; }
}

/* ═══════════════════════════════════════════════════════════
   ABOUT PAGE — Indicator Types & Sustainability Index
═══════════════════════════════════════════════════════════ */

.about-indicator-block {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  border: 1.5px solid transparent;
}

.about-benefit {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.about-cost {
  background: #fff7ed;
  border-color: #fed7aa;
}

.about-ind-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.about-ind-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.benefit-badge {
  background: #dcfce7;
  color: #166534;
}

.cost-badge {
  background: #fee2e2;
  color: #991b1b;
}

.about-ind-examples-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 10px 0 6px 0;
}

.about-ind-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.about-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 16px;
}

.about-note-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.about-note p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: justify;
}

/* Sustainability Index section */
.about-si-formula {
  background: linear-gradient(135deg, #f0fdfa, #e0f2fe);
  border: 1.5px solid #99f6e4;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  text-align: center;
}

.about-si-formula-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.about-si-eq {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.3px;
  font-family: monospace;
}

.about-si-classes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.about-si-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface);
}

.about-si-range {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 90px;
  flex-shrink: 0;
  font-family: monospace;
}

.about-si-label {
  font-size: 13px;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   BASELINE LABEL BAR
═══════════════════════════════════════════════════════ */

.baseline-label-bar {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
  border: 1px solid #a7f3d0;
  border-left: 4px solid #0d9488;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.baseline-label-title {
  font-size: 13px;
  font-weight: 800;
  color: #0d9488;
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}

.baseline-label-sub {
  font-size: 11px;
  color: #047857;
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   ML METHOD NOTE
═══════════════════════════════════════════════════════ */

.ml-method-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.ml-method-note-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.ml-method-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ml-method-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.ml-method-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ml-method-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ml-method-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: justify;
}

@media (min-width: 480px) {
  .ml-method-row {
    flex-direction: row;
  }
  .ml-method-item {
    flex: 1;
  }
}

/* ═══════════════════════════════════════════════════════════
   ABOUT PAGE — ESGE Dimensions and Indicators
═══════════════════════════════════════════════════════════ */

.about-dim-block {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  border: 1px solid transparent;
}

.about-dim-E  { background: rgba(22,163,74,0.05);  border-color: rgba(22,163,74,0.2);  }
.about-dim-S  { background: rgba(2,132,199,0.05);   border-color: rgba(2,132,199,0.2);  }
.about-dim-G  { background: rgba(124,58,237,0.05);  border-color: rgba(124,58,237,0.2); }
.about-dim-Ec { background: rgba(180,83,9,0.05);    border-color: rgba(180,83,9,0.2);   }

.about-dim-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.about-dim-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.about-dim-label {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.about-dim-weight {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.about-dim-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: justify;
  margin: 0 0 10px 0;
}

.about-dim-indicators {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 10px;
}

.about-dim-ind-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
}

.about-dim-ind-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.about-dim-type {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  vertical-align: middle;
  margin-left: 3px;
}

.benefit-type { background: rgba(22,163,74,0.1);  color: #15803d; }
.cost-type    { background: rgba(239,68,68,0.1);   color: #b91c1c; }

/* ═══════════════════════════════════════════════════════════
   ABOUT PAGE — Normalisation Method
═══════════════════════════════════════════════════════════ */

.about-norm-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.about-norm-card {
  border-radius: 10px;
  padding: 14px 16px;
  border: 1.5px solid transparent;
}

.about-norm-benefit {
  background: rgba(22,163,74,0.05);
  border-color: rgba(22,163,74,0.2);
}

.about-norm-cost {
  background: rgba(239,68,68,0.05);
  border-color: rgba(239,68,68,0.2);
}

.about-norm-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.about-norm-formula {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255,255,255,0.7);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
  word-break: break-all;
}

.about-norm-note {
  font-size: 11px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

@media (min-width: 500px) {
  .about-norm-grid { flex-direction: row; }
  .about-norm-card { flex: 1; }
}
