.support-page {
  --bg: #f7f7f2;
  --surface: #fff;
  --text: #182822;
  --muted: #4d5c55;
  --border: #dce3db;
  --accent: #19634f;
  --accent-soft: #e2f0e8;
  --donation-bg: #153e34;
  --donation-text: #f1f9f2;
  --donation-muted: #bbd6c9;
  --donation-edge: #51776a;
  --donation-icon: #ffe2aa;
  color-scheme: light;
}

.support-page[data-theme="dark"] {
  --bg: #121a17;
  --surface: #19251f;
  --text: #eaf4ed;
  --muted: #b3c6ba;
  --border: #35483e;
  --accent: #9bd9bd;
  --accent-soft: #263e33;
  --donation-bg: #1a3d32;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  .support-page:not([data-theme]) {
    --bg: #121a17;
    --surface: #19251f;
    --text: #eaf4ed;
    --muted: #b3c6ba;
    --border: #35483e;
    --accent: #9bd9bd;
    --accent-soft: #263e33;
    --donation-bg: #1a3d32;
    color-scheme: dark;
  }
}

.support-layout {
  max-width: 72rem;
  padding: 1.55rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
}

.support-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.back-link, .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: .5rem;
  border-radius: 10px;
}

.back-link {
  padding: 0 .45rem;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover, .theme-toggle:hover { background: var(--accent-soft); }

.back-link svg, .theme-toggle svg, .donation-button svg, .project-arrow svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.theme-toggle {
  width: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  cursor: pointer;
}

.theme-toggle[hidden], .theme-sun, .theme-toggle[aria-pressed="true"] .theme-moon { display: none; }
.theme-toggle[aria-pressed="true"] .theme-sun { display: block; }

.support-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5.5vw, 4.5rem);
  padding: clamp(2rem, 4.5vw, 4rem) 0;
}

.support-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.65rem, 6vw, 5rem);
  font-weight: 780;
  line-height: .99;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.support-hero h1 span { color: var(--accent); }
.support-hero > p { max-width: 39ch; margin: 0; color: var(--muted); }

.support-goal { max-width: 28rem; margin-top: clamp(1.35rem, 3vw, 2.05rem); }

.goal-heading, .goal-totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem .8rem;
  flex-wrap: wrap;
}

.goal-heading h2 { margin: 0; font-size: .92rem; line-height: 1.45; }
.goal-heading span, .goal-totals span { color: var(--muted); font-size: .84rem; }
.goal-totals { justify-content: flex-start; margin: .2rem 0 .45rem; }
.goal-totals strong { font-size: 1.6rem; line-height: 1.25; font-variant-numeric: tabular-nums; }

.support-goal progress {
  display: block;
  width: 100%;
  height: .45rem;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--accent-soft);
  accent-color: var(--accent);
}

.support-goal progress::-webkit-progress-bar { background: var(--accent-soft); }
.support-goal progress::-webkit-progress-value { background: var(--accent); }
.support-goal progress::-moz-progress-bar { background: var(--accent); }

.donation-card {
  display: grid;
  align-content: center;
  justify-items: start;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid var(--donation-edge);
  border-radius: 24px;
  background: radial-gradient(ellipse at 100% 0%, #2c6551, transparent 64%), var(--donation-bg);
  color: var(--donation-text);
}

.donation-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  border: 1px solid var(--donation-edge);
  background: #234f41;
  color: var(--donation-icon);
}

.donation-icon svg { width: 31px; height: 31px; }
.donation-card h2 { margin: .95rem 0 .4rem; font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.035em; }
.donation-card p { margin: 0 0 1.2rem; color: var(--donation-muted); }

.donation-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.3rem;
  min-height: 48px;
  padding: .55rem 1rem;
  border-radius: 10px;
  background: var(--donation-icon);
  color: #282113;
  font-weight: 750;
  text-decoration: none;
}

.donation-button:hover { background: #fff1ce; }

.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 1.05rem 0 0;
  padding: 0;
  list-style: none;
}

.payment-methods li {
  margin: 0;
  padding: .13rem .46rem;
  border: 1px solid var(--donation-edge);
  border-radius: 5px;
  color: var(--donation-text);
  font-size: .74rem;
  white-space: nowrap;
}

.supported-projects > h2 {
  margin: 0 0 .95rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -.035em;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-list > li { margin: 0; }

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .16s ease;
}

.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.project-icon { display: block; border-radius: 14px; }

.project-arrow {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
}

.project-card h3 { margin: .85rem 0 .35rem; font-size: 1.12rem; line-height: 1.3; letter-spacing: -.02em; }
.project-card p { margin: 0 0 1rem; font-size: .92rem; line-height: 1.48; color: var(--muted); }
.project-action { margin-top: auto; color: var(--accent); font-size: .88rem; font-weight: 700; }
.project-card:hover { border-color: var(--accent); }
.project-card:hover .project-arrow { background: var(--accent-soft); }
.project-card:hover .project-action { text-decoration: underline; }

.support-layout :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.support-layout .donation-button:focus-visible { outline-color: var(--donation-icon); }
.support-footer { margin-top: 2.15rem; }
.support-footer p { margin: 0; }
.support-footer a { overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .support-intro, .project-list { grid-template-columns: minmax(0, 1fr); }
  .hero-break { display: none; }
  .support-hero h1 { max-width: 14ch; text-wrap: wrap; }
  .project-card { position: relative; padding-left: 5.2rem; }
  .project-top { position: absolute; top: 1rem; left: 1rem; right: 1rem; pointer-events: none; }
  .project-icon { width: 50px; height: 50px; }
  .project-card h3 { margin-top: 0; padding-right: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .project-card { transition: none; }
}
