:root {
  color-scheme: light;
  --background: #f8f5ec;
  --surface: #fffdf7;
  --ink: #1b342d;
  --muted: #486159;
  --green: #153d33;
  --green-light: #dce8d6;
  --gold: #f4ce75;
  --gold-hover: #f8dc96;
  --border: #d9dfd0;
  --radius: 22px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-padding-top: 6rem;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

.install-dialog {
  width: min(28rem, calc(100% - 1.5rem));
  max-height: calc(100% - 1.5rem);
  margin: auto;
  border: 0;
  border-radius: 20px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 18px 56px #10291f55;
}

.install-dialog::backdrop { background: #0c2c22b8; }

.install-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.2rem;
  background: var(--green);
}

.install-brand img { max-width: 72%; height: auto; }
.install-brand form { margin: 0; }
.install-close {
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff40;
  border-radius: 50%;
  background: transparent;
  color: white;
  cursor: pointer;
  font: 1.5rem/1 system-ui, sans-serif;
}

.install-body { padding: clamp(1.25rem, 5vw, 2rem); }
.install-body p { margin: .85rem 0 1rem; }
.install-body .button { width: 100%; }
.install-instructions { padding: .9rem; border-radius: 12px; background: var(--green-light); }
.install-instructions p, .install-instructions ol { margin: 0; }
.install-instructions ol { padding-left: 1.25rem; }
.install-instructions li + li { margin-top: .45rem; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  line-height: 1.55;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid #17685c;
  outline-offset: 4px;
  box-shadow: 0 0 0 4px var(--surface);
}

.skip-link {
  position: fixed;
  z-index: 4;
  top: .6rem;
  left: .6rem;
  padding: .65rem 1rem;
  transform: translateY(-200%);
  border-radius: 8px;
  background: var(--gold);
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(100% - 3rem, 70rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 4.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}

.brand, .header-nav, .button {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: .65rem;
  font-size: 1.26rem;
  font-weight: 760;
  letter-spacing: -.035em;
  text-decoration: none;
}

.brand img {
  background: var(--green);
  border-radius: 11px;
}

.header-nav { gap: .85rem; }

.header-news {
  padding: .45rem;
  font-weight: 620;
  text-decoration: none;
}

.header-news:hover, .site-footer a:hover { text-decoration: underline; }

.button {
  min-height: 44px;
  justify-content: center;
  gap: .65rem;
  padding: .65rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 100vw;
  font: inherit;
  font-weight: 730;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-donate {
  background: var(--gold);
  color: var(--ink);
}

.button-donate:hover { background: var(--gold-hover); }

.button-outline {
  border-color: #8ea69a;
  background: transparent;
  color: var(--green);
}

.button-outline:hover { background: var(--green-light); }

main.shell { padding-top: clamp(1rem, 4vw, 3.15rem); }

.connection-status {
  margin: 0 0 .8rem;
  padding: .6rem .85rem;
  border-radius: 10px;
  background: #f3e4b6;
  font-size: .9rem;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  min-height: 23.5rem;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--green);
  color: #fffaf0;
}

.hero-content { padding: clamp(1.5rem, 5vw, 4.2rem); }

.campaign-label {
  margin: 0 0 .5rem;
  color: #e2eacb;
  font-size: .88rem;
  font-weight: 760;
  letter-spacing: .03em;
}

h1, h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.04;
}

h1 { font-size: clamp(2.15rem, 5vw, 4.3rem); }

h2 { font-size: clamp(1.45rem, 3vw, 2.55rem); }

.hero-content > p:not(.campaign-label) {
  max-width: 38ch;
  margin: 1.15rem 0 1.5rem;
  color: #e8eee1;
}

.hero-content .button { padding-inline: 1.2rem; }

.hero-art {
  position: absolute;
  z-index: -1;
  inset: 1.25rem 0 0 55%;
  overflow: hidden;
  pointer-events: none;
}

.arc {
  position: absolute;
  right: clamp(-4rem, -2vw, -1rem);
  bottom: -23%;
  width: 85%;
  height: 111%;
  border: clamp(16px, 3vw, 38px) solid;
  border-bottom: 0;
  border-radius: 100vw 100vw 0 0;
  transform: rotate(22deg);
  transform-origin: bottom center;
}

.arc-1 { border-color: #2f6957; }
.arc-2 { inset: 21% 2% auto auto; width: 69%; height: 100%; border-color: #56816b; }
.arc-3 { inset: 33% 8% auto auto; width: 52%; height: 91%; border-color: #91a971; }
.arc-4 { inset: 47% 15% auto auto; width: 36%; height: 69%; border-color: #d9b65f; }

.donate-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 1.35rem;
  padding: clamp(1.5rem, 4vw, 2.8rem);
  border: 1px solid #e2b94d;
  border-radius: var(--radius);
  background: var(--surface);
}

.donate-panel:target { box-shadow: 0 0 0 3px #e2b94d; }

.donate-copy p {
  max-width: 57ch;
  margin: .8rem 0 0;
  color: var(--muted);
}

#payment-note { font-size: .9rem; }

.donate-links {
  display: grid;
  gap: .6rem;
}

.campaign-progress {
  grid-column: 1 / -1;
  margin-top: .65rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.metrics, .support-items {
  display: grid;
  gap: .7rem;
  margin: .65rem 0 0;
}

.metrics { grid-template-columns: repeat(4, 1fr); }

.metrics div {
  padding: .75rem .9rem;
  border-radius: 11px;
  background: #eef2e7;
}

.metrics dt { font-weight: 720; }

.metrics dd, .support-items p {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .92rem;
}

#campaign-progress {
  display: block;
  width: 100%;
  height: 1rem;
  margin-top: 1rem;
  accent-color: #2f6957;
}

#campaign-updated {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .85rem;
}

.support-panel {
  margin-top: 1.35rem;
  padding: clamp(1.5rem, 4vw, 2.8rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.support-result {
  margin: .8rem 0 0;
  color: var(--muted);
}

.support-items {
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
  margin-top: 1rem;
}

.support-items a {
  display: inline-block;
  margin-top: .35rem;
  font-size: .92rem;
  text-underline-offset: .15em;
}

.support-items ul {
  margin: .45rem 0 0;
  padding-inline-start: 1.2rem;
}

.resources {
  margin-top: 1.35rem;
}

.resource {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.resource {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.12rem 1.2rem;
  text-decoration: none;
}

.resource:hover { background: #f0f4e9; }

.resource h2 {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 720;
  letter-spacing: normal;
}

.resource p {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.resource > span { font-weight: 700; }

.notification-resource {
  width: 100%;
  margin-top: .65rem;
  border-color: #e5c9d0;
  color: #791d33;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.notification-resource:hover { background: #fff0f3; }
.notification-resource-title, .notification-summary { display: block; }
.notification-summary { margin-top: .25rem; color: var(--muted); font-size: .92rem; font-weight: 400; }
.notification-resource > span:last-child { align-self: center; font-size: 1.5rem; }

.notification-dialog { background: #fffafa; box-shadow: 0 18px 58px #4c132451; }
.notification-dialog::backdrop { background: #371423a8; }

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1.2rem;
  background: linear-gradient(135deg, #9a253a, #6c1428);
  color: white;
}

.notification-header .install-close { flex: 0 0 44px; }
.notification-header h2 { font-size: clamp(1.45rem, 6vw, 1.95rem); }
.notification-form { padding: clamp(1rem, 4vw, 1.5rem); }
.notification-form > p { margin: 0 0 .85rem; }

.notification-topics {
  min-width: 0;
  margin: 0 0 .85rem;
  padding: 0;
  border: 0;
  display: grid;
  gap: .35rem;
}

.notification-topics legend { margin: 0 0 .4rem; padding: 0; font-weight: 700; }
.notification-topic {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: .7rem;
  padding: .45rem .7rem;
  border: 1px solid #e9d5d9;
  border-radius: 10px;
  background: white;
  cursor: pointer;
}

.notification-topic:has(input:checked) { border-color: #b45167; background: #fff0f3; }
.notification-topic-all { font-weight: 750; }
.notification-topic input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: #902039; }
.notification-state, .notification-feedback { font-size: .92rem; }
.notification-state { color: var(--muted); }
.notification-feedback { color: #791d33; font-weight: 650; }
.notification-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.notification-actions > .button { flex: 1 1 auto; }
.notification-actions > .button-notification { flex-basis: 100%; background: #881e35; color: white; }
.notification-actions > .button-notification:hover { background: #6f1529; }
.notification-actions > .button:disabled { opacity: .6; cursor: default; }
.notification-actions > .notification-later { border-color: transparent; background: transparent; color: #791d33; }
.notification-actions > .notification-later:hover { background: #fff0f3; }

.site-footer {
  padding-block: 1.5rem;
  color: var(--muted);
  font-size: .82rem;
}

.site-footer a { text-decoration: none; }
.mobile-nav { display: none; }

@media (max-width: 45rem) {
  :root { scroll-padding-bottom: 5rem; }
  body { padding-bottom: calc(4.65rem + env(safe-area-inset-bottom, 0px)); }
  .shell { width: min(100% - 1.5rem, 70rem); }
  .header-inner { min-height: 4rem; }
  .header-nav { gap: .5rem; }
  .header-news { display: none; }
  .brand { font-size: 1.12rem; gap: .45rem; }
  .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .header-nav .button { padding-inline: .7rem; font-size: .88rem; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-content { padding-bottom: 2.5rem; }
  .hero-art { inset: auto 0 0 auto; width: 46%; height: 52%; opacity: .44; }
  .hero-content > p:not(.campaign-label) { max-width: 32ch; }
  .donate-panel { grid-template-columns: 1fr; }
  .donate-links { justify-items: start; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .mobile-nav {
    position: fixed;
    z-index: 3;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: .35rem;
    padding: .5rem max(.75rem, env(safe-area-inset-right, 0px)) calc(.55rem + env(safe-area-inset-bottom, 0px)) max(.75rem, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--border);
    background: var(--surface);
  }
  .mobile-nav a {
    display: grid;
    min-height: 44px;
    place-items: center;
    font-size: .9rem;
    font-weight: 730;
    text-decoration: none;
  }
}

@media (max-width: 23rem) {
  .header-nav .button { padding-inline: .53rem; }
  .brand img { display: none; }
  .donate-links .button { width: 100%; }
}

@media (max-width: 31rem) {
  .support-items { grid-template-columns: 1fr; }
  .metrics dd { overflow-wrap: anywhere; }
}
