/*
 * Jews in Japan – front end.
 *
 * Every colour, radius, space and type size comes from "The Jews and
 * Japanese" design system, through the presets the jewsandjapanese theme
 * publishes (--wp--preset--color--washi, --wp--custom--radius--sm, ...).
 * The values after the commas are the design system's light-theme values,
 * used only if a theme without those presets is active.
 *
 * Design-system rules applied here: cards on washi-raised with a hairline
 * border and radius-sm (crisp, cut-paper corners); radius-md only for
 * inputs; callouts on ai-tint; links in tekhelet; borders, not shadows;
 * no gradients; no left-border cards; sentence case; a 2px tekhelet focus
 * ring with a 2px washi gap.
 */
:root {
	--jij-washi: var(--wp--preset--color--washi, #F6F1E7);
	--jij-raised: var(--wp--preset--color--washi-raised, #FFFCF6);
	--jij-sumi: var(--wp--preset--color--sumi, #1E1B18);
	--jij-muted: var(--wp--preset--color--sumi-muted, #5E574F);
	--jij-ai: var(--wp--preset--color--ai, #1F3A68);
	--jij-on-ai: var(--wp--preset--color--on-ai, #FFFCF6);
	--jij-tekhelet: var(--wp--preset--color--tekhelet, #2B6199);
	--jij-shu: var(--wp--preset--color--shu, #C0361C);
	--jij-ai-tint: var(--wp--preset--color--ai-tint, #C5D3E8);
	--jij-hairline: var(--wp--preset--color--hairline, #D6CCBA);
	--jij-radius-sm: var(--wp--custom--radius--sm, 2px);
	--jij-radius-md: var(--wp--custom--radius--md, 6px);
	--jij-radius-disc: var(--wp--custom--radius--disc, 9999px);
	--jij-space-1: 4px;
	--jij-space-2: var(--wp--preset--spacing--2, 8px);
	--jij-space-3: var(--wp--preset--spacing--3, 12px);
	--jij-space-4: var(--wp--preset--spacing--4, 16px);
	--jij-space-6: var(--wp--preset--spacing--6, 24px);
	--jij-space-10: var(--wp--preset--spacing--10, 40px);
	--jij-label: var(--wp--preset--font-size--label, 14px);
	--jij-caption: var(--wp--preset--font-size--caption, 13px);
	--jij-heading: var(--wp--preset--font-size--heading, 28px);
	--jij-display: var(--wp--preset--font-family--display, "Frank Ruhl Libre", serif);
}

/* Keyboard focus: 2px tekhelet ring with a 2px washi gap. */
:where(.jij-button, .jij-register input, .jij-register button, .jij-comments textarea, .jij-comments input[type=submit], .jij-comments a, .jij-talk a, .jij-mailing button, .jij-next-talk-link):focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px var(--jij-washi), 0 0 0 4px var(--jij-tekhelet);
}

/* ------------------------------------------------------------------ */
/* Entry pages (talks, people, books & media, web resources)           */
/* ------------------------------------------------------------------ */

/* The "impact" summary: a callout on ai-tint. */
.jij-lead { background: var(--jij-ai-tint); color: var(--jij-sumi); border-radius: var(--jij-radius-sm); padding: var(--jij-space-4) var(--jij-space-6); margin: 0 0 var(--jij-space-6); }
.jij-lead h2 { font-size: var(--jij-label); font-weight: 500; line-height: 20px; color: var(--jij-sumi); margin: 0 0 var(--jij-space-2); }
.jij-lead p:last-child { margin-bottom: 0; }

.jij-facts { width: 100%; border-collapse: collapse; margin: 0 0 var(--jij-space-6); }
.jij-facts th, .jij-facts td { text-align: left; vertical-align: top; padding: var(--jij-space-2) var(--jij-space-3) var(--jij-space-2) 0; border-bottom: 1px solid var(--jij-hairline); }
.jij-facts th { width: 32%; font-weight: 500; color: var(--jij-muted); }

.jij-buttons { display: flex; flex-wrap: wrap; gap: var(--jij-space-2); margin: 0 0 var(--jij-space-6); }

/* Sources list (compact): one row per source, an English and a Japanese version sharing a row.
   Image, both titles, a details line, why to read it in both languages, each version's links. */
.jij-sources { list-style: none; margin: 0; padding: 0; }
.jij-source { display: flex; gap: var(--jij-space-4); align-items: flex-start; padding: var(--jij-space-3) 0; border-bottom: 1px solid var(--jij-hairline); }
.jij-source[hidden], .jij-sources-section[hidden] { display: none; }
.jij-source-img { flex: none; display: block; width: 56px; line-height: 0; --jij-portrait: 56px; }
.jij-source-img .wp-block-image.jij-source-portrait { margin: 0; }
.jij-source-cover { display: block; width: 56px; height: auto; max-height: 84px; object-fit: contain; object-position: left top; border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); background: var(--jij-raised); }
.jij-source-cover-empty { height: 56px; display: flex; align-items: center; justify-content: center; font-size: var(--jij-caption); line-height: 1.2; color: var(--jij-muted); text-align: center; }
.jij-source-body { flex: 1; min-width: 0; }
.jij-source-body p { margin: 0; }
.jij-source-head { line-height: 1.35; }
.jij-source-title { font-family: var(--jij-display); font-weight: 500; color: var(--jij-sumi); text-decoration: none; }
.jij-source-title-alt { margin-left: var(--jij-space-2); font-family: var(--wp--preset--font-family--display-ja, "Shippori Mincho", serif); color: var(--jij-ai); text-decoration: none; }
.jij-source-title:hover, .jij-source-title-alt:hover { text-decoration: underline; }
.jij-source-meta { margin-top: 2px !important; font-size: var(--jij-caption); line-height: 18px; color: var(--jij-muted); }
.jij-source-why { margin-top: var(--jij-space-1) !important; font-size: var(--jij-label); line-height: 20px; color: var(--jij-sumi); }
.jij-source .jij-source-why[lang="ja"] { line-height: 22px; }
.jij-source-links { display: flex; flex-wrap: wrap; gap: var(--jij-space-1) var(--jij-space-2); margin-top: var(--jij-space-2) !important; }
.jij-source-link { display: inline-block; padding: 0 var(--jij-space-2); border: 1px solid var(--jij-muted); border-radius: var(--jij-radius-sm); font-size: var(--jij-caption); line-height: 22px; color: var(--jij-ai); text-decoration: none; }
.jij-source-link:hover { background: var(--jij-ai-tint); }
.jij-source-link:focus-visible, .jij-source-title:focus-visible, .jij-source-title-alt:focus-visible { outline: 2px solid var(--jij-tekhelet); outline-offset: 2px; box-shadow: 0 0 0 2px var(--jij-washi); }
.jij-source-hero { margin: 0 0 var(--jij-space-6); }
.jij-source-hero img { display: block; max-width: min(100%, 320px); height: auto; border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); }
.jij-source-hero .wp-element-caption { font-size: var(--jij-caption); color: var(--jij-muted); text-align: left; margin-top: var(--jij-space-2); }
.jij-lead p + p { margin-top: var(--jij-space-3); }

/* Sources page: one section per category (0.9.0), and a link to the Search page. */
.jij-sources-page .jij-sources-section { margin-top: var(--jij-space-10); }
.jij-sources-search-link { margin: var(--jij-space-6) 0 0; font-size: var(--jij-label); }
.jij-sources-search-link a { color: var(--jij-tekhelet); }
/* Bilingual headings (0.13.2): on wide screens the Japanese part of a heading moves to the next line whole,
   never leaving one character behind. (Phones wrap normally: a long Japanese part is wider than their column.) */
@media (min-width: 782px) {
	.jij-entry h2 span[lang="ja"], .jij-section h2 span[lang="ja"], .jij-search-group h2 span[lang="ja"], .jij-sources-section h2 span[lang="ja"] { white-space: nowrap; }
}
/* Drafts (0.13.0), seen only by administrators and Lead researchers. */
.jij-draft-badge { display: inline-block; margin-left: var(--jij-space-2); padding: 0 var(--jij-space-2); border-radius: var(--jij-radius-md); background: var(--jij-ai-tint); color: var(--jij-sumi); font-family: var(--wp--preset--font-family--sans, inherit); font-size: var(--jij-caption); font-weight: 500; line-height: 20px; vertical-align: middle; white-space: nowrap; }
.jij-button-primary { background: var(--jij-ai); border-color: var(--jij-ai); color: var(--jij-on-ai); }
.jij-button-primary:hover { background: var(--jij-ai); opacity: .9; }
.jij-button-primary:focus-visible { outline: 2px solid var(--jij-tekhelet); outline-offset: 2px; box-shadow: 0 0 0 2px var(--jij-washi); }
.jij-publish-on-page { margin: 0 0 var(--jij-space-6); padding: var(--jij-space-4); background: var(--jij-raised); border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); }
.jij-publish-status { margin: 0 0 var(--jij-space-3); font-size: var(--jij-label); color: var(--jij-muted); }
.jij-publish-form { margin: 0; }
.jij-publish-also { margin: var(--jij-space-3) 0 0; padding: 0; border: 0; min-width: 0; }
.jij-publish-also legend { padding: 0; margin-bottom: var(--jij-space-1); font-size: var(--jij-label); font-weight: 500; color: var(--jij-sumi); }
.jij-publish-also-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--jij-space-2); font-size: var(--jij-label); line-height: 22px; }
.jij-publish-also-item a { color: var(--jij-tekhelet); }
.jij-publish-also-item a:focus-visible { outline: 2px solid var(--jij-tekhelet); outline-offset: 2px; box-shadow: 0 0 0 2px var(--jij-washi); }
.jij-publish-also-field { cursor: pointer; }
.jij-publish-also-item input { width: 16px; height: 16px; margin: 0; accent-color: var(--jij-ai); }
.jij-publish-also-field { color: var(--jij-muted); }
.jij-published-note { margin: 0 0 var(--jij-space-4); padding: var(--jij-space-2) var(--jij-space-3); background: var(--jij-ai-tint); color: var(--jij-sumi); border-radius: var(--jij-radius-sm); font-size: var(--jij-label); }
/* Edit button (0.12.0): shown only to those who may edit the entry; a secondary (ai outline) button. */
.jij-edit-link { margin: 0 0 var(--jij-space-4); }
.jij-edit-link-inline { margin: var(--jij-space-2) 0 0; }
.jij-edit-link .jij-button:focus-visible { outline: 2px solid var(--jij-tekhelet); outline-offset: 2px; box-shadow: 0 0 0 2px var(--jij-washi); }
/* Researchers page (0.11.0): each researcher as in the People list, then their work by kind. */
.jij-researcher-works { display: flex; flex-direction: column; gap: var(--jij-space-3); margin: var(--jij-space-3) 0 var(--jij-space-2); }
.jij-researcher-works-group h4 { margin: 0 0 var(--jij-space-1); font-size: var(--jij-label); font-weight: 500; line-height: 20px; color: var(--jij-muted); }
.jij-researcher-works-group ul { margin: 0; padding: 0; list-style: none; }
.jij-researcher-works-group li { font-size: var(--jij-label); line-height: 22px; }
.jij-researcher-works-group a { color: var(--jij-tekhelet); }
.jij-researcher-work-year { color: var(--jij-muted); font-size: var(--jij-caption); }
/* A person's page: "Find every source that mentions …" under Recommended reading (0.10.0). */
.jij-mentions-link { margin: var(--jij-space-3) 0 0; font-size: var(--jij-label); line-height: 20px; }
.jij-mentions-link a { color: var(--jij-tekhelet); }
.jij-mentions-link a:focus-visible { outline: 2px solid var(--jij-tekhelet); outline-offset: 2px; box-shadow: 0 0 0 2px var(--jij-washi); }
.jij-sources-empty { color: var(--jij-muted); }

/* Search page (0.9.0): the search panel (inputs: radius-md, sumi-muted border for 3:1). */
.jij-search-form { margin: var(--jij-space-6) 0 0; padding: var(--jij-space-4); background: var(--jij-raised); border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); }
.jij-search-form p { margin: 0; }
.jij-search-form label { display: block; margin-bottom: var(--jij-space-1); font-size: var(--jij-label); font-weight: 500; line-height: 20px; color: var(--jij-sumi); }
.jij-search-form input[type=search], .jij-search-form select { width: 100%; box-sizing: border-box; padding: var(--jij-space-2) var(--jij-space-3); font: inherit; font-size: var(--jij-label); color: var(--jij-sumi); background: var(--jij-raised); border: 1px solid var(--jij-muted); border-radius: var(--jij-radius-md); }
.jij-search-form input:focus-visible, .jij-search-form select:focus-visible { outline: 2px solid var(--jij-tekhelet); outline-offset: 2px; box-shadow: 0 0 0 2px var(--jij-washi); }
.jij-search-types { display: flex; flex-wrap: wrap; gap: var(--jij-space-2) var(--jij-space-4); margin: var(--jij-space-3) 0 0; padding: 0; border: 0; min-width: 0; }
.jij-search-types legend { width: 100%; padding: 0; margin-bottom: var(--jij-space-1); font-size: var(--jij-label); font-weight: 500; line-height: 20px; color: var(--jij-sumi); }
.jij-search-form .jij-search-type { display: inline-flex; align-items: center; gap: var(--jij-space-2); margin: 0; font-weight: 400; cursor: pointer; }
.jij-search-type input { width: 16px; height: 16px; margin: 0; accent-color: var(--jij-ai); }
.jij-search-type-count { color: var(--jij-muted); }
.jij-search-filter-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: var(--jij-space-3); margin-top: var(--jij-space-3); }
.jij-search-filter-row:empty { display: none; }
.jij-search-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--jij-space-2); margin-top: var(--jij-space-3) !important; }
.jij-search-count { font-size: var(--jij-label); color: var(--jij-muted); }
/* Results: one section per type, sources by category. */
.jij-search-page [hidden] { display: none !important; }
.jij-search-page .jij-search-group { margin-top: var(--jij-space-10); }
.jij-search-sub { margin-top: var(--jij-space-6); }
.jij-search-sub h3 { margin: 0 0 var(--jij-space-2); font-size: var(--jij-label); font-weight: 500; line-height: 20px; color: var(--jij-muted); }
.jij-search-none, .jij-search-empty { margin-top: var(--jij-space-6); color: var(--jij-muted); }
/* Results of other types (articles, researchers, new types): like a source row. */
.jij-search-list { list-style: none; margin: 0; padding: 0; }
.jij-search-entry { display: flex; gap: var(--jij-space-4); align-items: flex-start; padding: var(--jij-space-3) 0; border-bottom: 1px solid var(--jij-hairline); }
.jij-search-entry-img { flex: none; display: block; width: 56px; line-height: 0; text-decoration: none; --jij-portrait: 56px; }
.jij-search-entry-img .wp-block-image.jij-source-portrait { margin: 0; }
.jij-search-entry-cover { display: block; width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); }
.jij-search-entry-initials { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--jij-radius-disc); background: var(--jij-ai-tint); color: var(--jij-ai); font-family: var(--jij-display); font-size: var(--jij-label); line-height: 1; }
.jij-search-entry-body { flex: 1; min-width: 0; }
.jij-search-entry-body p { margin: 0; }
.jij-search-entry-title { font-family: var(--jij-display); font-weight: 500; line-height: 1.35; color: var(--jij-sumi); text-decoration: none; }
.jij-search-entry-title:hover { text-decoration: underline; }
.jij-search-entry-title:focus-visible { outline: 2px solid var(--jij-tekhelet); outline-offset: 2px; box-shadow: 0 0 0 2px var(--jij-washi); }
.jij-search-entry-meta { margin-top: 2px !important; font-size: var(--jij-caption); line-height: 18px; color: var(--jij-muted); }
.jij-search-entry-text { margin-top: var(--jij-space-1) !important; font-size: var(--jij-label); line-height: 20px; color: var(--jij-sumi); }
@media (max-width: 600px) {
	.jij-source { gap: var(--jij-space-3); }
	.jij-source-img, .jij-source-cover { width: 48px; }
	.jij-source-img { --jij-portrait: 48px; }
	.jij-source-cover-empty { height: 48px; }
	.jij-source-title-alt { display: block; margin-left: 0; }
	.jij-search-filter-row { grid-template-columns: 1fr 1fr; gap: var(--jij-space-2) var(--jij-space-3); }
	.jij-search-form { padding: var(--jij-space-3); }
	.jij-search-entry { gap: var(--jij-space-3); }
	.jij-search-entry-img, .jij-search-entry-cover, .jij-search-entry-initials { width: 48px; }
	.jij-search-entry-img { --jij-portrait: 48px; }
	.jij-search-entry-cover, .jij-search-entry-initials { height: 48px; }
}
/* Secondary button: ai outline. (Primary actions use the theme's own button: ai fill, on-ai text.) */
.jij-button { display: inline-block; padding: var(--jij-space-2) var(--jij-space-4); border: 1px solid var(--jij-ai); border-radius: var(--jij-radius-sm); color: var(--jij-ai); background: transparent; text-decoration: none; font: inherit; font-size: var(--jij-label); font-weight: 500; line-height: 20px; cursor: pointer; }
.jij-button:hover { background: var(--jij-ai-tint); }
.jij-button-quiet { border-color: transparent; color: var(--jij-tekhelet); text-decoration: underline; padding-left: var(--jij-space-1); padding-right: var(--jij-space-1); }
.jij-button-quiet:hover { background: transparent; }

.jij-section { margin-top: var(--jij-space-10); }
/* 0.13.3: a researcher's own headed sections, after the list of their work. */
.jij-researcher-notes { margin-top: var(--jij-space-10); }
.jij-researcher-notes li { margin-bottom: var(--jij-space-3); }
/* Long web addresses (Sources, facts) wrap instead of widening the page on phones. */
.jij-entry { overflow-wrap: anywhere; }
.jij-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(10em, 1fr)); gap: var(--jij-space-3); }
.jij-gallery img { width: 100%; height: 10em; object-fit: cover; display: block; border-radius: var(--jij-radius-sm); }
.jij-downloads { padding-left: 1.25em; }
.jij-player { margin-bottom: var(--jij-space-4); }
.jij-embed iframe { max-width: 100%; }

/* ------------------------------------------------------------------ */
/* Cards (lists of entries, researcher pages)                          */
/* ------------------------------------------------------------------ */

.jij-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15em, 1fr)); gap: var(--jij-space-6); margin: var(--jij-space-4) 0 var(--jij-space-10); }
.jij-card { background: var(--jij-raised); border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); overflow: hidden; display: flex; }
.jij-card-link { display: flex; flex-direction: column; width: 100%; text-decoration: none; color: var(--jij-sumi); }
.jij-card-link:hover h3 { text-decoration: underline; }
.jij-card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.jij-card-body { padding: var(--jij-space-4); display: flex; flex-direction: column; gap: var(--jij-space-1); flex: 1; }
.jij-card-type { font-size: var(--jij-caption); color: var(--jij-muted); }
.jij-card h3 { font-family: var(--jij-display); font-size: 1.15em; font-weight: 500; margin: 0; line-height: 1.3; }
.jij-card p { font-size: 0.95em; margin: 0; }
.jij-card-date { font-size: var(--jij-caption); color: var(--jij-muted); margin-top: auto; padding-top: var(--jij-space-2); }
.jij-members-note { padding: var(--jij-space-3) var(--jij-space-4); background: var(--jij-ai-tint); color: var(--jij-sumi); border-radius: var(--jij-radius-sm); }

/* ------------------------------------------------------------------ */
/* Join and Log in forms                                               */
/* ------------------------------------------------------------------ */

.jij-register { max-width: 34em; }
.jij-register label { font-size: var(--jij-label); font-weight: 500; }
.jij-register input[type=text], .jij-register input[type=email], .jij-register input[type=password] { width: 100%; box-sizing: border-box; margin-top: var(--jij-space-1); padding: var(--jij-space-2) var(--jij-space-3); font: inherit; font-weight: 400; color: var(--jij-sumi); background: var(--jij-raised); border: 1px solid var(--jij-muted); border-radius: var(--jij-radius-md); }
.jij-row { display: flex; gap: var(--jij-space-4); flex-wrap: wrap; }
.jij-row label { flex: 1 1 12em; }
.jij-check { display: flex; gap: var(--jij-space-2); align-items: flex-start; font-weight: 400 !important; }
.jij-check input { margin-top: .3em; accent-color: var(--jij-ai); }
.jij-hp { position: absolute; left: -9999px; }
.jij-login .jij-admin-login { margin-top: var(--jij-space-10); font-size: var(--jij-caption); color: var(--jij-muted); }

/* Messages: information on ai-tint; problems on washi-raised with a shu border and shu text. */
.jij-notice { padding: var(--jij-space-3) var(--jij-space-4); background: var(--jij-ai-tint); color: var(--jij-sumi); border-radius: var(--jij-radius-sm); }
.jij-notice.jij-error { background: var(--jij-raised); border: 1px solid var(--jij-shu); color: var(--jij-shu); }

.jij-account-links a { margin-left: var(--jij-space-4); }

/* ------------------------------------------------------------------ */
/* Talks                                                               */
/* ------------------------------------------------------------------ */

.jij-talks { display: flex; flex-direction: column; gap: var(--jij-space-6); margin: var(--jij-space-4) 0 var(--jij-space-10); }
.jij-talk { display: flex; gap: var(--jij-space-6); padding-bottom: var(--jij-space-6); border-bottom: 1px solid var(--jij-hairline); }
.jij-talk-date { flex: 0 0 8.5em; font-size: var(--jij-label); font-weight: 500; line-height: 20px; color: var(--jij-ai); padding-top: .2em; }
.jij-talk-body { flex: 1; min-width: 0; }
.jij-talk-body h3 { font-family: var(--jij-display); font-weight: 500; margin: 0 0 var(--jij-space-1); font-size: 1.3em; line-height: 1.3; }
.jij-talk-body h3 a { color: var(--jij-sumi); text-decoration: none; }
.jij-talk-body h3 a:hover { text-decoration: underline; }
.jij-talk-body p { margin: 0 0 var(--jij-space-2); }
.jij-talk-meta { font-size: var(--jij-label); color: var(--jij-muted); }
.jij-talk .jij-buttons { margin: var(--jij-space-2) 0 0; }
.jij-talks-empty { color: var(--jij-muted); }

/* People list (the People page): portrait thumbnail beside each person, rows like the talk list. */
.jij-people { display: flex; flex-direction: column; gap: var(--jij-space-6); margin: var(--jij-space-6) 0 var(--jij-space-10); }
.jij-person { display: flex; gap: var(--jij-space-6); align-items: flex-start; padding-bottom: var(--jij-space-6); border-bottom: 1px solid var(--jij-hairline); }
.jij-person-portrait { flex: none; --jij-portrait: 96px; }
.jij-person-portrait .wp-block-image.jij-portrait { margin: 0; }
.jij-portrait-initials { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: var(--jij-radius-disc); background: var(--jij-ai-tint); color: var(--jij-ai); font-family: var(--jij-display); font-size: var(--jij-heading); text-decoration: none; }
.jij-person-body { flex: 1; min-width: 0; }
.jij-person-body h3 { font-family: var(--jij-display); font-weight: 500; margin: 0; font-size: 1.3em; line-height: 1.3; }
.jij-person-body h3 a { color: var(--jij-sumi); text-decoration: none; }
.jij-person-body h3 a:hover { text-decoration: underline; }
.jij-person-ja { margin: var(--jij-space-1) 0 0; color: var(--jij-ai); font-family: var(--wp--preset--font-family--display-ja, "Shippori Mincho", serif); }
.jij-person-meta { margin: var(--jij-space-1) 0 var(--jij-space-2); font-size: var(--jij-label); color: var(--jij-muted); }
.jij-person-body p { margin-top: 0; margin-bottom: var(--jij-space-2); }
.jij-person-more a, .jij-featured-more a { color: var(--jij-tekhelet); }
.jij-featured-sep { color: var(--jij-hairline); margin: 0 var(--jij-space-2); }
.jij-people-empty { color: var(--jij-muted); }
@media (max-width: 600px) {
	.jij-person { gap: var(--jij-space-4); }
	.jij-person-portrait { --jij-portrait: 64px; }
	.jij-portrait-initials { width: 64px; height: 64px; font-size: var(--jij-label); }
}
@media (max-width: 600px) {
	.jij-talk { flex-direction: column; gap: var(--jij-space-1); }
	.jij-talk-date { flex-basis: auto; }
}

/* Next talk button (home page): the theme's primary button (ai fill) with three lines. */
.jij-next-talk .jij-next-talk-link { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--jij-space-1); text-align: left; line-height: 1.3; max-width: 100%; border-radius: var(--jij-radius-sm); }
.jij-next-talk-label { font-size: var(--jij-caption); font-weight: 500; }
.jij-next-talk-title { font-size: 1.05em; font-weight: 700; }
.jij-next-talk-meta { font-size: var(--jij-label); font-weight: 400; }

/* ------------------------------------------------------------------ */
/* Comments under talks, articles and pages                            */
/* ------------------------------------------------------------------ */

.jij-comments { margin-top: var(--jij-space-10); padding-top: var(--jij-space-6); border-top: 1px solid var(--jij-hairline); }
.jij-comments .wp-block-comments-title { font-family: var(--jij-display); font-size: var(--jij-heading); font-weight: 500; margin: 0 0 var(--jij-space-4); }

/* Each comment is a card; replies are indented cards inside it. */
.jij-comments .wp-block-comment-template,
.jij-comments .wp-block-comment-template ol { list-style: none; margin: 0; padding: 0; }
.jij-comments .wp-block-comment-template li { margin: 0 0 var(--jij-space-4); padding: var(--jij-space-4) var(--jij-space-6); background: var(--jij-raised); border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); }
.jij-comments .wp-block-comment-template ol { margin-top: var(--jij-space-4); }
.jij-comments .wp-block-comment-template ol li { margin-left: var(--jij-space-4); }
.jij-comment-meta { gap: var(--jij-space-1) var(--jij-space-3); align-items: baseline; font-size: var(--jij-label); margin-bottom: var(--jij-space-2); }
.jij-comment-meta .wp-block-comment-author-name { font-weight: 500; color: var(--jij-sumi); }
.jij-comment-meta .wp-block-comment-date, .jij-comment-meta .wp-block-comment-date a { color: var(--jij-muted); text-decoration: none; }
.jij-comment-meta .wp-block-comment-reply-link { margin-left: auto; }
.jij-comment-meta .wp-block-comment-reply-link a { color: var(--jij-tekhelet); }
.jij-comments .wp-block-comment-content p:first-child { margin-top: 0; }
.jij-comments .wp-block-comment-content p:last-child { margin-bottom: 0; }
.jij-comments .comment-awaiting-moderation { display: block; font-size: var(--jij-caption); color: var(--jij-muted); margin-bottom: var(--jij-space-2); }

/* The comment box: the same card, under the comments or under the comment being replied to. */
.jij-comments .comment-respond { margin-top: var(--jij-space-6); padding: var(--jij-space-4) var(--jij-space-6) var(--jij-space-6); background: var(--jij-raised); border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); }
.jij-comments li .comment-respond { margin: var(--jij-space-4) 0 0; padding: var(--jij-space-4) 0 0; border: 0; border-top: 1px solid var(--jij-hairline); border-radius: 0; background: transparent; }
.jij-comments .comment-reply-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--jij-space-1) var(--jij-space-4); margin: 0 0 var(--jij-space-3); font-family: var(--jij-display); font-size: 1.35em; font-weight: 500; }
.jij-comments .comment-reply-title small { font-family: inherit; font-size: var(--jij-label); font-weight: 400; }
.jij-comments .comment-reply-title small a { color: var(--jij-tekhelet); }
.jij-comments .logged-in-as, .jij-comments .must-log-in { font-size: var(--jij-label); color: var(--jij-muted); margin: 0 0 var(--jij-space-3); }
.jij-comments .logged-in-as a, .jij-comments .must-log-in a { color: var(--jij-tekhelet); }
.jij-comments textarea { width: 100%; box-sizing: border-box; padding: var(--jij-space-2) var(--jij-space-3); font: inherit; color: var(--jij-sumi); background: var(--jij-raised); border: 1px solid var(--jij-muted); border-radius: var(--jij-radius-md); }
.jij-comments .form-submit { margin: var(--jij-space-3) 0 0; }

/* ------------------------------------------------------------------ */
/* Featured person, mailing list                                       */
/* ------------------------------------------------------------------ */

.jij-featured-person[hidden] { display: none !important; }
.jij-featured-more { margin-top: var(--jij-space-6); }

/* Portraits: a disc (radius-disc is for the sun, seals and portraits only). */
.wp-block-image.jij-portrait { margin: 0; flex: none; }
.wp-block-image.jij-portrait img { width: var(--jij-portrait, 144px); height: var(--jij-portrait, 144px); object-fit: cover; object-position: 50% 20%; border-radius: var(--jij-radius-disc); display: block; }
.jij-featured-head { gap: var(--jij-space-6); }
.jij-portrait-wrap { --jij-portrait: 224px; margin: 0 0 var(--jij-space-6); }
.jij-portrait-wrap .wp-element-caption, .jij-photos .wp-element-caption { font-size: var(--jij-caption); line-height: 20px; color: var(--jij-muted); margin: var(--jij-space-2) 0 0; text-align: left; max-width: 40em; }
@media (max-width: 600px) {
	.jij-featured-head { --jij-portrait: 96px; gap: var(--jij-space-4); }
	.jij-portrait-wrap { --jij-portrait: 160px; }
}

/* A person's photos: a grid of captioned photos, each linking to the full image. */
.jij-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(14em, 1fr)); gap: var(--jij-space-6); }
.jij-photos .wp-block-image { margin: 0; }
.jij-photos img { width: 100%; height: 14em; object-fit: cover; display: block; border: 1px solid var(--jij-hairline); border-radius: var(--jij-radius-sm); }
.jij-photos a { cursor: zoom-in; }

/* Photo viewer (assets/photos.js): the photo large on sumi, previous/next on the edges. */
.jij-viewer { box-sizing: border-box; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: var(--jij-space-10) calc(var(--jij-space-10) + 48px); border: 0; background: transparent; color: var(--jij-washi); }
.jij-viewer[open] { display: flex; align-items: center; justify-content: center; }
.jij-viewer::backdrop { background: var(--jij-sumi); }
.jij-viewer-figure { margin: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; height: 100%; justify-content: center; }
.jij-viewer-img { display: block; min-height: 0; max-width: 100%; max-height: calc(100% - 5em); object-fit: contain; border-radius: var(--jij-radius-sm); }
.jij-viewer-caption { margin-top: var(--jij-space-3); max-width: 48em; font-size: var(--jij-caption); line-height: 20px; color: var(--jij-washi); text-align: center; }
.jij-viewer-caption a { color: var(--jij-washi); text-decoration: underline; }
.jij-viewer-count { margin-right: var(--jij-space-2); font-weight: 500; }
.jij-viewer-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: var(--jij-radius-sm); background: var(--jij-raised); color: var(--jij-ai); cursor: pointer; }
.jij-viewer-btn svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }
.jij-viewer-btn:hover { background: var(--jij-ai-tint); }
.jij-viewer-btn:focus-visible { outline: 2px solid var(--jij-tekhelet); outline-offset: 2px; box-shadow: 0 0 0 2px var(--jij-washi); }
.jij-viewer-prev { left: var(--jij-space-4); top: 50%; transform: translateY(-50%); }
.jij-viewer-next { right: var(--jij-space-4); top: 50%; transform: translateY(-50%); }
.jij-viewer-close { right: var(--jij-space-4); top: var(--jij-space-4); }
@media (max-width: 600px) {
	/* On phones the controls hug the edges and the photo and caption sit between them, never under them. */
	.jij-viewer { padding: calc(var(--jij-space-4) + 48px) calc(2 * var(--jij-space-2) + 48px) var(--jij-space-6); }
	.jij-viewer-img { max-height: calc(100% - 7em); }
	.jij-viewer-prev { left: var(--jij-space-2); }
	.jij-viewer-next { right: var(--jij-space-2); }
}
.jij-featured-more a { color: var(--jij-tekhelet); }

/* Mailing list: a callout on ai-tint. */
.jij-mailing { padding: var(--jij-space-4) var(--jij-space-6); background: var(--jij-ai-tint); color: var(--jij-sumi); border-radius: var(--jij-radius-sm); margin: var(--jij-space-4) 0 var(--jij-space-10); }
.jij-mailing p:last-child { margin-bottom: 0; }
.jij-mailing .jij-button-quiet { color: var(--jij-ai); }
