/* =========================================================
   Anyala Family Link
   Palette taken from the logo: navy ink, leaf green, sky blue, sun amber
   ========================================================= */
:root {
  --ink: #15233f;
  --ink-soft: #4a5772;
  --ink-faint: #7b8699;
  --paper: #ffffff;
  --mist: #f1f5f0;
  --mist-2: #e4ece3;
  --leaf: #1e7b3c;
  --leaf-deep: #145a2b;
  --leaf-tint: #e3f2e6;
  --sky: #2a62b8;
  --sky-tint: #e6eefa;
  --sun: #f4a51c;
  --sun-deep: #d98a00;
  --sun-tint: #fff3dc;
  --danger: #b3261e;
  --line: rgba(21, 35, 63, .12);
  --line-strong: rgba(21, 35, 63, .22);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(21,35,63,.06), 0 18px 40px -24px rgba(21,35,63,.35);
  --wrap: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; flex: none; }
a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.012em; font-variation-settings: "opsz" 96; }
h1 { font-size: clamp(2.3rem, 4.6vw + .6rem, 4.1rem); letter-spacing: -.022em; }
h2 { font-size: clamp(1.75rem, 2.4vw + .8rem, 2.7rem); }
h3 { font-size: 1.28rem; font-variation-settings: "opsz" 36; }
h4 { font-family: var(--sans); font-size: .95rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px; padding: .82em 1.45em; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap; line-height: 1.2;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 1.05em; height: 1.05em; }
.btn-sun { background: var(--sun); color: #2b1d00; box-shadow: 0 8px 22px -12px rgba(217,138,0,.9); }
.btn-sun:hover { background: #ffb534; }
.btn-leaf { background: var(--leaf); color: #fff; }
.btn-leaf:hover { background: var(--leaf-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-danger { background: #fde8e7; color: var(--danger); }
.btn-sm { padding: .55em 1.05em; font-size: .92rem; }
.btn-lg { padding: 1em 1.8em; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.text-link { font-weight: 600; color: var(--leaf); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.text-link:hover { color: var(--leaf-deep); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--mist); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--mist-2); }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header.scrolled { border-color: var(--line); }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 44px; height: auto; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.32rem; line-height: 1; letter-spacing: -.01em; display: flex; flex-direction: column; }
.brand-name small { font-family: var(--sans); font-weight: 600; font-size: .7rem; color: var(--leaf); letter-spacing: .02em; margin-top: 3px; }
.main-nav { display: flex; gap: 2px; }
.main-nav a { color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500; padding: 8px 11px; border-radius: 999px; transition: color .2s, background .2s; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); background: var(--mist); }
.menu-btn { display: none; border: 0; background: none; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; }
.menu-btn svg { width: 24px; height: 24px; }
.offline-bar { background: var(--sun-tint); color: #6b4700; text-align: center; font-size: .88rem; padding: 8px 16px; }

@media (max-width: 1080px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .main-nav {
    position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(255,255,255,.97); backdrop-filter: blur(20px); padding: 8px 20px 24px;
    border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .25s var(--ease);
  }
  .main-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { font-size: 1.15rem; padding: 14px 6px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .main-nav a.active { background: none; color: var(--leaf); }
}
@media (max-width: 480px) { .header-donate { padding: .5em .85em; } .brand-name { font-size: 1.15rem; } }

/* ---------------- sections ---------------- */
.page { animation: pageIn .45s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.band { padding: clamp(64px, 9vw, 120px) 0; }
.band-mist { background: var(--mist); }
.band-ink { background: var(--ink); color: #eef2f8; }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink p { color: #c3cbdb; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.band-ink .section-head p { color: #b9c3d6; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head.split > div { max-width: 640px; }
.section-head.split p { margin-bottom: 0; }

/* ---------------- hero ---------------- */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 40px; align-items: center; }
.hero-kicker { color: var(--leaf); font-weight: 600; margin-bottom: 18px; }
.hero-title { font-size: clamp(2.5rem, 4.4vw + .8rem, 4.6rem); line-height: 1.04; margin-bottom: 26px; font-weight: 600; }
.hero-lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 52/56; max-width: 540px; margin-left: auto; width: 100%; }
.thread { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--leaf); overflow: visible; }
.thread path { stroke-dasharray: 1 9; }
.knot { position: absolute; margin: 0; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 8px #fff, var(--shadow); opacity: 0; transform: scale(.85); animation: knotIn .8s var(--ease) forwards; }
.knot img { width: 100%; height: 100%; object-fit: cover; }
.k1 { width: 46%; aspect-ratio: 1; left: 0; top: 2%; animation-delay: .1s; }
.k1 img { object-position: 30% 30%; }
.k2 { width: 40%; aspect-ratio: 1; right: 0; top: 30%; animation-delay: .55s; }
.k2 img { object-position: 50% 15%; }
.k3 { width: 38%; aspect-ratio: 1; left: 14%; bottom: 0; animation-delay: 1s; }
.knot-label { position: absolute; font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--ink-soft); opacity: 0; animation: fadeIn .6s 1.5s forwards; }
.l1 { left: 47%; top: 4%; } .l2 { right: 2%; top: 72%; } .l3 { left: 54%; bottom: 8%; }
@keyframes knotIn { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
.thread path.draw { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.2s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin: 8px auto 0; }
}

/* ---------------- bento ---------------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; gap: 16px; }
.tile { position: relative; border-radius: var(--r-lg); overflow: hidden; color: #fff; text-decoration: none; background: var(--ink); isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); z-index: -2; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(21,35,63,0) 35%, rgba(21,35,63,.86)); }
.tile:hover img { transform: scale(1.04); }
.tile-copy { position: absolute; left: 22px; right: 22px; bottom: 18px; }
.tile-copy h3 { margin: 0 0 4px; color: #fff; }
.tile-copy p { margin: 0; color: rgba(255,255,255,.86); font-size: .95rem; }
.tile-xl { grid-column: span 2; grid-row: span 2; }
.tile-xl h3 { font-size: 1.8rem; }
.tile-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .tile-xl { grid-column: auto; grid-row: span 2; } }

/* ---------------- founder ---------------- */
.founder { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.founder-photo { margin: 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow); }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.founder blockquote { margin: 0 0 22px; font-family: var(--display); font-size: clamp(1.7rem, 2.4vw + .6rem, 2.6rem); line-height: 1.18; font-weight: 400; letter-spacing: -.015em; }
.founder blockquote::before { content: "\201C"; display: block; font-size: 4rem; line-height: .6; color: var(--sun); margin-bottom: 10px; }
.founder-name { font-weight: 700; margin-bottom: 18px; }
.founder-name span { display: block; font-weight: 500; color: var(--ink-soft); }
.founder-copy > p:not(.founder-name) { color: var(--ink-soft); max-width: 36em; }
.founder-dark .founder-copy > p:not(.founder-name) { color: #c3cbdb; }
.founder-dark .founder-name span { color: var(--sun); }
@media (max-width: 800px) { .founder { grid-template-columns: 1fr; } .founder-photo { max-width: 420px; } }

/* ---------------- Tuesday timeline ---------------- */
.timeline { list-style: none; padding: 0; margin: 0 0 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: t; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; border-top: 2px dotted rgba(244,165,28,.6); }
.timeline li { padding: 0 22px 0 0; position: relative; }
.timeline li::before { content: ""; display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 6px var(--ink); margin-bottom: 22px; position: relative; }
.t-time { font-family: var(--display); font-size: 1.5rem; color: var(--sun); display: block; margin-bottom: 6px; }
.timeline h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.timeline p { font-size: .97rem; margin: 0; }
@media (max-width: 800px) {
  .timeline { grid-template-columns: 1fr; gap: 26px; }
  .timeline::before { left: 11px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 2px dotted rgba(244,165,28,.6); }
  .timeline li { padding-left: 48px; }
  .timeline li::before { position: absolute; left: 0; top: 0; margin: 0; }
}
.tuesday-media { max-width: 900px; margin: 0 auto; }

/* ---------------- video player ---------------- */
.player { position: relative; border-radius: var(--r-md); overflow: hidden; background: #000; aspect-ratio: 16/9; color: #fff; }
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-big {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: transform .2s, opacity .25s;
}
.player-big svg { width: 34px; height: 34px; margin-left: 5px; }
.player-big:hover { transform: scale(1.06); }
.player.playing .player-big { opacity: 0; pointer-events: none; }
.player-bar {
  position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 14px; background: rgba(20,24,34,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: opacity .3s;
}
.player.playing.idle .player-bar { opacity: 0; }
.player-bar button { border: 0; background: none; color: #fff; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.player-bar button:hover { background: rgba(255,255,255,.14); }
.player-bar svg { width: 20px; height: 20px; }
.player-time { font-size: .82rem; font-variant-numeric: tabular-nums; min-width: 86px; text-align: center; opacity: .9; }
.player-track { flex: 1; height: 20px; display: flex; align-items: center; cursor: pointer; }
.player-rail { position: relative; height: 4px; width: 100%; background: rgba(255,255,255,.28); border-radius: 4px; }
.player-buf { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.35); border-radius: 4px; }
.player-fill { position: absolute; inset: 0 auto 0 0; background: var(--sun); border-radius: 4px; }
.player-fill::after { content: ""; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.player-speed { font-size: .8rem; font-weight: 700; width: auto !important; padding: 0 6px; }
.player-caption { margin-top: 12px; font-size: .95rem; color: var(--ink-soft); }
.band-ink .player-caption { color: #b9c3d6; }

/* ---------------- projects ---------------- */
.needed { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-bottom: 34px; padding: 22px 26px; background: var(--mist); border-radius: var(--r-md); align-items: baseline; }
.needed b { font-family: var(--display); font-size: 1.9rem; font-weight: 600; display: block; letter-spacing: -.01em; }
.needed span { color: var(--ink-soft); font-size: .95rem; }
.needed.big { margin-top: -8px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .25s, transform .25s; }
.project-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow); transform: translateY(-2px); }
.project-cover { position: relative; aspect-ratio: 16/10; background: var(--mist); overflow: hidden; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.glyph-cover { display: grid; place-items: center; width: 100%; height: 100%; color: var(--leaf);
  background: radial-gradient(circle at 80% 15%, rgba(244,165,28,.28), transparent 45%), linear-gradient(160deg, var(--leaf-tint), var(--sky-tint)); }
.glyph-cover svg { width: 38%; height: 60%; }
.glyph-cover small { position: absolute; bottom: 12px; right: 14px; font-size: .75rem; color: var(--ink-faint); }
.status { position: absolute; top: 14px; left: 14px; font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #fff; color: var(--ink); }
.status.urgent { background: var(--danger); color: #fff; }
.status.funded, .status.completed { background: var(--leaf); color: #fff; }
.project-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.project-body .cat { color: var(--leaf); font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.project-body h3 { margin-bottom: 8px; }
.project-body p { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.progress { height: 8px; background: var(--mist-2); border-radius: 8px; overflow: hidden; margin: 6px 0 10px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), #3aa55b); border-radius: 8px; min-width: 6px; transition: width 1s var(--ease); }
.money { display: flex; justify-content: space-between; font-size: .9rem; gap: 10px; }
.money b { font-weight: 700; }
.money span { color: var(--ink-soft); }
@media (max-width: 980px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .project-grid { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { border: 0; background: var(--mist); color: var(--ink-soft); padding: 8px 15px; border-radius: 999px; font-size: .92rem; font-weight: 600; cursor: pointer; transition: .2s; }
.chip:hover { color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; }
.chip small { opacity: .65; margin-left: 4px; font-weight: 500; }

/* project detail */
.pd-hero { padding: 36px 0 0; }
.pd-head { display: grid; grid-template-columns: 1.3fr .9fr; gap: 40px; align-items: start; }
.pd-media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/10; background: var(--mist); }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pd-thumbs button { border: 0; padding: 0; width: 86px; height: 62px; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.give-box { position: sticky; top: calc(var(--header-h) + 20px); background: #fff; border-radius: var(--r-lg); padding: 28px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.give-box h1 { font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem); margin-bottom: 10px; }
.give-box .raised { font-family: var(--display); font-size: 2rem; font-weight: 600; }
.give-box .of { color: var(--ink-soft); }
.give-box .progress { height: 10px; margin: 14px 0; }
.give-stats { display: flex; gap: 22px; color: var(--ink-soft); font-size: .92rem; margin-bottom: 18px; }
.give-stats b { color: var(--ink); display: block; font-size: 1.1rem; }
.pd-body { display: grid; grid-template-columns: 1.3fr .9fr; gap: 40px; padding: 48px 0 100px; }
.cost-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cost-table th { text-align: left; font-weight: 600; color: var(--ink-soft); font-size: .85rem; padding: 0 10px 10px 0; border-bottom: 1px solid var(--line-strong); }
.cost-table td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cost-table td.num, .cost-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost-table tfoot td { font-weight: 700; border-bottom: 0; padding-top: 16px; }
.cost-table .give-item { border: 0; background: var(--sun-tint); color: #6b4700; font-weight: 600; font-size: .8rem; padding: 4px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cost-table .give-item:hover { background: #ffe6b3; }
.supporters { list-style: none; padding: 0; margin: 0; }
.supporters li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
@media (max-width: 900px) { .pd-head, .pd-body { grid-template-columns: 1fr; } .give-box { position: static; } }

/* ---------------- posts ---------------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; }
.post-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.post-thumb { position: relative; aspect-ratio: 4/3; border-radius: var(--r-md); overflow: hidden; background: var(--mist); margin-bottom: 16px; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.035); }
.post-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.post-badge svg { width: 12px; height: 12px; }
.post-meta { font-size: .86rem; color: var(--ink-faint); margin-bottom: 6px; }
.post-meta .cat { color: var(--leaf); font-weight: 600; }
.post-meta .cat::after { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-faint); margin: 0 8px; vertical-align: middle; }
.post-card h3 { font-size: 1.32rem; margin-bottom: 8px; transition: color .2s; }
.post-card:hover h3 { color: var(--leaf); }
.post-card p { color: var(--ink-soft); font-size: .97rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; margin-bottom: 56px; text-decoration: none; color: var(--ink); }
.post-feature .post-thumb { aspect-ratio: 16/10; margin: 0; border-radius: var(--r-lg); }
.post-feature h2 { font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); }
.post-feature p { color: var(--ink-soft); font-size: 1.08rem; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } .post-feature { grid-template-columns: 1fr; gap: 18px; } }

.filters { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.filters .chips { margin-bottom: 20px; flex: 1; }
.search { display: flex; align-items: center; gap: 8px; background: var(--mist); border-radius: 999px; padding: 0 14px; min-width: 240px; }
.search input { border: 0; background: none; padding: 10px 0; outline: none; width: 100%; }
.search svg { color: var(--ink-faint); }
.empty { padding: 60px 20px; text-align: center; color: var(--ink-soft); grid-column: 1 / -1; }

/* single story */
.story-head { padding: 48px 0 28px; }
.story-head .post-meta { font-size: .95rem; margin-bottom: 14px; }
.story-head h1 { font-size: clamp(2.1rem, 3.6vw + .6rem, 3.6rem); max-width: 18em; }
.story-head .lede { font-size: 1.22rem; color: var(--ink-soft); max-width: 40em; }
.story-cover { border-radius: var(--r-lg); overflow: hidden; max-height: 640px; }
.story-cover img { width: 100%; height: 100%; object-fit: cover; max-height: 640px; }
.story-layout { display: grid; grid-template-columns: 1fr 680px 1fr; padding: 48px 0 40px; }
.story-layout > * { grid-column: 2; }
.share { grid-column: 1 !important; grid-row: 1 / span 6; position: sticky; top: calc(var(--header-h) + 30px); align-self: start; display: flex; flex-direction: column; gap: 8px; width: 40px; }
.share a, .share button { width: 40px; height: 40px; border-radius: 50%; background: var(--mist); color: var(--ink); display: grid; place-items: center; border: 0; cursor: pointer; }
.share a:hover, .share button:hover { background: var(--ink); color: #fff; }
.share svg { width: 18px; height: 18px; }
@media (max-width: 1000px) {
  .story-layout { grid-template-columns: 1fr; }
  .story-layout > * { grid-column: 1; }
  .share { grid-column: 1 !important; grid-row: auto; position: static; flex-direction: row; width: auto; margin-bottom: 24px; }
}
.prose { font-size: 1.1rem; line-height: 1.72; }
.prose h2 { font-size: 1.7rem; margin: 1.6em 0 .5em; }
.prose h3 { margin: 1.4em 0 .4em; }
.prose blockquote { margin: 1.6em 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--sun); font-family: var(--display); font-size: 1.35rem; line-height: 1.4; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--leaf); }
.prose strong { font-weight: 700; }
.prose a { color: var(--leaf); }
.story-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 36px 0; }
.story-gallery button { border: 0; padding: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--mist); }
.story-gallery button:first-child:nth-last-child(n+4) { grid-column: span 2; grid-row: span 2; }
.story-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.story-gallery button:hover img { transform: scale(1.05); }
.story-video { margin: 0 0 36px; }
.link-list { list-style: none; margin: 32px 0; padding: 0; border-top: 1px solid var(--line); }
.link-list a { display: flex; gap: 14px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.link-list a:hover { color: var(--leaf); }
.link-list svg { width: 20px; height: 20px; color: var(--leaf); }
.link-list small { display: block; font-weight: 400; color: var(--ink-faint); font-size: .82rem; }
.poll { margin: 36px 0; padding: 28px; background: var(--mist); border-radius: var(--r-lg); }
.poll h3 { display: flex; gap: 10px; align-items: flex-start; }
.poll h3 svg { width: 22px; height: 22px; color: var(--leaf); margin-top: 2px; }
.poll-opt { position: relative; display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; border: 0; background: #fff; padding: 14px 16px; border-radius: 12px; margin-bottom: 8px; cursor: pointer; overflow: hidden; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.poll-opt:hover:not([disabled]) { box-shadow: inset 0 0 0 2px var(--leaf); }
.poll-opt[disabled] { cursor: default; }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: var(--leaf-tint); transition: width .8s var(--ease); z-index: 0; }
.poll-opt.mine .bar { background: #c9e8d0; }
.poll-opt > span { position: relative; z-index: 1; }
.poll-opt .pct { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.poll-opt.mine .label::after { content: " \2713"; color: var(--leaf); }
.poll-foot { font-size: .88rem; color: var(--ink-soft); margin: 10px 0 0; }
.story-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0 0; }
.story-nav a { padding: 18px 20px; border-radius: var(--r-md); background: var(--mist); text-decoration: none; color: var(--ink); }
.story-nav a small { display: block; color: var(--ink-faint); margin-bottom: 4px; }
.story-nav a b { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.story-nav .next { text-align: right; grid-column: 2; }
.story-cta { margin: 40px 0 0; padding: 30px; border-radius: var(--r-lg); background: var(--ink); color: #fff; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.story-cta h3 { color: #fff; margin: 0 0 4px; }
.story-cta p { margin: 0; color: #c3cbdb; }

/* ---------------- page hero ---------------- */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 4vw, 48px); }
.page-hero.compact { padding-bottom: 28px; }
.page-hero .lede { font-size: 1.22rem; color: var(--ink-soft); }
.page-hero-img { margin-top: 44px; border-radius: var(--r-lg); width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.prose-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
@media (max-width: 800px) { .prose-grid { grid-template-columns: 1fr; gap: 6px; } }
.mvv { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 20px; }
.mvv article { background: #fff; border-radius: var(--r-lg); padding: 30px; }
.mvv h3 { color: var(--leaf); font-size: 1.5rem; }
.mvv p { color: var(--ink-soft); margin: 0; }
.values { list-style: none; padding: 0; margin: 0; color: var(--ink-soft); }
.values li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.values li:last-child { border: 0; }
.values b { color: var(--ink); }
@media (max-width: 900px) { .mvv { grid-template-columns: 1fr; } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; padding: 24px 20px; border-radius: var(--r-md); background: var(--mist); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--leaf); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps h3 { font-size: 1.15rem; }
.steps p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
@media (max-width: 1000px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* programs */
.programs { padding-bottom: 100px; }
.program { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.program:first-child { border-top: 0; }
.program:nth-child(even) .program-media { order: 2; }
.program-media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/3; }
.program-media img { width: 100%; height: 100%; object-fit: cover; }
.program-copy > p { color: var(--ink-soft); font-size: 1.08rem; }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; columns: 2; column-gap: 24px; }
.ticks li { padding: 4px 0 4px 26px; position: relative; break-inside: avoid; font-size: .97rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 10px; width: 14px; height: 8px; border-left: 2.5px solid var(--leaf); border-bottom: 2.5px solid var(--leaf); transform: rotate(-45deg); }
.program-links { display: flex; gap: 24px; flex-wrap: wrap; }
@media (max-width: 800px) { .program { grid-template-columns: 1fr; } .program:nth-child(even) .program-media { order: 0; } .ticks { columns: 1; } }

/* grown */
.grown { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.grown-copy p { color: var(--ink-soft); font-size: 1.1rem; }
.grown-photos { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: 440px; }
.grown-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); }
.grown-photos img:first-child { grid-row: span 2; }
@media (max-width: 800px) { .grown { grid-template-columns: 1fr; } .grown-photos { height: 320px; } }

.give-band { background: linear-gradient(120deg, var(--leaf-deep), var(--leaf)); color: #fff; padding: 64px 0; }
.give-band-inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.give-band h2 { color: #fff; margin-bottom: 8px; max-width: 18em; }
.give-band p { margin: 0; color: rgba(255,255,255,.85); }

/* ---------------- gallery ---------------- */
.video-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 44px; }
.video-row h3 { font-size: 1.1rem; margin: 12px 0 0; }
.video-row h3 a { color: var(--ink); text-decoration: none; }
@media (max-width: 760px) { .video-row { grid-template-columns: 1fr; } }
.masonry { columns: 4 240px; column-gap: 12px; padding-bottom: 100px; }
.masonry button { display: block; width: 100%; border: 0; padding: 0; margin: 0 0 12px; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--mist); break-inside: avoid; position: relative; }
.masonry img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.masonry button:hover img { transform: scale(1.04); }
.masonry span { position: absolute; left: 10px; bottom: 10px; right: 10px; font-size: .8rem; color: #fff; text-align: left; opacity: 0; transition: .25s; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.masonry button:hover span, .masonry button:focus-visible span { opacity: 1; }

/* ---------------- lightbox ---------------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(9,14,26,.94); display: flex; align-items: center; justify-content: center; padding: 60px 70px; animation: fadeIn .2s forwards; opacity: 0; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 10px; object-fit: contain; }
.lightbox figcaption { color: #cfd6e4; margin-top: 12px; font-size: .95rem; text-align: center; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
@media (max-width: 600px) { .lightbox { padding: 60px 10px; } .lb-prev, .lb-next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); } .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); } }

/* ---------------- forms ---------------- */
.card { background: #fff; border-radius: var(--r-lg); padding: clamp(22px, 3vw, 34px); box-shadow: inset 0 0 0 1px var(--line); }
.card.subtle { background: var(--mist); box-shadow: none; }
.card h3 { font-size: 1.2rem; }
.form h2 { font-size: 1.7rem; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--ink-faint); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff;
  transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2315233f' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(30,123,60,.14); }
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .narrow-field { max-width: 140px; }
.field-row:has(.narrow-field) { grid-template-columns: 1fr 140px; }
@media (max-width: 560px) { .field-row, .field-row:has(.narrow-field) { grid-template-columns: 1fr; gap: 0; } .field-row .narrow-field { max-width: none; } }
.check { display: flex; gap: 10px; align-items: center; margin: 4px 0 18px; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--leaf); }
.form-msg { margin: 12px 0 0; font-size: .95rem; min-height: 1em; }
.form-msg.error { color: var(--danger); }
.form-msg.ok { color: var(--leaf); }

/* donate */
.donate-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; padding-bottom: 100px; align-items: start; }
.donate-side { display: grid; gap: 18px; }
@media (max-width: 900px) { .donate-grid { grid-template-columns: 1fr; } }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--mist); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; text-align: center; padding: 10px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--ink-soft); transition: .2s; }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(21,35,63,.12); }
.segmented input:focus-visible + span { outline: 3px solid var(--sky); }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.amount { border: 1.5px solid var(--line-strong); background: #fff; border-radius: 14px; padding: 14px 8px; font-weight: 700; font-size: 1.05rem; cursor: pointer; transition: .15s; font-variant-numeric: tabular-nums; }
.amount:hover { border-color: var(--ink); }
.amount.active { border-color: var(--leaf); background: var(--leaf-tint); color: var(--leaf-deep); }
.impact { min-height: 1.6em; color: var(--leaf-deep); font-weight: 600; font-size: .97rem; }
.methods { border: 0; padding: 0; margin: 8px 0 18px; }
.methods legend { font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.method { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-strong); margin-bottom: 8px; cursor: pointer; }
.method:has(input:checked) { box-shadow: inset 0 0 0 2px var(--leaf); background: #fbfdfb; }
.method input { margin-top: 4px; accent-color: var(--leaf); width: 18px; height: 18px; }
.method b { display: block; }
.method small { color: var(--ink-soft); font-size: .86rem; }
.gift-list { list-style: none; padding: 0; margin: 0; }
.gift-list li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: .96rem; }
.gift-list li:last-child { border: 0; }
.gift-list b { color: var(--ink); display: block; }
.pay-detail { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .95rem; margin: 0 0 16px; }
.pay-detail dt { color: var(--ink-soft); }
.pay-detail dd { margin: 0; font-weight: 600; word-break: break-word; }
.result { padding: 90px 0 120px; }
.result .badge-ok { width: 76px; height: 76px; border-radius: 50%; background: var(--leaf-tint); color: var(--leaf); display: grid; place-items: center; margin: 0 auto 22px; }
.result .badge-ok svg { width: 38px; height: 38px; }
.result .card { text-align: left; margin-top: 28px; }

/* involve & contact */
.ways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.way { text-align: left; border: 0; background: var(--mist); border-radius: var(--r-md); padding: 22px; cursor: pointer; transition: .2s; }
.way h3 { font-size: 1.15rem; margin-bottom: 6px; }
.way p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.way.active { background: var(--ink); color: #fff; }
.way.active h3 { color: #fff; } .way.active p { color: #c3cbdb; }
@media (max-width: 860px) { .ways { grid-template-columns: 1fr 1fr; } }
.involve-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; padding-bottom: 100px; align-items: start; }
.pray h3 { margin-top: 1.2em; } .pray h3:first-child { margin-top: 0; }
.pray p { color: var(--ink-soft); font-size: .96rem; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; padding-bottom: 100px; align-items: start; }
.contact-cards { display: grid; gap: 12px; }
.contact-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--r-md); background: var(--mist); text-decoration: none; color: var(--ink); }
.contact-card svg { width: 22px; height: 22px; color: var(--leaf); margin-top: 3px; }
.contact-card small { display: block; color: var(--ink-soft); }
.contact-card b { font-weight: 600; word-break: break-word; }
@media (max-width: 860px) { .involve-grid, .contact-grid { grid-template-columns: 1fr; } }

/* ---------------- footer ---------------- */
.site-footer { background: var(--mist); padding: 70px 0 calc(28px + env(safe-area-inset-bottom, 0px)); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 36px; }
.footer-grid a { display: block; color: var(--ink-soft); text-decoration: none; padding: 4px 0; font-size: .95rem; }
.footer-grid a:hover { color: var(--leaf); }
.footer-brand p { color: var(--ink-soft); font-size: .95rem; margin-top: 14px; max-width: 26em; }
.footer-brand img { width: 150px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--ink); padding: 0; }
.socials svg { width: 18px; height: 18px; }
.foot-contact { color: var(--ink-soft); font-size: .95rem; }
.subscribe { display: flex; gap: 8px; margin-top: 10px; }
.subscribe input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 14px; background: #fff; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-faint); }
.foot-base a { color: var(--ink-faint); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .95rem; opacity: 0; pointer-events: none; transition: .3s var(--ease); z-index: 300; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

.skeleton { background: linear-gradient(90deg, var(--mist) 25%, var(--mist-2) 50%, var(--mist) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-card { height: 340px; }

/* =========================================================
   ADMIN
   ========================================================= */
.admin { min-height: calc(100vh - var(--header-h)); background: #f6f8f6; }
.login-wrap { min-height: 70vh; display: grid; place-items: center; padding: 40px 20px; }
.login-card { width: min(420px, 100%); }
.login-card img { width: 64px; margin-bottom: 14px; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - var(--header-h)); }
.admin-side { background: var(--ink); color: #c9d1e0; padding: 24px 14px; display: flex; flex-direction: column; gap: 4px; }
.admin-side .who { padding: 0 10px 18px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 12px; }
.admin-side .who b { color: #fff; display: block; }
.admin-side .who small { color: #8e9ab1; }
.admin-tab { display: flex; justify-content: space-between; align-items: center; text-align: left; border: 0; background: none; color: inherit; padding: 11px 12px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.admin-tab:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-tab.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-tab .count { background: var(--sun); color: #2b1d00; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.admin-side .spacer { flex: 1; }
.admin-main { padding: clamp(18px, 3vw, 36px); min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-top h1 { font-size: 2rem; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: var(--r-md); padding: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.stat small { color: var(--ink-soft); display: block; }
.stat b { font-family: var(--display); font-size: 1.8rem; font-weight: 600; }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.table-wrap { background: #fff; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: .93rem; }
.atable th { text-align: left; font-weight: 600; color: var(--ink-soft); font-size: .82rem; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfcfb; white-space: nowrap; }
.atable td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable tr:last-child td { border: 0; }
.atable .thumbcell { width: 72px; }
.atable .thumbcell img { width: 64px; height: 46px; object-fit: cover; border-radius: 8px; }
.atable .actions { white-space: nowrap; text-align: right; }
.atable .actions .icon-btn { margin-left: 4px; }
.atable .ttl { font-weight: 600; }
.atable .sub { color: var(--ink-faint); font-size: .82rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-soft); white-space: nowrap; }
.pill.ok, .pill.successful, .pill.published, .pill.funded, .pill.completed { background: var(--leaf-tint); color: var(--leaf-deep); }
.pill.pending, .pill.draft, .pill.active { background: var(--sun-tint); color: #7a5200; }
.pill.failed, .pill.cancelled, .pill.urgent { background: #fde8e7; color: var(--danger); }
.admin-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.admin-toolbar .search { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.editor { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.editor .card { margin-bottom: 18px; }
.editor-side { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .editor-side { position: static; } }
.md-toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.md-toolbar button { border: 0; background: var(--mist); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: .85rem; font-weight: 700; min-width: 34px; }
.md-toolbar button:hover { background: var(--mist-2); }
.md-toolbar .sep { width: 1px; background: var(--line); margin: 0 4px; }
.md-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem !important; line-height: 1.6; min-height: 340px !important; }
.preview-pane { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 18px 22px; max-height: 520px; overflow: auto; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: 16px; padding: 26px; text-align: center; color: var(--ink-soft); cursor: pointer; transition: .2s; }
.dropzone.over { border-color: var(--leaf); background: var(--leaf-tint); }
.dropzone svg { width: 34px; height: 34px; color: var(--leaf); margin: 0 auto 8px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.img-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--mist); }
.img-item img { width: 100%; height: 100%; object-fit: cover; }
.img-item .cover-flag { position: absolute; left: 6px; top: 6px; background: var(--sun); color: #2b1d00; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.img-item .img-actions { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.img-item .img-actions button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; display: grid; place-items: center; }
.img-item .img-actions svg { width: 14px; height: 14px; }
.img-item .img-meta { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-size: .68rem; padding: 14px 7px 5px; }
.img-item.busy::after { content: "Converting…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.8); font-size: .8rem; font-weight: 600; }
.repeater-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.repeater-row.single { grid-template-columns: 1fr auto; }
.repeater-row.items { grid-template-columns: 2fr 70px 130px 120px auto; }
.repeater-row input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); }
.repeater-row .rowtotal { text-align: right; font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 700px) { .repeater-row.single { grid-template-columns: 1fr auto; }
.repeater-row.items { grid-template-columns: 1fr 1fr; } }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; font-weight: 600; }
.toggle input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--mist-2); position: relative; cursor: pointer; transition: .2s; flex: none; }
.toggle input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.toggle input:checked { background: var(--leaf); }
.toggle input:checked::after { left: 21px; }
.seg-small { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.seg-small label { cursor: pointer; }
.seg-small input { position: absolute; opacity: 0; }
.seg-small span { display: inline-block; padding: 7px 13px; border-radius: 999px; background: var(--mist); font-size: .88rem; font-weight: 600; }
.seg-small input:checked + span { background: var(--ink); color: #fff; }
.msg-item { background: #fff; border-radius: var(--r-md); padding: 18px 20px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; }
.msg-item.unread { box-shadow: inset 3px 0 0 var(--sun), inset 0 0 0 1px var(--line); }
.msg-item header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.msg-item p { white-space: pre-wrap; margin: 0 0 10px; color: var(--ink-soft); }
.modal { position: fixed; inset: 0; background: rgba(21,35,63,.5); z-index: 150; display: grid; place-items: center; padding: 20px; }
.modal .card { width: min(520px, 100%); max-height: 90vh; overflow: auto; }
@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; overflow-x: auto; padding: 10px; gap: 4px; position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 5; }
  .admin-side .who, .admin-side .spacer { display: none; }
  .admin-tab { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .knot, .knot-label { opacity: 1; transform: none; }
  .thread path.draw { stroke-dashoffset: 0; }
}

/* text tiles (programmes without photos) */
.tile-text { display: block; }
.tile-text::after { display: none; }
.tile-ink { background: var(--ink); }
.tile-leaf { background: var(--leaf-deep); }
.tile-glyph { position: absolute; top: 22px; left: 22px; width: 44px; height: 44px; color: var(--sun); }
/* branded panels where there are no photos */
.brand-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 30px; color: #fff; }
.brand-panel.ink { background: radial-gradient(circle at 80% 15%, rgba(244,165,28,.22), transparent 50%), var(--ink); }
.brand-panel.leaf { background: radial-gradient(circle at 80% 15%, rgba(244,165,28,.22), transparent 50%), var(--leaf-deep); }
.brand-panel svg { width: 76px; height: 76px; color: var(--sun); }
.brand-panel p { margin: 0; max-width: 24em; color: rgba(255,255,255,.85); font-size: .98rem; }
.post-glyph { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 80% 15%, rgba(244,165,28,.25), transparent 50%), linear-gradient(160deg, var(--leaf-tint), var(--sky-tint)); }
.post-glyph img { width: 34%; height: auto !important; object-fit: contain !important; }
.post-card:hover .post-glyph img { transform: none; }
/* site photo strip on home */
.site-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 34px; }
.site-strip a { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4/3; color: #fff; text-decoration: none; }
.site-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.site-strip a:hover img { transform: scale(1.04); }
.site-strip span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; background: linear-gradient(transparent, rgba(21,35,63,.85)); font-weight: 600; font-size: .95rem; }
@media (max-width: 760px) { .site-strip { grid-template-columns: 1fr 1fr; } }
/* project needs list */
.needs-list { list-style: none; padding: 0; margin: 0; }
.needs-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.needs-list li span:last-child { color: var(--ink-soft); white-space: nowrap; }
.project-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-soft); padding-top: 12px; border-top: 1px solid var(--line); }
.project-foot b { color: var(--leaf); }
.repeater-row.pair { grid-template-columns: 1fr 90px auto; }
