:root {
  color-scheme: light;
  --ink: #111412;
  --muted: #56615c;
  --panel: #ffffff;
  --line: #cbd8d0;
  --wash: #f4f7f5;
  --green: #0f6b57;
  --green-dark: #094738;
  --red: #b84940;
  --yellow: #f2cf5b;
  --shadow: 0 24px 80px rgba(13, 30, 23, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(15,107,87,0.12), transparent 30%),
    linear-gradient(180deg, #f7faf8 0%, #eef4f0 100%);
}

.gateway-shell {
  min-height: 100vh;
  display: grid;
  place-items: stretch;
  padding: 24px;
}

.gateway-panel {
  width: min(1180px, 100%);
  margin: auto;
  display: grid;
  gap: 28px;
}

.brand-row,
.section-heading,
.utility-row,
.proof-row,
.hero-actions,
.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-row,
.section-heading,
.utility-row {
  justify-content: space-between;
}

.brand-logo {
  width: min(320px, 58vw);
  height: auto;
  background: rgba(255,255,255,0.78);
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a,
.secondary-link,
.utility-row a {
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 850;
}

.site-nav a {
  padding: 8px 0;
  font-size: 14px;
}

.hero-piece,
.value-strip,
.compliance-panel,
.proof-panel,
.ledger-panel,
.developer-panel,
.source-panel {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-piece {
  padding: clamp(26px, 5vw, 54px);
  display: grid;
  gap: 22px;
  overflow: hidden;
  position: relative;
}

.hero-piece::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15,107,87,0.12), transparent 68%);
  pointer-events: none;
}

.intro-copy,
.mission-copy {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 0;
  font-size: clamp(42px, 7.2vw, 90px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

p,
label,
a,
button,
input {
  font-size: 16px;
}

p,
.muted {
  color: var(--muted);
  line-height: 1.58;
}

.mission-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mission-copy p {
  margin-bottom: 0;
  font-size: 18px;
}

.primary-link,
button,
.utility-row a {
  border: 1px solid var(--green);
  background: var(--green);
  color: #ffffff;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.secondary-link,
button.secondary,
#refresh-projects,
#refresh-ledger,
#preview-unlock,
.utility-row a {
  background: #ffffff;
  color: var(--green-dark);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.value-strip {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  padding: 20px;
}

.value-strip strong {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.value-strip span {
  color: var(--muted);
  line-height: 1.55;
}

.compliance-panel {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.compliance-panel > div:first-child {
  max-width: 860px;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.compliance-grid article {
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
  display: grid;
  align-content: start;
  gap: 10px;
}

.compliance-grid strong {
  color: var(--green-dark);
  font-size: 15px;
  line-height: 1.18;
}

.compliance-grid p,
.compliance-note {
  margin: 0;
  font-size: 14px;
}

.compliance-note {
  padding-top: 2px;
  color: var(--muted);
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.use-case-grid article {
  min-height: 280px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
  position: relative;
  overflow: hidden;
}

.use-case-grid span,
.ledger-grid span,
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.use-case-grid span {
  display: block;
  margin-bottom: 18px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.use-case-graphic {
  height: 78px;
  margin-bottom: 20px;
  border: 1px solid rgba(9,71,56,0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15,107,87,0.10), rgba(255,255,255,0.08)),
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(9,71,56,0.06) 14px 15px);
  position: relative;
}

.use-case-graphic::before,
.use-case-graphic::after,
.use-case-graphic i {
  content: "";
  position: absolute;
  display: block;
}

.graphic-captcha i {
  width: 26px;
  height: 26px;
  top: 25px;
  border: 2px solid var(--green-dark);
  background: rgba(255,255,255,0.72);
}

.graphic-captcha i:nth-child(1) { left: 28px; }
.graphic-captcha i:nth-child(2) { left: 62px; }
.graphic-captcha i:nth-child(3) { left: 96px; }

.graphic-captcha::after {
  left: 68px;
  top: 18px;
  width: 18px;
  height: 38px;
  border-radius: 14px 14px 6px 6px;
  border: 2px solid var(--green-dark);
  border-bottom-width: 8px;
  background: rgba(242,207,91,0.26);
}

.graphic-circuit::before {
  left: 24px;
  right: 24px;
  top: 38px;
  height: 2px;
  background: var(--green-dark);
}

.graphic-circuit i {
  width: 18px;
  height: 18px;
  top: 30px;
  border-radius: 50%;
  background: var(--green-dark);
  box-shadow: 0 0 0 7px rgba(15,107,87,0.12);
}

.graphic-circuit i:nth-child(1) { left: 30px; }
.graphic-circuit i:nth-child(2) { left: calc(50% - 9px); background: var(--yellow); }
.graphic-circuit i:nth-child(3) { right: 30px; }

.graphic-paywall::before {
  left: 28px;
  top: 18px;
  width: 74px;
  height: 42px;
  border: 2px solid var(--green-dark);
  background: rgba(255,255,255,0.68);
}

.graphic-paywall i {
  left: 46px;
  width: 40px;
  height: 4px;
  background: rgba(9,71,56,0.72);
}

.graphic-paywall i:nth-child(1) { top: 29px; }
.graphic-paywall i:nth-child(2) { top: 40px; }
.graphic-paywall i:nth-child(3) { top: 51px; width: 26px; }

.graphic-paywall::after {
  right: 34px;
  top: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 8px rgba(242,207,91,0.20);
}

.graphic-queue i {
  width: 22px;
  height: 22px;
  top: 28px;
  border-radius: 50%;
  background: var(--green-dark);
}

.graphic-queue i:nth-child(1) { left: 30px; opacity: 0.42; }
.graphic-queue i:nth-child(2) { left: 70px; opacity: 0.68; }
.graphic-queue i:nth-child(3) { left: 110px; background: var(--yellow); }

.graphic-queue::after {
  right: 30px;
  top: 20px;
  width: 38px;
  height: 38px;
  transform: rotate(45deg);
  border-top: 3px solid var(--green-dark);
  border-right: 3px solid var(--green-dark);
}

.use-case-grid h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.use-case-grid p {
  margin-bottom: 0;
  font-size: 15px;
}

.project-section {
  display: grid;
  gap: 16px;
}

.charity-provider-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.charity-provider-card {
  display: grid;
  grid-template-rows: auto minmax(86px, auto) 134px 1fr auto;
  overflow: hidden;
  min-height: 400px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fffdf7;
  color: #26302d;
  box-shadow: 0 16px 36px rgba(0,0,0,0.18);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.charity-provider-card:hover,
.charity-provider-card.is-selected {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(0,0,0,0.24), 0 0 0 2px rgba(0,184,148,0.44);
  filter: saturate(1.04);
}

.charity-donor-line {
  padding: 22px 16px 0;
  color: rgba(25,35,31,0.64);
  font: 800 0.76rem Inter, Arial, sans-serif;
}

.charity-provider-card > p {
  margin: 8px 0 12px;
  padding: 0 16px;
  color: rgba(22,32,28,0.9);
  font: 800 0.9rem/1.45 Inter, Arial, sans-serif;
}

.charity-card-image {
  position: relative;
  display: block;
  min-height: 126px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.14)),
    linear-gradient(135deg, #4cf0ce, #00b879 55%, #ffe277);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.charity-card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, #13a385 0 8px, transparent 9px) 12px calc(100% - 34px) / 28px 24px repeat-x,
    repeating-linear-gradient(180deg, rgba(255,255,255,0.16) 0, rgba(255,255,255,0.16) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 22% 20%, rgba(255,255,255,0.28), transparent 28%);
  opacity: 0.78;
  mix-blend-mode: soft-light;
}

.charity-card-image::after {
  content: "*";
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #00c98e;
  color: #fff;
  font-size: 1.55rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.22);
}

.charity-card-water .charity-card-image {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(0,139,111,0.08)),
    url("https://res.cloudinary.com/everydotorg/image/upload/f_auto%2Cc_limit%2Cw_3840%2Cq_auto/profile_pics/lwm1eyu2xxgewkcftmyq") center / cover no-repeat;
  filter: saturate(1.28) contrast(1.04) brightness(1.06);
}

.charity-card-health .charity-card-image {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(202,38,124,0.08)),
    url("https://res.cloudinary.com/everydotorg/image/upload/f_auto%2Cc_limit%2Cw_3840%2Cq_auto/profile_pics/mwdpe7lw3sn6ivthu6ii") center / cover no-repeat;
  filter: saturate(1.32) contrast(1.04) brightness(1.05);
}

.charity-card-cash .charity-card-image {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(79,190,82,0.08)),
    url("https://res.cloudinary.com/everydotorg/image/upload/f_auto%2Cc_limit%2Cw_3840%2Cq_auto/profile_pics/mqmcd6jiuyusibklq1pd") center / cover no-repeat;
  filter: saturate(1.28) contrast(1.04) brightness(1.05);
}

.charity-card-body {
  display: grid;
  gap: 7px;
  padding: 16px;
  background: #ffe5ad;
}

.charity-card-health .charity-card-body { background: #ffd2e5; }
.charity-card-cash .charity-card-body { background: #e8fac2; }

.charity-card-body strong {
  color: #26302d;
  font: 900 1.08rem/1.08 Inter, Arial, sans-serif;
}

.charity-card-body small {
  color: rgba(38,48,45,0.72);
  font: 700 0.75rem/1.35 Inter, Arial, sans-serif;
}

.charity-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #fffdf7;
}

.charity-card-footer small {
  color: #007e60;
  font: 800 0.72rem Inter, Arial, sans-serif;
}

.charity-card-footer em {
  min-width: 76px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #00a87d;
  color: #fff;
  font: 900 0.72rem Inter, Arial, sans-serif;
  text-align: center;
  font-style: normal;
  box-shadow: inset 0 1px 8px rgba(255,255,255,0.18), 0 0 0 rgba(0,168,118,0);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.charity-provider-card:hover .charity-card-footer em,
.charity-provider-card.is-selected .charity-card-footer em {
  background: #00aa7f;
  box-shadow: inset 0 1px 10px rgba(255,255,255,0.24), 0 0 18px rgba(0,168,118,0.28);
  transform: translateY(-1px);
}

.proof-panel,
.ledger-panel,
.developer-panel,
.source-panel {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.developer-panel {
  grid-template-columns: 0.82fr 1.18fr;
  align-items: start;
}

.install-steps {
  margin: 14px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.install-steps li {
  margin: 0 0 10px;
  padding-left: 4px;
}

.install-steps li::marker {
  color: var(--green-dark);
  font-weight: 900;
}

.developer-snippets {
  display: grid;
  gap: 10px;
}

.source-panel .section-heading a,
.source-grid a {
  color: var(--green-dark);
  text-decoration: none;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.source-grid a {
  padding: 14px;
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
  display: grid;
  align-content: space-between;
}

.source-grid strong,
.source-grid span {
  display: block;
}

.source-grid span {
  color: var(--muted);
  font-size: 13px;
}

.proof-panel form {
  display: grid;
  gap: 8px;
}

.proof-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.protocol-status {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
  display: grid;
  gap: 4px;
}

.protocol-status strong {
  color: var(--green-dark);
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ledger-grid article,
.ledger-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.ledger-grid article {
  padding: 14px;
  display: grid;
  gap: 6px;
}

.ledger-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ledger-grid strong {
  font-size: 24px;
  line-height: 1;
}

.ledger-list {
  display: grid;
  gap: 8px;
}

.ledger-item {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.ledger-item strong,
.ledger-item span {
  display: block;
}

.ledger-amount {
  color: var(--green-dark);
  font-weight: 900;
  white-space: nowrap;
}

.ledger-meta {
  color: var(--muted);
  font-size: 12px;
}

.developer-panel pre {
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111412;
  color: #e8f5ef;
  padding: 14px;
}

@media (max-width: 980px) {
  .brand-row,
  .section-heading,
  .utility-row,
  .proof-row,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .site-nav {
    justify-content: flex-start;
  }
  .mission-copy,
  .value-strip,
  .compliance-grid,
  .use-case-grid,
  .charity-provider-card-row,
  .developer-panel,
  .source-grid,
  .ledger-grid {
    grid-template-columns: 1fr;
  }
  .gateway-shell { padding: 16px; }
  .brand-logo { width: min(280px, 100%); }
  .charity-provider-card { min-height: 0; }
  .ledger-item { grid-template-columns: 1fr; }
}
