/* --- Self-hosted fonts (SIL OFL) — latin + hebrew subsets only --- */
@font-face {
    font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "David Libre"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/david-libre-400-hebrew.woff2") format("woff2");
    unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
    font-family: "David Libre"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/david-libre-400-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "David Libre"; font-style: normal; font-weight: 500; font-display: swap;
    src: url("/assets/fonts/david-libre-500-hebrew.woff2") format("woff2");
    unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
    font-family: "David Libre"; font-style: normal; font-weight: 500; font-display: swap;
    src: url("/assets/fonts/david-libre-500-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "David Libre"; font-style: normal; font-weight: 700; font-display: swap;
    src: url("/assets/fonts/david-libre-700-hebrew.woff2") format("woff2");
    unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
    font-family: "David Libre"; font-style: normal; font-weight: 700; font-display: swap;
    src: url("/assets/fonts/david-libre-700-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* --- Brand palette --- */
    --navy:          #19465f; /* teal — header, hero, CTA band */
    --navy-dark:     #112f41; /* deep teal — footer, gradient end */
    /* The one teal ramp every gradient (header, hero, page hero, CTA band,
       footer) is built from, so they can never drift apart. */
    --teal-light:    #235a78;
    --teal-mid:      var(--navy);
    --teal-dark:     var(--navy-dark);
    /* Hero glow. The first layer pins the top edge to the header's bottom
       colour (--teal-mid) so no seam shows where the two meet. */
    --teal-glow: linear-gradient(180deg, var(--teal-mid) 0, rgba(25, 70, 95, 0) 110px),
                 radial-gradient(120% 120% at 50% 0%, var(--teal-light) 0%, var(--teal-mid) 45%, var(--teal-dark) 100%);
    --gold:          #e38543; /* amber — accents, buttons, borders */
    --link-blue:     #19465f; /* logo teal — body/inline links, always underlined (9:1 on cream) */
    --gold-btn-hover:#a35418; /* dark amber — button hover fills (white text 5.4:1) */
    --input-border:  #8a8573; /* form-field edges (≥3:1 on white + cream, WCAG 1.4.11) */
    --focus-ring:    #19465f; /* focus outline on light surfaces (≥3:1) */
    --focus-ring-on-dark: #ffffff; /* focus outline on teal/navy bands */
    --yellow:        #f3e980; /* yellow — hero Hebrew, selected states */
    --red:           #bd2227; /* logo red — danger actions, field errors (6.1:1 on white) */
    --cream:         #f7f4ec;
    --ink:           #1a1a1a;
    --muted:         #4a5562;
    --line:          #ddd8cc;
    --white:         #ffffff;
    --radius: 10px;
    --shadow: 0 6px 24px rgba(25, 70, 95, 0.10);
    --maxw: 1200px;
    font-size: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    /* Sticky footer: short pages keep the footer at the bottom of the viewport. */
    min-height: 100vh; display: flex; flex-direction: column;
}
.site-main { flex: 1 0 auto; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

h1, h2, h3 { font-family: "David Libre", Georgia, "Times New Roman", serif; color: var(--navy); line-height: 1.25; }
h1 { font-size: 2.8rem; margin: 0 0 .5rem; font-weight: 700; }
h2 { font-size: 1.5rem; margin: 0 0 .75rem; font-weight: 700; }
h3 { font-size: 1.15rem; margin: 0 0 .5rem; font-weight: 500; }
a { color: var(--link-blue); text-underline-offset: 2px; }

/* --- Header --- */
.site-header { background: linear-gradient(180deg, var(--teal-light) 0%, var(--teal-mid) 100%); color: var(--white); position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand-logo {
    width: auto; height: 48px;
    object-fit: contain; flex: none;
}
.brand-text strong { display: block; font-size: 1.05rem; }
.brand-text small { color: #a8bfc9; font-size: .75rem; }
.brand-hebrew { display: block; font-family: "David Libre", "Times New Roman", serif; font-size: 1.05rem; color: var(--white); letter-spacing: 1px; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: #c0d4dc; text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.site-nav a:hover, .site-nav a.is-active { color: var(--white); }
/* Non-colour cue for the current page (WCAG 1.4.1). */
.site-nav a.is-active { box-shadow: inset 0 -3px 0 var(--gold); font-weight: 600; }

/* --- Buttons --- */
.btn {
    display: inline-block; padding: 12px 22px; border-radius: var(--radius);
    font-weight: 600; text-decoration: none; border: 2px solid transparent;
    cursor: pointer; font-size: 1rem; transition: transform .05s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn { min-height: 44px; }
.btn-primary:hover, .btn-ghost:hover, .btn-ghost-light:hover, .btn-whatsapp:hover { box-shadow: 0 4px 14px rgba(25, 70, 95, 0.30); }

/* Skip-to-content link: off-screen until focused (WCAG 2.4.1). */
.skip-link {
    position: absolute; left: 8px; top: -48px; z-index: 100;
    background: var(--navy); color: var(--white); padding: 10px 16px;
    border-radius: var(--radius); text-decoration: none; font-weight: 600;
    transition: top .15s ease;
}
.skip-link:focus { top: 8px; outline: 3px solid var(--gold); outline-offset: 2px; }
.site-main:focus { outline: none; }

/* Global visible focus indicator for all interactive elements (WCAG 2.4.7). */
a:focus-visible,
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 4px;
}
/* Dark bands: switch the ring to white so it stays ≥3:1. */
.site-header :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.cta-band :focus-visible,
.kiddush-preview-box :focus-visible,
.modal-overlay.hall-lightbox :focus-visible { outline-color: var(--focus-ring-on-dark); }

/* Hebrew content language support */
[lang="he"] {
    font-family: "David Libre", "Times New Roman", serif;
    direction: rtl;
}
.btn-primary { background: var(--gold); color: var(--navy-dark); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-btn-hover); border-color: var(--gold-btn-hover); color: var(--white); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }
/* Ghost button for dark bands (hero, CTA band): secondary weight. */
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn-ghost-light:hover { background: var(--white); color: var(--navy-dark); border-color: var(--white); }
.btn-block { display: block; width: 100%; }

/* --- Hero --- */
.hero { background: var(--teal-glow); color: var(--white); }
/* Short banner for the form pages (Donate, Kiddush): same glow as the home hero. */
.page-hero { background: var(--teal-glow); color: var(--white); padding: 34px 0 30px; }
.page-hero h1 { color: var(--white); font-size: 2.2rem; margin: 0 0 10px; }
.page-hero .lead { color: rgba(255, 255, 255, 0.9); margin: 0; }
@media (max-width: 760px) { .page-hero h1 { font-size: 1.8rem; } }
.hero-inner { padding: 52px 20px 48px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.hero h1 { color: var(--white); font-size: 2.8rem; margin: 0; }
.hero-tagline { color: rgba(255, 255, 255, 0.9); font-size: 1.15rem; margin: 10px 0 8px; }
.hero-next { color: var(--yellow); font-size: 1.05rem; margin: 0 0 28px; font-weight: 600; }
/* Fluid size + normal wrapping so the pasuk can never force horizontal scroll (WCAG 1.4.10). */
.hero-pasuk {
    font-family: "David Libre", "Times New Roman", serif; direction: rtl;
    color: var(--yellow); font-size: clamp(1.05rem, 3.4vw, 1.55rem); line-height: 1.85; font-weight: 500;
    margin: 18px auto 0; max-width: 100%; white-space: normal; text-wrap: balance;
    position: relative; padding-top: 20px;
}
/* Gold rule flourish above the pasuk to separate it from the name. */
.hero-pasuk::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 64px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
@media (max-width: 480px) { .hero-pasuk { max-width: 24ch; } }
.hero-actions { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 26px; }
/* Ghost button on the dark hero needs light border/text to be legible. */
.hero .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.6); }
.hero .btn-ghost:hover { background: var(--white); color: var(--navy-dark); border-color: var(--white); }
.hero-logo {
    display: block; width: auto; height: 180px; max-width: 100%; margin: 0 auto 22px;
    object-fit: contain; filter: drop-shadow(0 4px 16px rgba(0,0,0,0.35));
}
/* Remove the old glyph-based crest rule if it lingers */
.hero-crest { display: none; }

/* --- Sections --- */
.section { padding: 24px 0; }
.section-alt { background: var(--white); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

/* Two-column mid-band: Announcements + Minyan Times as floating cards. */
.mid-band {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 48px 20px;
    min-height: 0;
}
/* min-width:0 is essential — without it grid children can overflow their track */
.mid-col {
    position: relative; min-width: 0;
    border-radius: 16px;
    padding: 28px 30px;
    box-shadow: 0 10px 30px rgba(25, 70, 95, 0.08);
}
.mid-col-inner { max-width: none; padding: 0; }
.mid-col-announce {
    background: linear-gradient(150deg, #fffdf2 0%, #fdf4cf 100%);
    border: 1px solid #ece1bb;
}
.mid-col-times {
    background: var(--white);
    border: 1px solid var(--line);
}
/* Single card (e.g. no announcements): collapse to one centred, readable-width column. */
.mid-band-single { grid-template-columns: minmax(0, 560px); justify-content: center; }
.mid-col h2 {
    text-align: center; margin-bottom: 18px; padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--gold), transparent) 1;
}

@media (max-width: 760px) {
    /* On mobile: times first (more immediately useful), announcements below. */
    .mid-band { grid-template-columns: 1fr; gap: 18px; padding: 28px 16px; }
    .mid-col-announce { order: 2; }
    .mid-col-times { order: 1; }
    .mid-col { padding: 22px 20px; }
}

/* Visually-hidden utility for screen-reader-only landmarks/labels. */
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }

.times-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
#times h2 { text-align: center; }
/* Keep anchored sections clear of the sticky header. */
#times, #announcements, #hall-pay, #kiddush-pay { scroll-margin-top: 110px; }
.times-updated { text-align: center; color: var(--muted); font-size: .8rem; font-style: italic; margin: -4px 0 14px; }
.times-list { margin: 0; }
.times-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 6px; border-bottom: 1px solid #eee7d6; }
.times-row:last-child { border-bottom: none; }
.times-row dt { color: var(--muted); font-weight: 500; margin: 0; font-size: .95rem; }
.times-row dd { color: var(--navy); font-weight: 700; font-size: 1.05rem; margin: 0; text-align: right; }

.cta-band { background: radial-gradient(90% 170% at 50% 0%, var(--teal-light) 0%, var(--teal-mid) 55%, var(--teal-dark) 100%); color: var(--white); text-align: center; padding: 32px 0; border-top: 1px solid rgba(255,255,255,0.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.cta-band h2 { color: var(--white); font-size: 1.5rem; margin: 0 0 12px; }
.cta-inner p { color: #c8dde5; margin-bottom: 18px; font-size: .95rem; } /* AA on teal (WCAG 1.4.3) */
.cta-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 900px; margin: 0 auto; align-items: start; text-align: center; }
.cta-split-three { grid-template-columns: 1fr 1fr 1fr; max-width: 1100px; gap: 24px; }
.cta-split > div { padding: 16px; }
.cta-split h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 8px; }
.cta-split p { font-size: .9rem; margin-bottom: 14px; }
@media (max-width: 900px) { 
    .cta-split-three { grid-template-columns: 1fr; gap: 24px; } 
}
@media (max-width: 760px) { 
    .cta-split { grid-template-columns: 1fr; gap: 24px; } 
}

.kiddush-block { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.kiddush-lead { color: #c8dde5; font-size: .95rem; margin-bottom: 6px; }
.kiddush-phone { margin: 0 0 12px; font-size: 1.1rem; font-weight: 600; }
.kiddush-phone a { color: var(--gold); text-decoration: none; }
.kiddush-phone a:hover { text-decoration: underline; }
.btn-whatsapp { background: #25d366; color: #06331a; border-color: #25d366; display: inline-flex; align-items: center; gap: 8px; }
/* Hover keeps the dark text (6.1:1) — white on WhatsApp green fails AA. */
.btn-whatsapp:hover { background: #22c55e; border-color: #22c55e; color: #06331a; }
.btn-disabled { opacity: .65; cursor: not-allowed; }
/* Icon + label buttons (Call, WhatsApp, flyer). */
.btn-with-icon { display: inline-flex; align-items: center; gap: 8px; }
/* Paired Call + WhatsApp buttons — equal height, vertically aligned. */
.contact-btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: stretch; }
.contact-btn-row .btn { display: inline-flex; line-height: 1; align-items: center; justify-content: center; flex-wrap: nowrap; white-space: nowrap; padding: 0 22px; }
.contact-btn-row .btn span { display: inline-block; }
.contact-btn-row .wa-icon,
.contact-btn-row .btn-icon { width: 20px; height: 20px; margin: 0; flex: none; }
.wa-icon { width: 22px; height: 22px; flex: none; }
/* Inline SVG icon inside buttons */
.btn-icon { width: 18px; height: 18px; flex: none; vertical-align: middle; margin-right: 4px; }

/* --- Donate form --- */
.donate-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-top: 24px; }
.donate-form fieldset { border: none; padding: 0; margin: 0 0 24px; }
.donate-form legend { font-weight: 600; color: var(--navy); margin-bottom: 12px; font-size: 1.05rem; }
.amount-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.amount-option { position: relative; }
.amount-option input { position: absolute; opacity: 0; }
.amount-option span {
    display: block; text-align: center; padding: 14px 8px; border: 2px solid var(--line);
    border-radius: var(--radius); font-weight: 600; color: var(--navy); cursor: pointer; background: var(--cream);
}
.amount-option input:checked + span {
    border-color: var(--gold); background: #fdf6cc; font-weight: 800;
    box-shadow: inset 0 0 0 1px var(--gold);
}
/* Non-colour cue: checkmark on the selected amount (WCAG 1.4.1). */
.amount-option input:checked + span::after {
    content: "✓"; display: inline-block; margin-left: 6px; color: var(--link-blue); font-weight: 900;
}
/* Visible keyboard focus for the custom radio+span control (WCAG 2.4.7). */
.amount-option input:focus-visible + span {
    outline: 3px solid var(--navy); outline-offset: 2px;
}
.custom-amount { margin-top: 14px; }
.field, .custom-amount { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .custom-amount label { font-weight: 500; color: var(--navy); }
.donate-form input[type="text"],
.donate-form input[type="email"],
.donate-form input[type="tel"],
.kiddush-form input[type="email"],
.kiddush-form input[type="tel"],
.donate-form input[type="number"],
.donate-form input[type="date"],
.kiddush-form input[type="text"],
.kiddush-form input[type="date"],
.kiddush-form select,
.kiddush-form textarea {
    color: var(--ink);
    padding: 12px; border: 1px solid var(--input-border); border-radius: var(--radius); font-size: 1rem;
    background: var(--white); width: 100%;
}
.donate-form select,
.donate-form input[type="number"] { min-height: 44px; }
.donate-form select { color: var(--ink); padding: 12px; border: 1px solid var(--input-border); border-radius: var(--radius); font-size: 1rem; background: var(--white); width: 100%; }
.donate-form input:focus,
.donate-form select:focus,
.kiddush-form input:focus,
.kiddush-form select:focus,
.kiddush-form textarea:focus { outline: 3px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
/* Inline field errors (WCAG 3.3.1). */
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--red); border-width: 2px; }
.field-error { color: var(--red); font-size: .88rem; font-weight: 600; margin: 2px 0 0; }
.field-error::before { content: "⚠ "; }
.field-error[hidden] { display: none; }
.wa-hint { margin: 10px 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.wa-hint:empty { display: none; }
.donate-form input:disabled { background: #f0eee7; color: #9aa0aa; }
.kiddush-form textarea { font-family: inherit; resize: vertical; }
.secure-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 14px; }

/* --- Announcements --- */
.section-announce { background: #fdf6cc; }
/* Tighten the band when only one announcement exists so it doesn't feel empty. */
.section-announce-single { padding: 36px 0; }
.announce-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.announce-item { background: var(--white); border: 1px solid #e8dfc0; border-left: 4px solid var(--navy); border-radius: var(--radius); padding: 12px 14px; word-break: normal; overflow-wrap: anywhere; min-width: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.04); hyphens: none; white-space: normal; }
.announce-item h3 { margin: 0 0 4px; font-size: 1rem; }
.announce-date { color: var(--muted); font-size: .8rem; margin: 0 0 6px; }
.announce-item p:last-child { margin-bottom: 0; }

.announce-body { font-size: 1.05rem; word-break: normal; overflow-wrap: anywhere; hyphens: none; }
.announce-body p { margin: .4rem 0; }
.announce-body ul { list-style: disc; padding-left: 24px; margin: .4rem 0; }
.announce-body ol { list-style: decimal; padding-left: 24px; margin: .4rem 0; }
.announce-body li { margin: .2rem 0; }
.announce-body a { color: var(--link-blue); }

/* --- Admin --- */
.admin-wide { max-width: 960px; margin: 0 auto; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-bar h1 { margin: 0; }
.logout-form { display: inline-flex; margin: 0; }
.form-success { background: #e4f3e4; border: 1px solid #7bbf7b; color: #245c24; padding: 14px 18px; border-radius: var(--radius); font-weight: 600; }
.form-error { background: #f8e0e0; border: 1px solid #d38b8b; color: #8a2b2b; padding: 14px 18px; border-radius: var(--radius); font-weight: 600; }

.admin-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-bottom: 26px; }
.admin-card h2 { margin-top: 0; }
.admin-hint { color: var(--muted); margin: -6px 0 18px; }

.field-label { display: block; font-weight: 600; color: var(--navy); font-size: .85rem; margin-bottom: 5px; }
.admin-card label { display: block; }
.admin-card input[type="text"],
.admin-card input[type="date"],
.admin-card .time-picker {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line);
    border-radius: var(--radius); font-size: 1rem; font-family: inherit;
}
.admin-card input:focus, .time-picker:focus { outline: 3px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }

.minyan-row { display: flex; gap: 14px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); margin-bottom: 12px; }
.minyan-row .grow { flex: 1; }
.time-input { display: flex; gap: 8px; align-items: center; }
.time-input .time-picker { max-width: 140px; }
.time-input input[type="text"] { min-width: 160px; }
.time-toggle { background: none; border: none; color: var(--link-blue); font-size: .8rem; text-decoration: underline; cursor: pointer; padding: 4px; white-space: nowrap; }
.time-toggle:hover { color: var(--navy); }

.ann-block { border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); padding: 20px; margin-bottom: 20px; }
.ann-meta { display: flex; gap: 16px; margin-bottom: 16px; }
.ann-meta .grow { flex: 1; }
.ann-edit-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.ann-editor-col, .ann-preview-col { min-width: 0; max-width: 100%; }
/* Preview should match exact live width: 700px container - 48px padding = 652px content */
.ann-preview-col { max-width: 652px; }
.quill-editor { background: var(--white); border-radius: var(--radius); min-height: 200px; font-size: 1rem; }
.ann-block .btn-remove { margin-top: 16px; }

/* Live preview card — mirrors the public announcement styling exactly. */
.announce-preview { background: #fbf3df; border-radius: var(--radius); padding: 16px; }
/* Match exact live width: .mid-col-inner max-width 700px minus padding 24px each side */
.announce-preview { max-width: 652px; margin: 0; }
.announce-preview .announce-item { 
    background: var(--white); 
    border: 1px solid #e8dfc0; 
    border-left: 4px solid var(--navy); 
    border-radius: var(--radius); 
    padding: 12px 14px; 
    margin: 0;
    word-break: normal;
    overflow-wrap: anywhere;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    hyphens: none;
    white-space: normal;
}
.announce-preview .announce-item h3 { margin: 0 0 4px; font-size: 1rem; }
.announce-preview .announce-date { color: var(--muted); font-size: .8rem; margin: 0 0 6px; }
.announce-preview .announce-body { font-size: 1.05rem; word-break: normal; overflow-wrap: anywhere; hyphens: none; }
.announce-preview .announce-body p { margin: .4rem 0; }
.announce-preview .announce-body ul { list-style: disc; padding-left: 24px; margin: .4rem 0; }
.announce-preview .announce-body ol { list-style: decimal; padding-left: 24px; margin: .4rem 0; }
.announce-preview .announce-body li { margin: .2rem 0; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--line); }
.ql-toolbar.ql-snow { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); background: #fff; }
.ql-container.ql-snow { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }

.btn-add { background: var(--white); color: var(--navy); border-color: var(--navy); margin-top: 4px; }
.btn-add:hover { background: var(--navy); color: var(--white); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-remove { padding: 8px 14px; font-size: .9rem; justify-self: start; }
.btn-lg { padding: 15px 32px; font-size: 1.1rem; }
.admin-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

@media (max-width: 820px) {
    .ann-edit-grid { grid-template-columns: 1fr; }
    .ann-preview-col { margin-left: 0; }
}
@media (max-width: 640px) {
    .minyan-row { flex-direction: column; align-items: stretch; }
    .ann-meta { flex-direction: column; }
    .time-input { flex-wrap: wrap; }
    .time-input .time-picker { max-width: none; }
}

/* --- Thank you / mock --- */
.thankyou-mark { font-size: 3rem; }
.test-banner { background: #fdf6cc; border: 2px solid var(--gold-btn-hover); color: #5a3a00; padding: 12px 16px; border-radius: var(--radius); font-weight: 700; margin-bottom: 20px; text-align: center; }
.mock-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* --- Footer --- */
.site-footer { background: linear-gradient(180deg, var(--teal-dark) 0%, #0d2531 100%); color: #a8bfc9; margin-top: 0; border-top: 3px solid var(--gold); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.site-footer a { color: #f4a661; text-decoration: none; } /* ≥4.5:1 on footer navy */
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Top row: brand (left) + contact (right). */
.footer-top {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px 40px;
    padding-top: 32px; padding-bottom: 28px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: auto; height: 48px; object-fit: contain; flex: none; }
.footer-name { display: block; color: var(--white); font-size: 1.05rem; margin-bottom: 2px; }
.footer-address { font-size: .88rem; color: #a8bfc9; }
.site-footer .footer-address a { color: inherit; }
.footer-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 22px; font-size: .95rem; }
.footer-contact a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* Bottom bar: copyright (left) + legal links (right), quieter than the top row. */
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.09); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-top: 6px; padding-bottom: 6px; }
.footer-copy { margin: 0; font-size: .85rem; color: #a8bfc9; }
/* 44px targets (WCAG 2.5.8) without visually enlarging the text. */
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; font-size: .85rem; }
.site-footer .footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: #c8d6dd; }
.site-footer .footer-links a:hover { color: #f4a661; }

@media (max-width: 760px) {
    .footer-top { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 28px; padding-bottom: 20px; gap: 12px; }
    .footer-brand { flex-direction: column; gap: 10px; }
    .footer-contact { justify-content: center; gap: 0 18px; }
    .footer-bottom-inner { flex-direction: column-reverse; padding-top: 4px; padding-bottom: 16px; gap: 0; }
    .footer-links { justify-content: center; gap: 0 16px; }
}

/* --- Responsive --- */
@media (max-width: 760px) {
    .cards, .times-grid, .footer-inner { grid-template-columns: 1fr; }
    .footer-note { text-align: left; }
    .hero h1 { font-size: 2.1rem; }
    .brand-text small { display: none; }
}

/* Stack the header below tablet width so brand + nav never crowd or scroll (WCAG 1.4.10). */
.site-nav { flex-wrap: wrap; }
@media (max-width: 760px) {
    .header-inner { flex-direction: column; gap: 6px; padding: 10px 16px 4px; }
    .site-nav { width: 100%; justify-content: center; gap: 4px 14px; }
    .site-nav a { padding: 0 6px; font-size: .95rem; }
}
@media (max-width: 480px) {
    .site-nav { justify-content: space-between; gap: 0 6px; }
    .site-nav a { font-size: .9rem; padding: 0 4px; }
}

/* Honour reduced-motion preferences (WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Touch target enhancement for inline links */
.announce-body a,
.cta-inner a:not(.btn),
.eft-lead a {
    display: inline-block;
    min-height: 44px;
    padding: 8px 4px;
    margin: -8px -4px;
}

/* --- Donate: purpose selector --- */
.purpose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.purpose-option { position: relative; }
.purpose-option input { position: absolute; opacity: 0; }
.purpose-option span {
    display: block; text-align: center; padding: 14px 10px; border: 2px solid var(--line);
    border-radius: var(--radius); font-weight: 600; color: var(--navy); cursor: pointer; background: var(--cream);
}
.purpose-option input:checked + span {
    border-color: var(--gold); background: #fbf3df; box-shadow: inset 0 0 0 1px var(--gold);
}
.purpose-option input:checked + span::after {
    content: "✓"; display: inline-block; margin-left: 6px; color: var(--link-blue); font-weight: 900;
}
.purpose-option input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }

/* --- Donate: trust / reassurance panel --- */
.trust-panel {
    margin: 18px 0; padding: 14px 20px; background: #fbf3df;
    border: 1px solid var(--line); border-radius: var(--radius);
}
.powered-by {
    display: flex; align-items: center; gap: 8px; margin: 0;
    font-size: .9rem; color: var(--muted);
}
.trust-lock { margin-right: 2px; }
.powered-by-link { display: inline-flex; align-items: center; }
.powered-by-logo { height: 22px; width: auto; vertical-align: middle; }
.trust-note { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

/* --- Payment status / error pages --- */
.status-mark {
    display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 18px;
    border-radius: 50%; font-size: 2.6rem; font-weight: 900; line-height: 1;
}
.status-mark-success { background: #e4f3e4; color: #245c24; border: 3px solid #7bbf7b; }
.status-mark-error   { background: #f8e0e0; color: #8a2b2b; border: 3px solid #d38b8b; }
.status-mark-pending { background: #fbe6c4; color: #6b4e12; border: 3px solid var(--link-blue); font-size: 2rem; }
.status-note { color: var(--muted); }
.status-warning {
    display: inline-block; margin: 6px auto 0; padding: 12px 16px; max-width: 52ch;
    background: #fdf6cc; border: 1px solid var(--gold); border-left: 4px solid var(--gold);
    border-radius: var(--radius); color: var(--ink); text-align: left;
}
.status-checked { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }

/* Shown after returning from a cancelled Payfast payment. */
.payment-cancelled {
    margin: 20px 0; padding: 14px 18px; border-radius: var(--radius);
    background: #eef4f7; border: 1px solid #b9cfd9; border-left: 4px solid var(--navy);
    color: var(--ink); scroll-margin-top: 120px;
}
.payment-cancelled strong { display: block; color: var(--navy); margin-bottom: 2px; }
.payment-cancelled:focus { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Kiddush: non-WhatsApp alternatives (call / email). */
.kiddush-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.kiddush-alt-lead { margin: 0 0 12px; color: var(--ink); }
.kiddush-alt-note { margin-top: 10px; }
.status-ref { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.status-help { margin-top: 22px; color: var(--muted); font-size: .9rem; }
.status-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* --- Empty states --- */
.empty-state {
    color: var(--muted); font-style: italic; background: var(--white);
    border: 1px dashed var(--line); border-radius: var(--radius);
    padding: 18px 20px; margin: 16px 0 0; text-align: center;
}

/* --- Kiddush block: online sponsor CTA --- */
.kiddush-or { color: #c3cbdc; margin: 16px 0 6px; font-size: .95rem; }

/* --- Kiddush sponsorship page (kiddush.php) --- */
.kiddush-notice {
    background: #fbf3df; border: 1px solid var(--gold); border-left: 4px solid var(--gold);
    color: var(--navy); padding: 14px 18px; border-radius: var(--radius); margin: 24px 0 28px;
}
/* Lift the form card off the cream background */
.kiddush-form {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-top: 8px;
}
.field-hint { display: block; color: var(--muted); font-size: .82rem; margin-top: 5px; }

.kiddush-preview-box {
    background: var(--navy); color: #d7ddea; border-radius: var(--radius);
    padding: 20px 22px; margin: 24px 0 20px;
}
.preview-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #c8d0e0; margin: 0 0 12px; }
.preview-quote {
    font-family: "Segoe UI", system-ui, sans-serif; font-size: .975rem; line-height: 1.75;
    white-space: pre-wrap; margin: 0; color: #e8ecf5;
    border-left: 3px solid var(--gold); padding-left: 14px;
}
/* WhatsApp button: centred content on full-width */
.btn-whatsapp.btn-block { justify-content: center; }

/* --- Donate: kiddush details panel --- */
.kiddush-panel {
    background: #fbf3df; border: 1px solid var(--gold); border-left: 4px solid var(--gold);
    border-radius: var(--radius); padding: 20px 22px; margin: 20px 0;
    display: none; /* shown via JS when kiddush purpose selected */
}
.kiddush-panel.is-visible { display: block; }
.kiddush-panel h3 { margin: 0 0 6px; color: var(--navy); }
.kiddush-panel p { margin: 0 0 14px; color: var(--ink); }
.kiddush-panel .kiddush-phone { margin: 6px 0 14px; font-size: 1.1rem; font-weight: 600; }
.kiddush-panel .kiddush-phone a { color: var(--navy-dark); }

/* --- Donate: pointer to the kiddush enquiry flow --- */
.donate-kiddush-note {
    margin: 0 0 20px; padding: 12px 16px; font-size: .95rem; color: var(--muted);
    background: var(--white); border: 1px solid var(--line);
    border-left: 4px solid var(--navy); border-radius: var(--radius);
}
.donate-kiddush-note a { color: var(--navy-dark); font-weight: 600; }

/* --- Kiddush: pay-after-agreement panel --- */
.kiddush-pay {
    margin-top: 28px; padding: 26px 28px; background: var(--white);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.kiddush-pay h2 { margin-top: 0; font-size: 1.35rem; }
.kiddush-pay-lead { color: var(--muted); margin: 0 0 18px; }

/* --- Donate: manual EFT / bank transfer panel --- */
.eft-panel {
    margin-top: 28px; padding: 26px 28px; background: var(--white);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.eft-panel h2 { margin-top: 0; font-size: 1.35rem; }
.eft-lead { color: var(--muted); margin: 0 0 18px; }
.eft-details { margin: 0 0 18px; }
.eft-row {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 10px 0; border-bottom: 1px solid var(--line);
}
.eft-row:last-child { border-bottom: none; }
.eft-row dt { color: var(--navy); font-weight: 600; margin: 0; }
.eft-value {
    font-family: "Segoe UI", system-ui, monospace; font-weight: 700; color: var(--ink);
    letter-spacing: .3px; text-align: right; user-select: all;
}
.eft-copied { margin-left: 12px; color: #245c24; font-weight: 600; font-size: .95rem; }
.eft-copied:empty { margin: 0; }

/* --- Davening-times flyer --- */
.flyer-current a { font-weight: 600; }
.flyer-meta { color: var(--muted); font-size: .85rem; margin-left: 8px; }

/* --- Modal dialog for flyer preview --- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.is-open { display: flex; }
.modal-content { background: var(--white); border-radius: var(--radius); max-width: 1200px; max-height: 95vh; width: 100%; height: 95vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.modal-header h2 { margin: 0; font-size: 1.25rem; }
.modal-close {
    background: none; border: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted);
    padding: 0; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--ink); }
.modal-body { flex: 1 1 auto; overflow: auto; padding: 0; min-height: 0; display: flex; align-items: center; justify-content: center; background: #f4f4f4; }
.modal-body iframe { width: 100%; height: 100%; border: none; display: block; }
.modal-body img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.modal-body img[hidden], .modal-body iframe[hidden] { display: none; }

/* Focus trap: prevent tabbing out of modal */
body.modal-open { overflow: hidden; }
.admin-card input[type="file"] {
    width: 100%; padding: 12px 14px; border: 1px dashed var(--line);
    border-radius: var(--radius); background: var(--cream); font-size: .95rem;
}

.flyer-download { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.flyer-view-link { color: var(--link-blue); font-weight: 600; text-decoration: none; }
.flyer-view-link:hover { text-decoration: underline; }

.flyer-block { margin-top: 22px; }
.flyer-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; }
.flyer-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.btn-flyer-download { padding: 12px 18px; }
@media (max-width: 480px) {
    .flyer-actions { flex-direction: column; align-items: stretch; }
    .flyer-actions .btn { justify-content: center; }
}

/* Modal header action buttons (download / print). */
.modal-actions { display: flex; align-items: center; gap: 6px; }
.modal-action {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 1px solid var(--line); border-radius: 8px;
    color: var(--navy); font: inherit; font-size: .9rem; font-weight: 600;
    padding: 8px 12px; cursor: pointer; text-decoration: none; line-height: 1;
    min-height: 44px; min-width: 44px; justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.modal-action svg { width: 18px; height: 18px; flex: none; }
.modal-action:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
@media (max-width: 560px) {
    .modal-action span { display: none; }
    .modal-action { padding: 8px 10px; }
}
.flyer-image-link { display: block; }
.flyer-image {
    display: block; max-width: 100%; height: auto; margin: 0 auto;
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.flyer-block .flyer-download { justify-content: center; }

/* Admin: current-flyer bar + type badge */
.flyer-current-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.flyer-current { margin: 0; }
.flyer-type {
    display: inline-block; margin-left: 8px; padding: 2px 8px; background: var(--navy); color: var(--white);
    border-radius: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .5px; vertical-align: middle;
}
.btn-remove-flyer { flex: none; }

/* --- Hall gallery --- */
.hall-gallery-section h2 {
    display: inline-block; padding-bottom: 12px; margin-bottom: 6px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--gold), transparent) 1;
}
.gallery-sub { color: var(--muted); font-size: 1rem; margin: 0 auto 4px; max-width: 46ch; }

/* Hall intro band — warm cream lead-in above the gallery. */
.hall-intro { background: linear-gradient(180deg, var(--cream) 0%, #f1ece0 100%); padding: 48px 0 40px; }
.hall-intro h1 { margin-bottom: 14px; }
.hall-gallery-section { padding: 44px 0; }
.hall-gallery {
    list-style: none; padding: 0; margin: 28px 0 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px;
}
.hall-gallery-item { margin: 0; }
.hall-thumb {
    position: relative; display: block; width: 100%; padding: 0; border: none; cursor: pointer;
    border-radius: 14px; overflow: hidden; background: var(--cream);
    box-shadow: 0 8px 22px rgba(25, 70, 95, 0.12); line-height: 0;
    transition: transform .28s ease, box-shadow .28s ease;
}
.hall-thumb img {
    display: block; width: 100%; height: 210px; object-fit: cover;
    transition: transform .5s ease;
}
/* Gradient veil + "View" cue that fades in on hover/focus. */
.hall-thumb::after {
    content: "View"; position: absolute; inset: 0;
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 16px; color: var(--white); font-weight: 600; font-size: .9rem;
    letter-spacing: .04em; line-height: 1;
    background: linear-gradient(to top, rgba(17, 47, 65, 0.65) 0%, rgba(17, 47, 65, 0) 55%);
    opacity: 0; transition: opacity .28s ease;
}
.hall-thumb:hover, .hall-thumb:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(25, 70, 95, 0.22); }
.hall-thumb:hover img, .hall-thumb:focus-visible img { transform: scale(1.08); }
.hall-thumb:hover::after, .hall-thumb:focus-visible::after { opacity: 1; }
.hall-thumb:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .hall-thumb, .hall-thumb img { transition: none; }
    .hall-thumb:hover, .hall-thumb:focus-visible { transform: none; }
    .hall-thumb:hover img, .hall-thumb:focus-visible img { transform: none; }
}

/* --- Hall lightbox (reuses .modal-overlay show/hide) --- */
.hall-lightbox { flex-direction: column; }
.hall-lightbox-inner {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 100%; max-width: 1100px; max-height: 90vh;
}
.hall-lightbox-inner img {
    display: block; max-width: 100%; max-height: 82vh; width: auto; height: auto;
    border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.hall-lightbox-close {
    position: absolute; top: -8px; right: 0; color: var(--white); font-size: 2.4rem; z-index: 2;
}
.hall-lightbox-close:hover { color: var(--gold); }
.hall-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: var(--white); border: none; cursor: pointer;
    font-size: 2.4rem; line-height: 1; width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; min-height: 44px;
}
.hall-nav:hover { background: rgba(0,0,0,0.8); }
.hall-nav:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hall-prev { left: 8px; }
.hall-next { right: 8px; }
.hall-lightbox-count {
    position: absolute; bottom: -34px; left: 0; right: 0; text-align: center;
    color: var(--white); font-size: .9rem; margin: 0;
}
@media (max-width: 600px) {
    .hall-thumb img { height: 140px; }
    .hall-nav { width: 44px; height: 44px; font-size: 2rem; }
}

/* ==========================================================================
   Donate: one-off / monthly plan picker
   ========================================================================== */
/* Same tile pattern as .amount-option / .purpose-option. */
.donate-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.donate-plan { position: relative; display: flex; cursor: pointer; }
.donate-plan input { position: absolute; opacity: 0; }
.donate-plan span {
    display: flex; flex-direction: column; gap: 2px; width: 100%;
    padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--cream);
}
.donate-plan strong { color: var(--navy); }
.donate-plan small { color: var(--muted); font-size: .85rem; }
.donate-plan input:checked + span {
    border-color: var(--gold); background: #fdf6cc; box-shadow: inset 0 0 0 1px var(--gold);
}
.donate-plan input:checked + span strong::after {
    content: "✓"; display: inline-block; margin-left: 6px; color: var(--link-blue); font-weight: 900;
}
.donate-plan input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 480px) { .donate-plans { grid-template-columns: 1fr; } }

.donate-summary { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0 0; color: var(--navy); font-size: .95rem; }
.donate-summary:empty { display: none; }
/* Months picker is always shown; greyed out while "One-off" is chosen. The
   :has() rule works even if a blocker stops donate.js from running. */
.donate-term { margin-top: 14px; transition: opacity .2s ease; }
.donate-term-hint { color: var(--muted); font-size: .85rem; margin: 4px 0 0; }
.donate-form:has(input[name="plan"][value="full"]:checked) .donate-term,
.donate-term.is-off { opacity: .45; }
.donate-term select:disabled { cursor: not-allowed; }

/* Admin: monthly progress line and purpose pills */
.payment-meta { display: block; font-size: .75rem; color: var(--muted); margin-top: 3px; }
.payment-flag { color: var(--red); font-weight: 600; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef2f4; color: var(--navy); }
.pill-kiddush { background: #e9f5ee; color: #1b7a44; }
.pill-hall { background: #eef0fb; color: var(--link-blue); }
.pill-donation { background: #eef2f4; color: var(--navy); }
.pill-pushka { background: #fdf3df; color: #8a5a00; }

/* Admin: Payments Received table (search, filters, sortable headers) */
.admin-bar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.payments-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.payments-toolbar .field { margin-bottom: 0; flex: 1 1 180px; }
.payments-toolbar .field:first-child { flex: 2 1 260px; }
.payments-toolbar input,
.payments-toolbar select {
    color: var(--ink); padding: 10px 12px; min-height: 44px; width: 100%;
    border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--white); font: inherit;
}
.payments-toolbar input:focus,
.payments-toolbar select:focus { outline: 3px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
.admin-summary { display: flex; gap: 20px; flex-wrap: wrap; color: var(--navy); margin-bottom: 12px; }
.table-wrap { overflow-x: auto; padding: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th,
.admin-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.admin-table thead th { background: var(--cream); color: var(--navy); white-space: nowrap; position: sticky; top: 0; }
.admin-table tbody tr:hover { background: #faf8f3; }
.admin-table .num { text-align: right; white-space: nowrap; }
.admin-table code { font-size: .8rem; white-space: nowrap; }
.sort-btn {
    background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit;
    cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.sort-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sort-icon::after { content: "↕"; opacity: .4; font-size: .8em; }
th[aria-sort="ascending"] .sort-icon::after { content: "▲"; opacity: 1; }
th[aria-sort="descending"] .sort-icon::after { content: "▼"; opacity: 1; }
.payment-contact a { display: block; overflow-wrap: anywhere; }
.payments-empty td { text-align: center; color: var(--muted); padding: 24px; }
@media (max-width: 760px) {
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
    .admin-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
    .admin-table td { border: 0; padding: 4px 12px; }
    .admin-table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
    .admin-table .num { text-align: left; }
    .admin-table tr[hidden] { display: none; }
}
