/* ==========================================================================
   Messengers of Love Foundation — design system
   Olive & Linen. One stylesheet serves both directions: every inline offset
   uses logical properties (margin-inline-start, not margin-left), so `dir=rtl`
   mirrors the layout without a second RTL stylesheet.
   ========================================================================== */

:root {
    --bg:             #F4F1E7;
    --surface:        #FAF8F1;
    --border:         #E2DDCB;
    --band:           #EDE9DA;

    --olive:          #6B7A5A;
    --olive-dark:     #5A6A4A;
    --olive-tint:     #E3E7D6;
    --olive-ink:      #4A5740;

        /* Terracotta appears NOWHERE except donation actions. --terracotta is
       the resting swatch; buttons use --terracotta-btn, which is darkened to
       reach 4.5:1 against its own label. */
    --terracotta:     #C1664B;
    --terracotta-btn: #AF5940;
    --terracotta-dark:#9C4E38;

    /* The olive band behind the donate call-out, darkened so body text on it
       reaches AA. */
    --olive-band:     #647353;

    --ink:            #38392E;
    --muted:          #6A6C58;   /* darkened from spec for WCAG AA on --bg */
    /* Metadata. Contrast forces this close to --muted, so the visual
       hierarchy between secondary and tertiary text is carried by SIZE and
       weight rather than by colour alone. Verified 4.5:1 on --band, the
       darkest ground it ever sits on. */
    --faint:          #676952;

    --radius:         12px;
    --radius-lg:      16px;
    --maxw:           1120px;

    --shadow-sm:      0 1px 2px rgba(56,57,46,.05);
    --shadow-md:      0 12px 28px rgba(56,57,46,.14);

    --font-latin: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-arabic: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* The browser's own [hidden] rule loses to any class that sets display, so a
   component like .btn stays visible after hidden=true. This makes the
   attribute mean what it says, everywhere. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-latin);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Arabic needs more leading and a slightly larger size to stay legible. */
[dir="rtl"] body,
body[dir="rtl"] { font-family: var(--font-arabic); font-size: 17.5px; line-height: 1.85; }
[lang="ar"] { font-family: var(--font-arabic); }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--olive-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--olive-ink); }

:focus-visible {
    outline: 3px solid var(--olive);
    outline-offset: 2px;
    border-radius: 4px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { line-height: 1.45; letter-spacing: 0; font-weight: 700; }

h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.8rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

.skip-link {
    position: absolute; inset-inline-start: -9999px; top: 0; z-index: 100;
    background: var(--olive-dark); color: #F8F7EF; padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { inset-inline-start: 0; }

/* ---------- Header ---------------------------------------------------- */

.site-header {
    background: var(--surface);
    border-block-end: 1px solid var(--border);
    position: sticky; top: 0; z-index: 40;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 25px; color: var(--olive); flex: none; }
.brand b { font-size: 1rem; font-weight: 600; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    padding: 10px 12px; border-radius: 999px; text-decoration: none;
    color: var(--muted); font-size: .92rem; min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { background: var(--band); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--olive-dark); font-weight: 600; }

/* Donate and the language toggle live outside .nav, so they stay visible on a
   phone rather than hiding behind the menu button. */
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.lang-toggle {
    border: 1px solid #C3C8B2; border-radius: 999px; padding: 8px 14px;
    font-size: .8rem; color: var(--olive-dark); text-decoration: none;
    min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center;
}
.lang-toggle:hover { background: var(--olive-tint); color: var(--olive-ink); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 12px 26px; border-radius: 999px;
    font-size: .95rem; font-weight: 600; text-decoration: none; border: none; cursor: pointer;
    transition: transform .2s cubic-bezier(.22,.8,.3,1), background .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--olive-dark); color: #F8F7EF; }
.btn-primary:hover { background: var(--olive-ink); color: #F8F7EF; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(90,106,74,.3); }
.btn-ghost { border: 1.5px solid #C3C8B2; color: var(--olive-dark); background: transparent; }
.btn-ghost:hover { background: var(--olive-tint); transform: translateY(-2px); }
.btn-give { background: var(--terracotta-btn); color: #FFF6F0; }
.btn-give:hover { background: var(--terracotta-dark); color: #FFF6F0; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(193,102,75,.32); }
.btn:active { transform: translateY(0); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* A button inside the header needs to beat ".nav a" and ".header-actions a"
   on specificity. Without this the navigation's muted colour won, rendering
   the donate label at 1.11:1 against terracotta — effectively invisible. */
.site-header .btn-give,
.site-header .btn-give:hover,
.site-header .btn-give:focus { color: #FFF6F0; background: var(--terracotta-btn); }
.site-header .btn-give:hover { background: var(--terracotta-dark); }
.site-header .btn-primary,
.site-header .btn-primary:hover { color: #F8F7EF; }

/* Hamburger */
.nav-toggle {
    display: none; background: none; border: 1px solid var(--border);
    border-radius: 999px; width: 44px; height: 44px; padding: 0;
    color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle .bars { display: block; width: 18px; }
.nav-toggle .bars span {
    display: block; height: 2px; background: var(--muted); border-radius: 2px;
    margin-block: 3px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .site-header .wrap { position: relative; }
    .nav {
        display: none;
        position: absolute; inset-inline: 0; top: 100%;
        background: var(--surface); border-block-end: 1px solid var(--border);
        flex-direction: column; align-items: stretch;
        padding: 8px 20px 16px; gap: 2px; z-index: 50;
        box-shadow: 0 10px 24px rgba(56,57,46,.1);
    }
    .nav.open { display: flex; }
    .nav a { padding: 13px 12px; font-size: 1rem; }
    /* The donate label alone is enough on a narrow screen. */
    .site-header .btn-give { padding-inline: 18px; font-size: .9rem; }
    .brand b { font-size: .92rem; }
}

@media (max-width: 420px) {
    .brand b { display: none; }   /* the lotus alone identifies the site */
    .site-header .btn-give { padding-inline: 16px; }
}

/* ---------- Hero ------------------------------------------------------ */

.hero { text-align: center; padding: clamp(40px, 7vw, 68px) 0 clamp(26px, 4vw, 36px); }
.hero .lotus {
    width: clamp(64px, 13vw, 92px); height: auto; color: #A8B394;
    margin: 0 auto 20px;
}
@media (max-width: 640px) {
    /* On a phone the lotus is the only ornament above the fold, so it earns
       more room rather than less. */
    .hero .lotus { width: clamp(78px, 22vw, 104px); margin-block-end: 22px; }
}
.hero p { color: var(--muted); max-width: 52ch; margin-inline: auto; margin-block-end: 24px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Photo mosaic ---------------------------------------------- */

.mosaic {
    display: grid; gap: 10px; margin-block-start: 32px;
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    /* Fixed aspect so the block never shifts while photos load. */
    aspect-ratio: 16 / 7;
}
.mosaic a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--band); }
.mosaic a:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.22,.8,.3,1); }
.mosaic a:hover img { transform: scale(1.05); }

@media (max-width: 720px) {
    .mosaic { grid-template-columns: 1.4fr 1fr; aspect-ratio: 5 / 4; }
    .mosaic a:nth-child(n+4) { display: none; }
}

/* ---------- Counts ---------------------------------------------------- */

.counts {
    display: flex; justify-content: center; gap: clamp(28px, 6vw, 56px); flex-wrap: wrap;
    background: var(--band); border-block: 1px solid var(--border);
    padding: 26px 20px; margin-block-start: 40px;
}
.counts div { text-align: center; }
.counts b { display: block; font-size: 1.9rem; color: var(--olive-dark); font-weight: 600; font-variant-numeric: tabular-nums; }
.counts span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
[dir="rtl"] .counts span { letter-spacing: 0; text-transform: none; font-size: .86rem; }

/* ---------- Sections -------------------------------------------------- */

.section { padding-block: clamp(36px, 6vw, 56px); }
.section-label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 0 0 6px; }
[dir="rtl"] .section-label { letter-spacing: 0; text-transform: none; font-size: .85rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }

.pillar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px; text-align: center; }
.pillar .icon { font-size: 1.8rem; margin-block-end: 8px; }
.pillar h3 { margin-block-end: 6px; }
.pillar p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Activity cards -------------------------------------------- */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .28s cubic-bezier(.22,.8,.3,1), box-shadow .28s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card .photo { overflow: hidden; background: var(--band); aspect-ratio: 4 / 3; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.22,.8,.3,1); }
.card:hover .photo img { transform: scale(1.05); }
.card .body { padding: 14px 16px 18px; flex: 1; }
.card h3 { font-size: 1.02rem; margin-block-end: 4px; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { color: var(--olive-dark); }
.card .meta { font-size: .82rem; color: var(--faint); }

.tag {
    display: inline-block; font-size: .68rem; letter-spacing: .11em; text-transform: uppercase;
    background: var(--olive-tint); color: var(--olive-ink);
    padding: 4px 10px; border-radius: 999px; margin-block-end: 8px;
}
[dir="rtl"] .tag { letter-spacing: 0; text-transform: none; font-size: .78rem; }

/* A card whose activity has no title in this language: the photo and the
   structured fields carry it. No placeholder text is ever shown. */
.card.untitled .body { padding-block-start: 12px; }

/* ---------- Filters --------------------------------------------------- */

.filters { display: flex; flex-direction: column; gap: 14px; margin-block-end: 28px; }
.filter-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.filter-row > .label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); min-width: 90px; font-weight: 600; }
[dir="rtl"] .filter-row > .label { letter-spacing: 0; text-transform: none; font-size: .88rem; }
.chip {
    display: inline-flex; align-items: center; min-height: 40px;
    padding: 8px 15px; border-radius: 999px; font-size: .87rem; text-decoration: none;
    background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.chip:hover { border-color: #C3C8B2; color: var(--ink); }
.chip[aria-current="true"] { background: var(--olive-dark); border-color: var(--olive-dark); color: #F8F7EF; font-weight: 600; }

/* ---------- Activity detail ------------------------------------------- */

.article { max-width: 760px; margin-inline: auto; }
.article .meta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--faint); font-size: .9rem; margin-block-end: 18px; }
.article .prose { font-size: 1.05rem; color: var(--ink); }
.article .prose p { margin-block-end: 1.1em; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-block-start: 28px; }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: var(--radius); background: var(--band); }
.gallery figcaption { font-size: .82rem; color: var(--faint); margin-block-start: 6px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .9rem; text-decoration: none; }
[dir="rtl"] .back-link .arrow { transform: scaleX(-1); }

/* ---------- Pagination ------------------------------------------------ */

.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-block-start: 34px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: .9rem;
    border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.pagination a:hover { border-color: #C3C8B2; color: var(--ink); }
.pagination .current { background: var(--olive-dark); border-color: var(--olive-dark); color: #F8F7EF; font-weight: 600; }
[dir="rtl"] .pagination .arrow { transform: scaleX(-1); }

/* ---------- Donate band and page -------------------------------------- */

.band-give { background: var(--olive-band); color: #F3F2E9; text-align: center; padding: clamp(36px, 6vw, 52px) 20px; }
.band-give h2 { color: #FBFAF3; }
.band-give p { max-width: 46ch; margin-inline: auto; opacity: .9; }

.amounts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-block: 20px; }
.amount {
    min-height: 44px; padding: 12px 22px; border-radius: 999px;
    border: 1.5px solid var(--border); background: var(--surface);
    font: inherit; color: var(--ink); cursor: pointer;
}
.amount[aria-pressed="true"] { border-color: var(--terracotta-btn); background: #F6E7E0; color: var(--terracotta-dark); font-weight: 600; }

.notice {
    background: #F6EFE6; border: 1px solid #E5D6C2; border-radius: var(--radius);
    padding: 20px 22px; margin-block: 22px; text-align: start;
}
.notice h3 { margin-block-end: 6px; }
.notice p { margin: 0; color: var(--muted); }

/* ---------- Prose pages ----------------------------------------------- */

.page-body { max-width: 720px; margin-inline: auto; }
.page-body h2 { margin-block-start: 1.6em; }
.page-body p { color: var(--ink); }
.page-body .lead { font-size: 1.12rem; color: var(--muted); }

.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-block: 22px; }
@media (max-width: 560px) { .values { grid-template-columns: 1fr; } }
.value { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.value b { display: block; color: var(--olive-dark); margin-block-end: 2px; }
.value span { color: var(--muted); font-size: .92rem; }

/* ---------- Footer ---------------------------------------------------- */

.site-footer { background: var(--ink); color: #B7B9A6; margin-block-start: 0; padding-block: 34px; font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-start; }
.site-footer a { color: #D6D8C6; }
.site-footer .branch { max-width: 44ch; opacity: .78; margin: 0; }
.site-footer .foot-brand { display: flex; align-items: center; gap: 10px; margin-block-end: 8px; }
.site-footer .foot-brand svg { width: 26px; height: 22px; color: #A8B394; }
.site-footer .foot-brand b { color: #E9EADF; }

/* ---------- Empty and error states ------------------------------------ */

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.error-page { text-align: center; padding: clamp(60px, 12vw, 120px) 20px; }

/* ==========================================================================
   Motion — spec §8. Everything animates transform/opacity only, so it runs on
   the GPU and stays smooth on older phones.
   ========================================================================== */

.lotus-draw path {
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    animation: lotus-draw 2.1s ease forwards;
}
.lotus-draw path:nth-child(2), .lotus-draw path:nth-child(3) { animation-delay: .16s; }
.lotus-draw path:nth-child(4), .lotus-draw path:nth-child(5) { animation-delay: .34s; }
@keyframes lotus-draw { to { stroke-dashoffset: 0; } }

/* Content is visible by default; .rise only adds the transition. If the
   JavaScript never runs, every card is still there and readable. */
.rise { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.8,.3,1); }
.rise.in { opacity: 1; transform: none; }
.no-js .rise { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .lotus-draw path { stroke-dashoffset: 0; }
    .rise { opacity: 1; transform: none; }
    .card:hover, .btn:hover, .mosaic a:hover img, .card:hover .photo img { transform: none; }
}

@media print {
    .site-header, .site-footer, .filters, .pagination, .band-give { display: none; }
    body { background: #fff; }
}

/* Visually hidden but available to screen readers — used where an activity has
   no title in the current language and only structured fields carry it. */
.sr-only, .visually-hidden-title span {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
    white-space: nowrap; border: 0;
}
.visually-hidden-title { margin: 0; }

/* ==========================================================================
   Homepage: who we are, values, how it happens, pillar photos
   ========================================================================== */

.quiet-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .92rem; text-decoration: none; color: var(--olive-dark);
    border-block-end: 1px solid #C3C8B2; padding-block-end: 2px;
    min-height: 44px;
}
.quiet-link:hover { color: var(--olive-ink); border-color: var(--olive); }
[dir="rtl"] .quiet-link .arrow { transform: scaleX(-1); }

/* ---------- who we are band ---------- */
.who-band {
    background: var(--band);
    border-block: 1px solid var(--border);
    padding-block: clamp(40px, 6vw, 60px);
    text-align: center;
}
.who-band .lotus { width: 38px; height: 31px; color: #A8B394; margin-inline: auto; margin-block-end: 14px; }
.who-band .who-quote {
    font-size: clamp(1.15rem, .95rem + .8vw, 1.42rem);
    line-height: 1.5; color: var(--ink); font-weight: 500;
    max-width: 38ch; margin-inline: auto; margin-block-end: 14px; letter-spacing: -.01em;
}
[dir="rtl"] .who-band .who-quote { line-height: 1.7; font-weight: 600; letter-spacing: 0; }
.who-band .who-body { font-size: .98rem; color: var(--muted); max-width: 54ch; margin-inline: auto; margin-block-end: 18px; }

/* ---------- pillar cards with real photographs ---------- */
.pillar-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: transform .28s cubic-bezier(.22,.8,.3,1), box-shadow .28s ease;
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pillar-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--band); }
.pillar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s cubic-bezier(.22,.8,.3,1); }
.pillar-card:hover .pillar-photo img { transform: scale(1.05); }
/* A scrim so the label stays readable whatever the photograph happens to be. */
.pillar-photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(56,57,46,0) 45%, rgba(56,57,46,.62) 100%);
}
.pillar-photo b {
    position: absolute; inset-inline-start: 15px; inset-block-end: 11px; z-index: 2;
    color: #FBFAF3; font-size: 1.05rem; letter-spacing: -.01em;
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.pillar-empty { display: flex; align-items: center; justify-content: center; background: var(--olive-tint); }
.pillar-empty::after { background: none; }
.pillar-empty .icon { font-size: 2rem; opacity: .75; }
.pillar-empty b { color: var(--olive-ink); text-shadow: none; }
.pillar-body { padding: 14px 16px 18px; }
.pillar-body p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.6; }

/* ---------- values ribbon ---------- */
.values-ribbon {
    background: var(--olive-band); border-radius: var(--radius-lg);
    padding: clamp(26px, 4vw, 38px) clamp(20px, 3vw, 30px);
}
.values-ribbon h2 { color: #FBFAF3; margin-block-end: 4px; }
.section-label.on-olive { color: #C8D0B8; }

.values-grid {
    list-style: none; margin: 18px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1px; background: rgba(255,255,255,.2);
    border-radius: var(--radius); overflow: hidden;
}
@media (max-width: 880px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .values-grid { grid-template-columns: 1fr; } }

.value-cell { background: var(--olive-band); padding: 17px 15px; }
.value-cell b {
    display: block; font-size: 1.04rem; color: #FBFAF3; margin-block-end: 3px; font-weight: 600;
}
[dir="rtl"] .value-cell b { font-size: 1.12rem; font-weight: 700; }
.value-cell span { font-size: .85rem; color: #D4DAC6; line-height: 1.5; display: block; }
.value-more { display: flex; align-items: center; }
.value-more a {
    color: #E4E9D8; text-decoration: none; font-size: .9rem;
    border-block-end: 1px solid rgba(255,255,255,.4); padding-block-end: 2px;
    display: inline-flex; align-items: center; gap: 6px;
}
.value-more a:hover { color: #fff; border-color: #fff; }
[dir="rtl"] .value-more .arrow { transform: scaleX(-1); }

/* ---------- how it happens ---------- */
.how-section { padding-block-start: 0; }
.steps {
    list-style: none; margin: 22px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

.step { position: relative; padding-block-start: 6px; }
.step-number {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--olive-tint); color: var(--olive-ink);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .9rem; margin-block-end: 11px;
}
.step b { display: block; font-size: 1rem; color: var(--ink); margin-block-end: 5px; }
.step p { font-size: .92rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* A dashed rule joining the steps, so they read as a sequence. */
.step::before {
    content: ''; position: absolute; inset-block-start: 23px;
    inset-inline-start: 44px; inset-inline-end: -20px; height: 1px;
    background: repeating-linear-gradient(90deg, #CDD3BE 0 5px, transparent 5px 10px);
}
.step:last-child::before { display: none; }
@media (max-width: 760px) { .step::before { display: none; } }

/* ---------- the foundation's emblem ----------
   Masked to its own circle, so what meets the page is the gold ring rather
   than the artwork's grey-lavender square. No shadow: a circle has no box to
   justify. Inside the pages the open-line lotus carries the identity, and it
   alone is the favicon — a vector is the only thing legible at 32px. */
.brand .crest { width: 46px; height: 46px; flex: none; }
.brand b { max-width: 24ch; }

.foot-brand .crest-footer { width: 112px; height: 112px; margin-block-end: 10px; }

@media (max-width: 860px) {
    .brand .crest { width: 40px; height: 40px; }
    .foot-brand .crest-footer { width: 92px; height: 92px; }
}
@media (max-width: 420px) {
    .brand .crest { width: 36px; height: 36px; }
}

/* ---------- share ----------
   WhatsApp and Telegram first: that is where this organisation's reach is. */
.share {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-block: 26px 4px; padding-block-start: 20px;
    border-block-start: 1px solid var(--border);
}
.share-label { font-size: .86rem; color: var(--faint); margin-inline-end: 4px; }

.share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--muted); cursor: pointer; text-decoration: none;
    transition: transform .2s cubic-bezier(.22,.8,.3,1), background .2s ease, color .2s ease, border-color .2s ease;
    position: relative;
}
.share-btn:hover { transform: translateY(-2px); }
.share-whatsapp:hover { background: #25D366; border-color: #25D366; color: #fff; }
.share-telegram:hover { background: #229ED9; border-color: #229ED9; color: #fff; }
.share-copy:hover { background: var(--olive-tint); border-color: #C3C8B2; color: var(--olive-ink); }

.copied-note {
    position: absolute; inset-block-end: calc(100% + 6px); inset-inline-start: 50%;
    transform: translateX(-50%);
    background: var(--ink); color: #F3F2E9; font-size: .74rem;
    padding: 4px 10px; border-radius: 6px; white-space: nowrap;
}
[dir="rtl"] .copied-note { transform: translateX(50%); }

/* ---------- where we work: a ranking, not a wall of cards ----------
   Bars compare countries with each other rather than claiming a scale, and
   only countries with published work appear. */
.country-ranking { list-style: none; margin: 18px 0 0; padding: 0; border-block-start: 1px solid var(--border); }
.rank-row { border-block-end: 1px solid var(--border); }
.rank-row a {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 6px; text-decoration: none; color: var(--ink);
    min-height: 56px; border-radius: 8px;
    transition: background .2s ease;
}
.rank-row a:hover { background: var(--band); color: var(--ink); }
.rank-flag { font-size: 1.35rem; line-height: 1; flex: none; }
.rank-name { flex: 1; min-width: 0; }
.rank-name b { display: block; font-size: 1rem; font-weight: 600; }
.rank-name span { font-size: .8rem; color: var(--faint); }
.rank-bar { width: 140px; height: 6px; background: var(--band); border-radius: 999px; overflow: hidden; flex: none; }
.rank-bar i { display: block; height: 100%; background: var(--olive); border-radius: 999px; }
.rank-count {
    min-width: 40px; text-align: end; font-variant-numeric: tabular-nums;
    font-size: .95rem; font-weight: 600; color: var(--olive-dark); flex: none;
}
@media (max-width: 560px) { .rank-bar { width: 64px; } }

/* ---------- activities: country symbols as a filter ----------
   Compact on purpose. A photograph per country was too heavy visually and in
   bytes; the landmark carries the identity at a fraction of both. */
.symbol-row {
    display: flex; gap: 6px; overflow-x: auto; padding-block-end: 6px;
    margin-block-end: 18px; scrollbar-width: thin;
}
.symbol {
    flex: 0 0 auto; width: 88px; padding: 10px 6px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    border: 1px solid transparent; border-radius: var(--radius);
    text-decoration: none; color: var(--muted); text-align: center;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.symbol:hover { background: var(--surface); border-color: var(--border); color: var(--ink); }
.symbol.is-active { background: var(--olive-tint); border-color: #C3C8B2; color: var(--olive-ink); }
.symbol-mark { display: block; width: 52px; height: 36px; color: var(--olive); }
.symbol.is-active .symbol-mark { color: var(--olive-ink); }
.symbol-mark svg { width: 100%; height: 100%; }
.symbol-all svg { width: 34px; height: 34px; margin-block-start: 2px; }
.symbol-name { font-size: .78rem; line-height: 1.25; }
.symbol-count {
    font-size: .68rem; font-variant-numeric: tabular-nums;
    background: var(--band); color: var(--faint);
    border-radius: 999px; padding: 1px 7px;
}
.symbol.is-active .symbol-count { background: rgba(255,255,255,.55); color: var(--olive-ink); }

/* ---------- the dropdown filter ---------- */
.filter-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.filter-field { display: flex; flex-direction: column; gap: 5px; min-width: 190px; flex: 1 1 190px; }
.filter-field label {
    font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--faint); font-weight: 600;
}
[dir="rtl"] .filter-field label { letter-spacing: 0; text-transform: none; font-size: .84rem; }
.filter-field select {
    font: inherit; font-size: .95rem; padding: 11px 13px; min-height: 46px;
    background: var(--surface); color: var(--ink);
    border: 1.5px solid var(--border); border-radius: var(--radius);
}
.filter-field select:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(107,122,90,.18); }
.btn-filter { min-height: 46px; }
.clear-link { font-size: .88rem; color: var(--muted); align-self: center; }
@media (max-width: 560px) { .filter-field { flex: 1 1 100%; } }

/* ---------- a country's own page ---------- */
.country-head {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    margin-block: 18px 26px; padding-block-end: 20px;
    border-block-end: 1px solid var(--border);
}
.country-head-mark { width: 110px; height: auto; color: var(--olive); flex: none; }
.country-head h1 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.country-head .sub { color: var(--muted); margin: 0; }
@media (max-width: 560px) { .country-head-mark { width: 82px; } }

.chip-count {
    display: inline-block; margin-inline-start: 6px;
    font-size: .74rem; font-variant-numeric: tabular-nums;
    background: var(--band); color: var(--faint);
    border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.chip[aria-current="true"] .chip-count { background: rgba(255,255,255,.22); color: #F8F7EF; }

.related-section { padding-block-start: 0; border-block-start: 1px solid var(--border); margin-block-start: 8px; padding-block-start: 34px; }

/* The legal name sits above the description in the footer: LTD is a
   registration detail, which belongs here rather than in the navigation. */
.site-footer .foot-name {
    color: #E9EADF; font-weight: 600; font-size: .95rem;
    margin: 0 0 6px;
}

/* ---------- text shown in the other language ----------
   Quiet, never apologetic. The words are the volunteer's own; the label only
   says which language they wrote them in. */
.written-in {
    font-size: .76rem; color: var(--faint); margin: -2px 0 10px;
    letter-spacing: .04em;
}
[dir="rtl"] .written-in { letter-spacing: 0; font-size: .82rem; }

/* A block in the other language reads in its own direction, set inline with
   dir, and gets a hairline to show it is a quotation of sorts. */
.prose.is-other-language {
    border-inline-start: 2px solid var(--olive-tint);
    padding-inline-start: 14px;
}

/* ---------- donate ----------
   One clear action. No amount buttons: the PayPal button is a "customer set
   price" one, so the donor types the amount on PayPal's page. */
.give-block { text-align: center; margin-block: 28px 22px; }
.give-action { margin: 0 0 14px; }
.btn-lg { font-size: 1.05rem; padding: 15px 42px; }
.give-note {
    margin: 0 auto 8px; max-width: 46ch;
    font-size: .88rem; line-height: 1.6; color: var(--muted);
}
.give-currency { color: var(--faint); font-size: .84rem; }

.give-qr {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    margin-block: 26px; padding-block-start: 24px;
    border-block-start: 1px solid var(--border);
}
.give-qr img {
    width: 180px; height: 180px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface); padding: 10px;
}

.give-contact {
    margin-block-start: 26px; text-align: center;
    font-size: .88rem; color: var(--muted); line-height: 1.7;
}

@media (max-width: 700px) {
    /* The phone is already in their hand — the button matters, not the code. */
    .give-qr img { width: 150px; height: 150px; }
    .btn-lg { width: 100%; justify-content: center; }
}
