/* The public website: the platform's pages, center pages, jobs and donations (open without an account). */
.site { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg, var(--surface-alt)); }
.site-header {
  position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border);
}
.site-header .site-bar {
  max-width: 1120px; margin: 0 auto; height: var(--topbar-h, 64px); padding: 0 var(--space-lg);
  display: flex; align-items: center; gap: var(--space-sm);
}
.site-header .brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-family: var(--font-heading); }
.site-header .brand:hover { text-decoration: none; }
.site-header nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.site-header nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-pill);
  color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm);
}
.site-header nav a:hover { background: var(--surface-alt); color: var(--text); text-decoration: none; }
.site-header nav a[aria-current='page'] { background: var(--primary-soft); color: var(--primary); }
.site-header .end { display: flex; align-items: center; gap: var(--space-xs); }
.site-header .menu-toggle { display: none; }
/* Words in the header are never split. When the menu does not fit (long words, a narrow window), js/ui/site.js
   first makes it tighter (no icons, less padding, smaller text) and, if it still does not fit, folds it into the
   menu button, as on phones. */
.site-header nav a, .site-header .brand .words .name, .site-header .brand .words .sub { white-space: nowrap; overflow-wrap: normal; }
.site-header .brand { flex-shrink: 0; }
.site-header.tight nav a { padding: 8px 9px; font-size: var(--fs-xs); }
.site-header.tight nav a .icon { display: none; }
.site-header.compact nav { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; background: var(--surface);
  border-bottom: 1px solid var(--border); padding: var(--space-xs) var(--space-md) var(--space-md); }
.site-header.compact nav.open { display: flex; }
.site-header.compact nav a { padding: 12px; border-radius: var(--radius-control); font-size: var(--fs-sm); }
.site-header.compact nav a .icon { display: inline-block; }
.site-header.compact .menu-toggle { display: inline-flex; }
.site-header.compact .end { margin-inline-start: auto; }
@media (max-width: 899.98px) {
  .site-header nav { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: var(--space-xs) var(--space-md) var(--space-md); }
  .site-header nav.open { display: flex; }
  .site-header nav a { padding: 12px; border-radius: var(--radius-control); }
  .site-header .menu-toggle { display: inline-flex; }
  .site-header .brand .name { display: none; }
}
.site-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: var(--space-xl) var(--space-lg) var(--space-xxxl); }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .site-bar { max-width: 1120px; margin: 0 auto; padding: var(--space-lg); display: flex; flex-wrap: wrap; gap: var(--space-sm);
  align-items: center; justify-content: space-between; color: var(--text-muted); font-size: var(--fs-sm); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: var(--space-md); }

/* landing */
.site-hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: var(--radius-card-lg);
  padding: clamp(28px, 6vw, 56px); background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  display: grid; gap: var(--space-lg);
}
.site-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .08; background-image: url('/assets/pattern.svg'); background-size: 56px 56px; }
.site-hero h1 { font-family: var(--font-heading); font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.3; margin: 0; }
.site-hero p { margin: 0; color: rgba(255, 255, 255, .85); font-size: var(--fs-lg); max-width: 60ch; }
.site-hero .actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.site-hero .btn.outlined { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.site-hero .btn.outlined:hover:not(:disabled) { background: rgba(255, 255, 255, .12); border-color: #fff; }
.site-hero .eyebrow { color: var(--accent); font-weight: 700; font-size: var(--fs-sm); }
.site-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.site-stats .stat { background: rgba(255, 255, 255, .1); border-radius: var(--radius-card); padding: var(--space-md); }
.site-stats .stat .v { font-size: var(--fs-xxl); font-weight: 700; }
.site-stats .stat .k { color: rgba(255, 255, 255, .8); font-size: var(--fs-sm); }
@media (max-width: 559.98px) { .site-stats { grid-template-columns: minmax(0, 1fr); } }

.site-section { margin-top: var(--space-xxl); }
.site-section > .head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-md); }
.site-section > .head > :first-child { min-width: 0; flex: 1 1 220px; }
.site-section > .head h2 { margin: 0; font-family: var(--font-heading); font-size: var(--fs-xl); }
.site-section > .head p { margin: 4px 0 0; color: var(--text-muted); }

.site-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 300px)), 1fr)); }
.site-card { display: flex; flex-direction: column; gap: var(--space-xs); height: 100%; color: var(--text); }
.site-card:hover { text-decoration: none; }
.site-card .title { font-weight: 700; font-size: var(--fs-lg); }
.site-card .meta { color: var(--text-muted); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.site-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.site-card .desc { color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.site-card .foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; padding-top: var(--space-xs); }

.feature-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.feature { display: flex; flex-direction: column; gap: var(--space-xs); }
.feature h3 { margin: 0; font-size: var(--fs-lg); }
.feature p { margin: 0; color: var(--text-muted); }

/* center page */
.center-head { display: flex; gap: var(--space-md); align-items: center; flex-wrap: wrap; }
.center-head .logo { width: 72px; height: 72px; border-radius: 18px; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.center-head .logo.placeholder { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.center-head h1 { margin: 0; font-family: var(--font-heading); font-size: var(--fs-xxl); }
.center-head .grow { flex: 1; min-width: 220px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; margin: 0; }

/* campaign progress */
.progress { height: 10px; border-radius: var(--radius-pill); background: var(--surface-alt); border: 1px solid var(--border); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--secondary), var(--primary)); border-radius: inherit; }
.progress-meta { display: flex; justify-content: space-between; gap: var(--space-xs); font-size: var(--fs-sm); color: var(--text-muted); }
.progress-meta strong { color: var(--text); }

.code-box { font-family: var(--font-mono, monospace); font-size: var(--fs-xl); letter-spacing: .06em; direction: ltr; text-align: center;
  padding: var(--space-md); border: 2px dashed var(--primary); border-radius: var(--radius-card); background: var(--primary-soft); color: var(--primary); user-select: all; }

/* ---- design 2: light hero with picture, stat tiles, tinted feature cards, cards with pictures ---- */
.site-header .brand { gap: 10px; }
.site-header .brand .words { display: flex; flex-direction: column; line-height: 1.15; }
.site-header .brand .words .name { font-size: var(--fs-xl); color: var(--primary); }
.site-header .brand .words .sub { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 500; }
.site-header nav a { padding: 9px 14px; }
.site-header .login-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.site-header .login-avatar:hover { background: #d4e9e1; text-decoration: none; }
@media (max-width: 899.98px) { .site-header .brand .words .sub { display: none; } }

.hero2 {
  position: relative; overflow: hidden; border-radius: 28px; border: 1px solid #DCEBE3;
  background: linear-gradient(110deg, #FFFFFF 0%, #F4FAF6 45%, #E6F2EC 100%);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; min-height: 300px;
}
.hero2 .text { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: var(--space-md); justify-content: center; }
.hero2 .pill { align-self: flex-start; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: var(--fs-sm); border: 1px solid #CFE3D9; }
.hero2 h1 { margin: 0; font-family: var(--font-heading); font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.3; color: var(--text); }
.hero2 h1 .brand { color: var(--primary); }
.hero2 p { margin: 0; color: var(--text-muted); font-size: var(--fs-lg); max-width: 52ch; line-height: 1.8; }
.hero2 .actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.hero2 .actions .btn.outlined { border-radius: var(--radius-pill); }
.hero2 .actions .btn.filled { border-radius: var(--radius-pill); padding-inline: 22px; }
.hero2 .art { position: relative; min-height: 220px; }
.hero2 .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; max-width: none; }
@media (max-width: 759.98px) {
  .hero2 { grid-template-columns: minmax(0, 1fr); }
  .hero2 .art { order: -1; min-height: 190px; }
}

.stat-tiles { display: grid; gap: var(--space-md); grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--space-lg); }
@media (max-width: 899.98px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-tile { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.stat-tile .ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.stat-tile .ic .icon { width: 26px; height: 26px; }
.stat-tile .v { font-size: 1.6rem; font-weight: 800; line-height: 1.1; background: none; }
.stat-tile > div { min-width: 0; }
.stat-tile .k { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.35; hyphens: auto; }
/* phones: two tiles per row are narrow, so the icon goes above the number and the label gets the tile's full width */
@media (max-width: 559.98px) { .stat-tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: var(--space-md); } .stat-tile .ic { width: 44px; height: 44px; } }
.tint-green { background: #EAF6EF; color: #0E7C5B; }
.tint-purple { background: #F1ECFB; color: #6D4BC3; }
.tint-orange { background: #FDF0E3; color: #D97706; }
.tint-blue { background: #E8F1FB; color: #2563EB; }
.stat-tile.tint-green, .stat-tile.tint-purple, .stat-tile.tint-orange, .stat-tile.tint-blue { border-color: transparent; }
.stat-tile .v.tone-green { color: #0E7C5B; } .stat-tile .v.tone-purple { color: #6D4BC3; }
.stat-tile .v.tone-orange { color: #D97706; } .stat-tile .v.tone-blue { color: #2563EB; }

.feature2 { position: relative; display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-lg); border-radius: 20px; border: 1px solid transparent; min-height: 170px; }
.feature2 .big { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .7); }
.feature2 .big .icon { width: 30px; height: 30px; }
.feature2 h3 { margin: var(--space-xs) 0 0; font-size: var(--fs-lg); color: var(--text); }
.feature2 p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.7; }
.feature2 .go { position: absolute; inset-inline-end: 16px; bottom: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .85); color: inherit; }
.feature2:hover { text-decoration: none; filter: brightness(.98); }

.site-section > .head h2 { display: flex; align-items: center; gap: 10px; }
.site-section > .head h2 .icon { color: var(--accent, #D97706); }

.pic-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-md); align-items: stretch; color: var(--text); height: 100%; }
.pic-card:hover { text-decoration: none; }
.pic-card .pic { width: 112px; height: 88px; border-radius: 14px; overflow: hidden; background: var(--surface-alt); flex: none; }
.pic-card .pic img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.pic-card .body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pic-card .title { font-weight: 700; font-size: var(--fs-lg); }
.pic-card .meta { color: var(--text-muted); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pic-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.pic-card .desc { color: var(--text-muted); font-size: var(--fs-sm); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pic-card .foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.pic-card.full { grid-column: 1 / -1; }
.pic-card .avatar-pic { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; align-self: start; }
.pic-card .avatar-pic img { width: 100%; height: 100%; max-width: none; }
@media (max-width: 459.98px) { .pic-card .pic { width: 92px; height: 76px; } }

.site-footer { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--surface) 0%, #F2F8F5 100%); }
.site-footer::before { content: ''; position: absolute; inset: auto 0 0 0; height: 110px; background: url('/assets/illustrations/skyline.svg') center bottom / auto 110px repeat-x; pointer-events: none; }
.site-footer .site-bar { position: relative; padding-block: var(--space-xl); }
.site-footer .brandline { display: flex; align-items: center; gap: 10px; color: var(--text); }
.site-footer .brandline .name { font-weight: 800; color: var(--primary); font-family: var(--font-heading); font-size: var(--fs-lg); }
.site-footer .links a { color: var(--text-muted); }
.site-footer .links a:hover { color: var(--primary); }
.center-cover { height: clamp(140px, 24vw, 240px); border-radius: 22px; overflow: hidden; background: var(--surface-alt); }
.center-cover img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.feature2 { padding-bottom: 56px; }
.pic-card .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pic-card .body .hstack { min-width: 0; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.icon-choice { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  display: inline-grid; place-items: center; color: var(--primary); cursor: pointer; }
.icon-choice .icon { width: 24px; height: 24px; }
.icon-choice:hover, .icon-choice.selected { background: var(--primary-soft); border-color: var(--primary); }
.switch-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); padding: var(--space-sm) 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
/* the title keeps a readable width; a status label and the switch move under it on a narrow screen */
.switch-row .grow { flex: 1 1 160px; min-width: 0; }
.money-table td.num, .money-table th.num { text-align: end; white-space: nowrap; }
.section-img { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius-md, 12px); }
