/* Public site styles. Every colour, font and size comes from the design spec
   (CSS variables written by Design.BuildCss) or from the data-* options on
   <body>. Layout uses logical properties only, so it works in RTL and LTR. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--kh-bg);
  color: var(--kh-text);
  font-family: var(--kh-font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--kh-font-heading); font-weight: var(--kh-heading-weight, 700); line-height: 1.15; margin: 0 0 .6em;
  text-wrap: balance; text-transform: var(--kh-heading-transform, none); letter-spacing: var(--kh-heading-tracking, normal);
}
h1 { font-size: var(--kh-h1); }
h2 { font-size: var(--kh-h2); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--kh-primary); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--kh-accent); outline-offset: 3px; }

.kh-container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
.kh-section { padding-block: var(--kh-section-pad); position: relative; }

.kh-skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 10;
  background: var(--kh-primary); color: var(--kh-on-primary); padding: 10px 16px; border-radius: var(--kh-radius);
}
.kh-skip-link:focus { top: 12px; }

/* ---- Background texture (plain sections show it; others cover it) -------- */
body[data-texture="dots"] { background-image: radial-gradient(color-mix(in srgb, var(--kh-text) 11%, transparent) 1px, transparent 1.5px); background-size: 22px 22px; }
body[data-texture="lines"] { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--kh-text) 5%, transparent) 0 1px, transparent 1px 14px); }
body[data-texture="grid"] {
  background-image: linear-gradient(color-mix(in srgb, var(--kh-text) 6%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--kh-text) 6%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ---- Card style: prayer boxes, events, Shabbat boxes, embedded forms ------- */
body[data-cards="flat"] :is(.kh-prayer__table, .kh-prayer__card, .kh-event, .kh-shabbat__item, .kh-embed--card .kh-embed__form, .kh-card) { border-color: transparent; }
/* Footer: columns and minimal layouts */
.kh-footer--columns .kh-footer__inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; align-items: start; }
.kh-footer--columns .kh-footer__brand strong { font-family: var(--kh-font-heading); font-size: 1.3rem; }
.kh-footer--columns .kh-footer__contact { display: flex; flex-direction: column; gap: 6px; }
.kh-footer--columns .kh-footer__links { flex-direction: column; gap: 6px; }
.kh-footer--columns .kh-footer__copyright { grid-column: 1 / -1; border-top: 1px solid currentColor; padding-top: 16px; opacity: .75; }
.kh-footer--minimal { padding-block: 18px; }
.kh-footer--minimal .kh-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; font-size: .9rem; }
.kh-footer--minimal .kh-footer__contact { display: none; }
.kh-footer--minimal .kh-footer__copyright { order: -1; margin: 0; }
body[data-cards="raised"] :is(.kh-prayer__table, .kh-prayer__card, .kh-event, .kh-shabbat__item, .kh-embed--card .kh-embed__form, .kh-card) {
  border-color: transparent; box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 14px 34px -18px rgb(0 0 0 / .32);
}

/* ---- Section backgrounds ------------------------------------------------ */
.kh-bg--surface { background: var(--kh-surface); }
.kh-bg--tint { background: color-mix(in srgb, var(--kh-primary) 7%, var(--kh-bg)); }
.kh-bg--primary { background: var(--kh-primary); color: var(--kh-on-primary); }
.kh-bg--primary a:not(.kh-btn), .kh-bg--primary h1, .kh-bg--primary h2, .kh-bg--primary h3,
.kh-bg--primary .kh-hero__eyebrow, .kh-bg--primary .kh-prayer__table caption, .kh-bg--primary .kh-prayer__card h3 { color: inherit; }
.kh-bg--primary .kh-hero__body, .kh-bg--primary .kh-prayer__note { color: inherit; opacity: .88; }
.kh-bg--primary .kh-prayer__table, .kh-bg--primary .kh-prayer__card { color: var(--kh-text); }
.kh-bg--primary .kh-prayer__table caption, .kh-bg--primary .kh-prayer__card h3 { color: var(--kh-primary); }

/* ---- Dividers between sections ------------------------------------------- */
body[data-divider="line"] main > section + section { border-block-start: 1px solid var(--kh-border); }
body[data-divider="ornament"] main > section + section::before {
  content: "\2726"; position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  color: var(--kh-accent); font-size: 1.1rem; line-height: 1; z-index: 1;
}
body[data-divider="wave"] main > section + section::before {
  content: ""; position: absolute; top: -7px; inset-inline: 0; height: 14px; background: var(--kh-accent); opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='14'%3E%3Cpath d='M0 7 Q12 0 24 7 T48 7' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") repeat-x center / 48px 14px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='14'%3E%3Cpath d='M0 7 Q12 0 24 7 T48 7' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") repeat-x center / 48px 14px;
}

/* ---- Buttons ----------------------------------------------------------- */
.kh-btn {
  display: inline-block; padding: 12px 24px; border-radius: var(--kh-radius); font-weight: 700;
  text-decoration: none; border: 2px solid var(--kh-primary); transition: opacity .15s, transform .15s; line-height: 1.2;
}
.kh-btn:hover { opacity: .9; transform: translateY(-1px); }
.kh-btn--primary { background: var(--kh-primary); color: var(--kh-on-primary); }
.kh-btn--secondary { background: transparent; color: var(--kh-primary); }
body[data-buttons="pill"] .kh-btn { border-radius: 999px; }
body[data-buttons="outline"] .kh-btn--primary { background: transparent; color: var(--kh-primary); }
body[data-buttons="outline"] .kh-btn--secondary { border-color: transparent; }
body[data-buttons="underline"] .kh-btn { background: transparent; color: var(--kh-primary); border: 0; border-block-end: 2px solid var(--kh-accent); border-radius: 0; padding-inline: 2px; }
.kh-bg--primary .kh-btn--primary { background: var(--kh-on-primary); color: var(--kh-primary); border-color: var(--kh-on-primary); }
.kh-bg--primary .kh-btn--secondary { color: var(--kh-on-primary); border-color: var(--kh-on-primary); }
body[data-buttons="underline"] .kh-bg--primary .kh-btn { background: transparent; color: var(--kh-on-primary); }
/* Outline buttons on a primary-coloured section: draw them in the contrasting colour, never in the section's own. */
body[data-buttons="outline"] .kh-bg--primary .kh-btn--primary { background: transparent; color: var(--kh-on-primary); border-color: var(--kh-on-primary); }
body[data-buttons="outline"] .kh-bg--primary .kh-btn--secondary { color: var(--kh-on-primary); border-color: transparent; }
body[data-buttons="underline"] .kh-bg--primary .kh-btn { border-block-end-color: var(--kh-on-primary); }

/* ---- Images ------------------------------------------------------------ */
.kh-img { border-radius: var(--kh-radius); object-fit: cover; }
body[data-images="square"] .kh-img { border-radius: 0; }
body[data-images="arch"] .kh-img { border-radius: 999px 999px var(--kh-radius) var(--kh-radius); }
body[data-images="framed"] .kh-img { border-radius: 0; padding: 8px; background: var(--kh-surface); border: 1px solid var(--kh-border); box-shadow: 0 10px 30px -18px rgb(0 0 0 / .35); }

/* ---- Header ------------------------------------------------------------ */
.kh-header { background: var(--kh-surface); border-block-end: 1px solid var(--kh-border); }
.kh-header__inner { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding-block: 14px; }
.kh-header__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--kh-text); font-family: var(--kh-font-heading); font-weight: var(--kh-heading-weight, 700); font-size: 1.3rem; }
.kh-header__brand img { height: 48px; width: auto; }
.kh-header__nav { margin-inline-start: auto; }
.kh-header__nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; }
.kh-header__nav a:not(.kh-btn) { color: var(--kh-text); text-decoration: none; padding-block: 6px; display: inline-block; }
.kh-header__nav a:not(.kh-btn):hover, .kh-header__nav a[aria-current="page"] { color: var(--kh-primary); }
.kh-header__nav a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -2px 0 var(--kh-accent); }
.kh-header__end { display: flex; align-items: center; gap: 16px; }
/* The header button: a donate button is emphasised (accent colour, a heart). */
.kh-header__cta { display: inline-flex; align-items: center; gap: 7px; }
.kh-header__cta-icon { flex: none; }
body .kh-header a.kh-header__cta--donate { background: var(--kh-accent); border-color: var(--kh-accent); color: var(--kh-on-accent, #fff); box-shadow: 0 4px 14px color-mix(in srgb, var(--kh-accent) 35%, transparent); }
body .kh-header a.kh-header__cta--donate:hover { filter: brightness(1.06); }
.kh-header__lang { color: var(--kh-muted); text-decoration: none; font-size: .95rem; }

.kh-header--centered .kh-header__inner { flex-direction: column; gap: 10px; padding-block: 22px 12px; }
.kh-header--centered .kh-header__brand { flex-direction: column; font-size: 1.5rem; text-align: center; }
.kh-header--centered .kh-header__brand img { height: 72px; }
.kh-header--centered .kh-header__nav { margin-inline-start: 0; }
.kh-header--centered .kh-header__nav ul { justify-content: center; }

/* Phone menu: the button and the copies inside the menu exist only on small screens. */
.kh-header { position: relative; }
.kh-header__toggle, .kh-header__menu-end { display: none; }
.kh-header__toggle {
  margin-inline-start: auto; width: 44px; height: 44px; padding: 0; border: 1px solid var(--kh-border);
  border-radius: 10px; background: transparent; color: var(--kh-text); cursor: pointer;
  align-items: center; justify-content: center; flex: none;
}
.kh-header__toggle-bars, .kh-header__toggle-bars::before, .kh-header__toggle-bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s;
}
.kh-header__toggle-bars { position: relative; }
.kh-header__toggle-bars::before, .kh-header__toggle-bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.kh-header__toggle-bars::before { top: -6px; }
.kh-header__toggle-bars::after { top: 6px; }
.kh-header--open .kh-header__toggle-bars { background: transparent; }
.kh-header--open .kh-header__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.kh-header--open .kh-header__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
.kh-header__toggle:focus-visible { outline: 3px solid var(--kh-accent); outline-offset: 2px; }

/* ---- Hero -------------------------------------------------------------- */
.kh-hero__eyebrow { color: var(--kh-accent); font-weight: 700; letter-spacing: .04em; margin-bottom: .7em; }
.kh-hero__body { font-size: 1.2rem; color: var(--kh-muted); max-width: 60ch; }
.kh-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.kh-hero--centered .kh-hero__text { text-align: center; max-width: 820px; margin-inline: auto; }
.kh-hero--centered .kh-hero__body { margin-inline: auto; }
.kh-hero--centered .kh-hero__actions { justify-content: center; }

.kh-hero--split .kh-hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.kh-hero__image { width: 100%; aspect-ratio: 4 / 3; }

.kh-hero--minimal .kh-hero__text { max-width: 900px; }
.kh-hero--minimal h1 { letter-spacing: -.01em; }
.kh-hero--minimal .kh-hero__eyebrow { text-transform: uppercase; font-size: .85rem; letter-spacing: .14em; }

/* Overlay laid over a photo background (any block, or a hero's photo): colour and strength are adjustable. */
.kh-section { --kh-ov-mix: color-mix(in srgb, var(--kh-ov-color, #000) calc(var(--kh-ov, .45) * 100%), transparent); }

/* Added elements below a block's own content */
.kh-extras { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.kh-extra--image { margin: 0; }
.kh-extra--image img { width: 100%; max-height: 560px; object-fit: cover; display: block; }
.kh-extra--buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.kh-hero--centered .kh-extras, .kh-hero--cover .kh-extras, .kh-hero--align-center .kh-extras { align-items: center; text-align: center; }
.kh-hero--centered .kh-extra--buttons, .kh-hero--cover .kh-extra--buttons, .kh-hero--align-center .kh-extra--buttons { justify-content: center; }

/* Photo behind the text: "banner" (text at the bottom) and "cover" (text in the middle). */
.kh-hero--ov-light { --kh-ov: .22; }
.kh-hero--ov-medium { --kh-ov: .42; }
.kh-hero--ov-strong { --kh-ov: .62; }
.kh-hero--banner {
  min-height: min(78vh, 680px); display: flex; align-items: flex-end;
  background: linear-gradient(to top, color-mix(in srgb, var(--kh-ov-color, #000) calc((var(--kh-ov, .42) + .3) * 100%), transparent), color-mix(in srgb, var(--kh-ov-color, #000) calc(var(--kh-ov, .42) * 35%), transparent) 70%), var(--kh-hero-img) center / cover no-repeat;
  color: #fff;
}
.kh-hero--cover {
  min-height: min(72vh, 640px); display: flex; align-items: center;
  background: linear-gradient(var(--kh-ov-mix), var(--kh-ov-mix)), var(--kh-hero-img) center / cover no-repeat;
  color: #fff;
}
.kh-hero--banner > .kh-container, .kh-hero--cover > .kh-container { width: 100%; }
:is(.kh-hero--banner, .kh-hero--cover) :is(h1, .kh-hero__eyebrow, .kh-hero__body) { color: #fff; }
:is(.kh-hero--banner, .kh-hero--cover) h1 { text-shadow: 0 2px 24px rgb(0 0 0 / .25); }
.kh-hero--banner .kh-hero__text { max-width: 760px; }
.kh-hero--cover .kh-hero__text { max-width: 860px; text-align: center; margin-inline: auto; }
.kh-hero--cover .kh-hero__body { margin-inline: auto; }
.kh-hero--cover .kh-hero__actions { justify-content: center; }
:is(.kh-hero--banner, .kh-hero--cover) .kh-btn--secondary { color: #fff; border-color: #fff; }
body[data-buttons="outline"] :is(.kh-hero--banner, .kh-hero--cover) .kh-btn--primary { color: #fff; border-color: #fff; }

/* Split with the photo first */
.kh-hero--img-start .kh-hero__image { order: -1; }

/* Alignment, for any hero layout */
.kh-hero--align-start .kh-hero__text { text-align: start; margin-inline: 0 auto; }
.kh-hero--align-start .kh-hero__body { margin-inline: 0; }
.kh-hero--align-start .kh-hero__actions { justify-content: flex-start; }
.kh-hero--align-center .kh-hero__text { text-align: center; margin-inline: auto; }
.kh-hero--align-center .kh-hero__body { margin-inline: auto; }
.kh-hero--align-center .kh-hero__actions { justify-content: center; }
.kh-hero--align-end .kh-hero__text { text-align: end; margin-inline: auto 0; }
.kh-hero--align-end .kh-hero__body { margin-inline: auto 0; }
.kh-hero--align-end .kh-hero__actions { justify-content: flex-end; }

/* Height */
.kh-hero--h-normal:is(.kh-hero--banner, .kh-hero--cover) { min-height: 0; }
.kh-hero--h-tall { min-height: min(80vh, 760px); display: flex; align-items: center; }
.kh-hero--h-full { min-height: calc(100svh - 76px); display: flex; align-items: center; }
.kh-hero--banner:is(.kh-hero--h-tall, .kh-hero--h-full) { align-items: flex-end; }
:is(.kh-hero--h-tall, .kh-hero--h-full) > .kh-container { width: 100%; }

/* ---- Rich text --------------------------------------------------------- */
.kh-richtext--narrow .kh-richtext__inner { max-width: 780px; }
.kh-richtext--columns .kh-richtext__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.kh-prose { max-width: 72ch; }
.kh-prose > :last-child { margin-bottom: 0; }
.kh-prose ul, .kh-prose ol { padding-inline-start: 1.4em; margin: 0 0 1em; }
.kh-prose blockquote { margin: 0 0 1em; padding-inline-start: 18px; border-inline-start: 4px solid var(--kh-accent); color: var(--kh-muted); font-style: italic; }

/* ---- Prayer times ------------------------------------------------------ */
.kh-prayer__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; align-items: start; }
.kh-prayer__table, .kh-prayer__card { width: 100%; background: var(--kh-surface); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); }
.kh-prayer__table { border-collapse: separate; border-spacing: 0; overflow: hidden; }
.kh-prayer__table caption, .kh-prayer__card h3 { font-family: var(--kh-font-heading); font-weight: 700; font-size: 1.15rem; text-align: start; padding: 14px 18px; margin: 0; color: var(--kh-primary); }
.kh-prayer__table th, .kh-prayer__table td { padding: 11px 18px; border-block-start: 1px solid var(--kh-border); }
.kh-prayer__table th { text-align: start; font-weight: 400; }
.kh-prayer__table td { text-align: end; font-weight: 700; font-variant-numeric: tabular-nums; }
.kh-prayer__card dl { margin: 0; }
.kh-prayer__card dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 18px; border-block-start: 1px solid var(--kh-border); }
.kh-prayer__card dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.kh-prayer__note { color: var(--kh-muted); margin-top: 18px; margin-bottom: 0; }

.kh-prayer--strip .kh-prayer__groups { grid-template-columns: 1fr; gap: 12px; }
.kh-prayer--strip .kh-prayer__card { display: flex; flex-wrap: wrap; align-items: center; }
.kh-prayer--strip .kh-prayer__card h3 { min-width: 170px; }
.kh-prayer--strip .kh-prayer__card dl { display: flex; flex-wrap: wrap; flex: 1; }
.kh-prayer--strip .kh-prayer__card dl > div { border: 0; flex-direction: column; gap: 0; padding: 10px 18px; }
.kh-prayer--strip .kh-prayer__card dt { font-size: .85rem; color: var(--kh-muted); }

/* ---- Image with text --------------------------------------------------- */
.kh-imagetext__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.kh-imagetext__image { width: 100%; aspect-ratio: 4 / 3; }
.kh-imagetext--image-end .kh-imagetext__image { order: 2; }
.kh-imagetext__action { margin: 24px 0 0; }

/* ---- Photo gallery ----------------------------------------------------- */
.kh-gallery__intro { color: var(--kh-muted); max-width: 64ch; }
.kh-gallery__items { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kh-gallery__items a { display: block; }
.kh-gallery__items img { width: 100%; aspect-ratio: 4 / 3; transition: transform .2s; }
.kh-gallery__items a:hover img { transform: scale(1.02); }
body[data-images="arch"] .kh-gallery__items img { border-radius: var(--kh-radius); }

.kh-gallery--mosaic .kh-gallery__items { grid-template-columns: repeat(4, 1fr); }
.kh-gallery--mosaic .kh-gallery__items li:first-child { grid-column: span 2; grid-row: span 2; }
.kh-gallery--mosaic .kh-gallery__items li:first-child img { height: 100%; aspect-ratio: auto; }

.kh-gallery--strip .kh-gallery__items { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-block-end: 10px; }
.kh-gallery--strip .kh-gallery__items li { flex: none; width: min(78vw, 380px); scroll-snap-align: start; }

/* ---- Text bar (often above the header) --------------------------------- */
.kh-textbar { padding-block: 10px; font-size: .95rem; }
.kh-textbar__inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 16px; }
.kh-textbar--start .kh-textbar__inner { justify-content: flex-start; }
.kh-textbar--end .kh-textbar__inner { justify-content: flex-end; }
.kh-textbar__text { margin: 0; }

/* Language switch (usually above the header): the current language marked, the others as links. */
.kh-langbar { padding-block: 6px; }
.kh-langbar__list { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.kh-langbar__item { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 10px; border-radius: 999px; color: inherit; text-decoration: none; font-size: .92rem; }
a.kh-langbar__item:hover { text-decoration: underline; text-underline-offset: 3px; }
.kh-langbar__item--current { font-weight: 700; background: color-mix(in srgb, currentColor 12%, transparent); }
.kh-textbar__link { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: inherit; }
.kh-top > .kh-section + .kh-section { border-top: 1px solid rgb(127 127 127 / .2); }
.kh-top > .kh-section::before, .kh-top > .kh-section::after { display: none; }

/* ---- Jewish calendar strip ---------------------------------------------- */
.kh-jcal { padding-block: 12px; font-size: .95rem; }
.kh-jcal__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; }
.kh-jcal--centered .kh-jcal__inner { justify-content: center; }
.kh-jcal__side { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.kh-jcal__side:empty { display: none; }
.kh-jcal__item { display: inline-flex; align-items: baseline; gap: .4em; white-space: nowrap; }
.kh-jcal__item + .kh-jcal__item::before { content: "·"; margin-inline: .7em; opacity: .55; }
.kh-jcal--centered .kh-jcal__side + .kh-jcal__side::before { content: "·"; margin-inline: .7em; opacity: .55; }
.kh-jcal__label { opacity: .75; }
.kh-jcal__value { font-weight: 700; }
.kh-jcal__item--bsd { font-weight: 700; letter-spacing: .02em; }
.kh-jcal__item--empty { display: none; }
@media (max-width: 760px) { .kh-jcal__inner { justify-content: center; text-align: center; } }

/* ---- Buttons, image, links ------------------------------------------------ */
.kh-buttons__intro, .kh-links__intro { color: var(--kh-muted); max-width: 64ch; }
.kh-buttons__row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.kh-buttons--align-center { text-align: center; }
.kh-buttons--align-center .kh-buttons__row { justify-content: center; }
.kh-buttons--align-center .kh-buttons__intro { margin-inline: auto; }
.kh-buttons--align-end { text-align: end; }
.kh-buttons--align-end .kh-buttons__row { justify-content: flex-end; }
.kh-buttons--align-end .kh-buttons__intro { margin-inline-start: auto; }
.kh-buttons--stacked .kh-buttons__row { flex-direction: column; max-width: 480px; }
.kh-buttons--stacked.kh-buttons--align-center .kh-buttons__row { margin-inline: auto; }
.kh-buttons--stacked.kh-buttons--align-end .kh-buttons__row { margin-inline-start: auto; }
.kh-buttons--stacked .kh-btn { text-align: center; }

.kh-image__figure { margin: 0 auto; }
.kh-image__figure img { width: 100%; display: block; }
.kh-image--medium .kh-image__figure { max-width: 760px; }
.kh-image--full .kh-image__figure img { border-radius: 0; padding: 0; border: 0; box-shadow: none; max-height: 80vh; object-fit: cover; }
.kh-image--full { padding-block: 0; }
.kh-image figcaption { margin-top: 12px; color: var(--kh-muted); font-size: .95rem; text-align: center; }
.kh-image--full figcaption { padding-inline: 16px; padding-block-end: 16px; }
.kh-image--framed .kh-image__figure { background: var(--kh-surface); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); padding: 18px; }

.kh-links__items { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.kh-links--cards .kh-links__items { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.kh-link a { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label arrow" "desc arrow" "host arrow"; align-items: center; column-gap: 14px; padding: 16px 18px; color: var(--kh-text); text-decoration: none; }
.kh-link a:hover .kh-link__label { color: var(--kh-primary); }
.kh-link__label { grid-area: label; font-weight: 700; }
.kh-link__desc { grid-area: desc; color: var(--kh-muted); font-size: .95rem; margin-top: 2px; }
.kh-link__host { grid-area: host; color: var(--kh-muted); font-size: .8rem; margin-top: 4px; }
.kh-link__host:empty { display: none; }
.kh-link__arrow { grid-area: arrow; width: 18px; height: 18px; fill: none; stroke: var(--kh-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .kh-link__arrow { transform: scaleX(-1); }

/* ---- CMS content: people, shiurim, announcements, FAQ ---------------------- */
.kh-card { background: var(--kh-surface); color: var(--kh-text); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); }
.kh-content__intro { color: var(--kh-muted); max-width: 64ch; }
.kh-bg--primary .kh-content__intro { color: inherit; opacity: .85; }
.kh-content__empty { border: 2px dashed var(--kh-border); border-radius: var(--kh-radius); padding: 18px; color: var(--kh-muted); }
.kh-people__items, .kh-shiurim__items, .kh-notices__items { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.kh-card h3 { font-size: 1.2rem; margin-bottom: .3em; }
.kh-card p { margin: 0 0 .6em; }
.kh-person__bio, .kh-shiur__desc, .kh-notice__text p, .kh-faq p { white-space: pre-line; }

.kh-people--grid .kh-people__items { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kh-person { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.kh-person__photo { width: 100%; aspect-ratio: 1; }
.kh-person__initials { width: 88px; height: 88px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in srgb, var(--kh-primary) 14%, var(--kh-surface)); color: var(--kh-primary); font-family: var(--kh-font-heading); font-size: 1.8rem; font-weight: 700; }
.kh-person__role { color: var(--kh-accent); font-weight: 700; }
.kh-person__bio { color: var(--kh-muted); }
.kh-person__contact { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .95rem; }
.kh-people--list .kh-person { flex-direction: row; align-items: flex-start; gap: 28px; padding: 24px; }
.kh-people--list .kh-person__photo { width: 220px; flex: none; }
.kh-people--list .kh-person__bio { color: var(--kh-text); max-width: 68ch; }

.kh-shiur { padding: 18px 20px; }
.kh-shiur__when { color: var(--kh-primary); font-weight: 700; }
.kh-shiur__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--kh-muted); }
.kh-shiur__desc { max-width: 68ch; }
.kh-shiurim--list .kh-shiur { display: grid; grid-template-columns: 190px 1fr; gap: 20px; }
.kh-shiurim--cards .kh-shiurim__items { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.kh-notice { overflow: hidden; }
.kh-notice__text { padding: 20px 22px; }
.kh-notice__date { display: block; color: var(--kh-accent); font-weight: 700; font-size: .9rem; margin-bottom: .4em; }
.kh-notice__image { width: 100%; aspect-ratio: 16 / 9; border-radius: 0; padding: 0; border: 0; box-shadow: none; }
.kh-notice__link { margin-top: 1em !important; }
.kh-notices--cards .kh-notices__items { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.kh-notices--latest .kh-notice { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; border-inline-start: 6px solid var(--kh-accent); }
.kh-notices--latest .kh-notice:not(:has(img)) { grid-template-columns: 1fr; }
.kh-notices--latest .kh-notice__image { height: 100%; aspect-ratio: auto; min-height: 220px; }

.kh-faq__inner { max-width: 820px; }
.kh-faq__item { border-block-end: 1px solid var(--kh-border); padding-block: 4px; }
.kh-faq__item summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 1.08rem; list-style-position: inside; }
.kh-faq__item[open] summary { color: var(--kh-primary); }
.kh-faq__item p { color: var(--kh-muted); margin: 0 0 14px; }
.kh-bg--primary .kh-faq__item p, .kh-bg--primary .kh-faq__item[open] summary { color: inherit; }
.kh-faq__list dt { font-weight: 700; font-size: 1.08rem; margin-top: 18px; }
.kh-faq__list dd { margin: 6px 0 0; color: var(--kh-muted); }

/* ---- Shabbat times ----------------------------------------------------- */
.kh-shabbat__items { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin: 0; }
.kh-shabbat__item { background: var(--kh-surface); color: var(--kh-text); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); padding: 20px 22px; }
.kh-shabbat__item dt { font-size: .9rem; color: var(--kh-muted); margin-bottom: 4px; }
.kh-shabbat__item dd { margin: 0; font-family: var(--kh-font-heading); font-weight: 700; font-size: 1.7rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kh-shabbat__item--parsha dd { color: var(--kh-primary); }
.kh-shabbat__date, .kh-shabbat__note { color: var(--kh-muted); margin: 16px 0 0; }
.kh-shabbat__date:empty { display: none; }
.kh-bg--primary .kh-shabbat__date, .kh-bg--primary .kh-shabbat__note { color: inherit; opacity: .88; }

.kh-shabbat--banner .kh-shabbat__inner { text-align: center; }
.kh-shabbat--banner .kh-shabbat__items { max-width: 880px; margin-inline: auto; }
.kh-shabbat--banner .kh-shabbat__item { background: transparent; border: 0; border-inline-start: 1px solid var(--kh-border); border-radius: 0; color: inherit; }
.kh-shabbat--banner .kh-shabbat__item:first-child { border-inline-start: 0; }
.kh-shabbat--banner .kh-shabbat__item dt, .kh-shabbat--banner.kh-bg--primary .kh-shabbat__item dd { color: inherit; }
.kh-shabbat--banner .kh-shabbat__item dd { font-size: 2.1rem; }

.kh-shabbat--inline { padding-block: 18px; }
.kh-shabbat--inline h2 { display: none; }
.kh-shabbat--inline .kh-shabbat__inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.kh-shabbat--inline .kh-shabbat__items { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.kh-shabbat--inline .kh-shabbat__item { background: transparent; border: 0; padding: 0; display: flex; gap: 8px; align-items: baseline; color: inherit; }
.kh-shabbat--inline .kh-shabbat__item dt { margin: 0; color: inherit; opacity: .8; }
.kh-shabbat--inline .kh-shabbat__item dd { font-size: 1.1rem; color: inherit; }
.kh-shabbat--inline .kh-shabbat__date, .kh-shabbat--inline .kh-shabbat__note { margin: 0; }

/* ---- Events calendar --------------------------------------------------- */
.kh-events__intro { color: var(--kh-muted); max-width: 64ch; }
.kh-events__list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.kh-event { display: flex; align-items: center; gap: 22px; background: var(--kh-surface); color: var(--kh-text); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); padding: 18px 22px; }
.kh-event__date { flex: none; width: 78px; text-align: center; border-radius: calc(var(--kh-radius) * .6); overflow: hidden; border: 1px solid var(--kh-border); background: var(--kh-bg); line-height: 1.1; }
.kh-event__month { display: block; background: var(--kh-primary); color: var(--kh-on-primary); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 4px 0; }
.kh-event__day { display: block; font-family: var(--kh-font-heading); font-size: 2rem; font-weight: 700; padding-top: 6px; }
.kh-event__weekday { display: block; font-size: .8rem; color: var(--kh-muted); padding-bottom: 6px; }
.kh-event__body { flex: 1; min-width: 0; }
.kh-event__body h3 { margin: 0 0 4px; font-size: 1.3rem; }
.kh-event__meta { margin: 0; color: var(--kh-muted); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.kh-event__link { flex: none; }
.kh-events__empty { color: var(--kh-muted); }

.kh-events--cards .kh-events__list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.kh-events--cards .kh-event { flex-direction: column; align-items: stretch; padding: 0 0 20px; overflow: hidden; gap: 14px; }
.kh-events--cards .kh-event__image { width: 100%; aspect-ratio: 16 / 10; border-radius: 0 !important; padding: 0 !important; border: 0 !important; }
.kh-events--cards .kh-event__date, .kh-events--cards .kh-event__body, .kh-events--cards .kh-event__link { margin-inline: 20px; }
.kh-events--cards .kh-event__date { margin-top: 20px; }
.kh-events--cards .kh-event__image + .kh-event__date { margin-top: -52px; position: relative; box-shadow: 0 8px 20px -10px rgb(0 0 0 / .4); }
.kh-events--cards .kh-event__link { text-align: center; }

/* Live calendar (calendar-plan.md §7): badges, sponsorship dates, month grid, week strip */
.kh-badge { display: inline-block; vertical-align: middle; margin-inline-start: 8px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  font-family: var(--kh-font-body, inherit); letter-spacing: .02em; background: color-mix(in srgb, var(--kh-accent) 16%, transparent); color: var(--kh-text); }
.kh-event--open { border-style: dashed; border-color: color-mix(in srgb, var(--kh-accent) 70%, var(--kh-border)); }

.kh-cal { margin-top: 24px; }
.kh-cal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.kh-cal__title { text-align: center; }
.kh-cal__month { display: block; font-family: var(--kh-font-heading); font-size: 1.4rem; font-weight: 700; }
.kh-cal__hebmonth { display: block; color: var(--kh-muted); font-size: .95rem; min-height: 1.2em; }
.kh-cal__nav { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--kh-border); background: var(--kh-surface); color: var(--kh-text); text-decoration: none; font-size: 1.5rem; line-height: 1; }
.kh-cal__nav:hover { border-color: var(--kh-primary); color: var(--kh-primary); }
.kh-cal__weekdays, .kh-cal__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kh-cal__weekdays span { text-align: center; font-size: .8rem; font-weight: 700; color: var(--kh-muted); padding: 6px 0; text-transform: uppercase; letter-spacing: .04em; }
.kh-cal__days { list-style: none; margin: 0; padding: 0; gap: 1px; background: var(--kh-border); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); overflow: hidden; }
.kh-cal__day { background: var(--kh-surface); color: var(--kh-text); min-height: 112px; padding: 6px 7px 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: start; }
.kh-cal__day--other { background: color-mix(in srgb, var(--kh-surface) 70%, var(--kh-bg)); }
.kh-cal__day--other > * { opacity: .55; }
.kh-cal__day--shabbat, .kh-cal__day--holiday { background: color-mix(in srgb, var(--kh-primary) 5%, var(--kh-surface)); }
.kh-cal__dayhead { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.kh-cal__num { font-weight: 700; font-size: .95rem; min-width: 1.7em; height: 1.7em; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.kh-cal__day--today .kh-cal__num { background: var(--kh-primary); color: var(--kh-on-primary); }
.kh-cal__full, .kh-cal__date { display: none; }
.kh-cal__heb { font-size: .78rem; color: var(--kh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kh-cal__hol { font-size: .74rem; font-weight: 600; color: var(--kh-primary); line-height: 1.3; }
.kh-cal__hol:empty { display: none; }
.kh-cal__item { display: flex; gap: 5px; align-items: baseline; font-size: .78rem; line-height: 1.3; padding: 3px 6px; border-radius: 6px; min-width: 0;
  background: color-mix(in srgb, var(--kh-primary) 10%, transparent); color: var(--kh-text); text-decoration: none; border-inline-start: 3px solid var(--kh-primary); }
a.kh-cal__item:hover { background: color-mix(in srgb, var(--kh-primary) 18%, transparent); }
.kh-cal__item--sponsorship { border-inline-start-color: var(--kh-accent); background: color-mix(in srgb, var(--kh-accent) 12%, transparent); }
.kh-cal__item--open { border: 1px dashed var(--kh-accent); border-inline-start-width: 3px; background: transparent; }
.kh-cal__item--occasion, .kh-cal__item--dedication { border-inline-start-color: var(--kh-muted); background: color-mix(in srgb, var(--kh-muted) 10%, transparent); }
.kh-cal__time { font-weight: 700; flex: none; }
.kh-cal__text { min-width: 0; }
.kh-cal__name { font-weight: 600; }
.kh-cal__sub { display: block; color: var(--kh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-cal--month .kh-cal__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-cal__item .kh-badge { margin-inline-start: 4px; padding: 0 6px; font-size: .65rem; }
.kh-cal__more { font-size: .74rem; color: var(--kh-muted); font-weight: 600; padding-inline-start: 4px; }

/* Week: seven columns with the date written out */
.kh-cal--week .kh-cal__day { min-height: 150px; padding: 10px; }
.kh-cal--week .kh-cal__dayhead { flex-wrap: wrap; justify-content: flex-start; }
.kh-cal--week .kh-cal__full { display: block; width: 100%; font-weight: 700; font-size: .9rem; }
.kh-cal--week .kh-cal__num { display: none; }
.kh-cal--week .kh-cal__date { display: inline; font-size: .85rem; color: var(--kh-muted); }

@media (max-width: 760px) {
  /* A list of the days that have something on */
  .kh-cal__weekdays { display: none; }
  .kh-cal__days { grid-template-columns: 1fr; }
  .kh-cal__day { min-height: 0 !important; padding: 10px 12px; }
  .kh-cal__day--empty:not(.kh-cal__day--holiday):not(.kh-cal__day--today) { display: none; }
  .kh-cal__day--other { display: none; }
  .kh-cal__full { display: block; flex: 1; font-weight: 700; }
  .kh-cal__num { display: none; }
  .kh-cal__date { display: inline; }
  .kh-cal--month .kh-cal__name { white-space: normal; }
}

/* ---- Embedded forms ---------------------------------------------------- */
.kh-embed__intro { color: var(--kh-muted); max-width: 64ch; }
.kh-embed__form { margin-top: 24px; }
.kh-embed--card .kh-embed__form { background: var(--kh-surface); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); padding: clamp(16px, 4vw, 36px); }
.kh-embed--card .kh-embed__form .form-card { border: 0; box-shadow: none; padding: 0; background: transparent; }
.kh-embed__frame { margin-top: 20px; }
.kh-embed__frame iframe { display: block; width: 100%; height: 1100px; border: 0; background: transparent; }
.kh-embed--card .kh-embed__frame { background: var(--kh-surface); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); overflow: hidden; box-shadow: 0 18px 40px -28px rgb(0 0 0 / .35); }
.kh-embed__fallback { margin: 12px 0 0; font-size: .92rem; }
.kh-embed__fallback a { color: var(--kh-muted); }

/* ---- Footer ------------------------------------------------------------ */
.kh-footer { background: var(--kh-text); color: var(--kh-bg); padding-block: 40px; }
.kh-footer a { color: inherit; }
.kh-footer__inner { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; }
.kh-footer__contact { font-style: normal; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.kh-footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; }
.kh-footer__copyright { margin: 0; flex-basis: 100%; opacity: .75; font-size: .92rem; }
.kh-footer--centered .kh-footer__inner { flex-direction: column; text-align: center; }
.kh-footer--centered .kh-footer__contact, .kh-footer--centered .kh-footer__links { justify-content: center; }

/* ---- Development only -------------------------------------------------- */
.kh-dev-error { margin: 16px; padding: 14px 18px; border: 2px dashed #b42318; background: #fef3f2; color: #7a271a; border-radius: 6px; font-family: system-ui, sans-serif; font-size: .95rem; }

@media (max-width: 760px) {
  /* Header: name and menu button on one row; the menu opens below as a full-width panel. */
  .kh-header__inner, .kh-header--centered .kh-header__inner { flex-direction: row; flex-wrap: nowrap; gap: 12px; padding-block: 10px; }
  .kh-header__brand, .kh-header--centered .kh-header__brand { flex-direction: row; font-size: 1.1rem; text-align: start; min-width: 0; }
  .kh-header__brand span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .kh-header__brand img, .kh-header--centered .kh-header__brand img { height: 40px; }
  .kh-header__toggle { display: inline-flex; order: 3; margin-inline-start: 0; }
  /* The header button stays visible beside the menu button; the language links move into the menu. */
  .kh-header__end { order: 2; margin-inline-start: auto; gap: 8px; }
  .kh-header__end .kh-header__lang { display: none; }
  .kh-header__end .kh-header__cta { padding: 8px 14px; font-size: .92rem; white-space: nowrap; }
  .kh-header__nav, .kh-header--centered .kh-header__nav {
    display: none; position: absolute; inset-inline: 0; top: 100%; z-index: 50; margin: 0;
    background: var(--kh-surface); border-block-end: 1px solid var(--kh-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12); padding: 8px 16px 16px; max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .kh-header--open .kh-header__nav { display: block; }
  .kh-header__nav ul, .kh-header--centered .kh-header__nav ul { flex-direction: column; flex-wrap: nowrap; gap: 0; justify-content: flex-start; }
  .kh-header__nav li + li { border-block-start: 1px solid var(--kh-border); }
  .kh-header__nav ul a:not(.kh-btn) { display: block; padding: 13px 4px; font-size: 1.05rem; }
  .kh-header__nav a[aria-current="page"] { box-shadow: none; }
  .kh-header__menu-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block-start: 14px; }

  .kh-hero--split .kh-hero__inner, .kh-richtext--columns .kh-richtext__inner, .kh-imagetext__inner { grid-template-columns: 1fr; gap: 24px; }
  .kh-imagetext--image-end .kh-imagetext__image { order: 0; }
  .kh-people--list .kh-person, .kh-shiurim--list .kh-shiur, .kh-notices--latest .kh-notice { display: flex; flex-direction: column; gap: 14px; }
  .kh-people--list .kh-person__photo { width: 100%; }
  .kh-gallery--mosaic .kh-gallery__items { grid-template-columns: repeat(2, 1fr); }
  .kh-footer--columns .kh-footer__inner { grid-template-columns: 1fr; gap: 18px; }
  .kh-event { flex-wrap: wrap; gap: 14px; }
  .kh-event__link { flex-basis: 100%; text-align: center; }
  .kh-shabbat--banner .kh-shabbat__item { border-inline-start: 0; }
}

/* ---- Video archive ---------------------------------------------------------- */
.kh-videos__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 24px; }
.kh-videos__search {
  flex: 1 1 240px; max-width: 420px; min-height: 44px; padding: 8px 14px; font: inherit; color: var(--kh-text);
  background: var(--kh-surface); border: 1px solid var(--kh-border); border-radius: var(--kh-radius);
}
.kh-videos__cats { display: flex; flex-wrap: wrap; gap: 8px; }
.kh-videos__cats button {
  min-height: 38px; padding: 6px 14px; font: inherit; font-size: .92rem; cursor: pointer; color: var(--kh-text);
  background: var(--kh-surface); border: 1px solid var(--kh-border); border-radius: 999px;
}
.kh-videos__cats button[aria-pressed="true"] { background: var(--kh-primary); border-color: var(--kh-primary); color: var(--kh-on-brand, #fff); }
.kh-videos__none { color: var(--kh-muted); }
.kh-videos__items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 24px; }
.kh-video[hidden] { display: none; }
.kh-video__player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--kh-radius); overflow: hidden; background: #000; }
.kh-video__play { position: absolute; inset: 0; display: block; }
.kh-video__play img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.kh-video__play:hover img { transform: scale(1.04); }
.kh-video__icon {
  position: absolute; top: 50%; left: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; border-radius: 12px;
  background: rgba(0, 0, 0, .72); transition: background .2s;
}
.kh-video__icon::after {
  content: ""; position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -6px;
  border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff;
}
.kh-video__play:hover .kh-video__icon, .kh-video__play:focus-visible .kh-video__icon { background: #e11d48; }
.kh-video__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kh-video__text h3 { margin: 12px 0 4px; font-size: 1.08rem; }
.kh-video__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; font-size: .9rem; color: var(--kh-muted); }
.kh-video__desc { margin: 8px 0 0; font-size: .95rem; }
.kh-bg--primary .kh-video__meta { color: inherit; opacity: .85; }
/* featured: the newest one large, beside its text on wide screens */
.kh-video--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.kh-video--featured .kh-video__text h3 { font-size: 1.5rem; margin-top: 0; }
/* list: rows with the description */
.kh-videos--list .kh-videos__items { grid-template-columns: 1fr; gap: 24px; }
.kh-videos--list .kh-video { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
.kh-videos--list .kh-video__text h3 { margin-top: 0; }
@media (max-width: 760px) {
  .kh-video--featured, .kh-videos--list .kh-video { grid-template-columns: 1fr; gap: 12px; }
}

/* ---- Coloured words in rich text (the only classes the sanitizer keeps) ---- */
.kh-tc-primary { color: var(--kh-primary); }
.kh-tc-accent { color: var(--kh-accent); }
.kh-tc-muted { color: var(--kh-muted); }
.kh-tc-mark { background: color-mix(in srgb, var(--kh-accent) 30%, transparent); color: inherit; padding: 0 .15em; border-radius: 3px; }
.kh-bg--primary .kh-tc-primary { color: var(--kh-accent); }

/* ---- A block's own look (SectionStyle: data-kh-look + --kh-blk-* variables) ----
   Buttons and cards (white boxes) keep the design's colours, so they stay readable. */
[data-kh-look~="text"] { color: var(--kh-blk-text); }
[data-kh-look~="text"] :is(p, li, dt, dd, summary, figcaption, blockquote, span, small, time, h3, h4,
  .kh-hero__eyebrow, .kh-hero__body, .kh-content__intro):not(:is(.kh-btn, .kh-card, .kh-prayer__table, .kh-prayer__card, .kh-event, .kh-shabbat__item, .kh-embed__form) *, .kh-btn, .kh-tc-primary, .kh-tc-accent, .kh-tc-muted) {
  color: var(--kh-blk-text); opacity: 1;
}
[data-kh-look~="heading"] :is(h1, h2, h3):not(:is(.kh-card, .kh-prayer__table, .kh-prayer__card, .kh-event, .kh-embed__form) *) { color: var(--kh-blk-heading); }

[data-kh-look~="size-small"] { font-size: .92rem; }
[data-kh-look~="size-large"] { font-size: 1.2rem; }
[data-kh-look~="size-xlarge"] { font-size: 1.4rem; }
[data-kh-look~="size-small"] h1 { font-size: calc(var(--kh-h1) * .85); }
[data-kh-look~="size-small"] h2 { font-size: calc(var(--kh-h2) * .85); }
[data-kh-look~="size-large"] h1 { font-size: calc(var(--kh-h1) * 1.15); }
[data-kh-look~="size-large"] h2 { font-size: calc(var(--kh-h2) * 1.15); }
[data-kh-look~="size-xlarge"] h1 { font-size: calc(var(--kh-h1) * 1.3); }
[data-kh-look~="size-xlarge"] h2 { font-size: calc(var(--kh-h2) * 1.3); }

[data-kh-look~="align-start"] { text-align: start; }
[data-kh-look~="align-center"] { text-align: center; }
[data-kh-look~="align-end"] { text-align: end; }
[data-kh-look~="align-start"] :is(.kh-hero__actions, .kh-buttons__row, .kh-textbar__inner, .kh-jcal__inner) { justify-content: flex-start; }
[data-kh-look~="align-center"] :is(.kh-hero__actions, .kh-buttons__row, .kh-textbar__inner, .kh-jcal__inner) { justify-content: center; }
[data-kh-look~="align-end"] :is(.kh-hero__actions, .kh-buttons__row, .kh-textbar__inner, .kh-jcal__inner) { justify-content: flex-end; }
[data-kh-look~="align-start"] .kh-extras { align-items: flex-start; }
[data-kh-look~="align-center"] .kh-extras { align-items: center; }
[data-kh-look~="align-end"] .kh-extras { align-items: flex-end; }
[data-kh-look~="align-center"] :is(.kh-richtext__inner, .kh-faq__inner, .kh-content__intro) { margin-inline: auto; }

[data-kh-look~="width-narrow"] .kh-container { max-width: 760px; }
[data-kh-look~="width-wide"] .kh-container { max-width: 1360px; }
[data-kh-look~="width-full"] .kh-container { max-width: none; }

/* The block's own padding, set with the editor's padding handles (px, physical sides). On phones
   the side padding is capped, so a wide desktop margin never squeezes the text into a sliver. */
.kh-section[data-kh-look~="pad"] { padding: var(--kh-pad-t) var(--kh-pad-r) var(--kh-pad-b) var(--kh-pad-l); }
@media (max-width: 760px) {
  .kh-section[data-kh-look~="pad"] { padding-left: min(var(--kh-pad-l), 24px); padding-right: min(var(--kh-pad-r), 24px); }
}

/* ---- Accessibility toolbar -------------------------------------------------
   Fixed colours (not the site's), so it stays readable in every design and mode. */
.kh-a11y { position: fixed; inset-inline-start: 14px; bottom: 14px; z-index: 1000; font-family: Arial, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.4; letter-spacing: normal; word-spacing: normal; }
.kh-a11y__button {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff; background: #1d4ed8; color: #fff;
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); padding: 0;
}
.kh-a11y__button:hover { background: #1e40af; }
.kh-a11y__button--active { background: #0f172a; }
.kh-a11y :focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.kh-a11y__panel {
  position: absolute; bottom: 64px; inset-inline-start: 0; width: min(320px, calc(100vw - 28px));
  background: #fff; color: #111827; border: 1px solid #d1d5db; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); padding: 16px;
}
.kh-a11y__panel[hidden] { display: none; }
.kh-a11y__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kh-a11y__title { margin: 0; font: 700 18px/1.2 Arial, sans-serif; color: #111827; text-transform: none; letter-spacing: normal; }
.kh-a11y__close { width: 36px; height: 36px; border: 0; border-radius: 8px; background: #f3f4f6; color: #111827; font-size: 22px; line-height: 1; cursor: pointer; }
.kh-a11y__size { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f3f4f6; border-radius: 10px; margin-bottom: 10px; }
.kh-a11y__size > span:first-child { flex: 1; font-weight: 600; }
.kh-a11y__size button { width: 44px; height: 40px; border: 1px solid #9ca3af; border-radius: 8px; background: #fff; color: #111827; font-weight: 700; cursor: pointer; }
.kh-a11y__size button:disabled { opacity: .4; cursor: default; }
.kh-a11y__size-value { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.kh-a11y__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kh-a11y__option {
  min-height: 48px; padding: 8px 10px; border: 2px solid #d1d5db; border-radius: 10px; background: #fff; color: #111827;
  font: 600 14px/1.25 Arial, sans-serif; cursor: pointer; text-align: center;
}
.kh-a11y__option[aria-pressed="true"] { border-color: #1d4ed8; background: #dbeafe; color: #1e3a8a; }
.kh-a11y__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.kh-a11y__reset { border: 0; background: none; color: #b91c1c; font-weight: 600; cursor: pointer; padding: 8px 0; font-size: 15px; }
.kh-a11y__foot a { color: #1d4ed8; font-size: 15px; }
@media print { .kh-a11y { display: none; } }

/* The visitor's choices: classes on <html> set by the toolbar. The toolbar itself is left out. */
html.kh-a11y-contrast {
  --kh-bg: #000; --kh-surface: #000; --kh-text: #fff; --kh-muted: #fff; --kh-border: #fff;
  --kh-primary: #ffeb3b; --kh-accent: #ffeb3b; --kh-on-primary: #000; --kh-on-brand: #000;
}
html.kh-a11y-contrast body,
html.kh-a11y-contrast body :not(.kh-a11y, .kh-a11y *, img, svg, svg *, video, iframe, picture, .kh-header__toggle-bars) {
  background-color: #000 !important; background-image: none !important; color: #fff !important;
  border-color: #fff !important; text-shadow: none !important; box-shadow: none !important;
}
html.kh-a11y-contrast body :is(a, a *, button:not(.kh-a11y *), button:not(.kh-a11y *) *):not(.kh-a11y *) { color: #ffeb3b !important; }
html.kh-a11y-contrast body .kh-btn { border: 2px solid #ffeb3b !important; }
html.kh-a11y-contrast body :is(section, header, footer, .kh-hero__media, .kh-hero)::before,
html.kh-a11y-contrast body :is(section, header, footer, .kh-hero__media, .kh-hero)::after { display: none !important; }
html.kh-a11y-gray body > :not(.kh-a11y) { filter: grayscale(1); }
html.kh-a11y-links body a:not(.kh-a11y *) { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px dashed currentColor; outline-offset: 2px; }
html.kh-a11y-font { --kh-font-heading: Arial, "Arial Hebrew", sans-serif; --kh-font-body: Arial, "Arial Hebrew", sans-serif; }
html.kh-a11y-font body :not(.kh-a11y *) { font-family: Arial, "Arial Hebrew", sans-serif !important; }
html.kh-a11y-spacing body :not(.kh-a11y, .kh-a11y *) { line-height: 1.9 !important; letter-spacing: .06em !important; word-spacing: .14em !important; }
html.kh-a11y-motion, html.kh-a11y-motion *, html.kh-a11y-motion *::before, html.kh-a11y-motion *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kh-btn { transition: none; }
  .kh-btn:hover { transform: none; }
  .kh-gallery__items img { transition: none; }
}

/* Last on purpose: overrides the button styles of strong backgrounds, which share this specificity. */
/* Buttons inside a card keep their normal look, whatever the block's background. */
body .kh-bg--primary :is(.kh-card, .kh-event, .kh-embed__form) .kh-btn--primary { background: var(--kh-primary); color: var(--kh-on-brand, #fff); border-color: var(--kh-primary); }
body .kh-bg--primary :is(.kh-card, .kh-event, .kh-embed__form) .kh-btn--secondary { background: transparent; color: var(--kh-primary); border-color: var(--kh-primary); }

/* "Powered by Kahalio" under every footer. Always present (rendered by the page, not the site
   document); quiet colours from the site's own palette so it fits every design. */
.kh-powered {
  display: flex !important; justify-content: center; align-items: center;
  padding: 10px 16px; background: var(--kh-bg); border-top: 1px solid var(--kh-border);
  font: 500 12px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.kh-powered a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--kh-muted); text-decoration: none; opacity: .9; transition: opacity .15s, color .15s;
}
.kh-powered a:hover { opacity: 1; color: var(--kh-text); }
.kh-powered img { width: 16px; height: 16px; border-radius: 4px; display: block; }
.kh-powered strong { font-weight: 700; color: var(--kh-text); }
/* ── Columns: blocks side by side in one row (a block's "columns"). Each column is an ordinary
   block; on phones they stack. ── */
.kh-row { position: relative; }
.kh-row__inner {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  max-width: 1140px; margin-inline: auto; padding-inline: 20px;
}
.kh-row--3 .kh-row__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kh-row--2.kh-row--first .kh-row__inner { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kh-row--2.kh-row--last .kh-row__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.kh-row--3.kh-row--first .kh-row__inner { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.kh-row--3.kh-row--last .kh-row__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }
.kh-row__col { display: flex; flex-direction: column; min-width: 0; }
.kh-row__col > * { flex: 1 1 auto; }
.kh-row__col .kh-container { max-width: none; padding-inline: 0; }
/* A column with its own background reads as a panel: room inside and the site's corners. */
.kh-row__col > .kh-section:is(.kh-bg--surface, .kh-bg--tint, .kh-bg--primary, [style*="background"]) { border-radius: var(--kh-radius); }
.kh-row__col > .kh-section:is(.kh-bg--surface, .kh-bg--tint, .kh-bg--primary, [style*="background"]) .kh-container { padding-inline: 24px; }
@media (max-width: 760px) {
  .kh-row.kh-row.kh-row .kh-row__inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kh-row__col > .kh-section:is(.kh-bg--surface, .kh-bg--tint, .kh-bg--primary, [style*="background"]) { margin-block: 8px; }
}

/* ── Footer: social network icons ── */
.kh-footer__social { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.kh-footer__social a {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent); transition: background-color .15s, border-color .15s;
}
.kh-footer__social a:hover, .kh-footer__social a:focus-visible { background: color-mix(in srgb, currentColor 15%, transparent); border-color: currentColor; }
.kh-footer__social svg { width: 18px; height: 18px; display: block; }
.kh-footer--centered .kh-footer__social { justify-content: center; }
.kh-footer--columns .kh-footer__social { margin-top: 14px; }
.kh-footer--minimal .kh-footer__social { gap: 4px; }
.kh-footer--minimal .kh-footer__social a { width: 32px; height: 32px; border-color: transparent; }
