/* =====================================================================
   Super Thanks — main stylesheet
   Mobile-first · vanilla CSS · custom properties design system
   ===================================================================== */

:root {
    --bg: #f5f6fb;
    --surface: #ffffff;
    --surface-2: #fafbff;
    --text: #181d33;
    --muted: #49536e;
    --border: #e4e7f1;
    --primary: #2f3e8f;
    --primary-700: #26327a;
    --night-1: #12183a;
    --night-2: #232f6e;
    --accent: #f59e0b;
    --accent-600: #d98d06;
    --accent-soft: #fff4dc;
    --success: #0e9f6e;
    --danger: #dc2626;
    --info: #2563eb;
    --radius: 16px;
    --radius-sm: 11px;
    --shadow-sm: 0 1px 2px rgba(18,24,58,.06), 0 2px 8px rgba(18,24,58,.05);
    --shadow-md: 0 4px 14px rgba(18,24,58,.08), 0 12px 32px rgba(18,24,58,.10);
    --shadow-lg: 0 8px 28px rgba(18,24,58,.16);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
            'Helvetica Neue', Arial, sans-serif;
}

/* ------------------------------ Reset -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul[class] { list-style: none; padding: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
    outline: 3px solid rgba(245,158,11,.65);
    outline-offset: 2px;
    border-radius: 4px;
}
::selection { background: #ffe1a6; }

.container { width: min(100% - 2rem, 1180px); margin-inline: auto; }
.site-main { flex: 1; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--night-1); color: #fff;
    padding: .6rem 1rem; border-radius: 0 0 10px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

.icon { display: inline-block; vertical-align: -.18em; flex: none; }

/* ---------------------------- Typography ----------------------------- */
h1, h2, h3, h4 { line-height: 1.22; font-weight: 800; letter-spacing: -.01em; }
.page-title { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .5rem; }
.section-title { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); }

/* ----------------------------- Buttons ------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; border: 2px solid transparent;
    padding: .78rem 1.5rem; border-radius: 999px;
    font-weight: 700; font-size: .97rem; line-height: 1.15;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, #33439c, var(--primary-700)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-accent { background: linear-gradient(135deg, #ffc351, var(--accent)); color: #3c2b00; box-shadow: 0 4px 14px rgba(245,158,11,.38); }
.btn-accent:hover { box-shadow: 0 6px 20px rgba(245,158,11,.5); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }
.btn-outline { background: transparent; color: var(--primary); border-color: #c9cfec; }
.btn-outline:hover { background: #eef1fb; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1rem; font-size: .88rem; }

/* ------------------------------ Badges ------------------------------- */
.badge { display: inline-block; padding: .22rem .66rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-processing { background: #dbeafe; color: #1d4ed8; }
.badge-succeeded  { background: #d1fae5; color: #065f46; }
.badge-failed     { background: #fee2e2; color: #991b1b; }
.badge-cancelled  { background: #e5e7eb; color: #374151; }
.badge-refunded   { background: #ede9fe; color: #5b21b6; }

/* ------------------------------ Forms -------------------------------- */
.field { margin-bottom: 1.05rem; }
.field label, .field-label {
    display: block; font-weight: 600; font-size: .92rem;
    margin-bottom: .38rem; color: var(--text);
}
.field .req { color: var(--danger); }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.input, textarea.input, select.input {
    width: 100%; background: var(--surface);
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: .72rem .9rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245,158,11,.16);
}
textarea.input { resize: vertical; min-height: 96px; }

/* Amount chips */
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: .6rem; }
.chip {
    border: 1.5px solid var(--border); background: var(--surface);
    border-radius: 999px; padding: .58rem .4rem;
    font-weight: 700; color: var(--text); text-align: center;
    transition: all .13s ease;
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip[aria-pressed="true"] {
    background: linear-gradient(135deg, #ffc351, var(--accent));
    border-color: var(--accent); color: #3c2b00;
    box-shadow: 0 3px 10px rgba(245,158,11,.35);
}
.amount-custom { position: relative; max-width: 240px; margin-top: .7rem; }
.amount-custom .cur {
    position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
    font-weight: 700; color: var(--muted);
}
.amount-custom input { padding-left: 1.9rem; font-weight: 700; }

/* Visitor-local currency display (injected by JS after geo detection).
   Payment amount sent to the backend remains unchanged. */
.chip.has-local {
    display: inline-flex;
    align-items: center; justify-content: center;
    line-height: 1.2;
}
.chip .chip-amt { display: block; }
.local-hint { font-weight: 700; }
/* Wider prefix padding when the symbol is multi-char (kr, CHF, CA$ …) */
.amount-custom.cur-wide input { padding-left: 3.4rem; }

/* Character counter */
.char-count { float: right; font-size: .78rem; color: var(--muted); font-weight: 500; }
.char-count.limit { color: var(--danger); font-weight: 700; }

/* Upload */
.upload-box {
    display: flex; align-items: center; gap: .8rem;
    border: 1.8px dashed #ccd3ea; border-radius: var(--radius-sm);
    padding: .85rem 1rem; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
    background: var(--surface-2);
}
.upload-box:hover, .upload-box.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: #eef1fb; color: var(--primary); flex: none;
}
.upload-text strong { display: block; font-size: .93rem; }
.upload-text span { font-size: .79rem; color: var(--muted); }
.upload-preview { display: none; align-items: center; gap: .8rem; margin-top: .6rem; }
.upload-preview img {
    width: 54px; height: 54px; object-fit: cover;
    border-radius: 10px; border: 1px solid var(--border);
}
.upload-preview.is-visible { display: flex; }
.preview-name { font-size: .85rem; color: var(--muted); word-break: break-all; flex: 1; }
.preview-remove {
    border: none; background: #fee2e2; color: var(--danger);
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center; font-size: 1rem; font-weight: 700;
}

/* Switch (anonymous donation) */
.switch-row { display: flex; align-items: flex-start; gap: .65rem; }
.switch-row input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 44px; height: 25px; border-radius: 999px; flex: none;
    background: #cbd2e6; position: relative; cursor: pointer;
    transition: background-color .18s ease; margin: 3px 0 0;
}
.switch-row input[type="checkbox"]::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 19px; height: 19px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
    transition: transform .18s ease;
}
.switch-row input[type="checkbox"]:checked { background: var(--success); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(19px); }
.switch-label { font-size: .92rem; font-weight: 600; user-select: none; cursor: pointer; }
.switch-sub { display: block; font-size: .79rem; color: var(--muted); font-weight: 400; }

/* Honeypot (bots only — visually removed) */
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

/* Inline form alerts */
.form-alert {
    display: none; border-radius: var(--radius-sm);
    padding: .75rem 1rem; font-size: .9rem; font-weight: 500;
    margin-bottom: 1rem; border: 1px solid transparent;
}
.form-alert.is-visible { display: block; }
.form-alert.error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.form-alert.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }

/* ----------------------------- Avatars -------------------------------- */
.avatar {
    width: 44px; height: 44px; border-radius: 50%;
    display: inline-grid; place-items: center; flex: none;
    color: #fff; font-weight: 800; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.av-0 { background: linear-gradient(135deg,#f59e0b,#d97706); }
.av-1 { background: linear-gradient(135deg,#6366f1,#4338ca); }
.av-2 { background: linear-gradient(135deg,#10b981,#047857); }
.av-3 { background: linear-gradient(135deg,#ec4899,#be185d); }
.av-4 { background: linear-gradient(135deg,#0ea5e9,#0369a1); }
.av-5 { background: linear-gradient(135deg,#f43f5e,#be123c); }
.av-6 { background: linear-gradient(135deg,#a855f7,#7e22ce); }
.av-7 { background: linear-gradient(135deg,#14b8a6,#0f766e); }
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }

/* ------------------------------ Header ------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.86);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 66px; }
.site-header.hide-navigation .site-nav,
.site-header.hide-navigation .nav-toggle { display: none; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none !important; }
.brand-name { font-weight: 800; font-size: 1.18rem; color: var(--night-1); letter-spacing: -.02em; }
.brand-name em { font-style: normal; color: var(--accent-600); }

.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.nav-list { display: flex; align-items: center; gap: .25rem; }
.nav-link {
    display: block; padding: .5rem .8rem; border-radius: 9px;
    color: var(--muted); font-weight: 600; font-size: .94rem;
}
.nav-link:hover { color: var(--text); background: #eef0f9; text-decoration: none; }
.nav-link.is-active { color: var(--primary); background: #eef1fb; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
    .nav-toggle {
        display: grid; place-items: center;
        width: 42px; height: 42px; border-radius: 10px;
        border: 1.5px solid var(--border); background: #fff; color: var(--text);
    }
    .nav-toggle .ic-close { display: none; }
    .nav-toggle[aria-expanded="true"] .ic-open { display: none; }
    .nav-toggle[aria-expanded="true"] .ic-close { display: block; }

    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: .35rem;
        background: #fff; border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md); padding: 1rem 1.2rem 1.25rem;
        display: none;
    }
    .site-nav.is-open { display: flex; }
    .nav-list { flex-direction: column; align-items: stretch; gap: .15rem; }
    .nav-link { padding: .7rem .85rem; }
    .nav-donate { justify-content: center; }
}

/* -------------------------------- Hero -------------------------------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(700px 340px at 12% -10%, rgba(99,102,241,.45), transparent 65%),
        radial-gradient(600px 320px at 88% 0%, rgba(245,158,11,.32), transparent 60%),
        linear-gradient(160deg, var(--night-1), var(--night-2));
    color: #fff; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 7vw, 6rem);
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
    color: #ffd58a; font-size: .82rem; font-weight: 700;
    padding: .38rem .95rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.hero h1 {
    font-size: clamp(2.2rem, 5.6vw, 3.6rem);
    margin-bottom: 1rem; letter-spacing: -.02em;
}
.hero h1 .accent-text {
    background: linear-gradient(120deg, #ffd166, #f59e0b);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { color: #c3c9e8; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.6rem; }
.hero-stat {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px; padding: .8rem 1.3rem; min-width: 150px;
}
.hero-stat b { display: block; font-size: 1.35rem; letter-spacing: -.01em; color: #ffd58a; }
.hero-stat span { font-size: .8rem; color: #aab2d8; }

.hero-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hero-deco svg {
    position: absolute; opacity: .5; color: #ffd166;
    animation: floaty 7s ease-in-out infinite;
}
.hd-1 { top: 14%; right: 8%; animation-delay: 0s; }
.hd-2 { top: 55%; right: 20%; opacity: .3; animation-delay: 1.4s; }
.hd-3 { bottom: 12%; right: 6%; opacity: .35; animation-delay: 2.6s; }
@keyframes floaty {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-14px) rotate(8deg); }
}

/* ------------------------- Home: form + donors ------------------------ */
/*
 * Structure: .home-top wraps [hero] + [.container.home-grid].
 *   DESKTOP (>999px): full-bleed hero on top, two-column cards below,
 *                     cards overlap the hero's bottom edge.
 *   MOBILE  (≤999px): .home-top collapses via display:contents so the
 *                     DONATION FORM is the first thing on the page,
 *                     before the hero (priority for the 45+ audience).
 */
.home-top { display: block; }

.home-grid {
    position: relative; z-index: 5;
    display: grid; gap: 1.25rem; align-items: start;
    margin-top: calc(-1 * clamp(1.6rem, 4vw, 3rem));
}
@media (min-width: 1000px) {
    .home-grid {
        gap: 2rem;
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    }
}

@media (max-width: 999px) {
    /* Flatten the wrapper — children join .site-main's flex flow. */
    .home-top { display: contents; }

    /* DONATION FORM FIRST, hero after it. */
    .home-grid      { order: -1; margin-top: 1.15rem; }
    .home-top > .hero { order: 0; }

    /* Make the leading card unmistakably actionable. */
    #donate { scroll-margin-top: 88px; border-top: 4px solid var(--accent); }
}

.home-grid.thanks-page-grid {
    margin-top: 0;
    padding-block: clamp(1.25rem, 4vw, 3rem);
}

.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.donate-card { padding: clamp(1.3rem, 3vw, 2rem); }
.donate-card-head { margin-bottom: 1.3rem; }
.donate-card-head p { color: var(--muted); font-size: .95rem; margin-top: .2rem; }

.trust-row {
    display: flex; flex-wrap: wrap; gap: .55rem;
    margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px dashed var(--border);
}
.trust-pill {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .78rem; font-weight: 700; color: #14532d;
    background: #ecfdf5; border: 1px solid #bbe9d3;
    padding: .35rem .75rem; border-radius: 999px;
}
.trust-pill .icon { color: var(--success); }

/* Checkout loading indicator */
.spinner {
    width: 44px; height: 44px; margin: 0 auto .9rem;
    border-radius: 50%; border: 4px solid #e8ebf7;
    border-top-color: var(--accent);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Official Dodo inline checkout (the SDK owns all payment-sensitive fields). */
.checkout-page-wrap { max-width: 820px; padding-block: clamp(1.25rem, 4vw, 3rem); }
.checkout-page-card { padding: clamp(1rem, 3vw, 1.75rem); }
.inline-checkout-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; margin-bottom: 1rem;
}
.inline-checkout-head h3 { font-size: 1.15rem; }
.inline-checkout-head p { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.inline-checkout-close { flex: 0 0 auto; padding: .55rem .85rem; }
.checkout-selected-amount {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-bottom: .45rem; padding: .8rem 1rem; border: 1px solid var(--border);
    border-radius: 12px; background: var(--surface-2);
}
.checkout-selected-amount span { color: var(--muted); font-size: .88rem; font-weight: 600; }
.checkout-selected-amount strong { color: var(--accent-600); font-size: 1.25rem; white-space: nowrap; }
.checkout-page-status { color: var(--muted); font-size: .9rem; margin-bottom: .85rem; }
.inline-checkout-loading { display: grid; place-items: center; min-height: 160px; }
.inline-checkout-loading[hidden] { display: none; }
.inline-checkout-loading .spinner { margin: 0; }
.inline-checkout-error { margin-bottom: 1rem; }
.dodo-checkout-container {
    width: 100%; min-width: 0; min-height: 680px; overflow: visible;
}
@media (max-width: 560px) {
    .checkout-page-wrap { padding: .75rem; }
    .checkout-page-card { padding: .9rem; }
    .checkout-selected-amount { padding: .65rem .75rem; }
    .checkout-selected-amount strong { font-size: 1.1rem; }
    .dodo-checkout-container { min-height: 760px; }
}

/* Donors panel */
.donors-panel { padding: 1.3rem 1.3rem 1.1rem; }
.panel-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: .9rem;
}
.live-dot {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .74rem; font-weight: 800; letter-spacing: .06em;
    color: var(--success); text-transform: uppercase;
}
.live-dot::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--success);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14,159,110,.45); }
    50%      { box-shadow: 0 0 0 6px rgba(14,159,110,0); }
}
.donor-feed { display: grid; gap: .35rem; }
.donor-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .5rem; border-radius: 12px;
    transition: background-color .12s ease;
}
.donor-row:hover { background: var(--surface-2); }
.donor-row-main { flex: 1; min-width: 0; display: grid; }
.donor-name { font-weight: 700; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor-msg-sm { font-size: .79rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor-row-side { text-align: right; }
.donor-amount { display: block; font-weight: 800; font-size: .95rem; color: var(--accent-600); }
time.donor-time { font-size: .75rem; color: var(--muted); }
.feed-empty { color: var(--muted); font-size: .92rem; padding: 1rem .5rem; }
.feed-more { display: inline-flex; align-items: center; gap: .35rem; margin-top: .8rem; font-weight: 700; font-size: .9rem; }

/* Wall of Kindness cards */
.wall-grid { display: grid; gap: 1.1rem; margin-top: 1.6rem; }
@media (min-width: 640px)  { .wall-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .wall-grid { grid-template-columns: repeat(3, 1fr); } }
.donor-card { display: flex; gap: .9rem; padding: 1.1rem; }
.donor-card-body { flex: 1; min-width: 0; }
.donor-card-top { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.donor-card .donor-msg { font-size: .89rem; color: var(--muted); margin: .35rem 0 .45rem; }

/* Features */
.features { padding: clamp(2.6rem, 6vw, 4.5rem) 0; }
.features-grid { display: grid; gap: 1.2rem; margin-top: 1.8rem; }
@media (min-width: 760px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card { padding: 1.5rem; }
.feature-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: grid; place-items: center; margin-bottom: 1rem;
    background: var(--accent-soft); color: var(--accent-600);
}
.feature-card p { color: var(--muted); font-size: .93rem; margin-top: .4rem; }

.section-head { max-width: 640px; }
.section-head .lead { margin-top: .4rem; }

/* CTA band */
.cta-band {
    background:
        radial-gradient(500px 260px at 85% 10%, rgba(245,158,11,.28), transparent 60%),
        linear-gradient(140deg, var(--night-2), var(--night-1));
    color: #fff; border-radius: 22px;
    padding: clamp(1.8rem, 4vw, 2.8rem);
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 1.2rem;
}
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); }

/* ------------------------- Inner page headers ------------------------- */
.page-hero {
    background:
        radial-gradient(600px 280px at 15% -20%, rgba(99,102,241,.35), transparent 65%),
        linear-gradient(160deg, var(--night-1), var(--night-2));
    color: #fff; text-align: center;
    padding: clamp(2.4rem, 5vw, 3.8rem) 0 clamp(2.6rem, 5vw, 3.6rem);
}
.page-hero .lead { color: #c3c9e8; max-width: 62ch; margin-inline: auto; }
.page-section { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
.section-tight { max-width: 780px; margin-inline: auto; }

/* Prose / content pages */
.prose h2 { font-size: 1.25rem; margin: 1.9rem 0 .55rem; }
.prose p, .prose li { color: #3c4560; font-size: .97rem; }
.prose ul { padding-left: 1.2rem; display: grid; gap: .35rem; list-style: disc; }
.prose .card { padding: clamp(1.2rem, 3vw, 2rem); }

/* FAQ accordion */
.faq-list { display: grid; gap: .8rem; margin-top: 1.6rem; }
.faq-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq-item summary {
    list-style: none; cursor: pointer; user-select: none;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.25rem; font-weight: 700; font-size: .98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform .18s ease; color: var(--muted); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item[open] summary { color: var(--primary); }
.faq-answer {
    padding: 0 1.25rem 1.1rem; color: var(--muted); font-size: .93rem;
}

/* --------------------------- Success / status -------------------------- */
.status-wrap { max-width: 560px; margin-inline: auto; text-align: center; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.status-card { padding: clamp(1.6rem, 4vw, 2.4rem); }
.status-icon {
    width: 74px; height: 74px; border-radius: 50%;
    display: grid; place-items: center; margin: 0 auto 1.1rem;
}
.status-icon.ok     { background: #d1fae5; color: var(--success); }
.status-icon.warn   { background: #fef3c7; color: #b45309; }
.status-icon.bad    { background: #fee2e2; color: var(--danger); }
.status-icon svg circle { stroke-dasharray: 63; stroke-dashoffset: 63; animation: draw .7s ease forwards .1s; }
.status-icon svg path   { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .5s ease forwards .55s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.status-amount {
    font-size: 1.9rem; font-weight: 800; letter-spacing: -.01em;
    color: var(--accent-600); margin: .4rem 0;
}
.status-msg-quote {
    background: var(--surface-2); border: 1px dashed var(--border);
    border-radius: 12px; padding: .9rem 1.1rem; margin: 1rem 0 1.4rem;
    color: var(--muted); font-size: .95rem; font-style: italic;
}
.status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.4rem; }
.poll-note { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .88rem; margin-top: 1rem; }
.poll-note .spinner { width: 18px; height: 18px; margin: 0; border-width: 2.5px; }

/* ------------------------------ Footer -------------------------------- */
.site-footer {
    background: var(--night-1); color: #aab2d8;
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
    font-size: .92rem;
}
.footer-grid {
    display: grid; gap: 1.8rem;
    padding: clamp(2.2rem, 5vw, 3.4rem) 0 1.8rem;
}
.site-footer.hide-main-footer .footer-grid { display: none; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-col .brand-name { color: #fff; }
.footer-blurb { margin: .8rem 0; max-width: 34ch; }
.footer-trust { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: #8a93bd; }
.footer-title { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.footer-links { display: grid; gap: .5rem; }
.footer-links a { color: #aab2d8; display: inline-flex; align-items: center; gap: .45rem; }
.footer-links a:hover { color: #ffd58a; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.09); padding: 1rem 0; font-size: .82rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.made-with { display: inline-flex; align-items: center; gap: .35rem; }
.heart-beat { color: #f87171; animation: beat 1.6s ease infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 12% { transform: scale(1.25); } 24% { transform: scale(1); } }

/* ---------------------------- Scroll-to-top ---------------------------- */
.to-top {
    position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 150;
    width: 46px; height: 46px; border-radius: 50%;
    border: none; display: grid; place-items: center;
    background: var(--primary); color: #fff;
    box-shadow: var(--shadow-lg);
    transition: transform .15s ease, opacity .2s ease;
}
.to-top:hover { transform: translateY(-3px); background: var(--primary-700); }

/* --------------------------- Reveal animation -------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ------------------------------- Admin -------------------------------- */
.admin-bar {
    background: var(--night-1); color: #fff;
}
.admin-bar-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; min-height: 58px; flex-wrap: wrap; padding-block: .4rem;
}
.admin-bar .brand-name { color: #fff; }
.admin-links { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.admin-link {
    display: inline-flex; align-items: center; gap: .45rem;
    color: #c3c9e8; font-weight: 600; font-size: .88rem;
    padding: .45rem .75rem; border-radius: 9px;
}
.admin-link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.admin-main { padding: 1.6rem 0 3rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat-card { padding: 1.15rem 1.25rem; }
.stat-card b { display: block; font-size: 1.5rem; letter-spacing: -.01em; }
.stat-card span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat-card.gold b   { color: var(--accent-600); }
.stat-card.green b  { color: var(--success); }
.stat-card.blue b   { color: var(--info); }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .88rem; }
.data-table th {
    text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); background: var(--surface-2);
    padding: .7rem .9rem; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: .68rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.row-actions { display: inline-flex; gap: .35rem; }
.icon-btn {
    width: 32px; height: 32px; border-radius: 8px;
    display: grid; place-items: center; border: 1.5px solid var(--border);
    background: #fff; color: var(--muted);
    transition: all .12s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent-600); background: var(--accent-soft); }
.icon-btn.danger:hover { border-color: #fca5a5; background: #fef2f2; color: var(--danger); }

.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.2rem; }
.filter-select { max-width: 220px; }
.login-wrap { max-width: 420px; margin: clamp(2rem, 8vw, 5rem) auto; }
.login-card { padding: clamp(1.5rem, 4vw, 2.2rem); }

.pagination { display: flex; justify-content: center; align-items: center; gap: .4rem; margin-top: 2rem; flex-wrap: wrap; }
.page-link {
    min-width: 40px; height: 40px; padding: 0 .6rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 1.5px solid var(--border);
    background: var(--surface); color: var(--text);
    font-weight: 700; font-size: .9rem;
}
.page-link:hover { border-color: var(--accent); text-decoration: none; }
.page-link.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { opacity: .45; pointer-events: none; }

/* Empty states */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .icon { width: 44px; height: 44px; color: #c9cfec; margin: 0 auto 1rem; }

/* =====================================================================
   MOBILE COMFORT MODE (≤700px) — tuned for a 45+ audience:
   larger type, 48px+ touch targets, higher contrast, zero clutter.
   ===================================================================== */
@media (max-width: 700px) {

    /* Global type scale bump — every rem-based size grows with it. */
    html { font-size: 17.5px; }

    /* Touch targets */
    .btn   { min-height: 50px; padding: .9rem 1.5rem; }
    .btn-lg, .btn-block { min-height: 58px; font-size: 1.06rem; }
    .nav-toggle { width: 48px; height: 48px; }

    .input, select.input {
        font-size: 1.05rem;
        padding: .95rem 1rem;
        min-height: 52px;
    }
    textarea.input { min-height: 130px; }
    .field label, .field-label, .switch-label { font-size: 1rem; }
    .field-hint { font-size: .88rem; }

    /* Amount chips: taller, easier to read & tap */
    .chip {
        padding: .95rem .35rem;
        font-size: 1.02rem;
        border-radius: 14px;
        min-height: 52px;
    }
    .amount-custom { max-width: none; }

    /* Anonymous switch: bigger track + knob */
    .switch-row input[type="checkbox"] { width: 54px; height: 31px; }
    .switch-row input[type="checkbox"]::after { width: 25px; height: 25px; }
    .switch-row input[type="checkbox"]:checked::after { transform: translateX(23px); }

    /* Upload area */
    .upload-box { padding: 1.05rem; }
    .upload-icon { width: 54px; height: 54px; }
    .upload-text strong { font-size: 1rem; }
    .upload-text span { font-size: .85rem; }

    /* Trust pills: bigger and easier to scan */
    .trust-pill { font-size: .86rem; padding: .48rem .85rem; }

    /* Hero becomes a compact, centred story section below the form */
    .hero { padding: 2.4rem 0 3rem; text-align: center; }
    .hero-inner { margin-inline: auto; }
    .hero .lead { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .hero-actions .btn { flex: 1 1 100%; }
    .hero-stats { justify-content: center; gap: .7rem; }
    .hero-stat { flex: 1 1 42%; min-width: 0; }
    .hero-deco { display: none; }            /* less visual noise */
    .hero-eyebrow { font-size: .88rem; }

    /* Feed / wall readability */
    time.donor-time { font-size: .84rem; }
    .donor-msg-sm { font-size: .86rem; white-space: normal; }

    /* Status pages: stacked full-width actions */
    .status-actions { flex-direction: column; align-items: stretch; }
    .status-actions .btn { width: 100%; }
    .status-amount { font-size: 2.2rem; }

    /* Footer centred on small screens */
    .footer-bottom-inner { justify-content: center; text-align: center; }
    .footer-links a { font-size: .98rem; }
}

/* Very small phones: keep chips comfortably tappable in 2 columns */
@media (max-width: 380px) {
    html { font-size: 18px; }
    .chip-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----------------------------- Reduced motion -------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}
.admin-logout-form { display: inline; margin: 0; }
.admin-link-button { border: 0; background: transparent; font: inherit; cursor: pointer; }
