@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&display=swap');

:root {
  --primary: #37474F;
  --primary-light: #546E7A;
  --primary-lighter: #78909C;
  --accent: #B0BEC5;
  --accent-light: #ECEFF1;
  --bg: #fafaf5;
  --bg-card: #ffffff;
  --bg-warm: #f5f0e8;
  --text: #1b1b18;
  --text-secondary: #6b6b60;
  --text-muted: #9c9c8e;
  --border: #e8e5db;
  --border-light: #f0ede4;
  --success: #2d6a4f;
  --danger: #c1121f;
  --danger-light: #fdf2f2;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

::selection {
  background: var(--primary-lighter);
  color: white;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== APP SHELL ===== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.app-title {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-icon {
  font-size: 1.5rem;
}

.app-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 300;
  margin-top: 0.25rem;
}

/* ===== TAB BAR ===== */
.tab-bar {
  display: flex;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 0.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-icon {
  font-size: 1.1rem;
}

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

/* ===== MAIN CONTENT ===== */
.app-content {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ===== CAUSES LIST ===== */
.causes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-pills {
  display: flex;
  gap: 0.4rem;
}

.filter-pill {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--primary-lighter);
}

.filter-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.causes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ===== CAUSE CARD ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cause-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  animation: fadeInUp 0.4s ease both;
}

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

.cause-card.funded {
  border-color: var(--primary-lighter);
}

.cause-card.donating {
  animation: donationPulse 0.5s ease;
}

@keyframes donationPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.02); box-shadow: 0 0 0 4px rgba(82,183,136,0.2); }
  100% { transform: scale(1); }
}

.cause-image {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.cause-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.funded-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
}

.funded-banner {
  background: linear-gradient(135deg, var(--primary-lighter), var(--primary));
  color: white;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.cause-body {
  padding: 1rem 1.25rem 1.25rem;
}

.cause-meta {
  margin-bottom: 0.5rem;
}

.cause-category {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cause-title {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.cause-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== PROGRESS BAR ===== */
.progress-section {
  margin-bottom: 1rem;
}

.progress-bar-track {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-lighter), var(--primary));
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.progress-stats {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
}

.raised-amount {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

.goal-amount {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.progress-percent {
  float: right;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: -1.1rem;
}

/* ===== DONATE BUTTONS ===== */
.donate-section {
  margin-bottom: 0.75rem;
}

.donate-buttons {
  display: flex;
  gap: 0.5rem;
}

.donate-btn {
  flex: 1;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  padding: 0.55rem 0;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.donate-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
}

.donate-btn:active {
  transform: scale(0.97);
}

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

/* ===== CAUSE FOOTER ===== */
.cause-footer {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.remove-btn {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.remove-btn:hover {
  color: var(--danger);
}

.confirm-remove {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.confirm-yes {
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.confirm-no {
  background: var(--border);
  color: var(--text-secondary);
  border: none;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* ===== ADD CAUSE FORM ===== */
.add-cause-section {
  max-width: 600px;
}

.cause-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

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

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.form-input,
.form-textarea,
.form-select {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary-lighter);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.photo-upload-area:hover {
  border-color: var(--primary-lighter);
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  gap: 0.4rem;
}

.upload-icon {
  font-size: 1.5rem;
}

.file-input-hidden {
  display: none;
}

.photo-preview {
  position: relative;
}

.photo-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.remove-photo-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.remove-photo-btn:hover {
  background: var(--danger);
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

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

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

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

/* ===== DONATION FEED ===== */
.feed-summary {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-warm);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.feed-summary-item {
  display: flex;
  flex-direction: column;
}

.summary-number {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  animation: fadeInUp 0.3s ease both;
  transition: background 0.2s;
}

.feed-item:hover {
  background: var(--bg-warm);
}

.feed-item-icon {
  flex-shrink: 0;
}

.donation-amount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.82rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.feed-item-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.feed-item-title {
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 2rem;
  margin-top: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  animation: fadeInUp 0.4s ease both;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }
.stat-card:nth-child(5) { animation-delay: 0.24s; }
.stat-card:nth-child(6) { animation-delay: 0.30s; }

.stat-card.accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-color: var(--primary);
}

.stat-card.accent .stat-value {
  color: white;
}

.stat-card.accent .stat-label {
  color: rgba(255,255,255,0.8);
}

.stat-value {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.chart-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.chart-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.empty-state p {
  font-size: 0.88rem;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== LOADING SKELETONS ===== */
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.skeleton-card {
  height: 200px;
  background: var(--border-light);
  border-radius: var(--radius);
  animation: pulse 1.5s ease infinite;
  margin-bottom: 1rem;
}

.skeleton-row {
  height: 56px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  animation: pulse 1.5s ease infinite;
  margin-bottom: 0.5rem;
}

.skeleton-row:nth-child(2) { animation-delay: 0.15s; }
.skeleton-row:nth-child(3) { animation-delay: 0.3s; }
.skeleton-row:nth-child(4) { animation-delay: 0.45s; }

.causes-loading,
.feed-loading,
.stats-loading {
  padding: 1rem 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .app-header {
    padding: 1.5rem 1rem 1rem;
  }

  .app-title {
    font-size: 1.4rem;
  }

  .app-content {
    padding: 1rem;
  }

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

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

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

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

  .tab-label {
    display: none;
  }

  .tab-icon {
    font-size: 1.25rem;
  }

  .tab-btn {
    padding: 0.65rem 0.25rem;
  }

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

  .feed-summary {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 380px) {
  .donate-buttons {
    flex-wrap: wrap;
  }

  .donate-btn {
    flex: 0 0 calc(50% - 0.25rem);
  }

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


<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to MicroGive! This is your personal micro-donation tracker. You'll see all your causes listed here once you create them.", "view": "user", "highlight_selector": ".app-header", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "Let's create your first cause. Tap the '+ New Cause' tab to get started.", "view": "user", "highlight_selector": ".tab-btn:nth-child(2)", "wait_for": "user_interaction"},
  {"step": 3, "narration": "Fill in the cause title, a description, your fundraising goal, and optionally upload a cover photo. Pick a category that fits.", "view": "user", "highlight_selector": ".cause-form", "wait_for": "tap_to_continue"},
  {"step": 4, "narration": "Once your cause is created, you'll see it as a card. Each card shows progress toward the goal with a visual bar.", "view": "user", "highlight_selector": ".causes-grid", "wait_for": "tap_to_continue"},
  {"step": 5, "narration": "Make a micro-donation by tapping $1, $2, $3, or $5. The progress bar updates instantly!", "view": "user", "highlight_selector": ".donate-buttons", "wait_for": "user_interaction"},
  {"step": 6, "narration": "Check the Activity tab to see your complete donation history with timestamps.", "view": "user", "highlight_selector": ".tab-btn:nth-child(3)", "wait_for": "user_interaction"},
  {"step": 7, "narration": "The Stats tab shows your overall impact — total donated, causes funded, and charts breaking down donations by category and over time.", "view": "user", "highlight_selector": ".tab-btn:nth-child(4)", "wait_for": "user_interaction"}
]
-->

.feed-item-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.feed-item-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.feed-item-donor {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.feed-item-title {
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.donation-donor-input {
  margin-bottom: 0.25rem;
}

.donation-donor-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -0.15rem;
  margin-bottom: 0.25rem;
}

@media (max-width: 640px) {
  .feed-item-title-row {
    gap: 0.2rem;
  }

  .feed-item-donor,
  .feed-item-title {
    max-width: 100%;
  }
}

.feed-item-live {
  border-color: var(--primary-lighter);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.12);
  background: linear-gradient(90deg, rgba(82, 183, 136, 0.08), var(--bg-card));
}

.feed-live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--primary-lighter);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .feed-live-pill {
    margin-left: 0;
  }
}

.stats-secondary-row {
  margin-top: 1.25rem;
}

.chart-container canvas {
  width: 100% !important;
  max-height: 280px;
}

.cause-share-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cause-share-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-btn {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.share-btn-secondary {
  color: var(--text-secondary);
}

.share-feedback {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 0.1rem;
}

@media (max-width: 640px) {
  .cause-share-actions {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
  }
}

.impact-reports-section {
  margin-top: 2rem;
}

.section-title-wrap {
  margin-bottom: 1rem;
}

.impact-report-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.impact-report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.impact-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.impact-report-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.impact-report-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.impact-report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.impact-report-stat {
  background: var(--bg-warm);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.impact-report-number {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.impact-report-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

.pdf-report-container{
  position: absolute;
  
  pointer-events: none;
  left: 0;
  top: 0;
  width: 794px;
  padding: 24px;
  background: white;
  color: #1b1b18; position: fixed; left: -9999px; top: 0;}

.pdf-report-header {
  margin-bottom: 20px;
  border-bottom: 1px solid #e8e5db;
  padding-bottom: 12px;
}

.pdf-report-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  margin-bottom: 4px;
}

.pdf-report-header p {
  color: #6b6b60;
}

.pdf-report-section {
  margin-bottom: 18px;
}

.pdf-report-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  margin-bottom: 8px;
}

.pdf-report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.pdf-report-grid div {
  border: 1px solid #e8e5db;
  border-radius: 8px;
  padding: 10px;
}

.pdf-report-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b6b60;
}

.pdf-report-grid p,
.pdf-report-section p,
.pdf-report-section li,
.pdf-report-footer p {
  font-size: 13px;
  line-height: 1.5;
}

.pdf-report-section ul {
  padding-left: 18px;
}

.pdf-report-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e8e5db;
  padding-top: 12px;
  margin-top: 18px;
  font-size: 12px;
  color: #6b6b60;
}

@media (max-width: 640px) {
  .impact-report-header {
    flex-direction: column;
    align-items: stretch;
  }

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

  .pdf-report-grid {
    grid-template-columns: 1fr;
  }

  .pdf-report-footer {
    flex-direction: column;
  }
}

.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tab-icon::before,
.tab-icon::after {
  content: none !important;
}

.tab-btn .tab-icon + .tab-label {
  margin-top: 0.1rem;
}
