/* ============================================================
   Dua Tangan — site styles
   Plain, professional nonprofit: real photos, few words,
   one sans family, no ornament. Palette is binding (PRODUCT.md).
   ============================================================ */

:root {
  /* Brand palette — do not change */
  --blue-50:  #f1f7fb;
  --blue-100: #dceaf3;
  --blue-200: #bdd6e7;
  --blue-300: #93bcd6;
  --blue-400: #6aa0c2;
  --blue-500: #4585aa;
  --blue-600: #336c8e;
  --blue-700: #284f6a;
  --blue-800: #1f3a4d;
  --blue-900: #142737;

  --cream-50:  #fdfaf3;
  --cream-100: #fbf6ec;
  --cream-200: #f6ecd6;
  --cream-300: #efddb8;
  --cream-400: #e6cb95;

  --warm-accent: #d99858;

  --ink:      #1f3a4d;
  --ink-soft: #466079;
  --ink-mute: #5f7488;
  --line:     #e4dccb;

  --font: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --shadow-lift: 0 1px 2px rgba(31, 58, 77, 0.06), 0 14px 32px -16px rgba(31, 58, 77, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --container: 1200px;
  --gutter: 20px;
  --section: 72px;
  --radius: 6px;

  /* Texture: fine paper grain (ink-tinted for light surfaces, light-tinted for dark bands) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.23 0 0 0 0 0.3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --glow-warm: color-mix(in srgb, var(--warm-accent) 22%, transparent);
  --glow-warm-dark: color-mix(in srgb, var(--warm-accent) 12%, transparent);
  --glow-blue: color-mix(in srgb, var(--blue-500) 45%, transparent);
}

@media (min-width: 800px) {
  :root { --gutter: 40px; --section: 112px; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grain) repeat, var(--cream-50);
  background-size: 180px 180px, auto;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: var(--blue-700); }
a:hover { color: var(--blue-900); }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section-alt { background: var(--grain), linear-gradient(180deg, var(--cream-100), var(--cream-50)); background-size: 180px 180px, auto; }
.section-warm { background: var(--grain), radial-gradient(90% 70% at 100% 0%, var(--glow-warm), transparent 70%), linear-gradient(180deg, var(--cream-200), var(--cream-100)); background-size: 180px 180px, auto, auto; }
.section-sky { background: var(--grain), radial-gradient(80% 60% at 0% 0%, color-mix(in srgb, var(--blue-200) 55%, transparent), transparent 70%), linear-gradient(180deg, var(--blue-50), var(--cream-50)); background-size: 180px 180px, auto, auto; }
.section-dark { background: var(--grain-light), radial-gradient(70% 90% at 0% 0%, var(--glow-blue), transparent 65%), radial-gradient(50% 70% at 100% 100%, var(--glow-warm-dark), transparent 70%), var(--blue-800); background-size: 180px 180px, auto, auto, auto; background-blend-mode: soft-light, normal, normal, normal; color: var(--blue-100); }

/* Italic serif accent: blue on light surfaces, warm accent on dark ones (contrast-checked, headings only) */
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--blue-500); letter-spacing: -0.01em; }
.section-dark em, .cta em, .page-head-dark em { color: var(--warm-accent); }
.num { white-space: nowrap; }
.mute { color: var(--ink-mute); }

/* Section heading row: title + optional link, no labels above */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: 40px;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--ink-soft); max-width: 56ch; margin-top: 12px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--blue-700);
  text-decoration: none;
  white-space: nowrap;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream-50);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 1px var(--line);
}
.site-footer .brand-mark { box-shadow: 0 0 0 2px color-mix(in srgb, var(--cream-50) 25%, transparent); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 16px; font-weight: 500; color: var(--ink-soft); text-decoration: none; white-space: nowrap; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--warm-accent); }
.site-header .header-cta { display: none; }

@media (min-width: 800px) {
  .site-header .header-cta { display: inline-flex; }
}
@media (max-width: 799px) {
  .header-inner { flex-wrap: wrap; gap: 0; min-height: 0; padding-top: 12px; }
  .nav {
    order: 3;
    width: calc(100% + var(--gutter) * 2);
    margin: 8px calc(var(--gutter) * -1) 0;
    padding: 0 var(--gutter);
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 0 10px; font-size: 15px; }
  .nav { -webkit-mask-image: linear-gradient(to right, var(--ink) 85%, transparent); mask-image: linear-gradient(to right, var(--ink) 85%, transparent); padding-right: 48px; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.btn-primary { background: linear-gradient(180deg, var(--blue-600), var(--blue-700)); color: #fff; box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent); }
.btn-primary:hover { background: linear-gradient(180deg, var(--blue-700), var(--blue-800)); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--blue-800); }
.btn-light:hover { background: var(--cream-200); color: var(--blue-900); }
.btn-ghost-light { border-color: rgba(255, 255, 255, 0.75); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ============================================================
   Home hero: text + photo at its own ratio
   ============================================================ */

.hero { position: relative; padding: 40px 0 64px; border-bottom: 1px solid var(--line); background: radial-gradient(60% 70% at 15% 30%, color-mix(in srgb, var(--blue-100) 80%, transparent), transparent 70%), radial-gradient(40% 60% at 85% 55%, var(--glow-warm), transparent 70%); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 96px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 72px; }
}
.hero h1 { font-size: clamp(46px, 6.4vw, 88px); letter-spacing: -0.03em; line-height: 0.98; }
.hero p { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-soft); max-width: 44ch; margin-top: 24px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-media { position: relative; }
.hero-badge {
  position: absolute;
  left: -36px;
  bottom: -36px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 5px solid var(--cream-50);
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--blue-900) 55%, transparent);
}
.hero-logo-solo { display: block; width: min(100%, 420px); margin: 0 auto; border-radius: 50%; box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--blue-900) 45%, transparent); }
@media (max-width: 899px) { .hero-badge { width: 96px; height: 96px; left: 16px; bottom: -28px; border-width: 4px; } .hero { padding-bottom: 88px; } }
@media (prefers-reduced-motion: no-preference) { .hero-badge { animation: settle 1200ms 250ms cubic-bezier(0.16, 1, 0.3, 1) both; } }
.hero-img { box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--blue-900) 55%, transparent); width: 100%; aspect-ratio: 4 / 5; max-height: 640px; object-fit: cover; border-radius: var(--radius); background: var(--blue-100); }
@media (max-width: 899px) { .hero-img { aspect-ratio: 1 / 1; object-position: center 65%; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-img { animation: settle 1200ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Totals sentence under the hero */
.totals {
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 500;
  max-width: 34ch;
  color: var(--ink);
}
.totals strong { font-weight: 700; color: var(--blue-700); white-space: nowrap; }
.totals-note { color: var(--ink-soft); font-size: 15px; margin-top: 16px; }

/* ============================================================
   Cards (shared surface) + pills
   ============================================================ */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms;
}
a.card:hover, .card:has(a:hover), .card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--blue-200); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--blue-200);
  background: #fff;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 200ms, color 200ms, border-color 200ms;
}
.pill:hover { border-color: var(--blue-500); color: var(--ink); }
.pill[aria-checked="true"], .pill[aria-selected="true"] { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.pill-count { font-size: 13px; padding: 0 7px; border-radius: 999px; background: var(--blue-50); color: var(--blue-800); line-height: 20px; }
.pill[aria-checked="true"] .pill-count, .pill[aria-selected="true"] .pill-count { background: rgba(255, 255, 255, 0.18); color: #fff; }
.filters { display: grid; gap: 4px; margin-bottom: 12px; }
.filters .pills { margin-bottom: 12px; }
@media (max-width: 699px) {
  .pills-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .pills-tabs::-webkit-scrollbar { display: none; }
  .pills-tabs .pill { flex: none; }
}

/* Entrance for re-filtered grids and panels */
@media (prefers-reduced-motion: no-preference) {
  .program-grid > *, .panel, .rows-in tr { animation: rise 500ms var(--ease) both; }
  .program-grid > *:nth-child(2) { animation-delay: 60ms; }
  .program-grid > *:nth-child(3) { animation-delay: 120ms; }
  .program-grid > *:nth-child(n+4) { animation-delay: 180ms; }
  .rows-in tr { animation-delay: calc(var(--i, 0) * 45ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Stats
   ============================================================ */

.stat-grid { display: grid; gap: 16px; }
@media (min-width: 800px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.stat { padding: 24px 24px 22px; transition: border-color 300ms; }
.section-dark .stat { background: rgba(255, 255, 255, 0.05); border-color: rgba(189, 214, 231, 0.2); }
.section-dark .stat:hover { border-color: var(--warm-accent); }
.section-dark .stat-label { color: var(--blue-100); }
.section-dark .stat-value { color: var(--cream-50); }
.section-dark .stat-note { color: var(--blue-200); }
.section-dark .totals-note { color: var(--blue-200); }
.stat-label { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.stat-value { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 3.6vw, 46px); letter-spacing: -0.02em; line-height: 1.1; margin-top: 8px; color: var(--blue-800); white-space: nowrap; }
.stat-note { font-size: 14px; color: var(--ink-mute); margin-top: 6px; }

/* ============================================================
   Program cards
   ============================================================ */

.program-grid { display: grid; gap: 24px; }
@media (min-width: 700px) { .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .program-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.program { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.program-media { overflow: hidden; }
.program-img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--blue-100); transition: transform 600ms var(--ease); }
.program:hover .program-img { transform: scale(1.04); }
.program-figure { aspect-ratio: 16 / 10; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; background: radial-gradient(circle, color-mix(in srgb, var(--blue-300) 45%, transparent) 1px, transparent 1.5px) 0 0 / 16px 16px, radial-gradient(90% 90% at 100% 0%, color-mix(in srgb, var(--blue-200) 70%, transparent), transparent 70%), linear-gradient(160deg, var(--blue-50), var(--cream-50)); border-bottom: 1px solid var(--line); }
.program-figure-value { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 3.6vw, 46px); line-height: 1; letter-spacing: -0.02em; color: var(--blue-800); }
.program-figure-label { font-size: 15px; color: var(--ink-soft); margin-top: 8px; }
@media (max-width: 699px) { .program-figure { aspect-ratio: auto; padding: 22px 22px 18px; } }
.program-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.program-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; color: var(--ink-mute); }
.program h3 { font-size: 22px; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.program h3 a { color: inherit; text-decoration: none; }
.program h3 a::after { content: ''; position: absolute; inset: 0; }
/* Cards stay compact: long titles/descriptions are clamped with an ellipsis; full text lives on cause.html */
.program .desc { color: var(--ink-soft); font-size: 16px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.program-meta > span:not(.badge) { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.program .funding { margin-top: auto; padding-top: 20px; }
.program-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--blue-700); margin-top: 14px; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 22px;
  background: var(--blue-50);
  color: var(--blue-800);
}
.badge-done { background: var(--cream-200); color: var(--ink); }

/* Progress */
.bar { height: 6px; border-radius: 3px; background: var(--blue-100); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-400), var(--blue-600)); border-radius: 3px; transform-origin: left center; transform: scaleX(var(--fill, 1)); transition: transform 1200ms var(--ease); }
.funding-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 15px; color: var(--ink-soft); }
.funding-row strong { color: var(--ink); font-weight: 700; }

/* ============================================================
   Ledger table (money in / out)
   ============================================================ */

.table-wrap { border-top: 2px solid var(--ink); }
.table-card { padding: 0; overflow: hidden; }
.table-card .ledger tbody tr:last-child td { border-bottom: 0; }

/* Home ledger: about six rows are visible, the rest scroll inside the card. Header sticks, edge shadows show more below. */
.ledger-scroll {
  max-height: 460px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 24px;
  background:
    linear-gradient(#fff 30%, transparent) top / 100% 28px no-repeat local,
    linear-gradient(transparent, #fff 70%) bottom / 100% 28px no-repeat local,
    radial-gradient(farthest-side at 50% 0, color-mix(in srgb, var(--ink) 20%, transparent), transparent) top / 100% 12px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, color-mix(in srgb, var(--ink) 20%, transparent), transparent) bottom / 100% 12px no-repeat scroll;
}
.ledger-scroll:focus-visible { outline: 2px solid var(--blue-600); outline-offset: -2px; }
.ledger-scroll .ledger { border-collapse: separate; border-spacing: 0; }
.ledger-scroll .ledger th { position: sticky; top: 0; z-index: 2; background: #fff; }
.ledger-note { font-size: 14px; color: var(--ink-mute); margin-top: 12px; }
@media (max-width: 639px) { .ledger-scroll { max-height: 520px; padding: 0 16px; } }
.table-card .ledger tbody tr:last-child td { border-bottom: 0; }
.ledger tbody tr { transition: background-color 150ms; }
@media (hover: hover) { .ledger tbody tr:hover td { background: var(--blue-50); } }
.kind-in { color: var(--blue-700); }
.kind-out { color: var(--ink-soft); }
.ledger { width: 100%; border-collapse: collapse; font-size: 16px; }
.ledger th {
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mute);
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ledger td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger .amt { text-align: right; padding-left: 20px; padding-right: 20px; white-space: nowrap; font-weight: 600; width: 1%; min-width: 150px; border-left: 1px solid var(--line); }
.ledger .amt:last-child { padding-right: 0; }
.ledger th.amt { font-weight: 600; }
.ledger .date { white-space: nowrap; color: var(--ink-mute); width: 1%; }
.ledger .in { color: var(--blue-700); }
.ledger .item { font-weight: 600; }
.ledger .sub { font-size: 14px; color: var(--ink-mute); margin-top: 2px; }
.ledger .sub a { color: var(--ink-soft); }
.ledger tfoot td { border-bottom: 0; font-weight: 700; }
.kind { font-size: 13px; font-weight: 600; color: var(--ink-mute); margin-right: 8px; }

@media (max-width: 639px) {
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tfoot { display: block; }
  .ledger tr { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .ledger td { padding: 0; border: 0; }
  .ledger .date { grid-column: 1 / -1; font-size: 14px; width: auto; }
  .ledger .main { grid-column: 1; }
  .ledger .amt { grid-column: 2; grid-row: 2; border-left: 0; min-width: 0; width: auto; padding: 0; }
  .ledger .amt:empty { display: none; }
  .ledger tfoot tr { border-bottom: 0; }
  .ledger tfoot .amt { grid-row: 1; }
  .tabs { -webkit-mask-image: linear-gradient(to right, var(--ink) 85%, transparent); mask-image: linear-gradient(to right, var(--ink) 85%, transparent); padding-right: 40px; }
}

/* ============================================================
   Steps
   ============================================================ */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.step { padding: 26px 24px 28px; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--warm-accent); color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 600; }
.step h3 { font-size: 22px; margin-top: 18px; }
.step p { color: var(--ink-soft); margin-top: 8px; }

/* ============================================================
   Stories
   ============================================================ */

.story-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 700px) {
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story-grid[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-grid[data-n="1"] { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
.story { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.story-media { overflow: hidden; }
.story img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--blue-100); transition: transform 600ms var(--ease); }
.story:hover img { transform: scale(1.04); }
.story-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.story-body .badge { align-self: flex-start; margin-bottom: 10px; }
.story h3 { font-size: 22px; }
.story h3 a { color: inherit; text-decoration: none; }
.story h3 a::after { content: ''; position: absolute; inset: 0; }
.story p { color: var(--ink-soft); font-size: 16px; margin-top: 8px; }
.story .by { font-size: 14px; color: var(--ink-mute); margin-top: auto; padding-top: 14px; }

/* ============================================================
   CTA band + footer
   ============================================================ */

.cta { background: var(--grain-light), radial-gradient(60% 100% at 100% 0%, var(--glow-warm-dark), transparent 70%), radial-gradient(70% 90% at 0% 100%, var(--glow-blue), transparent 65%), var(--blue-700); background-size: 180px 180px, auto, auto, auto; background-blend-mode: soft-light, normal, normal, normal; color: #fff; }
.cta-inner { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1fr auto; } }
.cta h2 { color: #fff; font-size: clamp(30px, 4vw, 48px); max-width: 18ch; }
.cta p { color: var(--blue-100); margin-top: 14px; max-width: 48ch; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; }

.site-footer { background: var(--grain-light), radial-gradient(60% 80% at 100% 0%, color-mix(in srgb, var(--blue-600) 35%, transparent), transparent 70%), var(--blue-900); background-size: 180px 180px, auto, auto; background-blend-mode: soft-light, normal, normal; color: var(--blue-100); padding: 64px 0 40px; font-size: 15px; }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer .brand { color: #fff; display: inline-flex; line-height: 1.2; }
.site-footer h4 { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.site-footer a { color: var(--blue-100); text-decoration: none; display: block; line-height: 2; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { max-width: 38ch; margin-top: 14px; }
.footer-fine { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(189, 214, 231, 0.2); font-size: 14px; color: var(--blue-200); }

/* ============================================================
   Inner pages
   ============================================================ */

.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(36px, 5vw, 60px); letter-spacing: -0.03em; }
.page-head .lede { font-size: 19px; color: var(--ink-soft); max-width: 56ch; margin-top: 16px; }
.page-head-dark { background: var(--grain-light), radial-gradient(70% 90% at 0% 0%, var(--glow-blue), transparent 65%), radial-gradient(50% 70% at 100% 100%, var(--glow-warm-dark), transparent 70%), var(--blue-800); background-size: 180px 180px, auto, auto, auto; background-blend-mode: soft-light, normal, normal, normal; border-bottom: 0; }
.page-head-dark h1 { color: var(--cream-50); }
.page-head-dark .lede { color: var(--blue-100); }
@media (min-width: 800px) { .page-head { padding: 88px 0 56px; } }

.back { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--ink-mute); text-decoration: none; margin-bottom: 24px; }
.back:hover { color: var(--ink); }

.empty { padding: 48px 0; color: var(--ink-mute); }

/* Filter / section tabs */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-mute);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue-600); font-weight: 600; }
.tab .count { font-size: 13px; color: var(--ink-mute); }

/* Cause detail */
.cause-head h1 { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.12; letter-spacing: -0.02em; text-wrap: pretty; }
.cause-top { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 960px) { .cause-top { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 56px; align-items: start; } }
.cause-top:not(:has(.cause-photo)) { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) {
  .cause-top:not(:has(.cause-photo)) .summary { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: start; }
  .cause-top:not(:has(.cause-photo)) .summary > :not(dl):not(.btn) { grid-column: 1; }
  .cause-top:not(:has(.cause-photo)) .summary dl { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .cause-top:not(:has(.cause-photo)) .summary .btn { grid-column: 2; }
}
.cause-photo { border-radius: var(--radius); }
.cause-photo .carousel-img { aspect-ratio: 3 / 2; }

/* Photo carousel (chrome.jsx Carousel): scroll-snap track, arrows on hover/focus (always on touch), dots below */
.carousel { position: relative; overflow: hidden; border-radius: inherit; background: var(--blue-100); }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: inherit; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--blue-600); outline-offset: -2px; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.carousel-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; user-select: none; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(253, 250, 243, 0.92); color: var(--ink); box-shadow: var(--shadow-lift); transition: opacity 200ms var(--ease), background 200ms; }
.carousel-btn:hover { background: #fff; }
.carousel-btn:disabled { opacity: 0 !important; pointer-events: none; }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
@media (hover: hover) { .carousel-btn { opacity: 0; } .carousel:hover .carousel-btn, .carousel:focus-within .carousel-btn { opacity: 1; } }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 2px; pointer-events: none; }
.carousel-dots button { pointer-events: auto; width: 24px; height: 24px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.carousel-dots button::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(253, 250, 243, 0.6); box-shadow: 0 0 0 1px rgba(20, 39, 55, 0.25); transition: width 200ms var(--ease), background 200ms; }
.carousel-dots button[aria-current]::before { width: 18px; border-radius: 4px; background: #fff; }
.carousel-count { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(20, 39, 55, 0.6); color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Description spans the full container width; clamped until "Baca selengkapnya" */
.cause-story-wrap { margin-top: 24px; }
.cause-story { font-size: 18px; line-height: 1.75; color: var(--ink-soft); }
.cause-story p + p { margin-top: 1.1em; }
.cause-story.is-clamped { max-height: calc(1.75em * 6); overflow: hidden; }
.cause-story.is-faded { -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.read-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--blue-700); cursor: pointer; }
.read-more:hover { color: var(--blue-900); }
.read-more:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; border-radius: 4px; }
.summary { padding: 26px 26px 28px; }
.summary .raised { font-family: var(--serif); color: var(--blue-800); font-size: clamp(34px, 3.6vw, 46px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.summary .of { color: var(--ink-soft); margin: 4px 0 18px; }
.summary dl { margin: 24px 0 0; }
.summary dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary dl div:last-child { border-bottom: 0; }
.summary dt { color: var(--ink-soft); }
.summary dd { margin: 0; font-weight: 600; }
.summary .note { font-size: 15px; color: var(--ink-mute); margin-top: 16px; }

.panel { padding: 12px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Program tabs: every panel is one table inside a scrollable card ---- */
.dt { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 18px 20px 16px; border-bottom: 1px solid var(--line); }
.dt-title { font-size: 22px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.dt-count { font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--ink-mute); }
.dt-sub { font-size: 14px; color: var(--ink-mute); margin-top: 4px; max-width: 60ch; line-height: 1.5; }
.dt .pills { margin: 0; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--cream-50); }
.dt-empty { padding: 56px 20px; text-align: center; color: var(--ink-mute); }

/* Only the table body scrolls. Soft shadows appear at an edge when there is more to scroll to. */
.dt-scroll {
  max-height: min(62vh, 520px);
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(#fff 30%, transparent) top / 100% 28px no-repeat local,
    linear-gradient(transparent, #fff 70%) bottom / 100% 28px no-repeat local,
    radial-gradient(farthest-side at 50% 0, color-mix(in srgb, var(--ink) 20%, transparent), transparent) top / 100% 12px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, color-mix(in srgb, var(--ink) 20%, transparent), transparent) bottom / 100% 12px no-repeat scroll;
}
.dt-scroll:focus-visible { outline: 2px solid var(--blue-600); outline-offset: -2px; }
.dt-scroll table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.dt-scroll th {
  position: sticky; top: 0; z-index: 2;
  background: var(--blue-50);
  text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-soft);
  padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.dt-scroll td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dt-scroll tr > :first-child { padding-left: 20px; }
.dt-scroll tr > :last-child { padding-right: 20px; }
.dt-scroll tbody tr:last-child td { border-bottom: 0; }
.dt-scroll tfoot td { position: sticky; bottom: 0; z-index: 1; background: var(--blue-50); border-top: 1px solid var(--line); border-bottom: 0; font-weight: 700; }
@media (hover: hover) and (min-width: 640px) { .dt-scroll tbody tr:hover td { background: var(--blue-50); } }
.dt-scroll .num-col { text-align: right; white-space: nowrap; font-weight: 600; }
.dt-scroll th.num-col { font-weight: 600; }
.dt-scroll .in { color: var(--blue-700); }
.dt-scroll .c-date { white-space: nowrap; color: var(--ink-mute); width: 1%; }
.dt .item { font-weight: 600; color: var(--ink); }
.dt .sub { font-size: 14px; color: var(--ink-mute); margin-top: 2px; line-height: 1.5; }
.dt .prose { white-space: pre-line; color: var(--ink-soft); }
.dt .show-m { display: none; }
.dt-people .c-photo { width: 1%; }
.dt-people img, .dt-people .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--blue-100); }
.dt-people .avatar { display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--blue-800); }
.dt-scroll a.text-link:hover { text-decoration: underline; }

/* Phones: no sideways scrolling. Each row folds into a compact entry inside the same scroll area. */
@media (max-width: 639px) {
  .dt-head { padding: 16px; }
  .dt .pills { padding: 12px 16px; }
  .dt-scroll { max-height: min(68vh, 560px); }
  .dt-scroll thead { display: none; }
  .dt-scroll table, .dt-scroll tbody, .dt-scroll tfoot { display: block; }
  .dt-scroll tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .dt-scroll tbody tr:last-child { border-bottom: 0; }
  .dt-scroll td, .dt-scroll tr > :first-child, .dt-scroll tr > :last-child { display: block; padding: 0; border: 0; background: none; }
  .dt .dt-scroll td.hide-m, .dt .dt-scroll th.hide-m { display: none; }
  .dt .show-m { display: block; }
  .dt-scroll .c-date { grid-column: 1 / -1; font-size: 14px; width: auto; white-space: normal; }
  .dt-scroll .c-date .show-m { display: inline; }
  .dt-scroll .c-main { grid-column: 1; }
  .dt-scroll .c-side { grid-column: 2; }
  .dt-scroll .c-x { grid-column: 1 / -1; margin-top: 6px; }
  .dt-scroll tfoot { position: sticky; bottom: 0; z-index: 1; background: var(--blue-50); border-top: 1px solid var(--line); }
  .dt-scroll tfoot tr { border-bottom: 0; }
  .dt-scroll tfoot td { position: static; border: 0; background: none; }
  .dt-people tr { grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; }
  .dt-people .c-photo { grid-column: 1; grid-row: 1 / span 2; width: auto; }
  .dt-people .c-main, .dt-people .c-x { grid-column: 2; margin-top: 0; }
}

details.items summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--blue-700); margin-top: 6px; }
details.items ul { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; color: var(--ink-soft); }
details.items li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }


/* Events */
.events { list-style: none; margin: 0; padding: 0; }
.events { display: grid; gap: 16px; }
.event { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 20px 24px; padding: 24px; }
.event:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--blue-200); }
@media (min-width: 800px) { .event { grid-template-columns: 96px 1fr 280px; align-items: start; } }
.event-date { line-height: 1; background: var(--blue-50); border-radius: 12px; padding: 12px 0; text-align: center; align-self: start; }
.event-date .d { display: block; font-family: var(--serif); color: var(--blue-800); font-size: 36px; font-weight: 600; letter-spacing: -0.03em; }
.event-date .m { display: block; font-size: 15px; font-weight: 600; color: var(--ink-mute); margin-top: 6px; }
.event h2 { font-size: 26px; }
.event .when { font-size: 15px; color: var(--ink-soft); margin-top: 6px; }
.event p { color: var(--ink-soft); margin-top: 10px; max-width: 60ch; }
.event h2 a { color: inherit; text-decoration: none; }
.event h2 a::after { content: ''; position: absolute; inset: 0; }
.event .excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.event:hover h2 a { text-decoration: underline; text-underline-offset: 4px; }
.event img { grid-column: 1 / -1; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 800px) { .event img { grid-column: 3; grid-row: 1; } }

/* Blog list */
.lead-story { position: relative; display: grid; margin-bottom: 40px; overflow: hidden; }
@media (min-width: 900px) { .lead-story:has(.lead-media) { grid-template-columns: 1.15fr 1fr; } }
.lead-media { overflow: hidden; }
.lead-media img { width: 100%; height: 100%; min-height: 240px; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 600ms var(--ease); }
.lead-story:hover img { transform: scale(1.03); }
.lead-body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 24px 22px 26px; }
@media (min-width: 900px) { .lead-body { padding: 36px 40px; } }
.lead-body .badge { margin-bottom: 14px; }
.lead-story h2 { font-size: clamp(26px, 3vw, 36px); }
.lead-story h2 a { color: inherit; text-decoration: none; }
.lead-story h2 a::after { content: ''; position: absolute; inset: 0; }
.lead-story:hover h2 a { text-decoration: underline; text-underline-offset: 5px; }
.lead-story p { color: var(--ink-soft); margin-top: 12px; }
.lead-story .by { font-size: 14px; color: var(--ink-mute); margin-top: 14px; }

/* Post (reading page) */
.post { padding-bottom: 72px; }
/* Proportions: 640px text column; the photo is only ~56px wider (28px overhang each side) and 4:3, not a wide banner. */
.post-col { max-width: calc(640px + var(--gutter) * 2); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.post-head { padding-top: 48px; padding-bottom: 32px; }
.post-head .back { margin-bottom: 28px; }
.post-head .badge { display: table; margin-bottom: 14px; }
.post-head h1 { font-size: clamp(30px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 16px; font-size: 15px; color: var(--ink-mute); }
.post-author { font-weight: 600; color: var(--ink); }
.post-figure { max-width: calc(696px + var(--gutter) * 2); margin: 8px auto 0; padding: 0 var(--gutter); }
.post-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--blue-100); }
.post-figure .carousel { border-radius: 12px; }
.post-figure .carousel img { border-radius: 0; }
.post-body { padding-top: 40px; font-size: 18px; line-height: 1.75; color: var(--ink); }
.post-lede { font-size: 20px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 28px; }
.post-content > * { margin: 0; }
.post-content > * + * { margin-top: 1.2em; }
.post-content h2 { font-size: 24px; line-height: 1.3; margin-top: 2em; }
.post-content h3 { font-size: 20px; line-height: 1.35; margin-top: 1.8em; }
.post-content h2 + *, .post-content h3 + * { margin-top: 0.5em; }
.post-content ul, .post-content ol { padding-left: 1.3em; }
.post-content li + li { margin-top: 0.4em; }
.post-content img { width: 100%; height: auto; border-radius: 12px; }
.post-content a { color: var(--blue-700); text-underline-offset: 3px; }
.post-content blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 1px solid var(--ink); font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.5; color: var(--blue-700); }
.post-end { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 16px; }
.post-more .section-head h2 { font-size: clamp(24px, 2.6vw, 30px); }
@media (min-width: 800px) {
  .post-head { padding-top: 64px; }
  .post-more { padding: 80px 0; }
}

/* Event detail (reuses the post layout) */
.event-facts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.event-facts li { display: flex; align-items: center; gap: 12px; font-size: 18px; color: var(--ink); }
.event-facts svg { color: var(--blue-600); }
.event-desc { white-space: pre-line; }
.event-desc p { white-space: pre-line; }
.event-cta { margin-top: 48px; padding: 26px 26px 28px; }
.event-cta:hover { transform: none; box-shadow: none; border-color: var(--line); }
.event-cta h2 { font-size: 24px; }
.event-cta p { color: var(--ink-soft); margin-top: 8px; font-size: 17px; line-height: 1.6; }
.event-cta .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.post-more .events { margin-top: 0; }

/* Contact */
.contact-grid { display: grid; gap: 56px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 88px; } }
.contact-grid h2 { font-size: 26px; margin-bottom: 20px; }
.channels { list-style: none; margin: 0; padding: 0; }
.channel-cards { display: grid; gap: 12px; }
.channel-cards li { border: 0; }
.channel-cards a { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms; }
.channel-cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--blue-200); }

.channels a { display: flex; align-items: center; gap: 14px; padding: 18px 0; color: var(--ink); text-decoration: none; }
.channels .ch-label { font-size: 14px; color: var(--ink-mute); display: block; }
.channels .ch-value { font-weight: 600; overflow-wrap: anywhere; }
.channels a:hover .ch-value { text-decoration: underline; text-underline-offset: 3px; }

.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--blue-300);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 48px;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue-600); outline-offset: 0; border-color: var(--blue-600); }
.form-error { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 20px; border-radius: var(--radius); background: var(--cream-200); color: var(--ink); font-size: 15px; }
.sent h3 { font-size: 28px; margin-top: 12px; }
.sent p { color: var(--ink-soft); margin-top: 10px; }
