/* jewish.css - 4jewish.com's own pages and blocks (prefix jw-). Reads the engine's tokens with fallbacks.
   Sections may add their own stylesheet (page 'css' => ['tanakh.css']); shared parts live here.

   Palette: tekhelet blue (--jw-accent, white text 8.6:1) for buttons and chips; --jw-accent-ink is the accent used AS
   text, readable on the page ground in each mode; Jerusalem-stone ground (--jw-soft) for strips and boxes;
   --jw-gold for small labels (4.7:1 on the stone ground). Hebrew: "JW Hebrew" is the self-hosted open-licence
   face in fonts/ (vowels and cantillation marks); the fallbacks cover systems without it. */
@font-face { font-family: "JW Hebrew"; src: url("fonts/hebrew.woff2") format("woff2"); font-display: swap; unicode-range: U+0590-05FF, U+FB1D-FB4F, U+200C-200F, U+25CC; }
@font-face { font-family: "JW Hebrew"; src: url("fonts/hebrew-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0590-05FF, U+FB1D-FB4F, U+200C-200F, U+25CC; }
:root {
  --jw-accent: #1d4d9a;
  --jw-accent-ink: #1d4d9a;
  --jw-ink: var(--text, #1a1f2b);
  --jw-muted: var(--muted, #5d6575);
  --jw-line: var(--border, #ddd8cc);
  --jw-card: var(--card, #fff);
  --jw-soft: #f6f2e8;
  --jw-gold: #85600f;
  --jw-radius: var(--radius, 10px);
  --jw-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --jw-hebrew: "JW Hebrew", "SBL Hebrew", "Ezra SIL", "Taamey Frank CLM", "Frank Ruehl CLM", "David", "Times New Roman", serif;
  --jw-link: #0a4fb8;
}
html[data-fs-theme="dark"] {
  --jw-accent-ink: #8db4f5;
  --jw-gold: #d9b35f;
  --jw-soft: #222018;
  --jw-line: #3a372f;
  --jw-card: #1b1a17;
  --jw-ink: #ece8df;
  --jw-muted: #a39e93;
  --jw-link: #8db4f5;
}
/* :where() keeps this at the engine rule's weight, so any classed link still sets its own colour. */
:where(.jw-main, .jw-home) a { color: var(--jw-link); }

.jw-main { min-width: 0; width: 100%; max-width: 1080px; margin: 0 auto; padding: 12px 16px 48px; color: var(--jw-ink); }
.jw-main.jw-wide { max-width: 1320px; }
.jw-muted { color: var(--jw-muted); }

/* Hebrew */
.jw-he { font-family: var(--jw-hebrew); font-size: 1.1em; line-height: 1; unicode-bidi: isolate; }
.jw-bi { color: var(--jw-gold); margin-inline-start: .25em; }
.jw-he-block { font-family: var(--jw-hebrew); font-size: 1.35rem; line-height: 2; text-align: right; unicode-bidi: isolate; margin: 0 0 .6em; }
.jw-translit { font-style: italic; color: var(--jw-muted); }
.jw-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; align-items: start; }
.jw-pair > * { min-width: 0; }
@media (max-width: 720px) { .jw-pair { grid-template-columns: 1fr; } }

/* section bar */
.jw-sectionbar { border-bottom: 1px solid var(--jw-line); background: var(--jw-soft); }
.jw-sectionbar .container-lg { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 12px; }
.jw-sectionbar .container-lg::-webkit-scrollbar { display: none; }
.jw-sectionbar a { white-space: nowrap; padding: 6px 10px; border-radius: 999px; text-decoration: none; color: var(--jw-ink); font-size: .92rem; }
.jw-sectionbar a:hover { background: var(--jw-card); }
.jw-sectionbar a.on { background: var(--jw-accent); color: #fff; }

/* breadcrumbs */
.jw-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 8px 0 12px; font-size: .85rem; color: var(--jw-muted); }
.jw-crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; }
.jw-crumbs a { color: var(--jw-muted); }

/* headings and blocks */
.jw-head { margin: 4px 0 18px; }
.jw-head h1 { font-family: var(--jw-serif); font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 0 0 6px; line-height: 1.2; }
.jw-head h1 .jw-he { font-size: .9em; color: var(--jw-gold); margin-inline-start: .3em; }
.jw-lede { font-size: 1.05rem; color: var(--jw-muted); max-width: 70ch; margin: 0; }
.jw-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jw-block { margin: 26px 0; }
.jw-block > h2 { font-family: var(--jw-serif); font-size: 1.35rem; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--jw-line); }
.jw-block h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.jw-prose { max-width: 72ch; }
.jw-prose p { margin: 0 0 1em; }
.jw-more { margin: 10px 0 0; }
.jw-note { font-size: .88rem; color: var(--jw-muted); border-left: 3px solid var(--jw-line); padding: 4px 10px; margin: 14px 0; }
.jw-asof { font-size: .82rem; color: var(--jw-muted); }
.jw-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--jw-line); background: var(--jw-card); color: var(--jw-ink); text-decoration: none; font-size: .92rem; cursor: pointer; }
.jw-btn:hover { border-color: var(--jw-accent); }
.jw-btn.primary { background: var(--jw-accent); border-color: var(--jw-accent); color: #fff; }

/* cards, chips, tables */
.jw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.jw-card { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--jw-line); border-radius: var(--jw-radius); background: var(--jw-card); color: var(--jw-ink); text-decoration: none; }
.jw-card:hover { border-color: var(--jw-accent); }
.jw-card b { font-size: 1rem; }
.jw-card small { color: var(--jw-muted); font-size: .8rem; }
.jw-card span { color: var(--jw-muted); font-size: .9rem; }
.jw-card-icon svg { width: 20px; height: 20px; fill: var(--jw-accent-ink); }
.jw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jw-chips a, .jw-chip { padding: 5px 11px; border: 1px solid var(--jw-line); border-radius: 999px; text-decoration: none; color: var(--jw-ink); font-size: .9rem; background: var(--jw-card); }
.jw-chips a:hover { border-color: var(--jw-accent); }
.jw-chips a.on { background: var(--jw-accent); color: #fff; border-color: var(--jw-accent); }
.jw-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.jw-table th, .jw-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--jw-line); vertical-align: top; }
.jw-table th { font-weight: 600; color: var(--jw-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; }
.jw-table td.num, .jw-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.jw-tablewrap { overflow-x: auto; }
.jw-cols { columns: 3 220px; column-gap: 24px; }
.jw-cols a { display: block; padding: 2px 0; break-inside: avoid; }
.jw-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.jw-dl dt { color: var(--jw-muted); font-weight: 500; }
.jw-dl dd { margin: 0; }

/* search box */
.jw-search { display: flex; flex-wrap: wrap; gap: 6px; max-width: 640px; margin: 8px 0 16px; }
.jw-search input[type=search] { flex: 1 1 190px; min-width: 0; width: 0; padding: 9px 14px; border: 1px solid var(--jw-line); border-radius: 999px; background: var(--jw-card); color: var(--jw-ink); font-size: 1rem; }
.jw-search button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 0; background: var(--jw-accent); color: #fff; }
.jw-search button svg { width: 16px; height: 16px; fill: currentColor; }

/* pager */
.jw-pager { display: flex; justify-content: space-between; gap: 12px; margin: 24px 0; }
.jw-pager a { text-decoration: none; padding: 8px 14px; border: 1px solid var(--jw-line); border-radius: 999px; }

/* news list */
.jw-news { list-style: none; padding: 0; margin: 0; }
.jw-news li { padding: 8px 0; border-bottom: 1px solid var(--jw-line); }
.jw-news li a { font-weight: 500; }
.jw-news small { display: block; color: var(--jw-muted); font-size: .8rem; }

/* home page */
.jw-home { max-width: 1080px; margin: 6px auto 14px; padding: 0 12px; }
.jw-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (min-width: 900px) { .jw-today { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.jw-today-cell { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--jw-radius); background: var(--jw-soft); border: 1px solid var(--jw-line); color: var(--jw-ink); text-decoration: none; }
.jw-today-cell small { text-transform: uppercase; letter-spacing: .04em; font-size: .7rem; color: var(--jw-gold); font-weight: 600; }
.jw-today-cell b { font-family: var(--jw-serif); font-size: 1rem; }
.jw-today-cell .jw-today-he { font-size: 1.05rem; color: var(--jw-accent-ink); }
.jw-today-cell span { font-size: .86rem; color: var(--jw-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jw-lead { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--jw-radius); border: 1px solid var(--jw-line); border-left: 4px solid var(--jw-accent); background: var(--jw-card); }
.jw-lead h2 { font-family: var(--jw-serif); font-size: 1.25rem; margin: 0 0 6px; }
.jw-door { margin: 0 0 12px; }
.jw-door-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--jw-muted); margin: 14px 0 6px; font-weight: 600; }
.jw-door-h .jw-he { font-size: 1.15rem; letter-spacing: 0; text-transform: none; color: var(--jw-gold); }
.jw-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.jw-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--jw-line); border-radius: var(--jw-radius); text-decoration: none; color: var(--jw-ink); background: var(--jw-card); }
.jw-tile:hover { border-color: var(--jw-accent); }
.jw-tile svg { width: 18px; height: 18px; fill: var(--jw-accent-ink); }
.jw-tile b { font-size: .95rem; }
.jw-tile span { font-size: .8rem; color: var(--jw-muted); }
.jw-prefs-ask { font-size: .9rem; margin: 0 0 10px; }
.jw-banner { margin: 0 0 12px; padding: 12px 16px; border-radius: var(--jw-radius); background: var(--jw-accent); color: #fff; }
.jw-banner a { color: #fff; text-decoration: underline; }
.jw-topic-tool { margin: 10px 0 18px; padding: 14px 16px; border: 1px solid var(--jw-line); border-radius: var(--jw-radius); background: var(--jw-soft); }

/* memorial pages (October 7th, the Holocaust): quiet, no colour accents */
.jw-memorial .jw-head h1 { font-weight: 500; }
.jw-memorial .jw-block > h2 { border-bottom-color: var(--jw-line); }
.jw-candle-line { color: var(--jw-muted); font-style: italic; }

/* sources */
.jw-sources { padding-left: 18px; }
.jw-sources li { margin: 0 0 10px; }

/* forms */
.jw-form label { display: block; font-weight: 500; margin: 10px 0 4px; }
.jw-form input[type=text], .jw-form input[type=email], .jw-form input[type=url], .jw-form input[type=number], .jw-form input[type=date], .jw-form input[type=time], .jw-form select, .jw-form textarea { width: 100%; max-width: 560px; padding: 8px 10px; border: 1px solid var(--jw-line); border-radius: 8px; background: var(--jw-card); color: var(--jw-ink); }
.jw-result { margin: 14px 0; padding: 14px 16px; border-radius: var(--jw-radius); background: var(--jw-soft); border: 1px solid var(--jw-line); }

@media print {
  #search-header, .jw-sectionbar, footer, .jw-actions, .jw-pager, .jw-search { display: none !important; }
  .jw-main { max-width: none; padding: 0; }
}

/* Shared site-kit and topic-page labels, darkened on this site only (the engine's teal and grey labels measure
   2.4-3.9:1 on white). jewish.css loads on every 4jewish.com page through the head slot. */
.sk-eyebrow { color: var(--jw-accent-ink, #1d4d9a); }
.ss-card-meta, .sk-updated, .ss-brief-n { color: #5b6270; }
html[data-fs-theme="dark"] .ss-card-meta, html[data-fs-theme="dark"] .sk-updated, html[data-fs-theme="dark"] .ss-brief-n { color: #aab1bd; }
html[data-fs-theme="dark"] .sk-more a, html[data-fs-theme="dark"] a.sk-more { color: var(--jw-link, #8db4f5); }
