/* ============================================
   Blu Diamond Water - Water Risk Calculator
   Brand Colors:
     Primary Dark Blue: #01118a
     Secondary Blue: #1863dc
     Accent Light Blue: #72cce9
     Accent Green: #c2d500
     White: #ffffff
     Light Gray: #f6f6f6
   ============================================ */

:root {
  --primary: #01118a;
  --secondary: #1863dc;
  --accent: #72cce9;
  --accent-green: #c2d500;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 50px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);
  --transition: all 0.25s ease;
  /* Risk level colors */
  --risk-low: #22c55e;
  --risk-moderate: #84cc16;
  --risk-elevated: #f59e0b;
  --risk-high: #f97316;
  --risk-critical: #ef4444;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Century Gothic', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

/* ============ HEADER ============ */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-logo .logo-img {
  height: 24px;
  filter: brightness(0) invert(1);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.header-nav a:hover {
  color: var(--primary);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  background: var(--primary);
  color: var(--white);
  font-family: inherit;
  line-height: 1.4;
}

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

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

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn-get-started {
  background: var(--secondary);
  color: #ffffff !important;
}

.btn-get-started:hover {
  background: var(--accent);
  color: var(--primary) !important;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: transparent;
  color: var(--primary);
  box-shadow: none;
}

.btn-accent {
  background: var(--accent-green);
  color: var(--primary);
}

.btn-accent:hover {
  background: #d4e600;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0a1f6b 60%, var(--secondary) 100%);
  color: var(--white);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(114,204,233,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(194,213,0,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.text-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  line-height: 1.7;
  font-weight: 300;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.stat-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

/* ============ CALCULATOR SECTION ============ */
.calculator-section {
  padding: 80px 0;
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 auto;
}

.calculator-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  max-width: 800px;
  margin: 0 auto;
}

/* Progress Bar */
.progress-bar {
  margin-bottom: 40px;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}

.progress-step.active .step-dot {
  background: var(--primary);
  color: var(--white);
}

.progress-step.completed .step-dot {
  background: var(--accent);
  color: var(--primary);
}

.step-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
}

.progress-step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.progress-line {
  width: 80px;
  height: 3px;
  background: var(--gray-200);
  margin: 0 8px;
  margin-bottom: 24px;
  border-radius: 2px;
}

/* Step: User Type / Facility Selection */
.step h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  text-align: center;
}

.facility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.facility-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.facility-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.facility-card.selected {
  border-color: var(--primary);
  background: rgba(1,17,138,0.03);
  box-shadow: 0 0 0 3px rgba(1,17,138,0.1);
}

.facility-icon {
  width: 48px;
  height: 48px;
  color: var(--secondary);
}

.facility-icon svg {
  width: 100%;
  height: 100%;
}

.facility-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.facility-desc {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* Step 2: Form Fields */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-800);
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(24,99,220,0.1);
}

.form-group input::placeholder {
  color: var(--gray-400);
}

.form-group .hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  gap: 12px;
}

/* ============ RESULTS ============ */
.results-container {
  animation: fadeIn 0.5s ease;
}

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

/* ============ RISK SCORE BANNER ============ */
.risk-score-banner {
  text-align: center;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  color: var(--white);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.risk-score-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

/* Risk level gradient backgrounds */
.risk-banner-low {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}
.risk-banner-moderate {
  background: linear-gradient(135deg, #65a30d, #84cc16);
}
.risk-banner-elevated {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}
.risk-banner-high {
  background: linear-gradient(135deg, #ea580c, #f97316);
}
.risk-banner-critical {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.risk-score-number {
  display: block;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.risk-score-label {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.risk-score-summary {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============ RISK INDICATOR CARDS ============ */
.risk-indicator-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.risk-indicator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  background: var(--white);
  border: 2px solid var(--gray-200);
  transition: var(--transition);
}

.risk-indicator-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Border colors by risk level */
.risk-indicator-card.risk-low { border-color: var(--risk-low); }
.risk-indicator-card.risk-moderate { border-color: var(--risk-moderate); }
.risk-indicator-card.risk-elevated { border-color: var(--risk-elevated); }
.risk-indicator-card.risk-high { border-color: var(--risk-high); }
.risk-indicator-card.risk-critical { border-color: var(--risk-critical); }

.risk-indicator-name {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 3.9em;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-600);
  margin-bottom: 12px;
  line-height: 1.3;
}

.risk-indicator-score {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
}

.risk-indicator-score.score-low { background: var(--risk-low); }
.risk-indicator-score.score-moderate { background: var(--risk-moderate); }
.risk-indicator-score.score-elevated { background: var(--risk-elevated); }
.risk-indicator-score.score-high { background: var(--risk-high); }
.risk-indicator-score.score-critical { background: var(--risk-critical); }

.risk-indicator-level {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.risk-indicator-level.level-low { color: var(--risk-low); }
.risk-indicator-level.level-moderate { color: var(--risk-moderate); }
.risk-indicator-level.level-elevated { color: var(--risk-elevated); }
.risk-indicator-level.level-high { color: var(--risk-high); }
.risk-indicator-level.level-critical { color: var(--risk-critical); }

.risk-indicator-finding {
  flex: 1;
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ============ RISK BREAKDOWN BARS ============ */
.risk-breakdown {
  margin-bottom: 32px;
}

.risk-breakdown h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

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

.breakdown-label {
  width: 180px;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
}

.breakdown-bar-wrap {
  flex: 1;
  height: 28px;
  background: var(--gray-100);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.breakdown-bar {
  height: 100%;
  border-radius: 14px;
  transition: width 0.8s ease;
  min-width: 2px;
}

.breakdown-value {
  width: 80px;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* Risk bar colors */
.bar-risk-low { background: var(--risk-low); }
.bar-risk-moderate { background: var(--risk-moderate); }
.bar-risk-elevated { background: var(--risk-elevated); }
.bar-risk-high { background: var(--risk-high); }
.bar-risk-critical { background: var(--risk-critical); }

/* ============ WATERSHED CARD ============ */
.watershed-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #eef8f3 100%);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
}

.watershed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.watershed-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.watershed-huc {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--white);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
}

.watershed-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
}

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

.watershed-item {
  background: var(--white);
  border-radius: 8px;
  padding: 12px 14px;
}

.watershed-item-full {
  grid-column: 1 / -1;
}

.watershed-item-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.watershed-item-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-800);
}

.water-stress-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.watershed-source {
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--gray-500);
  font-style: italic;
}

.watershed-loading {
  text-align: center;
  padding: 20px;
  color: var(--gray-500);
  font-size: 0.88rem;
  font-style: italic;
}

/* ============ RISK FINDINGS & RECOMMENDATIONS ============ */
.risk-findings {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
}

.risk-findings h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.risk-findings-list {
  list-style: none;
  padding: 0;
}

.risk-finding-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.risk-finding-item:last-child {
  border-bottom: none;
}

.risk-finding-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--white);
  margin-top: 2px;
}

.risk-finding-text {
  flex: 1;
}

.risk-finding-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.risk-finding-detail {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.risk-findings-cta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid rgba(0,0,0,0.06);
  text-align: center;
}

.risk-findings-cta p {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 16px;
}

/* ============ WATER RATE COMPARISON BAR ============ */
.water-rate-comparison {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.rate-bar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rate-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rate-bar-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  min-width: 100px;
  text-align: right;
}

.rate-bar-track {
  flex: 1;
  height: 18px;
  background: var(--gray-100);
  border-radius: 9px;
  overflow: hidden;
}

.rate-bar-fill {
  height: 100%;
  border-radius: 9px;
  transition: width 0.8s ease;
}

.rate-bar-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
  min-width: 56px;
}

.rate-diff {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 8px;
}

/* ============ WATER OFFSET APPLICABILITY ============ */
.offset-applicability-section {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}

.offset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.offset-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.offset-score-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}

.offset-score-badge.score-low { background: var(--risk-low); }
.offset-score-badge.score-moderate { background: var(--risk-moderate); }
.offset-score-badge.score-elevated { background: var(--risk-elevated); }
.offset-score-badge.score-high { background: var(--risk-high); }
.offset-score-badge.score-critical { background: var(--risk-critical); }

.offset-level {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.offset-level.level-low { color: var(--risk-low); }
.offset-level.level-moderate { color: var(--risk-moderate); }
.offset-level.level-elevated { color: var(--risk-elevated); }
.offset-level.level-high { color: var(--risk-high); }
.offset-level.level-critical { color: var(--risk-critical); }

.offset-finding {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
}

.offset-factors {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.offset-factor-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offset-factor-label {
  width: 240px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
}

.offset-factor-bar-wrap {
  flex: 1;
  height: 14px;
  background: var(--gray-100);
  border-radius: 7px;
  overflow: hidden;
}

.offset-factor-bar {
  height: 100%;
  border-radius: 7px;
  transition: width 0.8s ease;
  min-width: 2px;
}

.offset-factor-value {
  width: 60px;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
}

.offset-note {
  font-size: 0.78rem;
  color: var(--gray-500);
  font-style: italic;
  line-height: 1.5;
}

/* Offset Project Recommendations */
.offset-projects-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  margin: 20px 0 12px;
}

.offset-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.offset-project-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offset-project-icon {
  width: 32px;
  height: 32px;
  color: var(--secondary);
}

.offset-project-icon svg {
  width: 100%;
  height: 100%;
}

.offset-project-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
}

.offset-project-desc {
  font-size: 0.78rem;
  color: var(--gray-600);
  line-height: 1.5;
  flex: 1;
}

.offset-project-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}

.offset-project-trigger-label {
  font-size: 0.72rem;
  color: var(--gray-500);
  font-weight: 500;
}

.offset-project-trigger-score {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--white);
}

.offset-project-trigger-score.score-low { background: var(--risk-low); }
.offset-project-trigger-score.score-moderate { background: var(--risk-moderate); }
.offset-project-trigger-score.score-elevated { background: var(--risk-elevated); }
.offset-project-trigger-score.score-high { background: var(--risk-high); }
.offset-project-trigger-score.score-critical { background: var(--risk-critical); }

/* ============ DATA SOURCES SUMMARY ============ */
.data-sources-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.data-source-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.data-source-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.data-source-icon.source-live {
  border-color: var(--success);
  color: var(--success);
}

.data-source-icon.source-static {
  border-color: var(--gray-400);
  color: var(--gray-400);
}

.data-source-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.data-source-value {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.data-source-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-source-tag.tag-live {
  background: rgba(34,197,94,0.1);
  color: var(--success);
}

.data-source-tag.tag-static {
  background: var(--gray-100);
  color: var(--gray-500);
}

/* ============ SCENARIO PLANNING ============ */
.scenario-panel {
  background: var(--white);
  border: 2px solid var(--secondary);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
}

.scenario-panel h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.scenario-panel > p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 20px;
}

/* Scenario presets */
.scenario-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.scenario-preset-btn {
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 2px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  color: var(--gray-700);
}

.scenario-preset-btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  background: rgba(24,99,220,0.04);
}

.scenario-preset-btn.active {
  border-color: var(--secondary);
  background: var(--secondary);
  color: var(--white);
}

/* Scenario custom inputs */
.scenario-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.scenario-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scenario-input-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
}

.scenario-input-group input,
.scenario-input-group select {
  padding: 8px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--gray-800);
}

.scenario-actions {
  display: flex;
  gap: 12px;
}

/* Scenario comparison table */
.scenario-comparison {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--gray-200);
}

.scenario-comparison-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.7fr;
  background: var(--primary);
  color: var(--white);
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scenario-comparison-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.7fr;
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--gray-100);
  align-items: center;
}

.scenario-comparison-row:last-child {
  border-bottom: none;
}

.scenario-comparison-row.overall-row {
  background: var(--gray-50);
  font-weight: 700;
}

.scenario-indicator-name {
  font-weight: 600;
  color: var(--gray-700);
}

.scenario-score {
  font-weight: 700;
  text-align: center;
}

.scenario-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
  justify-content: center;
}

.scenario-delta.delta-up {
  color: var(--danger);
}

.scenario-delta.delta-down {
  color: var(--success);
}

.scenario-delta.delta-neutral {
  color: var(--gray-500);
}

/* Scenario description */
.scenario-description {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 20px;
}

/* Scenario checkbox list */
.scenario-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scenario-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--gray-700);
  cursor: pointer;
}
.scenario-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--secondary);
}

/* Scenario input row (number + unit) */
.scenario-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scenario-input-row input {
  flex: 1;
}
.scenario-input-unit {
  font-size: 0.82rem;
  color: var(--gray-500);
  white-space: nowrap;
}

/* Scenario changes summary */
.scenario-changes {
  font-size: 0.88rem;
  color: var(--gray-600);
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

/* Scenario overall score comparison (big display) */
.scenario-overall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  margin-bottom: 24px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}
.scenario-overall-baseline,
.scenario-overall-projected {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.scenario-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}
.scenario-score {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}
.scenario-level {
  font-size: 0.82rem;
  font-weight: 600;
}

/* Score colors (shared with indicator cards) */
.score-low, .level-low { color: var(--risk-low); }
.score-moderate, .level-moderate { color: var(--risk-moderate); }
.score-elevated, .level-elevated { color: var(--risk-elevated); }
.score-high, .level-high { color: var(--risk-high); }
.score-critical, .level-critical { color: var(--risk-critical); }

/* Arrow between baseline and projected */
.scenario-overall-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.scenario-arrow {
  font-size: 2rem;
  color: var(--gray-400);
}
.scenario-overall-arrow.worse .scenario-arrow { color: var(--danger); }
.scenario-overall-arrow.better .scenario-arrow { color: var(--success); }
.scenario-overall-arrow .scenario-delta {
  font-size: 1rem;
  font-weight: 700;
}
.scenario-overall-arrow.worse .scenario-delta { color: var(--danger); }
.scenario-overall-arrow.better .scenario-delta { color: var(--success); }
.scenario-overall-arrow.neutral .scenario-delta { color: var(--gray-500); }

/* Scenario comparison table */
.scenario-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.88rem;
}
.scenario-table thead {
  background: var(--primary);
  color: var(--white);
}
.scenario-table th {
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}
.scenario-table th:first-child {
  text-align: left;
}
.scenario-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
}
.scenario-table-name {
  font-weight: 600;
  color: var(--gray-700);
  text-align: left !important;
}
.scenario-cell-score {
  font-weight: 700;
  display: inline-block;
  min-width: 32px;
}
.scenario-delta-cell {
  font-weight: 700;
  font-size: 0.85rem;
}
.scenario-delta-cell.worse { color: var(--danger); }
.scenario-delta-cell.better { color: var(--success); }
.scenario-delta-cell.neutral { color: var(--gray-500); }

/* Scenario insights */
.scenario-insights {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scenario-insight {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
}
.scenario-insight.worse {
  background: rgba(239, 68, 68, 0.08);
  border-left: 4px solid var(--danger);
  color: var(--gray-700);
}
.scenario-insight.better {
  background: rgba(34, 197, 94, 0.08);
  border-left: 4px solid var(--success);
  color: var(--gray-700);
}
.scenario-insight.neutral {
  background: var(--gray-50);
  border-left: 4px solid var(--gray-300);
  color: var(--gray-600);
}

/* ============ LOADING STATE ============ */
.loading-overlay {
  text-align: center;
  padding: 60px 24px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--secondary);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.loading-subtext {
  font-size: 0.88rem;
  color: var(--gray-500);
  margin-bottom: 20px;
}

/* API status dots during loading */
.api-status {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.api-status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-500);
}

.api-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  transition: background 0.3s ease;
}

.api-status-dot.dot-loading {
  background: var(--warning);
  animation: pulse 1s ease infinite;
}

.api-status-dot.dot-success {
  background: var(--success);
}

.api-status-dot.dot-failed {
  background: var(--danger);
}

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

/* ============ LEAD FORM ============ */
.lead-form-section {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.lead-form-section h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.lead-form-section > p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.lead-success {
  text-align: center;
  padding: 24px;
}

.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
}

.success-icon svg {
  width: 100%;
  height: 100%;
}

.lead-success h4 {
  color: var(--success);
  margin-bottom: 8px;
}

/* ============ HOW IT WORKS ============ */
.how-it-works {
  padding: 80px 0;
  background: transparent;
}

.hiw-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px;
}

.hiw-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 28px;
  background: var(--gray-50);
  border-radius: var(--radius);
  transition: var(--transition);
}

.hiw-row:hover {
  background: var(--gray-100);
}

.hiw-number {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.hiw-content {
  flex: 1;
}

.hiw-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.hiw-content p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.footer-tagline {
  font-size: 0.9rem;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.8rem;
}

.disclaimer {
  margin-top: 8px;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ============ EMBED MODE ============ */
html.embed-mode .header,
html.embed-mode .hero,
html.embed-mode .footer {
  display: none !important;
}

html.embed-mode body {
  background: transparent;
  min-height: auto;
}

html.embed-mode .calculator-section {
  padding: 32px 0 40px;
  min-height: auto;
  background: transparent;
}

html.embed-mode .section-header {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

html.embed-mode .section-header h2 {
  color: var(--white);
}

html.embed-mode .section-header p {
  color: rgba(255, 255, 255, 0.9);
}

html.embed-mode .how-it-works {
  padding: 0 0 40px;
}


/* ============ REGION MODE TOGGLE ============ */
.mode-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.mode-btn {
  padding: 10px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}

.mode-btn:first-child {
  border-radius: 999px 0 0 999px;
  border-right: 1px solid var(--gray-200);
}

.mode-btn:last-child {
  border-radius: 0 999px 999px 0;
  border-left: 1px solid var(--gray-200);
}

.mode-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.mode-btn:hover:not(.active) {
  border-color: var(--accent);
  color: var(--gray-800);
}

.mode-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ============ INPUT MODE TOGGLE ============ */
.input-mode-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.input-mode-btn {
  padding: 8px 22px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}

.input-mode-btn:first-child {
  border-radius: 999px 0 0 999px;
  border-right: 1px solid var(--gray-200);
}

.input-mode-btn:last-child {
  border-radius: 0 999px 999px 0;
  border-left: 1px solid var(--gray-200);
}

.input-mode-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.input-mode-btn:hover:not(.active) {
  border-color: var(--accent);
  color: var(--gray-800);
}

/* ============ BATCH UPLOAD ============ */
.batch-subtitle {
  text-align: center;
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.batch-upload-area {
  margin-bottom: 20px;
}

.upload-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: var(--secondary);
  background: rgba(24, 99, 220, 0.03);
}

.upload-icon {
  color: var(--gray-400);
  margin-bottom: 12px;
}

.upload-text {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.upload-browse {
  color: var(--secondary);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.upload-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.file-info-details {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.upload-row-badge {
  background: var(--secondary);
  color: white;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.batch-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

/* ============ BATCH PREVIEW TABLE ============ */
.batch-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.batch-preview-stats {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
}

.batch-stat-valid {
  color: var(--success);
  font-weight: 600;
}

.batch-stat-error {
  color: var(--danger);
  font-weight: 600;
}

.batch-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.batch-preview-table th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
}

.batch-preview-table td {
  border-bottom: 1px solid var(--gray-100);
  padding: 10px 12px;
  color: var(--gray-700);
}

.batch-preview-table tr.row-error td {
  background: rgba(239, 68, 68, 0.04);
}

.batch-preview-table tr.row-valid td {
  background: rgba(34, 197, 94, 0.04);
}

.batch-error-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: help;
}

.batch-valid-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ============ BATCH RESULTS ============ */
.batch-results-container {
  padding: 0;
}

.batch-portfolio-summary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  margin-bottom: 32px;
  text-align: center;
}

.batch-portfolio-title {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 8px;
}

.batch-portfolio-score {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.batch-portfolio-level {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.batch-portfolio-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.batch-portfolio-stat {
  text-align: center;
}

.batch-portfolio-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.batch-portfolio-stat-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

.batch-risk-distribution {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.batch-risk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
}

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

/* Batch comparison table */
.batch-comparison {
  margin-bottom: 32px;
}

.batch-comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.batch-comparison-header h4 {
  margin: 0;
  color: var(--gray-800);
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.batch-table th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  white-space: nowrap;
}

.batch-table th:hover {
  background: var(--gray-100);
}

.batch-table td {
  border-bottom: 1px solid var(--gray-100);
  padding: 10px 12px;
  color: var(--gray-700);
}

.batch-table .score-cell {
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  padding: 4px 8px;
}

.score-cell.low { background: rgba(34,197,94,0.1); color: #16a34a; }
.score-cell.moderate { background: rgba(132,204,22,0.1); color: #65a30d; }
.score-cell.elevated { background: rgba(245,158,11,0.1); color: #d97706; }
.score-cell.high { background: rgba(249,115,22,0.1); color: #ea580c; }
.score-cell.critical { background: rgba(239,68,68,0.1); color: #dc2626; }

.batch-view-btn {
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--secondary);
  background: transparent;
  color: var(--secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.batch-view-btn:hover {
  background: var(--secondary);
  color: white;
}

/* Batch risk heatmap */
.batch-heatmap {
  margin-bottom: 32px;
}

.batch-heatmap h4 {
  margin-bottom: 16px;
  color: var(--gray-800);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: 200px repeat(5, 1fr);
  gap: 2px;
  font-size: 0.82rem;
}

.heatmap-header {
  font-weight: 600;
  color: var(--gray-700);
  padding: 8px;
  text-align: center;
  background: var(--gray-50);
  border-radius: 4px;
}

.heatmap-label {
  padding: 8px;
  font-weight: 500;
  color: var(--gray-700);
  display: flex;
  align-items: center;
}

.heatmap-cell {
  padding: 8px;
  text-align: center;
  font-weight: 700;
  border-radius: 4px;
}

/* International confidence disclaimer */
.intl-disclaimer {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(24, 99, 220, 0.05);
  border: 1px solid rgba(24, 99, 220, 0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.intl-disclaimer svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--secondary);
}

/* Batch Results — Summary, Comparison Table, Heatmap (actual class names) */
.batch-portfolio-summary h3 {
  margin: 0 0 20px;
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.9;
}

.batch-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.batch-summary-card {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.batch-summary-score {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.batch-summary-count {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.batch-summary-label {
  font-size: 0.82rem;
  opacity: 0.85;
  font-weight: 500;
}

.batch-summary-level {
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 2px;
}

.batch-summary-sublabel {
  font-size: 0.78rem;
  opacity: 0.75;
  margin-top: 2px;
}

.batch-risk-dist-label {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 8px;
}

.batch-risk-dist-bar {
  display: flex;
  height: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
}

.batch-risk-dist-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  min-width: 8px;
}

.batch-risk-dist-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.batch-risk-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  opacity: 0.9;
}

.batch-risk-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Batch Comparison Table (actual class names) */
.batch-comparison-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.batch-comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.batch-comparison-header h4 {
  margin: 0;
  color: var(--gray-800);
}

.batch-actions-bar {
  display: flex;
  gap: 8px;
}

.batch-comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.batch-comparison-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.batch-comparison-tbl th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}

.batch-comparison-tbl th.sortable {
  cursor: pointer;
}

.batch-comparison-tbl th.sortable:hover {
  background: var(--gray-100);
}

.batch-comparison-tbl td {
  border-bottom: 1px solid var(--gray-100);
  padding: 10px 12px;
  color: var(--gray-700);
}

.batch-comparison-tbl tr:hover {
  background: var(--gray-50);
}

.batch-score-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: 999px;
  min-width: 32px;
  text-align: center;
}

.batch-score-badge.score-low { background: rgba(34,197,94,0.12); color: #16a34a; }
.batch-score-badge.score-moderate { background: rgba(132,204,22,0.12); color: #65a30d; }
.batch-score-badge.score-elevated { background: rgba(245,158,11,0.12); color: #d97706; }
.batch-score-badge.score-high { background: rgba(249,115,22,0.12); color: #ea580c; }
.batch-score-badge.score-critical { background: rgba(239,68,68,0.12); color: #dc2626; }

.batch-score-cell {
  font-weight: 600;
  font-size: 0.85rem;
}

/* Batch Heatmap (actual class names) */
.batch-heatmap-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.batch-heatmap-section h4 {
  margin: 0 0 8px;
  color: var(--gray-800);
}

.batch-heatmap-desc {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.batch-heatmap-grid {
  display: grid;
  grid-template-columns: 180px repeat(5, 1fr);
  gap: 2px;
  font-size: 0.82rem;
}

.batch-heatmap-header-cell {
  font-weight: 600;
  color: var(--gray-700);
  padding: 8px;
  text-align: center;
  background: var(--gray-50);
  border-radius: 4px;
}

.batch-heatmap-row-label {
  padding: 8px;
  font-weight: 500;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-heatmap-cell {
  padding: 8px;
  text-align: center;
  font-weight: 700;
  border-radius: 4px;
  color: white;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .header-nav {
    gap: 12px;
  }

  .header-nav a:not(.btn) {
    font-size: 0.8rem;
  }

  .btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .logo-img {
    height: 22px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .calculator-card {
    padding: 24px;
  }

  .facility-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .lead-form-grid {
    grid-template-columns: 1fr;
  }

  /* Risk-specific responsive */
  .risk-indicator-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .risk-indicator-name {
    font-size: 0.7rem;
  }

  .risk-indicator-score {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }

  .risk-score-number {
    font-size: 3rem;
  }

  .breakdown-label {
    width: 120px;
    font-size: 0.78rem;
  }

  .breakdown-value {
    width: 70px;
    font-size: 0.78rem;
  }

  .data-sources-summary {
    grid-template-columns: 1fr;
  }

  .mode-toggle-wrap,
  .input-mode-toggle-wrap {
    flex-wrap: wrap;
  }

  .mode-btn,
  .input-mode-btn {
    font-size: 0.82rem;
    padding: 8px 18px;
  }

  .batch-portfolio-stats {
    gap: 20px;
  }

  .batch-table {
    font-size: 0.78rem;
  }

  .batch-table th,
  .batch-table td {
    padding: 8px 8px;
  }

  .heatmap-grid {
    grid-template-columns: 140px repeat(5, 1fr);
    font-size: 0.75rem;
  }

  .batch-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .batch-comparison-tbl {
    font-size: 0.78rem;
  }

  .batch-comparison-tbl th,
  .batch-comparison-tbl td {
    padding: 8px 6px;
  }

  .batch-heatmap-grid {
    grid-template-columns: 120px repeat(5, 1fr);
    font-size: 0.75rem;
  }

  .scenario-inputs {
    grid-template-columns: 1fr;
  }

  .offset-factor-label {
    width: 150px;
    font-size: 0.78rem;
  }

  .offset-projects-grid {
    grid-template-columns: 1fr;
  }

  .scenario-presets {
    gap: 6px;
  }

  .scenario-preset-btn {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .scenario-overall {
    gap: 16px;
    padding: 16px;
  }

  .scenario-score {
    font-size: 2rem;
  }

  .scenario-table th,
  .scenario-table td {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .watershed-grid {
    grid-template-columns: 1fr;
  }

  .hiw-row {
    padding: 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .result-total-number {
    font-size: 2rem;
  }

  .progress-steps {
    gap: 0;
  }

  .progress-line {
    width: 40px;
  }

  .step-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .header-nav a:not(.btn) {
    display: none;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .calculator-section {
    padding: 48px 0;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .hiw-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }

  /* Risk-specific mobile */
  .risk-indicator-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .risk-indicator-card:last-child {
    grid-column: 1 / -1;
  }

  .risk-score-number {
    font-size: 2.5rem;
  }

  .risk-score-label {
    font-size: 1.1rem;
  }

  .scenario-overall {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .scenario-overall-arrow {
    flex-direction: row;
    gap: 8px;
  }

  .scenario-arrow {
    font-size: 1.5rem;
  }

  .scenario-score {
    font-size: 1.8rem;
  }

  .scenario-table {
    font-size: 0.78rem;
  }

  .scenario-table th,
  .scenario-table td {
    padding: 6px 8px;
  }

  .scenario-panel {
    padding: 20px;
  }

  .scenario-actions {
    flex-direction: column;
  }

  .scenario-actions .btn {
    width: 100%;
  }
}

/* ============================================================
   LOCATION PREVIEW (live card under ZIP input)
   ============================================================ */
.location-preview {
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-left: 3px solid var(--secondary);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--gray-700);
}
.location-preview.error {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.06);
  color: var(--danger);
}
.location-preview-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
}
.location-preview-label {
  flex: 0 0 110px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}
.location-preview-value {
  flex: 1;
  color: var(--gray-800);
  font-weight: 500;
}
.location-preview-loading,
.location-preview-loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-style: italic;
}
.location-preview-error {
  font-weight: 600;
}
.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: bdw-spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes bdw-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   LOCATION MAP (Leaflet)
   ============================================================ */
#location-map-section {
  margin-bottom: 32px;
}
#location-map-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.map-container {
  height: 360px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin-bottom: 6px;
  background: var(--gray-50);
}
.map-attribution {
  text-align: right;
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-top: 0;
}
.map-attribution a {
  color: var(--gray-500);
}

@media (max-width: 640px) {
  .map-container {
    height: 260px;
  }
}
