/* Shared styles for the English content pages: /about/, /how-it-works/,
   /volunteer/, /donate/ and /privacy/. The homepage (and its generated
   language copies) and 404.html keep their own inline styles. */
:root {
  --ink-bg: #12241b;
  --ink-line: rgba(255, 255, 255, 0.10);
  --ink-line-strong: rgba(255, 255, 255, 0.16);
  --ink-text: #eaf4ee;
  --ink-muted: #a3b8ad;
  --bg: #f6faf7;
  --bg-2: #eef5f0;
  --panel: #ffffff;
  --ink: #0e1f17;
  --body: #2c3e35;
  --muted: #54685e;
  --line: #dce7e0;
  --accent: #1d8a4f;
  --accent-strong: #0f5d33;
  --accent-bright: #35d07f;
  --focus: #0f5d33;
  --soft: #e6f5ec;
  --blossom: #e8564a;
  --blossom-bright: #ff8a7a;
  --blossom-deep: #b93a30;
  --blossom-petal: #ffd3c9;
  --font-sans: "Inter", "Vazirmatn", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Noto Sans Arabic", Tahoma, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font-sans);
  --font-kai: "LXGW WenKai TC", "Kaiti TC", "Kaiti SC", "STKaiti", "BiauKai", "KaiTi", "DFKai-SB",
    "Noto Serif CJK TC", "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(10, 35, 22, 0.12);
  --shadow-sm: 0 8px 24px rgba(10, 35, 22, 0.07);
  --maxw: 820px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
/* Keep #anchor targets clear of the sticky header. No smooth scrolling:
   on a deep link (/about/#legal) it animates toward a spot measured before
   the web fonts swap in, and lands short. */
html { scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand, .cta-title { font-family: var(--font-display); }
::selection { background: var(--blossom-bright); color: #2a1210; }
.wrap { width: min(var(--maxw), calc(100% - 44px)); margin: 0 auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 60;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 12px 12px;
}
.skip-link:focus { left: 12px; }
/* Dark green ring on light areas, bright green on dark ones: both clear 3:1 */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
header, .skip-link, .page-hero, .give, .cta-panel, .contact, .poem, footer { --focus: var(--accent-bright); }

/* Header */
header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(18, 36, 27, 0.96);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--ink-line);
}
.nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  min-height: 68px;
  width: min(1120px, calc(100% - 44px)); margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 800; font-size: 1.14rem; text-decoration: none;
  color: var(--ink-text); margin-right: auto;
}
.brand .mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--accent); border-radius: 10px; color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14) inset, 0 4px 14px rgba(29,138,79,0.4);
}
.brand svg { width: 23px; height: 23px; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink-muted); font-size: 0.94rem; font-weight: 600;
  text-decoration: none; padding: 8px 13px; border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--ink-text); background: rgba(255,255,255,0.07); }
.nav-links a[aria-current="page"] { color: #06130c; background: var(--accent-bright); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 17px; border-radius: 999px; white-space: nowrap;
  color: #fff; font-size: 0.92rem; font-weight: 800; text-decoration: none;
  background: linear-gradient(180deg, #1a7f49, var(--accent-strong));
  box-shadow: 0 8px 20px rgba(29,138,79,0.35), 0 0 0 1px rgba(255,255,255,0.14) inset;
  transition: filter 0.15s ease, transform 0.15s var(--ease-out);
}
.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.nav-cta svg { width: 15px; height: 15px; }
.nav-cta[aria-current="page"] { color: #06130c; background: var(--accent-bright); box-shadow: none; }

/* Page hero */
.page-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 360px at 88% 0%, rgba(232, 86, 74, 0.10), transparent 60%),
    radial-gradient(900px 460px at 12% -20%, rgba(53, 208, 127, 0.16), transparent 60%),
    linear-gradient(180deg, #12241b 0%, #152a20 100%);
  color: var(--ink-text);
  padding: 88px 0 84px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 85%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 85%);
}
.page-hero .wrap { position: relative; }
.hero-flower {
  position: absolute; width: 440px; height: 440px;
  right: -120px; top: 50%; margin-top: -220px;
  color: var(--blossom-bright); opacity: 0.16; pointer-events: none;
}
.page-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 18px; color: var(--accent-bright);
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.76rem; font-weight: 800;
}
.page-kicker::before {
  content: ""; width: 12px; height: 12px; background: var(--blossom-bright);
  -webkit-mask: url('data:image/svg+xml;utf8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Ccircle cx=%2212%22 cy=%225.8%22 r=%224.6%22/%3E%3Ccircle cx=%226.1%22 cy=%2210.1%22 r=%224.6%22/%3E%3Ccircle cx=%228.4%22 cy=%2217%22 r=%224.6%22/%3E%3Ccircle cx=%2215.6%22 cy=%2217%22 r=%224.6%22/%3E%3Ccircle cx=%2217.9%22 cy=%2210.1%22 r=%224.6%22/%3E%3C/svg%3E') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Ccircle cx=%2212%22 cy=%225.8%22 r=%224.6%22/%3E%3Ccircle cx=%226.1%22 cy=%2210.1%22 r=%224.6%22/%3E%3Ccircle cx=%228.4%22 cy=%2217%22 r=%224.6%22/%3E%3Ccircle cx=%2215.6%22 cy=%2217%22 r=%224.6%22/%3E%3Ccircle cx=%2217.9%22 cy=%2210.1%22 r=%224.6%22/%3E%3C/svg%3E') center / contain no-repeat;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.5rem); line-height: 1.08;
  letter-spacing: -0.022em; margin: 0 0 18px; font-weight: 800;
  text-wrap: balance;
}
.page-hero h1 .hl {
  background: linear-gradient(92deg, var(--blossom-bright), var(--blossom-petal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero .lead { color: var(--ink-muted); font-size: 1.15rem; max-width: 620px; margin: 0; text-wrap: pretty; }

/* Content */
main { padding: 72px 0 96px; }
main h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.2;
  margin: 60px 0 14px; font-weight: 800; letter-spacing: -0.015em;
  text-wrap: balance;
}
main h2::before {
  content: ""; display: block; width: 28px; height: 3px; margin-bottom: 14px;
  border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-bright));
}
main .wrap > h2:first-child { margin-top: 0; }
main h2[data-step] { display: flex; align-items: center; gap: 14px; }
main h2[data-step]::before {
  content: attr(data-step);
  width: 38px; height: 38px; margin: 0; flex: none;
  display: grid; place-items: center;
  border-radius: 12px; color: #fff; font-size: 1rem;
  background: linear-gradient(160deg, #23a35e, var(--accent-strong));
  box-shadow: 0 8px 18px rgba(29, 138, 79, 0.3);
}
main :where(p, li) { color: var(--body); font-size: 1.03rem; }
main a { color: var(--accent-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
main a:hover { color: var(--accent); text-decoration-thickness: 2px; }
main strong { color: var(--ink); }

/* Lists: check bullets by default */
main ul { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; }
main ul > li { position: relative; padding-left: 34px; margin: 0; }
main ul > li::before {
  content: ""; position: absolute; left: 0; top: 0.2em;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5d33' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  box-shadow: 0 0 0 1px rgba(29, 138, 79, 0.22) inset;
}

/* Card grid list */
main ul.cards { grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
main ul.cards > li {
  padding: 22px 22px 20px; font-size: 0.98rem; line-height: 1.65;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}
main ul.cards > li:hover { transform: translateY(-3px); border-color: rgba(29, 138, 79, 0.4); box-shadow: 0 18px 44px rgba(10, 40, 25, 0.1); }
main ul.cards > li::before {
  position: static; display: block; margin-bottom: 14px;
  width: 36px; height: 36px; border-radius: 11px; background-size: 15px;
}
main ul.cards > li strong { display: block; font-size: 1.06rem; margin-bottom: 4px; letter-spacing: -0.01em; }

/* Separators stay in the markup so the text reads correctly without CSS
   (reader view, feeds); they're visually hidden where the bold lead-in
   becomes a card heading. */
main ul.cards .sep, .compare .sep {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
main ul.cards .desc { display: block; }
main ul.cards .desc::first-letter { text-transform: uppercase; }

/* Key/value facts table */
main ul.facts {
  gap: 0; margin: 24px 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
main ul.facts > li {
  display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 2px 24px;
  padding: 15px 22px; border-top: 1px solid var(--line); font-size: 0.98rem;
}
main ul.facts > li:first-child { border-top: 0; }
main ul.facts > li:nth-child(even) { background: #fafcfb; }
main ul.facts > li::before { content: none; }
main ul.facts > li strong { color: var(--muted); font-size: 0.9rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.compare p {
  margin: 0; padding: 24px; font-size: 0.98rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.compare p strong { display: block; font-size: 1.08rem; margin-bottom: 6px; letter-spacing: -0.01em; }

.cmdline {
  margin: 16px 0; padding: 15px 18px;
  background: var(--ink-bg); color: var(--ink-text);
  border: 1px solid var(--ink-line); border-radius: 12px;
  box-shadow: var(--shadow-sm);
  font: 500 0.82rem/1.5 "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  overflow-x: auto; white-space: pre;
}
.note {
  margin: 28px 0; padding: 18px 22px 18px 20px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.note p { margin: 0; }
.note.warn { background: #fff7f5; border-color: #f3d6d0; border-left-color: var(--blossom-deep); }
.note.warn strong { color: var(--blossom-deep); }

.poem {
  position: relative; overflow: hidden;
  margin: 44px 0; padding: 44px 32px 38px;
  border-radius: 22px; text-align: center;
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(255, 138, 122, 0.14), transparent 70%),
    linear-gradient(180deg, #172d22, var(--ink-bg));
  color: var(--ink-muted);
  box-shadow: var(--shadow);
}
.poem-flower {
  position: absolute; width: 260px; height: 260px; right: -70px; bottom: -90px;
  color: var(--blossom-bright); opacity: 0.18; pointer-events: none;
}
.poem .zh {
  position: relative; display: block; margin: 0 0 16px; margin-right: -0.2em;
  font-family: var(--font-kai); font-weight: 400; font-synthesis: none;
  font-size: clamp(1.3rem, 3.2vw, 1.75rem); letter-spacing: 0.2em; line-height: 1.5;
  color: var(--blossom-bright);
}
.poem .zh > span { display: inline-block; }
.poem .en { position: relative; display: block; color: var(--ink-text); font-size: 1.06rem; max-width: 52ch; margin: 0 auto; }
.poem small { position: relative; display: block; margin-top: 12px; font-size: 0.85rem; }

.diagram { margin: 0 0 56px; }
.diagram img {
  width: 100%; height: auto; display: block;
  border-radius: 20px; border: 1px solid var(--line); background: #fbfdfb;
  box-shadow: var(--shadow);
}

/* Buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 13px; margin: 26px 0 0; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; border-radius: 999px; padding: 0 24px;
  background: linear-gradient(180deg, #1a7f49, var(--accent-strong));
  color: #fff; font-weight: 800; font-size: 0.98rem; text-decoration: none;
  box-shadow: 0 12px 28px rgba(29,138,79,0.3), 0 0 0 1px rgba(255,255,255,0.12) inset;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
}
.button:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 36px rgba(29,138,79,0.4), 0 0 0 1px rgba(255,255,255,0.14) inset; }
.button svg { width: 18px; height: 18px; flex: none; }
.button.ghost {
  background: transparent; color: var(--accent-strong);
  box-shadow: none; border: 1.5px solid var(--accent);
}
.button.ghost:hover { color: var(--accent-strong); background: var(--soft); filter: none; }
.button.on-dark {
  background: rgba(255,255,255,0.07); color: var(--ink-text);
  border: 1px solid var(--ink-line-strong); box-shadow: none;
}
.button.on-dark:hover { color: var(--ink-text); background: rgba(255,255,255,0.12); filter: none; }

/* Dark callout panels */
.give, .cta-panel, .contact {
  position: relative; overflow: hidden;
  border-radius: 22px; color: var(--ink-muted);
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(53, 208, 127, 0.18), transparent 70%),
    radial-gradient(420px 240px at 100% 100%, rgba(232, 86, 74, 0.12), transparent 70%),
    linear-gradient(180deg, #172d22, var(--ink-bg));
  box-shadow: var(--shadow);
}
.give {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center;
  margin: 60px 0 28px; padding: 34px 34px 32px;
}
.give h2 { color: var(--ink-text); margin: 0 0 8px; }
.give p { color: var(--ink-muted); margin: 0; }
.cta-panel { margin-top: 72px; padding: 52px 28px; text-align: center; }
.cta-mark {
  width: 50px; height: 50px; display: block; margin: 0 auto 18px;
  color: var(--accent-bright); filter: drop-shadow(0 0 16px rgba(53, 208, 127, 0.5));
}
main .cta-title {
  margin: 0 0 6px; color: var(--ink-text);
  font-size: clamp(1.4rem, 3.2vw, 1.85rem); font-weight: 800; letter-spacing: -0.015em; line-height: 1.2;
}
main .cta-lead { margin: 0 0 26px; color: var(--ink-muted); }
.cta-panel .cta-row { justify-content: center; margin: 0; }

/* Footer */
footer {
  position: relative; background: var(--ink-bg); color: var(--ink-muted);
  padding: 44px 0 38px; font-size: 0.92rem;
}
footer::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 208, 127, 0.45) 30%, rgba(255, 138, 122, 0.4) 70%, transparent);
}
.foot { width: min(1120px, calc(100% - 44px)); margin: 0 auto; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-bottom: 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
footer nav a { color: var(--ink-muted); text-decoration: none; font-weight: 600; }
footer nav a:hover { color: var(--accent-bright); }
footer nav a[aria-current="page"] { color: var(--ink-text); }
.foot-legal { margin: 0; padding-top: 22px; border-top: 1px solid var(--ink-line); font-size: 0.86rem; line-height: 1.7; }

/* Privacy policy */
.page-hero .effective { margin: 18px 0 0; color: var(--ink-muted); font-size: 0.95rem; }
.page-hero .effective strong { color: var(--ink-text); }
.summary {
  padding: 24px 26px; border-radius: 16px;
  background: var(--soft); border: 1px solid #b8d7c4;
  box-shadow: var(--shadow-sm); color: var(--body);
}
.summary strong { color: var(--accent-strong); }
.privacy main h3 { margin: 28px 0 8px; font-size: 1.06rem; line-height: 1.4; letter-spacing: -0.005em; }
/* Plain dots: check marks would read as approval of the data listed */
.privacy main ul > li { padding-left: 26px; }
.privacy main ul > li::before {
  width: 7px; height: 7px; left: 6px; top: 0.72em;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(29, 138, 79, 0.12);
}
.plain-language {
  margin: 22px 0; padding: 18px 22px;
  background: #fff7f5; border: 1px solid #f3d6d0; border-left: 4px solid var(--blossom-deep);
  border-radius: 14px; color: var(--body); box-shadow: var(--shadow-sm);
}
.plain-language strong { color: var(--blossom-deep); }
.contact { margin-top: 64px; padding: 32px 34px; }
.contact h2 { color: var(--ink-text); margin-top: 0; }
.contact p { color: var(--ink-muted); margin: 0; }
main .contact a { color: var(--accent-bright); font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .hero-flower { animation: slowSpin 120s linear infinite; }
}
@keyframes slowSpin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  header { position: static; }
  html { scroll-padding-top: 16px; }
  .nav { padding: 12px 0 8px; min-height: 0; }
  /* Links become an evenly spaced tab row under the brand and Donate pill */
  .nav-links { order: 3; width: 100%; justify-content: space-between; gap: 4px; }
  .nav-links a { padding: 8px 2px; font-size: 0.88rem; border-radius: 0; }
  .nav-links a:hover { background: none; }
  .nav-links a[aria-current="page"] { color: var(--accent-bright); background: none; box-shadow: inset 0 -2px 0 var(--accent-bright); }
  .page-hero { padding: 60px 0 56px; }
  .hero-flower { width: 300px; height: 300px; right: -120px; margin-top: -150px; }
  main { padding: 52px 0 72px; }
  main h2 { margin-top: 48px; }
  main ul.cards, .compare { grid-template-columns: 1fr; }
  main ul.facts > li { grid-template-columns: 1fr; }
  .give { grid-template-columns: 1fr; padding: 28px 24px; }
  .cta-panel { padding: 40px 22px; }
}
@media (max-width: 359px) {
  .nav-links { gap: 0; }
  .nav-links a { font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
