/* Kehila. Design based on "unslop" by Damir Sokolovsky (github.com/heydamir/unslop), CC BY 4.0.
   World: the shul lobby notice board, paper sign up sheets, Florida daylight. One accent: palm green. */
@font-face { font-family: "Atkinson Next"; src: url(/fonts/atkinsonhyperlegiblenext.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson Mono"; src: url(/fonts/atkinsonhyperlegiblemono.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Young Serif"; src: url(/fonts/youngserif.woff2) format("woff2"); font-weight: 400; font-display: swap; }
:root {
  --page: #f6f2ea; --card: #fdfbf7; --raised: #efe9df; --deep: #e7dfd2;
  --line: rgba(31, 27, 22, .11); --line-2: rgba(31, 27, 22, .2);
  --text: #1f1b16; --text-2: #574e43; --muted: #6c6357;
  --accent: #2b6548; --accent-ink: #ffffff; --accent-soft: #e3ece4;
  --neg: #b42318;
  --sans: "Atkinson Next", ui-serif, Georgia, serif; --mono: "Atkinson Mono", ui-monospace, monospace; --serif: "Young Serif", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r-sm: 6px; --r: 10px; --r-card: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 18px/28px var(--sans); font-feature-settings: "tnum" 0; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 50; }
[hidden] { display: none !important; }

/* header and navigation */
.bar { position: sticky; top: 0; z-index: 20; background: var(--page); border-bottom: 1px solid var(--line); padding: 0 20px; padding-top: env(safe-area-inset-top); }
.brand { display: flex; align-items: center; gap: 8px; height: 60px; text-decoration: none; color: var(--text); max-width: 680px; margin: 0 auto; }
.mark { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.word { font: 400 22px/1 var(--serif); }
.where { font-size: 16px; color: var(--text-2); margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line-2); line-height: 20px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 68px; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 16px; transition: color .15s var(--ease); }
.tabs a svg { width: 26px; height: 26px; }
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* page */
main { outline: none; }
.page { max-width: 680px; margin: 0 auto; padding: 24px 20px 40px; }
.loading { color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 400; }
.title { font: 400 32px/38px var(--serif); margin: 4px 0 4px; }
.lede { color: var(--text-2); margin: 0 0 24px; }
.sec { margin-top: 32px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font: 600 20px/28px var(--sans); }
.sec-h a { font-size: 17px; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 16px; line-height: 24px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; color: var(--text-2); text-decoration: none; font-size: 17px; margin: -8px 0 4px -6px; padding-right: 8px; }

/* cards and rows */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 20px; }
.item h3 { font: 600 19px/26px var(--sans); }
.item p { margin: 4px 0 0; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--text-2); font-size: 16px; line-height: 24px; margin-top: 8px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .ic { width: 18px; height: 18px; color: var(--muted); }
.kind { font-size: 15px; color: var(--text-2); background: var(--raised); border-radius: var(--r-sm); padding: 2px 8px; display: inline-block; margin-bottom: 8px; line-height: 22px; }
.tag-sample { font-size: 14px; line-height: 20px; color: var(--text-2); border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: 1px 8px; margin-left: 8px; vertical-align: 2px; white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.linkbtn { background: none; border: 0; padding: 8px 4px; min-height: 44px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 16px; }
.empty { border: 1px dashed var(--line-2); border-radius: var(--r-card); padding: 24px 20px; color: var(--text-2); }
.empty p { margin: 0 0 16px; }

/* nav list (boards) */
.nav-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.nav-list li + li { border-top: 1px solid var(--line); }
.nav-list a { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 12px 20px; color: var(--text); text-decoration: none; transition: background .15s var(--ease); }
.nav-list a:hover { background: var(--raised); }
.nav-list .ic { color: var(--accent); width: 26px; height: 26px; }
.nav-list b { font-weight: 600; display: block; }
.nav-list small { display: block; color: var(--text-2); font-size: 16px; line-height: 22px; }
.nav-list .chev { margin-left: auto; color: var(--muted); width: 20px; height: 20px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-weight: 600; font-size: 18px; text-decoration: none; cursor: pointer; transition: background .15s var(--ease), transform .12s var(--ease), border-color .15s var(--ease); }
.btn:hover { background: var(--raised); }
.btn:active { transform: scale(.98); }
.btn.pri { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.pri:hover { background: #24573e; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn .ic { width: 20px; height: 20px; }
.btn.in { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.fab { position: fixed; right: 20px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 15; box-shadow: 0 8px 24px rgba(31, 27, 22, .14); }

/* minyan card and the tally (signature) */
.minyan { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; scroll-margin-top: 80px; }
.minyan.full { border-color: var(--accent); }
.m-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.m-time { font: 400 30px/34px var(--serif); }
.m-type { font: 600 19px/26px var(--sans); margin-top: 4px; }
.m-day { color: var(--text-2); font-size: 16px; }
.tally { display: flex; gap: 6px; margin: 16px 0 8px; }
.tally i { flex: 1; height: 12px; border-radius: 3px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.tally i.on { background: var(--accent); box-shadow: none; }
.count { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 16px; color: var(--text-2); }
.count b { color: var(--text); font-weight: 500; }
.full .count b { color: var(--accent); }
.names { color: var(--text-2); font-size: 16px; line-height: 24px; margin-top: 4px; }
.pending { border-style: dashed; }

/* today slip (home moment) */
.slip { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: grid; gap: 12px; }
.slip-h { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.slip-h .heb { font: 400 22px/28px var(--serif); }
.slip-h .greg { color: var(--text-2); font-size: 16px; }
.z-grid { display: grid; grid-template-columns: 1fr; gap: 0 32px; }
@media (min-width: 560px) { .z-grid { grid-template-columns: 1fr 1fr; } }
.z-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 17px; }
.z-row span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.z-row.now span:first-child { color: var(--accent); font-weight: 600; }
.z-list .z-row { font-size: 18px; padding: 12px 0; }
.z-note { font-size: 15px; line-height: 22px; color: var(--muted); margin: 16px 0 0; }
.date-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 16px; }
.date-nav .btn { min-width: 52px; padding: 0 12px; }
.date-nav strong { font-weight: 600; text-align: center; }

/* ads */
.ad-label { font-size: 14px; line-height: 20px; color: var(--muted); display: block; margin-bottom: 4px; }
.banner { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: var(--text); margin-top: 24px; }
.banner img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; display: block; background: var(--raised); }
.banner .b-text { padding: 12px 16px 16px; }
.banner b { font-weight: 600; }
.featured { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; text-decoration: none; color: var(--text); }
.featured .f-img { width: 88px; height: 88px; border-radius: var(--r); object-fit: cover; background: var(--raised); display: grid; place-items: center; color: var(--accent); }
.featured .f-img .ic { width: 36px; height: 36px; }
.featured b { font-weight: 600; display: block; }
.sponsored { border-style: solid; background: #fbf8f2; }

/* forms */
form.f { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field > span { font-weight: 600; }
.field small { color: var(--text-2); font-size: 16px; line-height: 22px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=datetime-local], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); font-size: 18px; line-height: 26px; }
textarea { min-height: 120px; resize: vertical; }
input[type=file] { max-width: 100%; font-size: 16px; }
.sample-note { font-size: 16px; color: var(--text-2); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); cursor: pointer; font-size: 17px; }
.choices input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.choices input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.err { color: var(--neg); margin: 0; }
.ok-box { background: var(--accent-soft); border-radius: var(--r-card); padding: 16px 20px; }
.ok-box p { margin: 0; }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 16px; padding: 0 20px 4px; scrollbar-width: none; }
.filters button { flex: none; min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--card); font-size: 16px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--page); border-color: var(--text); }

/* prices */
.prices { display: grid; gap: 12px; }
.price { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.price b { font-weight: 600; }
.price .amt { text-align: right; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price p { grid-column: 1 / -1; margin: 0; color: var(--text-2); font-size: 16px; line-height: 24px; }

/* sheet (install guide) */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(31, 27, 22, .4); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s var(--ease); }
.sheet-in { background: var(--card); width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; animation: rise .35s var(--ease); }
.sheet h2 { font: 400 26px/32px var(--serif); margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--raised); padding: 4px; border-radius: var(--r); margin: 16px 0; }
.seg button { min-height: 44px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; font-size: 17px; }
.seg button[aria-pressed="true"] { background: var(--card); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; counter-increment: s; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-family: var(--mono); }
.steps .ic { width: 20px; height: 20px; vertical-align: -4px; color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); background: var(--text); color: var(--page); padding: 12px 20px; border-radius: var(--r); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); z-index: 60; max-width: calc(100% - 40px); font-size: 17px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
footer.foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; line-height: 22px; }
footer.foot a { color: var(--text-2); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* wider screens: tabs move into the header */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 32px; }
  .brand { margin: 0; }
  .tabs { position: static; display: flex; gap: 4px; background: none; border: 0; padding: 0; }
  .tabs a { flex-direction: row; min-height: 44px; padding: 0 14px; border-radius: var(--r); font-size: 17px; gap: 8px; }
  .tabs a svg { width: 20px; height: 20px; }
  .tabs a:hover { background: var(--raised); color: var(--text); }
  .tabs a[aria-current="page"] { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
  .page { padding-top: 40px; }
  .fab { position: static; box-shadow: none; }
  .home-grid { display: grid; grid-template-columns: 1fr; }
  .toast { bottom: 32px; }
}
