/* Charity web site - the desktop's three brushes (dark, light, mix: /{company}/theme.css sets them per charity
   and per staff member, from the same Users.Color1/Color2 the desktop uses) in a modern frame. Self-hosted only
   (CSP: style-src 'self'); nothing inline, so the chart is SVG attributes, not style. */

:root {
    /* The house colours (App.xaml), until theme.css says otherwise. */
    --dark: #8B4513;
    --light: #F5F5DC;
    --mix: #C09D77;

    --page: color-mix(in srgb, var(--light) 55%, #ffffff);
    --surface: #ffffff;
    --tint: color-mix(in srgb, var(--mix) 14%, #ffffff);
    --tint-strong: color-mix(in srgb, var(--mix) 30%, #ffffff);
    --line: color-mix(in srgb, var(--mix) 38%, #ffffff);
    --text: #1d1b19;
    --muted: color-mix(in srgb, var(--dark) 45%, #5b5650);
    --on-dark: var(--light);
    --red: #c62828;
    --green: #2e7d32;
    --notice-bg: #fff5d6;
    --notice-line: #e9c96a;
    --focus: #f0a500;
    --radius: 20px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 28px rgba(16, 24, 40, .07);
    --shadow-lift: 0 2px 4px rgba(16, 24, 40, .05), 0 18px 48px rgba(16, 24, 40, .12);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, "Noto Sans Hebrew", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

h1, h2, h3 { color: var(--dark); line-height: 1.2; margin: 0 0 .75rem; }
h1 { font-size: 1.85rem; font-weight: 750; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; font-weight: 650; }
h1:focus { outline: none; }
p { margin: 0 0 1rem; }
a { color: var(--dark); }
a:hover { color: color-mix(in srgb, var(--dark) 75%, #000); }
.quiet { color: var(--muted); font-size: .92rem; }
.quiet a { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.owes { color: var(--red); }
.credit { color: var(--green); }
.hidden-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.notice {
    background: var(--notice-bg);
    border: 1px solid var(--notice-line);
    border-radius: 10px;
    padding: .75rem 1rem;
}

/* ---------- Buttons: the desktop's Secondary (light) and Primary (dark) appearances ---------- */

button, a.button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    color: var(--on-dark);
    background: var(--dark);
    border: 1px solid var(--dark);
    border-radius: 12px;
    padding: .7rem 1.25rem;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
button:hover, a.button:hover, .btn:hover { background: color-mix(in srgb, var(--dark) 88%, #000); color: var(--on-dark); }
.btn.secondary, button.secondary {
    color: var(--dark);
    background: var(--surface);
    border-color: var(--line);
}
.btn.secondary:hover, button.secondary:hover { background: var(--tint-strong); color: var(--dark); }
.btn.small, button.small { padding: .4rem .8rem; font-size: .9rem; border-radius: 8px; }
.btn.ghost, button.ghost { background: transparent; border-color: transparent; color: inherit; }
.btn.ghost:hover, button.ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; }

input:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* ---------- Fields: outlined, like the desktop's Entry ---------- */

input[type=text], input[type=tel], input[type=password], input[type=email], input[type=search], input[type=date], input[type=number], select, textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--dark) 35%, var(--line));
    border-radius: 12px;
    padding: .65rem .85rem;
    min-height: 2.75rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--dark); background: color-mix(in srgb, var(--light) 35%, #fff); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--mix) 35%, transparent); }
label { font-weight: 600; color: var(--dark); font-size: .92rem; }

/* ---------- Sign-in pages: one card in the middle ---------- */

.auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem 2.5rem;
    background:
        linear-gradient(180deg, var(--dark) 0, var(--dark) 13rem, transparent 13rem);
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--on-dark);
    padding: 2rem 0 1.5rem;
    font-weight: 650;
    font-size: 1.1rem;
}
.card {
    width: 100%;
    max-width: 28rem;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-lift);
}
.card form, .stack { display: flex; flex-direction: column; gap: .5rem; margin: 0 0 1rem; }
.card label { margin-top: .5rem; }
.card button[type=submit], .card a.button { margin-top: .75rem; width: 100%; }
input#code { letter-spacing: .3em; font-size: 1.3rem; text-align: center; }

.choice {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 500;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .75rem .9rem;
    margin-top: 0;
    cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--dark); background: var(--tint); }

.mark {
    display: inline-grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: var(--light);
    color: var(--dark);
    border: 2px solid color-mix(in srgb, var(--light) 60%, var(--dark));
    font-weight: 700;
    font-size: 1rem;
    flex: none;
}

/* The charity's own logo in place of the initials (owner, 11 Oct 2026), on a light tile so a logo drawn for white paper reads on the dark bar. */
.logo { height: 2.6rem; width: auto; max-width: 9rem; object-fit: contain; flex: none; background: #fff; border-radius: 6px; padding: 2px 4px; }
.auth-brand .logo { height: 4.5rem; max-width: 14rem; }

/* ---------- The app shell: the desktop's dark bar and tab strip ---------- */

.topbar {
    background: var(--dark);
    color: var(--on-dark);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.topbar-inner {
    max-width: 84rem;
    margin: 0 auto;
    padding: .7rem 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--on-dark); text-decoration: none; font-weight: 650; font-size: 1.05rem; min-width: 0; }
.brand:hover { color: var(--on-dark); }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topsearch { margin: 0 0 0 auto; flex: 0 1 22rem; display: flex; }
.topsearch input {
    min-height: 2.4rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: color-mix(in srgb, var(--light) 92%, transparent);
}
.who { display: flex; align-items: center; gap: .5rem; }
.who form { margin: 0; }
.who .btn { color: var(--on-dark); }

.tabs {
    max-width: 84rem;
    margin: 0 auto;
    padding: .55rem 1.25rem 0;
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    color: var(--on-dark);
    text-decoration: none;
    padding: .55rem 1.15rem .6rem;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    white-space: nowrap;
    opacity: .88;
}
.tabs a:hover { background: color-mix(in srgb, var(--mix) 35%, transparent); opacity: 1; color: var(--on-dark); }
.tabs a[aria-current=page] { background: var(--page); color: var(--dark); opacity: 1; }

.content { max-width: 84rem; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pagehead h1 { margin: 0; }
.pagehead .sub { color: var(--muted); margin: .25rem 0 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Tiles: the desktop's money boxes ---------- */

.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-bottom: 1.25rem; }
.tiles.hero { grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }
.tile {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow);
    min-width: 0;
}
.tile .label { color: var(--muted); font-weight: 600; font-size: .9rem; }
.tile .value { color: var(--dark); font-weight: 700; font-size: 1.65rem; font-variant-numeric: tabular-nums; margin-top: .2rem; overflow-wrap: anywhere; }
.tiles.hero .tile .value { font-size: 2.2rem; }
.tile .hint { color: var(--muted); font-size: .85rem; margin-top: .2rem; }

/* ---------- Panels and grids: the desktop's DataList ---------- */

.panel {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    min-width: 0;
}
.panel > h2 { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.columns { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.columns > .panel { margin-bottom: 0; }

.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin: 0 0 1rem; }
.filters > div { display: flex; flex-direction: column; gap: .25rem; min-width: 9rem; flex: 1 1 9rem; }
.filters > div.wide { flex: 3 1 16rem; }
.filters button, .filters .btn { min-height: 2.75rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chips a {
    text-decoration: none;
    padding: .35rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--dark);
    font-weight: 600;
    font-size: .9rem;
}
.chips a[aria-current=true] { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }

.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table.grid { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.grid th {
    background: var(--dark);
    color: var(--on-dark);
    font-weight: 600;
    text-align: start;
    padding: .65rem .8rem;
    white-space: nowrap;
}
table.grid th.num { text-align: end; }
table.grid th a { color: inherit; text-decoration: none; }
table.grid th a:hover { text-decoration: underline; color: inherit; }
table.grid td { padding: .6rem .8rem; border-top: 1px solid var(--line); vertical-align: top; }
table.grid tbody tr:nth-child(even) td { background: var(--tint); }
table.grid tbody tr:hover td { background: var(--tint-strong); }
table.grid td a { font-weight: 600; text-decoration: none; }
table.grid td a:hover { text-decoration: underline; }
table.grid tfoot td { font-weight: 700; background: color-mix(in srgb, var(--mix) 22%, #fff); border-top: 2px solid var(--mix); }
table.grid .yd { color: var(--muted); font-size: .88rem; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .9rem; color: var(--muted); font-size: .92rem; flex-wrap: wrap; }
.pager .actions .btn[aria-disabled=true] { opacity: .45; pointer-events: none; }

dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; margin: 0; }
dl.details dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
dl.details dd { margin: 0; overflow-wrap: anywhere; }
.badge {
    display: inline-block;
    padding: .15rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 650;
    background: var(--tint-strong);
    color: var(--dark);
}
.badge.good { background: color-mix(in srgb, var(--green) 15%, #fff); color: var(--green); }
.badge.warn { background: color-mix(in srgb, var(--red) 12%, #fff); color: var(--red); }

/* ---------- The 12-month chart (SVG) ---------- */

.chart { width: 100%; height: auto; display: block; }
.chart .bar-in { fill: var(--dark); }
.chart .bar-out { fill: var(--mix); }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.legend { display: flex; gap: 1rem; color: var(--muted); font-size: .88rem; margin-top: .4rem; }
.legend span::before { content: ""; display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; margin-inline-end: .35rem; vertical-align: -1px; }
.legend .in::before { background: var(--dark); }
.legend .out::before { background: var(--mix); }

/* ---------- Donor pages ---------- */

.portal-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.portal-hero h1 { margin: 0; }

footer.site { text-align: center; color: var(--muted); font-size: .82rem; padding: 0 1rem 2rem; }

.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }

@media (max-width: 900px) {
    .columns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .topbar-inner { padding: .6rem 1rem 0; gap: .6rem; }
    .topsearch { order: 3; flex: 1 1 100%; margin: 0; }
    .tabs { padding: .5rem 1rem 0; }
    .tabs a { padding: .5rem .85rem .55rem; }
    .content { padding: 1.25rem 1rem 2.5rem; }
    h1 { font-size: 1.45rem; }
    .tiles, .tiles.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
    .tiles.hero .tile .value { font-size: 1.5rem; }
    .tile .value { font-size: 1.25rem; }
    .tile { padding: .9rem 1rem; }
    .card { padding: 1.5rem 1.1rem; }
    dl.details { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
    dl.details dd { margin-bottom: .5rem; }
}

.brand + .who { margin-inline-start: auto; }

.who .me { font-size: .9rem; opacity: .85; }
@media (max-width: 640px) { .who .me { display: none; } }
dl.details + .quiet { margin-top: 1rem; margin-bottom: 0; }

/* ---------- Forms on a panel ---------- */
.panel.narrow { max-width: 38rem; }
.panel .stack label { margin-top: .5rem; }
.panel .stack button[type=submit] { margin-top: 1rem; align-self: flex-start; min-width: 10rem; }
.pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; }
.pair > div { display: flex; flex-direction: column; gap: .5rem; }
@media (max-width: 640px) { .pair { grid-template-columns: minmax(0, 1fr); } .panel .stack button[type=submit] { width: 100%; } }

/* A second row of smaller choices under a sign-in form ("text it again", "call me instead"). */
.card form.again { flex-direction: row; flex-wrap: wrap; gap: .5rem; }
.card form.again button { width: auto; margin-top: 0; }
.card button.secondary { margin-top: .5rem; }
.choice input[type=checkbox] { width: auto; }

/* Receipts and the printable statement (owner, 11 Oct 2026): one sheet of paper on screen, and only the sheet when printed. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.print-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; margin-bottom: 1rem; }
.paper { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; max-width: 52rem; margin: 0 auto; }
.paper-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--dark); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.paper-head h1 { margin: 0 0 .25rem; }
.paper-ref { text-align: end; }
.paper-ref .label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.mono { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.paper-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.5rem 0 1rem; padding: 1rem 1.25rem; border-radius: 10px; background: var(--tint); font-size: 1.15rem; }
.paper-total strong { font-size: 1.6rem; color: var(--dark); }
.paper .grid tfoot th { border-top: 2px solid var(--dark); }
.paper dl.details { margin-bottom: 1.25rem; }
@media (max-width: 640px) { .paper { padding: 1.1rem; } }
@media print {
    @page { margin: 14mm; }
    body { background: #fff; }
    .topbar, footer.site, .print-actions { display: none !important; }
    /* A staff list printed from its page (ReportActions): the rows and totals only */
    .tabs, .filters, .pager, .switch, .pagehead .actions { display: none !important; }
    .table-wrap { overflow: visible !important; }
    .content { padding: 0; max-width: none; }
    .paper { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
    .paper-total { background: none; border: 1px solid #999; }
    a { color: inherit; text-decoration: none; }
}

/* Pay what you owe (owner, 11 Oct 2026): one amount and one button; the card is typed on Stripe's own page. */
.panel.pay { border: 2px solid var(--mix); }
.pay-form { display: flex; flex-direction: column; gap: .5rem; }
.pay-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pay-row .currency { font-size: 1.4rem; font-weight: 700; color: var(--dark); }
.pay-row input { max-width: 10rem; font-size: 1.25rem; font-weight: 600; }
.pay-row button { margin-top: 0; }
@media (max-width: 640px) { .pay-row input { max-width: none; flex: 1; } .pay-row button { width: 100%; } }

/* The public zmanim board (owner, 11 Oct 2026): the wall screen's board for a phone or a desk, right to left. */
.board { display: flex; flex-direction: column; gap: 1rem; }
.board-day { background: var(--dark); color: var(--on-dark); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.board-day h1 { margin: 0; font-size: 2.2rem; color: var(--on-dark); }
.board-dayname { margin: .25rem 0 0; font-size: 1.3rem; }
.board-shabbos { margin: .5rem 0 0; font-size: 1.2rem; font-weight: 600; }
.board-english { margin: .5rem 0 0; opacity: .85; font-size: .95rem; text-align: left; }
.board-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 1rem; }
.board-list ul { list-style: none; margin: 0; padding: 0; }
.board-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.board-list li:last-child { border-bottom: 0; }
.board-list h3 { margin: 1rem 0 .25rem; font-size: 1.05rem; color: var(--dark); }
.board-list h3:first-of-type { margin-top: 0; }
.board .time { font-variant-numeric: tabular-nums lining-nums; font-weight: 600; white-space: nowrap; }
.board-notices p { margin: .4rem 0; font-size: 1.1rem; overflow-wrap: anywhere; }

/* Support (StaffSupport*): the switch between open and resolved, and a ticket as a chat - the charity's side on the right in
   its own colour, Roseteq's on the left in grey, a name and time over each run, files inside their bubble. */
.switch { display: flex; gap: .5rem; margin: 0 0 1rem; }
.switch a { padding: .4rem .9rem; border-radius: 8px; text-decoration: none; color: var(--dark); background: var(--tint); }
.switch a[aria-current=page] { background: var(--dark); color: #fff; }
.thread { display: flex; flex-direction: column; gap: .25rem; }
.bubble-who { font-size: .8rem; font-weight: 600; color: var(--muted); margin: .9rem .4rem .2rem; }
.bubble-who.mine { align-self: flex-end; }
.bubble-who.theirs { align-self: flex-start; }
.bubble { max-width: min(36rem, 92%); padding: .6rem .9rem .7rem; border-radius: 16px; }
.bubble.mine { align-self: flex-end; background: var(--dark); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: #eef1f5; color: #1d2633; border-bottom-left-radius: 4px; }
.bubble-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-img { display: block; max-width: 100%; margin-top: .5rem; border-radius: 6px; }
.bubble-audio { display: block; width: 18rem; max-width: 100%; margin-top: .5rem; }
.bubble-video { display: block; width: 100%; margin-top: .5rem; border-radius: 6px; background: #15181e; }
.bubble-file { display: inline-block; margin-top: .5rem; color: inherit; }
.thread-note { align-self: center; font-size: .8rem; color: var(--muted); background: #f4f6f9; border-radius: 10px; padding: .2rem .8rem; margin: .8rem 0; }
.panel.reply .row-actions { display: flex; gap: .5rem; }
.panel.reply .resolve { margin-top: .75rem; }

/* The "?" (HelpMark - the owner's standing rule, 13 Oct 2026): a note that explains sits behind a small round question mark and
   shows on hover, and on focus - a tap on a phone focuses the button. No script; the note is the button's aria-describedby. */
.helpmark { position: relative; display: inline-block; vertical-align: middle; margin-inline-start: .3rem; }
button.helpmark-q {
    width: 1.35rem; height: 1.35rem; min-width: 0; padding: 0; border-radius: 50%;
    font-size: .8rem; font-weight: 700; line-height: 1;
    background: var(--tint); color: var(--dark); border: 1px solid var(--line);
}
button.helpmark-q:hover, button.helpmark-q:focus-visible { background: var(--tint-strong); color: var(--dark); }
.helpmark-tip {
    display: none; position: absolute; z-index: 20; top: calc(100% + .4rem); inset-inline-start: 50%; transform: translateX(-50%);
    width: max-content; max-width: min(18rem, 80vw); padding: .5rem .75rem; border-radius: 8px;
    background: #1d2633; color: #fff; font-size: .85rem; font-weight: 400; line-height: 1.4; letter-spacing: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18); white-space: normal; text-align: start;
}
[dir=rtl] .helpmark-tip { transform: translateX(50%); }
.helpmark:hover .helpmark-tip, .helpmark:focus-within .helpmark-tip { display: block; }
/* A field's label with its "?" beside it - never inside it: a button inside <label for> is not allowed, and would join the field's name. */
.labelrow { display: flex; align-items: center; gap: .1rem; }
.labelrow label { margin: 0; }
.panel .stack .labelrow { margin-top: .5rem; }
.labelrow .helpmark { margin-inline-start: .25rem; }

/* The screen editor (StaffScreen): the notices beside the board as it shows now; one column on a phone. */
.screen-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
.screen-preview { position: sticky; top: 1rem; }
.screen-frame { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; background: #fff; }
.screen-frame .board-day h1 { font-size: 1.6rem; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); gap: .5rem 1rem; }
.pair > div { display: flex; flex-direction: column; gap: .3rem; }
.notice-row { border-top: 1px solid var(--line); padding: .75rem 0; }
.notice-row:first-of-type { border-top: 0; }
.notice-row.ended { opacity: .6; }
.notice-text { margin: 0 0 .25rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-row .quiet { margin: 0 0 .5rem; }
.notice-edit summary { cursor: pointer; color: var(--dark); font-weight: 600; margin-bottom: .5rem; }
.notice-hide { margin: .25rem 0 0; }
.notice-poster { display: block; max-width: min(100%, 16rem); max-height: 12rem; height: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 .4rem; background: #fff; }
@media (max-width: 860px) {
    .screen-editor { grid-template-columns: minmax(0, 1fr); }
    .screen-preview { position: static; }
}
.board-room { margin-inline-start: .4rem; color: var(--muted); font-size: .85em; }
/* Davening times (StaffDavening): the fixed-or-zman choice, and the preview's day. */
fieldset.when { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .9rem .9rem; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .4rem; }
fieldset.when legend { font-weight: 600; color: var(--dark); font-size: .92rem; padding: 0 .3rem; }
label.choice { display: flex; align-items: center; gap: .4rem; font-weight: 500; }
.preview-day { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 .75rem; }
.preview-day input { width: auto; }
/* The print and Excel buttons over a staff list (ReportActions). */
.report-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; margin: -.5rem 0 1rem; }
/* Money on the web (StaffLedger): a refusal in red, the Change / Cancel links on a ledger row, the code step's two buttons. */
.notice.warn { background: color-mix(in srgb, var(--red) 8%, #fff); border-color: color-mix(in srgb, var(--red) 40%, #fff); }
.row-links { white-space: nowrap; }
.row-links a + a { margin-inline-start: .6rem; }
.code-step .row-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.code-step input[name=code] { max-width: 10rem; letter-spacing: .2em; font-variant-numeric: tabular-nums; }

fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
fieldset[disabled] { opacity: .7; }

/* ---------- A charity's public page, and the site's own front door (owner, 14 Oct 2026; "more modern", like shulspace.com) ----------
   A light bar, a hero in the look the charity chose (Soft: a wash of its own colours, the picture beside the name; Picture: the picture
   filling the top), rounded cards, pill buttons. Every colour from the theme's three brushes, so each charity's page wears its own;
   nothing loaded from elsewhere. */

.btn.pill { border-radius: 999px; padding: .55rem 1.2rem; }
.btn.big { padding: .85rem 1.6rem; font-size: 1.05rem; }
.btn.pill:hover { transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--dark) 25%, transparent); }
.btn.light { background: #fff; color: var(--dark); border-color: #fff; }
.btn.light:hover { background: var(--light); color: var(--dark); }
.btn.outline { background: transparent; color: #fff; border-color: color-mix(in srgb, #fff 60%, transparent); }
.btn.outline:hover { background: color-mix(in srgb, #fff 14%, transparent); color: #fff; }

.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, #fff 85%, transparent);
    backdrop-filter: saturate(1.6) blur(12px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.site-nav-inner { max-width: 72rem; margin: 0 auto; padding: .75rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.site-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--dark); font-weight: 750; font-size: 1.1rem; letter-spacing: -.01em; min-width: 0; }
.site-brand:hover { color: var(--dark); }
.site-brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-brand .logo { height: 2.4rem; padding: 0; }
.site-brand .mark { width: 2.4rem; height: 2.4rem; font-size: .9rem; background: var(--dark); color: var(--on-dark); border: 0; }
.site-links { margin-inline-start: auto; display: flex; align-items: center; gap: 1.1rem; flex: none; }
.site-link { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-link:hover { color: var(--dark); }

body:has(.landing-main) { background: #fff; }
.landing-main { min-height: 70vh; }

/* Soft: the name and welcome on a wash of the charity's colours, the picture (or its mark) beside them. */
.site-hero {
    background:
        radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--mix) 38%, transparent), transparent 70%),
        radial-gradient(50rem 26rem at -10% 110%, color-mix(in srgb, var(--light) 90%, transparent), transparent 70%),
        linear-gradient(180deg, color-mix(in srgb, var(--light) 45%, #fff) 0, #fff 100%);
    padding: 4.5rem 1.25rem 4rem;
}
.hero-inner { max-width: 72rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.eyebrow { display: inline-block; margin: 0 0 1rem; padding: .3rem .85rem; border-radius: 999px; background: color-mix(in srgb, #fff 70%, transparent); border: 1px solid var(--line); color: var(--dark); font-weight: 650; font-size: .85rem; letter-spacing: .02em; }
.site-hero h1, .photo-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; margin: 0 0 1.1rem; overflow-wrap: anywhere; text-wrap: balance; }
.site-hero .lead, .photo-hero .lead { font-size: 1.15rem; max-width: 34rem; white-space: pre-line; margin: 0 0 1.75rem; }
.site-hero .lead { color: color-mix(in srgb, var(--text) 75%, var(--muted)); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-art { display: flex; justify-content: center; min-width: 0; }
.hero-art .card { max-width: 26rem; }
.hero-art .card h2 { font-size: 1.4rem; letter-spacing: -.02em; }
.landing-picture { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow-lift); background: var(--tint); }
.landing-picture.small { max-width: 24rem; aspect-ratio: auto; max-height: 14rem; border-radius: var(--radius); margin-bottom: 1rem; }
.hero-badge { width: min(20rem, 100%); aspect-ratio: 1; display: grid; place-items: center; border-radius: 36px; background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--light) 70%, #fff)); box-shadow: var(--shadow-lift); }
.hero-badge .logo { height: auto; width: 70%; max-width: none; max-height: 70%; background: none; }
.hero-badge .mark { width: 9rem; height: 9rem; font-size: 3rem; background: var(--dark); color: var(--on-dark); border: 0; }

/* Picture: the picture fills the top, darkened toward the bottom in the charity's own dark so the name reads over any photo. */
.photo-hero { position: relative; min-height: min(34rem, 80vh); display: flex; align-items: flex-end; overflow: hidden; color: #fff; background: var(--dark); }
.photo-hero .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.photo-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, color-mix(in srgb, var(--dark) 55%, transparent) 55%, color-mix(in srgb, var(--dark) 92%, #000) 100%); }
.photo-hero-inner { position: relative; z-index: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 6rem 1.25rem 5rem; }
.photo-hero h1 { color: #fff; max-width: 48rem; }
.photo-hero .lead { color: color-mix(in srgb, #fff 90%, transparent); }
.landing-section.after-photo { padding-top: 0; margin-top: -2.5rem; position: relative; z-index: 2; }
.bento.strip { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.bento.strip .bento-card { min-height: 0; background: #fff; box-shadow: var(--shadow-lift); }
.bento.strip .bento-card.wide { grid-column: auto; }
.bento.strip .bento-go { display: none; }

.landing-section { max-width: 72rem; margin: 0 auto; padding: 3.5rem 1.25rem 0; }
.section-title { font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -.03em; font-weight: 800; margin: 0 0 1.5rem; }

.bento { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding: 1.6rem;
    min-height: 12rem;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
    box-shadow: var(--shadow);
    transition: transform .18s, box-shadow .18s;
    overflow: hidden;
}
.bento-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: var(--text); }
.bento-card.wide { grid-column: span 2; }
/* No empty slot in the grid: the last card takes what is left of its row (the wide card plus one fills the first row of three). */
.bento:not(.strip) > .bento-card:nth-child(3):last-child { grid-column: 1 / -1; }
.bento:not(.strip) > .bento-card:nth-child(4):last-child { grid-column: span 2; }
.bento-card strong { color: var(--dark); font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.2; }
.bento-card span { color: var(--muted); }
.bento-card .bento-go { margin-top: auto; font-style: normal; font-weight: 650; color: var(--dark); }
.bento-card .bento-go::after { content: " \2192"; }
.tone-a { background: linear-gradient(135deg, color-mix(in srgb, var(--light) 70%, #fff), color-mix(in srgb, var(--mix) 30%, #fff)); }
.tone-b { background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--mix) 16%, #fff)); }
.tone-c { background: linear-gradient(160deg, color-mix(in srgb, var(--light) 55%, #fff), #fff); }
.tone-d { background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--light) 40%, #fff)); }
.bento-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; background: var(--dark); margin-bottom: .6rem; }
.bento-icon svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--on-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.contact-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    padding: 2.5rem;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(30rem 16rem at 100% 0, color-mix(in srgb, var(--mix) 55%, transparent), transparent 70%),
        linear-gradient(135deg, var(--dark), color-mix(in srgb, var(--dark) 70%, #000));
    box-shadow: var(--shadow-lift);
}
.contact-words { min-width: 0; }
.contact-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.03em; font-weight: 800; margin: 0 0 .5rem; }
.contact-address { margin: 0; white-space: pre-line; color: color-mix(in srgb, #fff 82%, transparent); }
.contact-ways { display: flex; flex-wrap: wrap; gap: .75rem; min-width: 0; }
.contact-ways .btn { overflow-wrap: anywhere; }
.contact-ways .btn span[dir=auto] { opacity: .7; font-weight: 600; }

/* What Roseteq Charity is: six small tiles (15 Oct 2026) */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.features li { display: grid; gap: .35rem; align-content: start; padding: 1.2rem 1.25rem; border-radius: 20px; background: #fff; border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); box-shadow: var(--shadow); min-width: 0; }
.features strong { color: var(--dark); font-size: 1.05rem; font-weight: 750; }
.features span { color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.section-lead { margin: -1rem 0 1.25rem; color: var(--muted); }

.charity-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.charity-list a, .charity-list .no-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    min-height: 9.5rem;
    padding: 1.2rem .8rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
    box-shadow: var(--shadow);
    text-decoration: none;
    text-align: center;
    font-weight: 650;
    font-size: .95rem;
    color: var(--text);
    overflow-wrap: anywhere;
    transition: transform .18s, box-shadow .18s;
}
.charity-list a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: var(--dark); }
.charity-list .logo { height: 3.5rem; max-width: 100%; padding: 0; }
.charity-list .go { font-size: .78rem; font-weight: 700; color: var(--dark); background: var(--tint); border-radius: 999px; padding: .2rem .7rem; }
.charity-list .mark { width: 3.5rem; height: 3.5rem; }

.site-foot { margin-top: 4.5rem; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.site-foot-inner { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: var(--muted); font-size: .92rem; }

/* The look choice on "Our page": two small drawings of the two looks. */
fieldset.looks { flex-direction: row; flex-wrap: wrap; gap: .75rem; margin: .75rem 0 .25rem; }
fieldset.looks legend { font-weight: 600; color: var(--dark); font-size: .92rem; margin-bottom: .5rem; padding: 0; }
.look-choice { flex: 1 1 14rem; display: grid; gap: .6rem; padding: .8rem; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; font-weight: 500; color: var(--text); position: relative; }
.look-choice:has(input:checked) { border-color: var(--dark); box-shadow: 0 0 0 1px var(--dark); background: var(--tint); }
.look-choice input { position: absolute; z-index: 1; top: .9rem; inset-inline-end: .9rem; width: 1.1rem; height: 1.1rem; accent-color: var(--dark); }
.look-name { display: flex; align-items: center; gap: .4rem; }
.look-name strong { color: var(--dark); }
.look-thumb { position: relative; display: block; height: 6.5rem; border-radius: 10px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.look-thumb i, .look-thumb b, .look-thumb em { position: absolute; display: block; border-radius: 4px; }
.look-thumb.soft { background: linear-gradient(180deg, color-mix(in srgb, var(--light) 60%, #fff), #fff); }
.look-thumb.soft i { left: 8%; top: 22%; width: 38%; height: 14%; background: var(--dark); }
.look-thumb.soft b { left: 8%; top: 44%; width: 30%; height: 7%; background: var(--line); }
.look-thumb.soft em { right: 8%; top: 16%; width: 38%; height: 58%; border-radius: 8px; background: color-mix(in srgb, var(--mix) 55%, #fff); }
.look-thumb.picture { background: linear-gradient(180deg, color-mix(in srgb, var(--mix) 60%, #fff) 0, color-mix(in srgb, var(--dark) 85%, #000) 75%); }
.look-thumb.picture i { left: 8%; top: 46%; width: 50%; height: 14%; background: #fff; }
.look-thumb.picture b { left: 8%; top: 66%; width: 34%; height: 7%; background: color-mix(in srgb, #fff 60%, transparent); }
.look-thumb.picture em { left: 8%; right: 8%; bottom: 0; height: 10%; border-radius: 4px 4px 0 0; background: #fff; }

@media (max-width: 860px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
    .site-hero { padding: 2.75rem 1rem 2.5rem; }
    .bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .landing-section { padding: 2.5rem 1rem 0; }
    .hero-badge { width: min(14rem, 100%); }
    .bento:not(.strip) > .bento-card:nth-child(3):last-child { grid-column: auto; }
    .bento:not(.strip) > .bento-card:nth-child(4):last-child { grid-column: 1 / -1; }
    .photo-hero-inner { padding: 5rem 1rem 4.5rem; }
}
@media (max-width: 560px) {
    .bento, .bento.strip { grid-template-columns: minmax(0, 1fr); }
    .bento-card.wide, .bento:not(.strip) > .bento-card:nth-child(n):last-child { grid-column: auto; }
    .bento-card { min-height: 0; }
    .site-nav-inner { padding: .6rem 1rem; }
    .site-link { display: none; }
    .contact-band { padding: 1.75rem 1.25rem; }
    .contact-ways, .contact-ways .btn, .hero-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .btn.pill, .bento-card, .charity-list a { transition: none; } .btn.pill:hover, .bento-card:hover, .charity-list a:hover { transform: none; } }
@media print { .site-nav, .site-foot { display: none !important; } }
