/* Bimah Rota – built for older eyes: large type, high contrast, big touch targets. */
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.f1f8a8210104.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.13a58e05dfd2.woff2") format("woff2"); }

:root {
  --navy: #1E3A8A; --navy-dark: #14213D; --ink: #14213D; --ink-2: #3A4659; --ink-3: #4A5568;
  --ground: #F4F6F9; --card: #FFFFFF; --line: #D5DBE5; --line-2: #C5CDD9; --field: #6B778A;
  --sky: #E8EEF9; --sky-2: #DCE4F5;
  --amber-bg: #FEF3C7; --amber-ink: #7C4A03;
  --orange-bg: #FFF7ED; --orange-line: #FDBA74; --orange-ink: #9A3412; --orange-pill: #FFEDD5;
  --purple-bg: #EDE9FE; --purple-ink: #5B21B6;
  --radius: 14px; --radius-lg: 18px;
  --tap: 3.5rem;
}
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html.text-large { font-size: 118.75%; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.1875rem; line-height: 1.45; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2.125rem; line-height: 1.15; }
h2 { font-size: 1.375rem; line-height: 1.25; }
a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
strong, .strong { font-weight: 700; }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-3); font-size: 1.0625rem; }
.lead { font-size: 1.1875rem; color: var(--ink-2); margin-top: .5rem; }
code { font-size: .95em; }
.icon { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: .5rem; top: -4rem; background: var(--card); padding: .75rem 1rem; border-radius: 10px; z-index: 50; }
.skip-link:focus { top: .5rem; }

/* Layout */
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack-sm { display: flex; flex-direction: column; gap: .75rem; }
.stack-xs { display: flex; flex-direction: column; gap: .375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .625rem; }
.btn-row > form, .btn-row > a { flex: 1 1 10rem; display: flex; }
.btn-row > form > .btn { flex: 1; }
.btn-col { display: flex; flex-direction: column; gap: .625rem; }
.narrow { max-width: 36rem; }
.shell { display: flex; min-height: 100vh; }
.content { flex: 1; min-width: 0; padding: 1.75rem 1.25rem 7rem; max-width: 72rem; }
.content:focus { outline: none; }
.dash-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); margin-top: 1.25rem; }
.page-head { margin-bottom: 1.25rem; }
.page-head + .dash-grid { margin-top: 0; }
.page-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-end; }
.eyebrow { color: var(--ink-3); font-size: 1.0625rem; margin-bottom: .25rem; }

/* Public (sign-in) pages */
.public-main { max-width: 26rem; margin: 0 auto; padding: 2.25rem 1.5rem 2rem; display: flex; flex-direction: column; gap: 1.5rem; min-height: 100vh; }
.public-main > .help-box { margin-top: auto; }

/* Brand */
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-mark { width: 3rem; height: 3rem; border-radius: 12px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 1.25rem; }
.brand-sub { color: var(--ink-3); font-size: 1rem; }
.brand-invert .brand-mark { background: rgba(255,255,255,.12); }
.brand-invert .brand-sub { color: var(--sky-2); }

/* Navigation */
.sidenav { display: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: .25rem; background: var(--card);
  border-top: 1px solid var(--line); padding: .5rem .5rem calc(.75rem + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .5rem 0; min-height: var(--tap);
  border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: .9375rem; font-weight: 700;
  text-align: center; line-height: 1.15; min-width: 0; }
.tabbar a[aria-current="page"] { background: var(--sky); color: var(--navy); }
@media (min-width: 900px) {
  .tabbar { display: none; }
  .sidenav { display: flex; flex-direction: column; gap: .5rem; width: 15rem; flex-shrink: 0; background: var(--navy); color: #fff; padding: 1.75rem 1rem; position: sticky; top: 0; height: 100vh; }
  .sidenav .brand { padding: 0 .5rem 1.25rem; }
  .side-link { display: flex; align-items: center; gap: .75rem; min-height: var(--tap); padding: 0 .875rem; border-radius: 12px; color: #fff; text-decoration: none; font-weight: 700; }
  .side-link:hover { background: rgba(255,255,255,.1); color: #fff; }
  .side-link[aria-current="page"] { background: #fff; color: var(--navy); }
  .side-foot { margin-top: auto; border-top: 1px solid #3B5BA5; padding: 1rem .5rem 0; display: flex; flex-direction: column; gap: .5rem; }
  .side-foot .link-button { color: #fff; }
  .content { padding: 2rem 2.25rem 3rem; }
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  /* Page actions sit on one line at the right of the heading. */
  .page-head-row > .btn-row { flex-wrap: nowrap; margin-left: auto; }
  .page-head-row > .btn-row > a, .page-head-row > .btn-row > form { flex: 0 0 auto; }
  .page-head-row > .btn-row .btn { white-space: nowrap; }
  /* Shortcuts for phones and tablets, where the side menu isn't shown. */
  .only-small, .btn-row > a.only-small { display: none; }
}

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-pad { padding: 1.125rem; }
.card-head { background: var(--navy); color: #fff; padding: .75rem 1.125rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0; }
.card-head h2 { font-size: 1.125rem; }
.card-body { padding: 1.125rem; }
.pill-invert { background: #fff; color: var(--navy); border-radius: 999px; padding: .125rem .75rem; font-weight: 700; font-size: 1.0625rem; white-space: nowrap; }
.card-alert { background: var(--orange-bg); border: 2px solid var(--orange-line); border-radius: var(--radius-lg); padding: 1.125rem; }
.quote { font-style: italic; color: var(--ink-2); }
.note-text { background: var(--ground); border-radius: 10px; padding: .75rem; }

/* Role lines */
.role-line { display: flex; gap: .875rem; align-items: center; }
.role-icon { width: 3rem; height: 3rem; border-radius: 12px; background: var(--sky); color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.role-icon-lg { width: 3.5rem; height: 3.5rem; border-radius: 14px; }
.role-title { font-size: 1.625rem; font-weight: 700; line-height: 1.2; }
.role-name { font-size: 1.25rem; font-weight: 700; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .625rem; }
.facts li, .icon-line { display: flex; gap: .75rem; align-items: center; }
.facts .icon { color: var(--ink-3); }
.icon-line .icon { color: var(--navy); }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.done-line { display: flex; align-items: center; gap: .625rem; color: var(--navy); font-weight: 700; }

/* Chips */
.chip { display: inline-block; align-self: flex-start; white-space: nowrap; border-radius: 999px; padding: .125rem .75rem; font-size: 1rem; font-weight: 700; background: var(--sky); color: var(--navy); }
.chip-shabbat { background: var(--amber-bg); color: var(--amber-ink); }
.chip-festival { background: var(--amber-bg); color: var(--amber-ink); }
.chip-simcha { background: var(--purple-bg); color: var(--purple-ink); }
.chip-need { background: var(--orange-pill); color: var(--orange-ink); }
.chip-ok { background: var(--sky); color: var(--navy); }
.chip-muted { background: #EEF1F5; color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .625rem; min-height: var(--tap); padding: .5rem 1.25rem;
  border-radius: 12px; border: 2px solid transparent; font-size: 1.1875rem; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--sky); }
.btn-neutral { background: var(--ground); color: var(--ink); border-color: var(--line-2); }
.btn-quiet { background: transparent; color: var(--navy); }
.btn-warn-outline { background: #fff; color: var(--orange-ink); border-color: var(--orange-ink); }
.btn-lg { min-height: 4rem; font-size: 1.3125rem; }
.btn-xl { min-height: 4.5rem; justify-content: flex-start; padding: .75rem 1.25rem; width: 100%; }
.btn-two-line { display: flex; flex-direction: column; align-items: flex-start; gap: .125rem; font-size: 1.3125rem; }
.btn-sub { font-size: 1rem; font-weight: 400; color: var(--sky-2); }
.btn-small { min-height: 2.75rem; padding: .25rem .875rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-inline { align-self: flex-start; }
.link-button { background: none; border: none; padding: .25rem 0; min-height: 2.75rem; color: var(--navy); text-decoration: underline; cursor: pointer; font-weight: 700; }
.back-link { display: inline-flex; align-items: center; gap: .375rem; min-height: 3rem; font-weight: 700; text-decoration: none; align-self: flex-start; }
.text-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; min-height: 2.75rem; }

/* Forms */
.label { font-weight: 700; font-size: 1.1875rem; display: block; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.input { width: 100%; min-height: 3.75rem; padding: .5rem 1rem; border: 2px solid var(--field); border-radius: 12px; background: #fff; font-size: 1.25rem; }
textarea.input { min-height: 5rem; resize: vertical; }
.input:disabled { background: var(--ground); color: var(--ink-2); }
.input-small { min-height: 2.75rem; font-size: 1.0625rem; padding: .25rem .5rem; }
.input-code { min-height: 4.75rem; font-size: 2.375rem; font-weight: 700; letter-spacing: .6em; text-align: center; border-width: 3px; border-color: var(--navy); padding-left: 1.2rem; }
.input[aria-invalid="true"] { border-color: var(--orange-ink); }
.field-error { color: var(--orange-ink); font-weight: 700; }
.check-card { display: flex; gap: .875rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; cursor: pointer; }
.check-card input { width: 1.75rem; height: 1.75rem; margin: 0; flex-shrink: 0; accent-color: var(--navy); }
.check-card > span { display: flex; flex-direction: column; gap: .25rem; }
.check-card > .icon-line { flex-direction: row; align-items: center; gap: .625rem; }
.check-card > .icon-line .icon { color: var(--navy); }
.choices { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .625rem; }
.choices legend { font-size: 1.375rem; font-weight: 700; padding: 0; margin-bottom: .625rem; }
.choice { display: flex; gap: .875rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; cursor: pointer; }
.choice:has(input:checked) { border: 3px solid var(--navy); padding: calc(1rem - 2px); }
.choice input { width: 1.625rem; height: 1.625rem; margin: .125rem 0 0; flex-shrink: 0; accent-color: var(--navy); }
.choice > span { display: flex; flex-direction: column; gap: .25rem; }
.choice-title { font-size: 1.25rem; font-weight: 700; }
.choice-body { color: var(--ink-2); font-size: 1.0625rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--ink-3); font-size: 1.0625rem; margin-top: 1.25rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* Messages */
.messages { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.msg { display: flex; gap: .625rem; align-items: flex-start; border-radius: 12px; padding: .875rem 1rem; font-weight: 700; }
.msg-success { background: var(--navy); color: #fff; font-size: 1.25rem; padding: 1.125rem 1.25rem; }
.msg-error, .msg-warning { background: var(--orange-pill); color: #7C2D12; }
.msg-info { background: var(--sky); color: var(--ink); }
.notice { display: flex; gap: .75rem; align-items: flex-start; background: var(--sky); border-radius: var(--radius); padding: 1rem; }
.notice .icon { color: var(--navy); margin-top: .125rem; }
.notice-warn { background: var(--orange-bg); }
.notice-warn .icon { color: var(--orange-ink); }
.help-box { display: flex; gap: .875rem; align-items: flex-start; background: var(--sky); border-radius: var(--radius); padding: 1rem; font-size: 1.0625rem; }
.help-box .icon { color: var(--navy); margin-top: .125rem; }
.big-check { width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; }

/* Lists of duties */
.row-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .625rem; }
.row-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .875rem; display: flex; gap: .875rem; align-items: center; }
.row-card-flat { border: none; padding: .5rem 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .125rem; }
.row-title { font-size: 1.25rem; font-weight: 700; }
.date-block { width: 3.625rem; flex-shrink: 0; border-radius: 10px; background: var(--sky); color: var(--navy); display: flex; flex-direction: column; align-items: center; padding: .375rem 0; font-size: .875rem; font-weight: 700; line-height: 1.15; }
.date-day { font-size: 1.5rem; }
.cta-banner { display: flex; align-items: center; gap: .75rem; background: var(--sky); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--ink); }
.cta-banner > span { flex: 1; display: flex; flex-direction: column; gap: .125rem; }
.cta-sub { color: var(--navy); font-weight: 700; font-size: 1.0625rem; }

/* Open slots */
.filter-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-chip { flex: 1 1 5rem; display: flex; align-items: center; justify-content: center; min-height: 3.125rem; padding: 0 1rem; border-radius: 999px; border: 2px solid var(--navy); color: var(--navy); background: #fff; font-weight: 700; text-decoration: none; font-size: 1.0625rem; }
.filter-chip[aria-current="true"] { background: var(--navy); color: #fff; }
.slot-groups { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .slot-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.group-head { display: flex; flex-direction: column; gap: .375rem; }
.group-sub { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.slot-card { padding: .875rem 1rem; display: flex; flex-direction: column; gap: .75rem; }
.slot-status { display: flex; gap: .5rem; align-items: center; color: var(--ink-2); font-size: 1.0625rem; }
.dots { display: inline-flex; gap: .25rem; }
.dot { width: .875rem; height: .875rem; border-radius: 50%; border: 2px solid var(--navy); background: #fff; }
.dot-filled { background: var(--navy); }
.status-urgent { color: var(--orange-ink); font-weight: 700; }

/* Open slots: one row per date */
.date-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.date-row { padding: 1rem; display: flex; flex-direction: column; gap: .875rem; }
.date-row-head { display: flex; gap: .875rem; align-items: flex-start; }
.date-row-head .chip { margin-top: .25rem; max-width: 100%; white-space: normal; }
.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; grid-template-columns: minmax(0, 1fr); }
.job { background: var(--ground); border-radius: 12px; padding: .75rem; display: flex; flex-direction: column; gap: .75rem; }
.job-open { background: var(--orange-bg); border: 2px solid var(--orange-line); padding: calc(.75rem - 2px); }
.job-mine { background: var(--sky); }
.job-top { display: flex; flex-direction: column; gap: .375rem; }
.job-text { display: contents; }
.job .role-icon { display: none; }
.job-name { font-size: 1.1875rem; font-weight: 700; line-height: 1.2; display: flex; align-items: center; gap: .5rem; }
.job-name .icon { color: var(--navy); }
.job .slot-status { flex-wrap: wrap; gap: .25rem .5rem; }
.job .slot-status > span:last-child { white-space: nowrap; }
.slot-status.status-urgent { color: var(--orange-ink); font-weight: 700; }
/* The button or note always sits at the bottom, the same height in every box. */
.job-action { margin-top: auto; display: flex; align-items: center; }
.job-action > form { width: 100%; }
.job-note { color: var(--ink-2); font-weight: 700; font-size: 1.0625rem; display: flex; align-items: center; gap: .5rem; padding-left: .25rem; }
.job-note-mine { color: var(--navy); }
/* Tablet and up: three jobs side by side under the date */
@media (min-width: 700px) {
  .jobs { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .job-action { min-height: var(--tap); }  /* same height in every box, so they line up */
}
/* Wide screens: date on the left, jobs on the right, all in one line */
@media (min-width: 1300px) {
  .date-row { flex-direction: row; align-items: stretch; }
  .date-row-head { width: 17rem; flex-shrink: 0; }
  .jobs { flex: 1; }
}

/* Members (coordinators) */
.member-search { display: flex; gap: .5rem; margin-bottom: 1rem; }
.member-search .input { flex: 1; min-width: 0; }
.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.member-row { display: flex; align-items: center; gap: .875rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: .75rem 1rem; color: var(--ink); text-decoration: none; min-height: var(--tap); }
.member-row:hover { border-color: var(--navy); color: var(--ink); }
.member-row > .icon { color: var(--ink-3); flex-shrink: 0; }
.member-initials { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--sky); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.member-initials-off { background: #EEF1F5; color: var(--ink-3); }
.member-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .125rem; }
.member-name { font-weight: 700; font-size: 1.1875rem; display: flex; flex-wrap: wrap; gap: .375rem .5rem; align-items: center; }
.member-email { overflow-wrap: anywhere; font-size: 1.0625rem; }
.member-meta { display: none; flex-direction: column; align-items: flex-end; gap: .125rem; font-size: 1.0625rem; text-align: right; }
@media (min-width: 700px) { .member-meta { display: flex; } }
.pager { align-items: center; margin-top: 1rem; }

/* "Are you sure?" pages */
.confirm-main { font-size: 1.375rem; font-weight: 700; }
.btn-danger { background: #9A3412; color: #fff; }
.btn-danger:hover { background: #7C2D12; color: #fff; }

/* Coordinator rota */
.rota-service { padding: 1rem; display: flex; flex-direction: column; gap: .875rem; }
.rota-service-head { display: flex; gap: .875rem; align-items: center; }
.rota-slots { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.rota-slot { background: var(--sky); border-radius: 12px; padding: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.rota-slot-short { background: var(--orange-pill); }
.rota-slot-title { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.rota-count { margin-left: auto; font-size: 1rem; }
.rota-person { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.rota-add { display: flex; gap: .5rem; }
.rota-add select { flex: 1; min-width: 0; }

@media print {
  .tabbar, .sidenav, .rota-add, .btn, .link-button { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .content { padding: 0; }
  .card, .rota-slot { break-inside: avoid; border: 1px solid #999; }
}
