@font-face {
  font-family: "Onest";
  src: url("./assets/fonts/onest-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size-adjust: .527;
  color: #202c24;
  background: #f5f7f5;
  font-synthesis: none;
  --canvas: #f5f7f5;
  --paper: #fff;
  --ink: #202c24;
  --muted: #526357;
  --green: #245c41;
  --green-dark: #184531;
  --green-soft: #dcecdf;
  --line: #e2e9e3;
  --radius: 26px;
  --motion: 160ms ease;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; line-height: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #347652; outline-offset: 3px; }
h1:focus, main:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 730; line-height: 1.14; text-wrap: balance; overflow-wrap: anywhere; }
p { overflow-wrap: anywhere; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 12px 20px; background: var(--paper); border-radius: 12px; }
.noscript { padding: 16px; text-align: center; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  width: fit-content;
  color: var(--green-dark);
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -.025em;
  text-decoration: none;
}
.brand img { object-fit: contain; flex-shrink: 0; }
.button, .text-link, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  text-decoration: none;
  text-align: center;
  font-weight: 680;
  transition: background-color var(--motion), box-shadow var(--motion), color var(--motion);
}
.button { border: 1px solid transparent; border-radius: 999px; padding: 10px 20px; }
.button svg, .text-link svg { width: 20px; height: 20px; }
.primary { color: #fff; background: var(--green); }
.primary:hover { background: var(--green-dark); }
.primary:active { background: #113725; }
.soft { color: var(--green-dark); background: var(--green-soft); }
.soft:hover, .soft:active { background: #c9e2d0; }
.outline { color: var(--green); background: transparent; border-color: #9ab5a2; }
.outline:hover, .outline:active { background: #e8f1e9; }
.text-link { width: fit-content; color: var(--green); text-align: left; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-button { width: 48px; border: 0; border-radius: 50%; background: transparent; color: var(--green); flex-shrink: 0; }
.icon-button:hover, .icon-button:active { background: #e8f1e9; }

.welcome {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1fr);
  gap: clamp(42px, 6vw, 104px);
  width: min(100%, 1220px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: max(34px, var(--safe-top)) max(36px, var(--safe-right)) max(34px, var(--safe-bottom)) max(36px, var(--safe-left));
}
.welcome-copy { display: flex; flex-direction: column; min-width: 0; }
.welcome-copy .brand { margin-left: -4px; }
.welcome-body { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; padding-block: 32px 32px; }
.welcome h1 { font-size: clamp(2.25rem, 4vw, 3.55rem); letter-spacing: -.04em; text-wrap: initial; line-height: 1.06; }
.welcome-roles { display: grid; width: min(100%, 470px); gap: 10px; }
.welcome-role { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5px 11px; padding: 14px; }
.welcome-role .avatar { grid-row: span 2; }
.welcome-role h2 { font-size: 1.12rem; }
.welcome-role p { color: var(--muted); font-size: .86rem; }
.welcome-role .welcome-button { grid-column: 1 / -1; margin-top: 6px; justify-content: space-between; padding-inline: 15px; }
.welcome-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; padding-inline: 4px; }
.welcome-note svg { width: 16px; height: 16px; }
.welcome-art { align-self: stretch; position: relative; background: #d1e2d4; border-radius: 36px; overflow: hidden; min-height: 480px; max-height: 780px; }
.welcome-art img { display: block; position: absolute; width: 100%; height: 100%; object-fit: cover; }

.app-header { background: var(--canvas); border-bottom: 1px solid var(--line); padding-top: var(--safe-top); }
.header-inner, .app-content { width: min(100%, 1136px); margin-inline: auto; padding-left: max(24px, var(--safe-left)); padding-right: max(24px, var(--safe-right)); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.navigation { display: flex; gap: 7px; }
.navigation a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 48px; border-radius: 999px; padding: 8px 14px; font-size: .92rem; font-weight: 650; color: var(--muted); text-decoration: none; transition: background-color var(--motion); }
.navigation a:hover { background: #e9f1ea; }
.navigation a[aria-current="page"] { color: var(--green-dark); background: var(--green-soft); }
.nav-icon svg { width: 21px; height: 21px; }
.app-content { padding-top: 32px; padding-bottom: max(42px, var(--safe-bottom)); }
.narrow { max-width: 736px; }
.app-content.catalog {
  --page-gutter: 24px;
  --rail-start: max(var(--page-gutter), var(--safe-left));
  --rail-end: max(var(--page-gutter), var(--safe-right));
  --content-start: max(var(--rail-start), calc((100% - 1088px) / 2));
  --content-end: max(var(--rail-end), calc((100% - 1088px) / 2));
  width: 100%;
  padding-inline: 0;
}
.catalog-search, .catalog > .section-title, .catalog > .feed {
  margin-inline: var(--content-start) var(--content-end);
}
.catalog-intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 33px; }
.catalog-search .search-label {
  min-height: 54px;
  padding-inline: 15px;
  background: #e8f0e9;
  border: 1px solid #d5e2d7;
  border-radius: 20px;
}
.catalog-search .search-label input { font-size: 1rem; }
.catalog-search input::placeholder { color: var(--muted); opacity: 1; }
.city-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #e8f0e9;
  color: var(--green-dark);
  min-height: 48px;
  border: 1px solid #d5e2d7;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .88rem;
  font-weight: 700;
  transition: background-color var(--motion);
}
.city-button:hover, .city-button:active { background: #deebe0; }
.city-button svg { width: 18px; height: 18px; }
.city-button svg:last-child { width: 14px; height: 14px; }
.categories {
  --category-gap: clamp(8px, 1.2vw, 14px);
  display: flex;
  align-items: flex-start;
  gap: var(--category-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--rail-start) var(--rail-end);
  scrollbar-width: thin;
  scrollbar-color: #9eb9a6 transparent;
  padding: 2px var(--rail-end) 8px var(--rail-start);
}
.categories:focus-visible { outline-offset: -3px; }
.mint { --tint: #e1efe4; --tint-ink: #245a3f; }
.lilac { --tint: #eee8f5; --tint-ink: #594770; }
.peach { --tint: #f8eadc; --tint-ink: #794c28; }
.rose { --tint: #f7e8eb; --tint-ink: #7d4053; }
.category {
  --caption-color: #2c4938;
  position: relative;
  display: flex;
  flex: 0 0 calc((100% + var(--rail-end) - 3 * var(--category-gap)) / 3.5);
  align-items: flex-end;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  isolation: isolate;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--tint);
  border: 0;
  border-radius: clamp(13px, 3vw, 20px);
  text-align: center;
  box-shadow: 0 2px 6px #19342626;
  transition: box-shadow var(--motion);
}
.category[data-id="children"] { --caption-color: #445229; }
.category.lilac { --caption-color: #514064; }
.category.peach { --caption-color: #684128; }
.category.rose { --caption-color: #733f51; }
.category-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  z-index: -1;
}
.category-label {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: max(34px, 2.45em);
  padding: 3px;
  color: #fff;
  background: var(--caption-color);
  font-size: clamp(.6875rem, 3.2vw, 1rem);
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.category-check {
  position: absolute;
  top: 7px;
  right: 7px;
  display: none;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--green-dark);
  border-radius: 50%;
}
.category-check svg { width: 15px; height: 15px; }
.category:hover { box-shadow: 0 3px 8px #19342640; }
.category:active .category-label { filter: brightness(.86); }
.category[aria-pressed="true"] .category-check { display: grid; }
.category::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #6c8072;
  border-radius: inherit;
  pointer-events: none;
}
.category[aria-pressed="true"]::after { border: 2px solid var(--green-dark); }
.category:focus-visible { outline: none; }
.category:focus-visible::after { border: 3px solid #fff; box-shadow: inset 0 0 0 3px var(--green-dark); }
.section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.section-title h1 { font-size: clamp(2.15rem, 4vw, 3.35rem); letter-spacing: -.035em; }
.demo-label { color: var(--muted); font-size: .82rem; padding: 4px 10px; border: 1px solid #d5e0d7; border-radius: 999px; }
.feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 18px #21392b08; }
.appeal-card { display: flex; flex-direction: column; gap: 9px; padding: 19px; }
.card-top { display: flex; align-items: center; gap: 10px; }
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 43px; height: 43px; color: var(--tint-ink); background: var(--tint); border-radius: 16px; font-size: .86rem; font-weight: 750; }
.avatar svg { width: 21px; height: 21px; }
.person { min-width: 0; display: grid; }
.person strong { font-size: .94rem; }
.person span { font-size: .82rem; color: var(--muted); }
.card-detail { margin: -4px -4px -4px auto; }
.card-detail svg { width: 19px; height: 19px; }
.appeal-card h3 { font-size: 1.19rem; letter-spacing: -.025em; text-wrap: initial; }
.appeal-card h3 a { text-decoration: none; }
.appeal-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.summary { color: var(--muted); font-size: .94rem; margin-bottom: auto; }
.funding { margin-block: 8px 5px; }
.funding-label { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; column-gap: 12px; color: var(--muted); font-size: .85rem; }
.funding-label strong { color: var(--ink); }
progress { display: block; margin-top: 7px; width: 100%; height: 8px; border: none; border-radius: 99px; appearance: none; background: #e4ede6; color: #397454; accent-color: #397454; overflow: hidden; }
progress::-webkit-progress-bar { background: #e4ede6; border-radius: 99px; }
progress::-webkit-progress-value { background: #397454; border-radius: 99px; }
progress::-moz-progress-bar { background: #397454; border-radius: 99px; }
.card-help { width: 100%; }
.empty { grid-column: 1 / -1; display: grid; justify-items: start; gap: 12px; padding: 24px; }
.empty p { color: var(--muted); }
.back-link { margin: -12px 0 10px; }
.detail-card { display: grid; gap: 16px; padding: clamp(18px, 4vw, 27px); margin-bottom: 14px; }
.detail-card h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; }
.detail-card h2 { font-size: 1.4rem; letter-spacing: -.025em; }
.detail-card > p, .locked p, .remaining { color: var(--muted); }
.detail-card > p { max-inline-size: 60ch; }
.remaining { margin-top: 10px; font-size: .9rem; }
.locked { background: #f1f5f1; display: grid; justify-items: center; gap: 9px; text-align: center; padding: 19px; border-radius: 20px; }
.locked p { font-size: .9rem; max-width: 43ch; }
.donate-button, .new-request { width: 100%; }
.new-request { margin-bottom: 18px; }
.request-list { display: grid; gap: 12px; }
.request-card { padding: 9px; }
.request-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 58px; border: 0; padding: 8px; border-radius: 18px; background: transparent; text-align: left; color: var(--ink); }
.request-row:hover, .request-row:active { background: #f1f6f1; }
.request-description { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.status-tag { display: inline-block; width: fit-content; color: #46534a; background: #edf0ed; font-size: .8rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; }
.status-tag.received { color: var(--green-dark); background: var(--green-soft); }
.report-button { width: calc(100% - 16px); margin: 4px 8px 8px; }
.profile-card .button { justify-self: start; }
.sponsor-account { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 15px; margin-bottom: 24px; }
.sponsor-email { overflow-wrap: anywhere; }
.sponsor-history h2 { font-size: 1.35rem; letter-spacing: -.025em; }
.support-card { display: grid; gap: 12px; padding: 16px; }
.support-card h3 a { text-decoration: none; }
.support-card h3 a:hover { text-decoration: underline; }
.support-meta { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; color: var(--muted); font-size: .85rem; }

dialog {
  width: min(480px, calc(100% - max(28px, var(--safe-left) + var(--safe-right))));
  max-height: calc(100% - max(32px, var(--safe-top) + var(--safe-bottom)));
  max-height: calc(100dvh - max(32px, var(--safe-top) + var(--safe-bottom)));
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 80px #102e1d35;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #172a206a; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 12px 12px 6px 25px; }
.dialog-header h2 { align-self: center; min-width: 0; font-size: 1.6rem; letter-spacing: -.035em; }
.dialog-header h2:focus { outline: none; }
.dialog-header form { flex-shrink: 0; margin: 0; }
.dialog-close { background: #e8f1e9; }
.dialog-close:hover, .dialog-close:active { background: #d3e6d7; }
.dialog-close:focus-visible { outline-offset: -3px; }
.dialog-content { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 10px 25px 25px; }
.dialog-note { color: var(--muted); margin: 0 0 16px; }
.entry-text { white-space: pre-wrap; margin-block: 10px 16px; }
.search-label { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #e9f0e9; color: var(--green); border-radius: 16px; }
.search-label:focus-within { outline: 2px solid #347652; outline-offset: 2px; }
.search-label input { min-width: 0; width: 100%; min-height: 48px; padding: 4px; border: 0; background: transparent; color: var(--ink); outline: none; }
.city-options { display: grid; gap: 4px; margin-top: 12px; }
.city-option { display: flex; justify-content: space-between; align-items: center; min-height: 48px; background: transparent; border: 0; padding: 8px 12px; border-radius: 14px; text-align: left; color: var(--ink); }
.city-option svg { color: var(--green); }
.city-option:hover, .city-option:active { background: #e5efe7; }
.local-form { display: grid; gap: 13px; }
.local-form label { display: grid; gap: 5px; font-weight: 650; font-size: .92rem; }
.local-form input, .local-form select, .local-form textarea { min-width: 0; width: 100%; min-height: 48px; border: 1px solid #aebfb2; padding: 10px; border-radius: 12px; font-weight: 400; font-size: 1rem; color: var(--ink); background: #fff; }
.local-form textarea { resize: vertical; }
.form-error { color: #962e41; font-size: .89rem; }
.auth-switch, .auth-providers { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.auth-switch { margin-bottom: 15px; }
.auth-providers { margin-top: 16px; }
.auth-providers button:disabled { color: var(--muted); background: transparent; opacity: .8; cursor: default; }
.auth-note { color: var(--muted); font-size: .81rem; }
.auth-providers + .auth-note { margin-top: 6px; }

@media (max-width: 700px) {
  html { scroll-padding-bottom: calc(74px + var(--safe-bottom)); }
  .welcome {
    display: flex;
    flex-direction: column;
    padding: max(22px, var(--safe-top)) max(22px, var(--safe-right)) max(30px, var(--safe-bottom)) max(22px, var(--safe-left));
    gap: 26px;
  }
  .welcome-body { padding: 23px 0 0; }
  .welcome h1 { font-size: clamp(2.05rem, 8.6vw, 3rem); }
  .welcome-button { width: 100%; }
  .welcome-art { width: 100%; min-height: 0; aspect-ratio: 1.85; border-radius: 29px; }
  .app-header .header-inner { min-height: 65px; }
  .header-inner, .app-content { padding-left: max(16px, var(--safe-left)); padding-right: max(16px, var(--safe-right)); }
  .app-content { padding-top: 18px; padding-bottom: calc(88px + var(--safe-bottom)); }
  .app-content.catalog { --page-gutter: 16px; }
  .header-inner:has(.city-button) { gap: 8px; }
  .navigation {
    position: fixed;
    z-index: 2;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    background: #eef4ee;
    border-top: 1px solid #dce7de;
    padding: 5px max(10px, var(--safe-right)) max(5px, var(--safe-bottom)) max(10px, var(--safe-left));
  }
  .navigation a { flex-direction: column; gap: 2px; min-height: 57px; padding: 4px; font-size: .73rem; border-radius: 16px; text-align: center; }
  .navigation a[aria-current="page"] { background: transparent; }
  .nav-icon { display: grid; place-items: center; width: min(60px, 100%); height: 29px; border-radius: 999px; }
  [aria-current="page"] .nav-icon { background: #d0e7d6; }
  .catalog-intro { gap: 12px; margin-bottom: 24px; }
  .feed { grid-template-columns: 1fr; gap: 12px; }
  .appeal-card { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
