/* =====================================================================
   Cincinnati Eruv — single stylesheet
   Palette: deep blue (boundary), warm gold accent, parchment + ink.
   ===================================================================== */

:root {
    --blue: #16307a;
    --blue-dark: #0f2257;
    --blue-soft: #e8edf8;
    --gold: #f2c14e;
    --gold-dark: #d9a82f;
    --ink: #1f2533;
    --muted: #5b6475;
    --line: #e4e2da;
    --cream: #faf7f0;
    --white: #ffffff;
    --up: #2e7d4f;
    --up-soft: #e6f3ec;
    --down: #c0392b;
    --down-soft: #fbeae8;
    --shadow: 0 6px 24px rgba(20, 30, 60, .08);
    --shadow-lg: 0 18px 48px rgba(20, 30, 60, .16);
    --radius: 14px;
    --maxw: 1120px;
    --serif: Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
        Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.18; color: var(--blue-dark); }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 .5em; }
h3 { font-size: 1.1rem; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
a { color: var(--blue); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--blue);
    color: #fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ----------------------------- Buttons -------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font: inherit; font-weight: 600; cursor: pointer;
    padding: .8em 1.5em; border-radius: 999px; border: 2px solid transparent;
    text-decoration: none; transition: transform .08s ease, box-shadow .2s ease,
        background .2s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: .5em 1em; font-size: .9rem; }
.btn-up { background: var(--up); color: #fff; }
.btn-down { background: var(--down); color: #fff; }
.btn-danger { background: transparent; color: var(--down); border-color: var(--down); }
.btn-danger:hover { background: var(--down-soft); }

/* --------------------------- Header / nav ----------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(150%) blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between;
    height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55em; color: var(--blue);
    text-decoration: none; font-family: var(--serif); font-weight: 700;
    font-size: 1.2rem; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { color: var(--blue-dark); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500;
    padding: .55em .85em; border-radius: 8px; font-size: .98rem; }
.site-nav a:hover { background: var(--blue-soft); color: var(--blue-dark); }
.nav-cta { background: var(--gold); color: var(--blue-dark) !important;
    font-weight: 700; }
.nav-cta:hover { background: var(--gold-dark) !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none;
    border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: .2s; }

/* ------------------------------- Hero --------------------------------- */
.hero { background:
        radial-gradient(1200px 400px at 80% -10%, rgba(242,193,78,.18), transparent),
        linear-gradient(160deg, var(--blue-dark), var(--blue)); color: #fff; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px;
    align-items: center; padding: clamp(48px, 8vw, 92px) 24px; }
.hero-inner--solo { grid-template-columns: 1fr; }
/* With no status card, let the copy breathe wider so the row isn't half-empty. */
.hero-inner--solo .lede { max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
    font-weight: 700; color: var(--gold); margin: 0 0 .8em; }
.hero h1 { color: #fff; }
.lede { font-size: 1.15rem; color: #dbe3f5; max-width: 38ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6em; }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* --------------------------- Status card ------------------------------ */
.status-card { background: #fff; color: var(--ink); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow-lg); position: relative;
    border-top: 6px solid var(--muted); }
.status-card.is-up { border-top-color: var(--up); }
.status-card.is-down { border-top-color: var(--down); }
.status-card.is-unknown { border-top-color: var(--muted); }
.status-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--muted);
    position: absolute; top: 28px; right: 28px; }
.is-up .status-dot { background: var(--up); }
.is-down .status-dot { background: var(--down); box-shadow: 0 0 0 6px var(--down-soft); }
.status-kicker { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem;
    font-weight: 700; color: var(--muted); margin: 0 0 .3em; }
.status-headline { font-family: var(--serif); font-size: 1.75rem; font-weight: 700;
    margin: 0 0 .4em; color: var(--blue-dark); }
.is-up .status-headline { color: var(--up); }
.is-down .status-headline { color: var(--down); }
.status-meta { font-size: .98rem; color: var(--ink); margin: 0 0 1em; }
.status-when { color: var(--muted); font-size: .9rem; }
.status-caveat { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line);
    padding-top: .9em; margin: 0; }

/* --------------------------- Shabbat bar ------------------------------ */
.shabbat-bar { background: var(--gold); color: var(--blue-dark); }
.shabbat-inner { display: flex; flex-wrap: wrap; gap: 8px 36px; justify-content: center;
    padding: 14px 24px; }
.shabbat-item { display: flex; align-items: baseline; gap: .5em; }
.shabbat-label { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem;
    font-weight: 700; opacity: .75; }
.shabbat-value { font-weight: 700; font-size: 1rem; }
.shabbat-item--holiday .shabbat-value { color: var(--down); }

/* ----------------------------- Sections ------------------------------- */
.section { padding: clamp(48px, 7vw, 84px) 0; }
.section--alt { background: var(--cream); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ------------------------------- Map ---------------------------------- */
.map-shell { position: relative; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--line); }
#eruv-map { height: clamp(380px, 60vh, 600px); width: 100%; background: #dfe7ea; z-index: 1; }
.map-legend { display: flex; flex-wrap: wrap; gap: 18px; background: #fff;
    padding: 12px 18px; font-size: .88rem; color: var(--ink);
    border-top: 1px solid var(--line); }
.map-legend span { display: inline-flex; align-items: center; gap: .5em; }
.swatch { width: 22px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch-line { background: transparent; border-bottom: 4px solid var(--blue); height: 4px; }
.swatch-fill { background: rgba(22,48,122,.14); border: 1px solid var(--blue); }
.swatch-excl { background: rgba(192,57,43,.28); border: 1px solid var(--down); }
.map-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
    margin-top: 22px; }
.map-disclaimer { font-size: .85rem; color: var(--muted); margin: 0; max-width: 52ch; }
.inst-marker span { display: grid; place-items: center; width: 26px; height: 26px;
    background: var(--gold); color: var(--blue-dark); border: 2px solid #fff;
    border-radius: 50%; font-weight: 700; font-size: .82rem; font-family: var(--sans);
    box-shadow: 0 2px 6px rgba(0,0,0,.35); }

/* ------------------------------ About --------------------------------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: .55em 0 .55em 1.8em; position: relative; border-bottom:
    1px solid var(--line); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--up);
    font-weight: 700; }

/* ------------------------------- FAQ ---------------------------------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 36px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 10px;
    padding: 4px 18px; }
.section--alt details { background: #fff; }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; color: var(--blue-dark);
    list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; font-weight: 700; color: var(--gold-dark);
    font-size: 1.3em; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 12px; margin: 0; }

/* ----------------------------- Donate --------------------------------- */
.section--donate { background: linear-gradient(160deg, var(--blue-dark), var(--blue));
    color: #fff; }
.section--donate h2 { color: #fff; }
.donate-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px;
    align-items: center; }
.donate-copy p { color: #dbe3f5; font-size: 1.08rem; }
.donate-card { background: #fff; color: var(--ink); border-radius: var(--radius);
    padding: 30px; text-align: center; box-shadow: var(--shadow-lg); }
.donate-amount { font-family: var(--serif); font-size: 3rem; font-weight: 700;
    color: var(--blue); margin: 0; line-height: 1; }
.donate-amount-label { text-transform: uppercase; letter-spacing: .08em;
    font-size: .8rem; font-weight: 700; color: var(--muted); margin: .3em 0 1.3em; }
.donate-fine { font-size: .82rem; color: var(--muted); margin: 1.2em 0 0; }

/* ---------------------------- Contact --------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.contact-list, .board-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: .7em 0; border-bottom: 1px solid var(--line);
    display: flex; gap: 10px; }
.contact-list span { flex: 0 0 110px; font-weight: 700;
    color: var(--blue-dark); }
.board-list { columns: 2; gap: 24px; }
.board-list li { padding: .35em 0; }

/* ----------------------------- Footer --------------------------------- */
.site-footer { background: var(--ink); color: #c7ccd6; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.brand--footer { color: #fff; }
.brand--footer .brand-text { color: #fff; }
.footer-note { color: #9aa2b1; max-width: 32ch; }
.site-footer h3 { color: #fff; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { padding: .35em 0; }
.footer-list a, .site-footer a { color: #c7ccd6; }
.footer-list a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 40px;
    padding-top: 20px; border-top: 1px solid #333a48; font-size: .85rem; color: #8b94a4; }
.footer-bottom a { color: #8b94a4; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* =====================================================================
   Check / login screens (keypad)
   ===================================================================== */
.page-check { background: linear-gradient(160deg, var(--blue-dark), var(--blue));
    min-height: 100vh; }
.page-check main { min-height: 100vh; display: flex; }
.check-screen { display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 24px; }
.check-box { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg);
    width: 100%; max-width: 420px; padding: 32px 28px; position: relative; text-align: center; }
.check-home { position: absolute; left: 20px; top: 18px; font-size: .85rem;
    text-decoration: none; color: var(--muted); }
.check-brand { display: inline-flex; align-items: center; gap: .5em; color: var(--blue);
    font-family: var(--serif); font-weight: 700; margin: 8px 0 18px; }
.check-box h1 { font-size: 1.6rem; margin: 0 0 .2em; }
.check-sub { color: var(--muted); margin: 0 0 1.4em; }
.check-error { background: var(--down-soft); color: var(--down); border-radius: 10px;
    padding: 10px 14px; font-weight: 600; font-size: .92rem; margin: 0 0 1.2em; }
.check-link { display: inline-block; margin-top: 14px; color: var(--muted);
    font-size: .9rem; }

.pin-display { display: flex; justify-content: center; gap: 18px; margin: 8px 0 26px; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line);
    transition: .15s; }
.pin-dot.filled { background: var(--blue); border-color: var(--blue);
    transform: scale(1.1); }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key { font: inherit; font-size: 1.5rem; font-weight: 600; padding: 18px 0;
    border: 1px solid var(--line); background: #fff; border-radius: 14px; cursor: pointer;
    color: var(--ink); transition: .1s; -webkit-tap-highlight-color: transparent; }
.key:hover { background: var(--blue-soft); }
.key:active { transform: scale(.96); background: var(--blue); color: #fff; }
.key-muted { font-size: 1rem; color: var(--muted); }

.report-form { display: grid; gap: 14px; }
.report-btn { font: inherit; font-size: 1.3rem; font-weight: 700; padding: 26px;
    border: 0; border-radius: 16px; cursor: pointer; color: #fff; transition: .1s; }
.report-btn:active { transform: scale(.98); }
.report-up { background: var(--up); }
.report-up:hover { background: #266b43; }
.report-down { background: var(--down); }
.report-down:hover { background: #a82f23; }
.report-cancel { margin-top: 4px; }
.status-inline { font-weight: 700; }
.status-up { color: var(--up); }
.status-down { color: var(--down); }
.status-unknown { color: var(--muted); }

.check-done .done-mark { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px;
    display: grid; place-items: center; font-size: 2.4rem; color: #fff; }
.check-done--up .done-mark { background: var(--up); }
.check-done--down .done-mark { background: var(--down); }
.done-time { color: var(--muted); font-size: .9rem; margin-bottom: 1.4em; }

.login-form { text-align: left; display: grid; gap: 8px; }
.login-form label { font-weight: 600; font-size: .9rem; }
.login-form input { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
    font: inherit; }
.login-form button { margin-top: 8px; }

/* =====================================================================
   Admin dashboard
   ===================================================================== */
.page-admin { background: var(--cream); }
.admin-bar { background: var(--blue-dark); color: #fff; }
.admin-bar-inner { display: flex; align-items: center; justify-content: space-between;
    height: 60px; }
.admin-title { display: flex; align-items: baseline; gap: 18px; }
.admin-title strong { font-family: var(--serif); font-size: 1.2rem; }
.admin-viewsite { color: #b9c4e0; text-decoration: none; font-size: .9rem; }
.admin-logout .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.admin-tabs { display: flex; gap: 4px; margin-top: 18px; flex-wrap: wrap; }
.admin-tab { padding: 10px 18px; text-decoration: none; color: var(--muted);
    font-weight: 600; border-radius: 10px 10px 0 0; }
.admin-tab:hover { background: #fff; }
.admin-tab.is-active { background: #fff; color: var(--blue-dark); box-shadow: var(--shadow); }
.admin-content { padding: 24px 24px 80px; }
.admin-section { background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.admin-section h2 { font-size: 1.25rem; margin-bottom: .8em; }
.admin-section--danger { border-color: var(--down); background: var(--down-soft); }
.admin-section--danger h2 { color: var(--down); }
.admin-hint { color: var(--muted); font-size: .92rem; }

.flash { border-radius: 10px; padding: 14px 18px; margin-bottom: 20px;
    border: 1px solid; }
.flash--ok { background: var(--up-soft); border-color: #bfe0cc; color: #1f5c3a; }
.flash--error { background: var(--down-soft); border-color: #f0c5bf; color: var(--down); }
.flash p { margin: 0; }
.flash-code { margin-top: 8px !important; font-size: 1.1rem; }
.flash-code strong { font-size: 1.8rem; letter-spacing: .15em; font-family: var(--sans); }

.admin-status { display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px; padding: 18px; border-radius: 10px;
    background: var(--blue-soft); }
.admin-status--up { background: var(--up-soft); }
.admin-status--down { background: var(--down-soft); }
.admin-status-now { font-family: var(--serif); font-size: 1.8rem; font-weight: 700;
    margin: 0; color: var(--blue-dark); }
.admin-status--up .admin-status-now { color: var(--up); }
.admin-status--down .admin-status-now { color: var(--down); }
.admin-status-meta { margin: 0; color: var(--muted); font-size: .9rem; }
.admin-override { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-override-label { font-size: .85rem; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px; }
.stat-card { background: var(--cream); border: 1px solid var(--line); border-radius: 10px;
    padding: 18px; text-align: center; }
.stat-value { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 700;
    color: var(--blue); }
.stat-label { font-size: .8rem; color: var(--muted); text-transform: uppercase;
    letter-spacing: .04em; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px;
    padding-top: 20px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end; height: 100%; gap: 4px; }
.bar { width: 100%; max-width: 38px; background: linear-gradient(var(--blue), var(--blue-dark));
    border-radius: 5px 5px 0 0; min-height: 2px; transition: height .3s ease; }
.bar-count { font-size: .72rem; color: var(--muted); }
.bar-label { font-size: .68rem; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.data-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line);
    color: var(--muted); text-transform: uppercase; font-size: .74rem; letter-spacing: .05em; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.row-inactive { opacity: .55; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.actions-cell form { margin: 0; }

.code-cell { font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
    letter-spacing: .15em; color: var(--ink); }
.code-cell--missing { font-weight: 400; letter-spacing: normal; color: var(--muted); cursor: help; }

.pill { display: inline-block; padding: .25em .7em; border-radius: 999px; font-size: .78rem;
    font-weight: 700; }
.pill-on, .pill-up { background: var(--up-soft); color: var(--up); }
.pill-off { background: #eceef2; color: var(--muted); }
.pill-down { background: var(--down-soft); color: var(--down); }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.input { padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
    font: inherit; width: 100%; background: #fff; }
.input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field small { color: var(--muted); font-size: .82rem; }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.inline-form .input { width: auto; flex: 1; min-width: 200px; }

/* ---------------------- Institution row editor ------------------------ */
.inst-list { list-style: none; margin: 0 0 14px; padding: 0;
    display: flex; flex-direction: column; gap: 8px; }
.inst-row { display: flex; align-items: center; gap: 10px; background: var(--cream);
    border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
    transition: box-shadow .15s ease, opacity .15s ease, border-color .15s ease; }
.inst-row.dragging { opacity: .45; box-shadow: var(--shadow-lg);
    border-color: var(--blue); }
.inst-handle { flex: none; display: grid; place-items: center; width: 28px; height: 32px;
    border: 0; background: none; color: var(--muted); cursor: grab;
    border-radius: 6px; touch-action: none; -webkit-tap-highlight-color: transparent; }
.inst-handle:hover { background: var(--blue-soft); color: var(--blue-dark); }
.inst-handle:active { cursor: grabbing; }
.inst-num { flex: none; width: 26px; height: 26px; display: grid; place-items: center;
    background: var(--gold); color: var(--blue-dark); border-radius: 50%;
    font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums; }
.inst-fields { flex: 1; display: grid; grid-template-columns: 2.2fr 1fr 1fr; gap: 8px;
    min-width: 0; }
.inst-fields .input { width: 100%; }
.inst-actions { flex: none; display: flex; gap: 4px; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px;
    border: 1px solid var(--line); background: #fff; border-radius: 8px;
    color: var(--muted); cursor: pointer; transition: .12s; }
.icon-btn:hover { background: var(--blue-soft); color: var(--blue-dark);
    border-color: var(--blue-soft); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn--danger:hover { background: var(--down-soft); color: var(--down);
    border-color: #f0c5bf; }
.inst-add { display: inline-flex; align-items: center; gap: .4em; }
.ic { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic--fill { fill: currentColor; stroke: none; }

/* File upload input */
.file-input { padding: 8px 10px; cursor: pointer; max-width: 460px; }
.file-input::file-selector-button { font: inherit; font-weight: 600; cursor: pointer;
    margin-right: 12px; padding: .5em 1em; border-radius: 8px;
    border: 1px solid var(--blue); background: var(--blue-soft); color: var(--blue-dark);
    transition: background .12s ease; }
.file-input::file-selector-button:hover { background: #dbe5f7; }

/* ============================ Responsive ============================== */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .site-nav { position: absolute; top: 68px; left: 0; right: 0; background: #fff;
        flex-direction: column; align-items: stretch; padding: 10px 16px 18px;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        display: none; }
    .site-nav.open { display: flex; }
    .site-nav a { padding: .8em 1em; }
    .hero-inner, .about-grid, .donate-inner, .contact-grid, .faq-grid,
    .footer-grid { grid-template-columns: 1fr; }
    .footer-grid { gap: 28px; }
    .field-row { grid-template-columns: 1fr; }
    .board-list { columns: 1; }
}

@media (max-width: 560px) {
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px;
        padding: 6px 12px; }
    .data-table td { border: 0; padding: 8px 0; display: flex; justify-content: space-between;
        gap: 16px; }
    .data-table td::before { content: attr(data-label); font-weight: 700; color: var(--muted);
        font-size: .8rem; }
    .actions-cell { justify-content: flex-start; }
    .inst-row { flex-wrap: wrap; }
    .inst-fields { grid-template-columns: 1fr; flex-basis: 100%; order: 2; }
    .inst-actions { order: 1; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}

/* ===================== Shabbat times info popout ======================= */
/* One info (ⓘ) affordance covering both candle-lighting and havdalah times.
   Native Popover API: the card renders in the top layer, so it is never
   clipped by the wrapping/centered .shabbat-inner flex row. Uses :root vars. */
.shabbat-info { align-self: center; }

/* Visually-hidden text label — gives the icon button a real, translatable,
   machine-readable accessible name (WCAG 2.5.3) without showing text on gold. */
.shabbat-info__sr {
    position: absolute; 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;
}

/* The ⓘ trigger: a real <button>, dark-blue glyph on gold (~7.9:1). */
.shabbat-info__btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; padding: 0;          /* >=24px hit target */
    border: 0; border-radius: 999px;
    background: transparent; color: var(--blue-dark);
    cursor: pointer; -webkit-appearance: none; appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, transform .08s ease;
}
.shabbat-info__btn:hover { background: rgba(15, 34, 87, .12); }
.shabbat-info__btn:active { transform: translateY(1px); }
.shabbat-info__btn:focus-visible {
    outline: 2px solid var(--blue-dark); outline-offset: 2px;
}
.shabbat-info__icon { display: block; width: 18px; height: 18px; }

/* The popout card: white surface, dark ink text, readable over gold.
   Centered fixed default = the no-JS / unsupported-positioner fallback;
   the JS positioner overrides top/left to tuck it under the icon. */
.shabbat-info__popout {
    position: fixed;
    margin: 0;
    inset: auto;                  /* clear the UA inset:0 so our top/left win */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(20rem, calc(100vw - 32px));
    max-width: 20rem;
    box-sizing: border-box;
    padding: 16px 18px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    font-family: var(--sans);
    font-size: .92rem;
    line-height: 1.55;
    text-align: left;
    /* Never clip the safety caveat when the card is taller than the viewport
       (large text / zoom / short landscape) — keep it scrollable. */
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
}
/* When the JS positioner has anchored it under the icon, drop the centering. */
.shabbat-info__popout.is-anchored { transform: none; }
/* Until the positioner runs, keep the opened card invisible so its centered
   default never flashes before it tucks under the icon. Scoped to .js-positioned
   (set only when the positioner is active), so the no-JS centered fallback and
   the @supports inline fallback both stay visible. */
.shabbat-info__popout.js-positioned:not(.is-anchored) { visibility: hidden; }
.shabbat-info__popout p { margin: 0; color: var(--ink); font-weight: 400; }
.shabbat-info__popout strong { color: var(--blue-dark); }
/* Title is a <p>, not a heading (avoids polluting the page heading outline);
   scoped + weighted so it wins over the body ".shabbat-info__popout p" rule. */
.shabbat-info__popout .shabbat-info__title {
    font-family: var(--serif);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin: 0 0 .55em;
}

/* Touch-friendly dismiss for mobile, where there is no Escape key. */
.shabbat-info__close {
    display: inline-flex; align-items: center; justify-content: center;
    font: inherit; font-weight: 600; font-size: .85rem;
    cursor: pointer; margin-top: 14px;
    padding: .45em 1.1em;
    border-radius: 999px;
    border: 2px solid var(--blue);
    background: transparent; color: var(--blue);
    transition: background .2s ease;
}
.shabbat-info__close:hover { background: var(--blue-soft); }
.shabbat-info__close:focus-visible {
    outline: 2px solid var(--blue); outline-offset: 2px;
}

/* No ::backdrop — deliberately non-modal so this reads as a light disclosure,
   not a dialog; the page behind stays visible and interactive. */

/* Fallback for browsers WITHOUT the Popover API (where popovertarget is inert).
   Gated in CSS via @supports so it applies BEFORE first paint — no flash for
   supported browsers (the JS-class approach used to flash the card on load).
   The card renders inline-and-open and the dead trigger is hidden, so the
   safety caveat is NEVER hidden. (Supported browsers ignore this whole block;
   there the popover works natively via popovertarget even with JS disabled.) */
@supports not selector(:popover-open) {
    .shabbat-info { flex-basis: 100%; justify-content: center; }
    .shabbat-info__btn { display: none; }
    .shabbat-info__popout {
        position: static; transform: none; inset: auto;
        margin: 6px 0 0; width: auto; max-width: 30rem;
        max-height: none; box-shadow: var(--shadow);
    }
    .shabbat-info__close { display: none; }
    .shabbat-info__popout[popover] { display: block; }
}
