/* ---------- Fonts (self-hosted, see FONTS in scripts/build.mjs) ---------- */
@font-face { font-family: "Noto Serif"; src: url("/fonts/noto-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("/fonts/noto-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("/fonts/noto-serif-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("/fonts/noto-serif-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Noto Naskh Arabic"; src: url("/fonts/noto-naskh-arabic-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Serif Hebrew"; src: url("/fonts/noto-serif-hebrew-hebrew-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Tokens (taken from the book cover) ---------- */
:root {
  color-scheme: light dark;
  --ink: #714112;           /* cover title & spine brown */
  --ink-dark: #1a120b;      /* cover subtitle & tagline */
  --spine: #71420e;
  --on-spine: #f8e2b8;

  --bg: #f6e7c8;
  --surface: #fcf3df;
  --surface-2: #efdcb4;
  --text: #2a1c0d;
  --muted: #6b5537;
  --border: #e0c89a;
  --accent: #714112;
  --accent-strong: #4f2d0b;
  --accent-soft: #f0d9ab;
  --on-accent: #fcf3df;
  --warm: #a0581c;
  --focus: #1f5fa8;
  --grain-alpha: 0.05;

  --serif: "Noto Serif", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --radius: 10px;
  --wrap: 68rem;
  --measure: 40rem;

  /* Paper grain: an SVG noise texture (vector, tiles seamlessly). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .2 0 0 0 0 .05 0 0 0 .6 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --blotch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004' numOctaves='4' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .3 0 0 0 0 .05 0 0 0 1.4 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c140b;
    --surface: #261b10;
    --surface-2: #33261a;
    --text: #f1e2c4;
    --muted: #c2ab86;
    --border: #4a3820;
    --accent: #e9b56a;
    --accent-strong: #f5cd8f;
    --accent-soft: #3a2a17;
    --on-accent: #1c140b;
    --warm: #e9a35f;
    --focus: #7fb2ea;
  }
}
:root[data-theme="dark"] {
  --bg: #1c140b;
  --surface: #261b10;
  --surface-2: #33261a;
  --text: #f1e2c4;
  --muted: #c2ab86;
  --border: #4a3820;
  --accent: #e9b56a;
  --accent-strong: #f5cd8f;
  --accent-soft: #3a2a17;
  --on-accent: #1c140b;
  --warm: #e9a35f;
  --focus: #7fb2ea;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grain), var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 700; margin: 0 0 0.75rem; text-wrap: balance; color: var(--accent); }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }
.prose { max-width: var(--measure); }
.muted { color: var(--muted); }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--warm); margin-bottom: 0.5rem; }
.eyebrow a { color: inherit; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); }
.lede p:last-child { margin-bottom: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: absolute; left: -9999px; top: 0.5rem; z-index: 10; background: var(--surface); padding: 0.5rem 1rem; border-radius: var(--radius); }
.skip-link:focus { left: 0.5rem; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.button {
  display: inline-block; padding: 0.65rem 1.25rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; line-height: 1.3;
}
.button:hover { background: var(--accent-strong); color: var(--on-accent); }
.button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.button.secondary:hover { background: var(--accent-soft); color: var(--accent-strong); }
.button.large { padding: 0.85rem 1.6rem; font-size: 1.1rem; }
.button.small { padding: 0.4rem 0.95rem; font-size: 0.95rem; white-space: nowrap; }
.button.disabled { background: var(--surface-2); color: var(--muted); cursor: default; }

/* ---------- Header (the book's spine) & footer ---------- */
.site-header { background: var(--spine); color: var(--on-spine); box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.brand { font-family: var(--serif); font-weight: 400; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-spine); text-decoration: none; }
.brand:hover { color: #fff; }
@media (max-width: 479px) { .brand { font-size: 0.8rem; line-height: 1.35; } }
.nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1rem; }
.nav li:empty { display: none; }
.nav a:not(.button) { color: var(--on-spine); opacity: 0.85; text-decoration: none; }
.nav a:not(.button):hover { opacity: 1; }
.nav .button { background: var(--on-spine); color: var(--spine); }

.site-footer { background: var(--spine); color: var(--on-spine); }
.site-footer a { color: var(--on-spine); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-top: 1.5rem; padding-bottom: 2rem; font-size: 0.9rem; }

/* ---------- Cover hero: a vector recreation of the front cover ---------- */
.cover-hero {
  --paper-ink: #714112;
  --paper-ink-dark: #1a120b;
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--paper-ink);
  background:
    var(--grain),
    var(--blotch),
    radial-gradient(ellipse 75% 60% at 58% 38%, #f9d49c 0%, #f1c07a 38%, #e9ad5c 68%, #d8933d 100%);
  /* Fine grain tiles; the large blotches stretch once over the whole hero so no seams show. */
  background-size: 220px 220px, cover, auto;
  background-repeat: repeat, no-repeat, no-repeat;
  border-bottom: 1px solid rgb(113 65 18 / 0.35);
}
/* Darker, burnt-looking edges like the printed cover. */
.cover-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  box-shadow: inset 0 0 120px 20px rgb(150 85 20 / 0.35);
}
.cover-art { position: relative; max-width: 54rem; margin: 0 auto; padding: 3rem 16px 3.5rem; text-align: center; }

.cover-title { margin: 0; color: var(--paper-ink); font-weight: 700; line-height: 1.02; letter-spacing: 0.005em; text-shadow: 0 1px 0 rgb(255 236 200 / 0.45); }
.cover-title .t-line { display: block; font-size: clamp(2.6rem, 10vw, 5.4rem); }
.cover-title .t-and { display: flex; align-items: center; justify-content: center; gap: 0.45em; font-size: clamp(1.7rem, 6.2vw, 3.4rem); margin: 0.08em 0 0.02em; }
.cover-title .rule { display: inline-block; width: 1.75em; height: 2px; background: currentColor; opacity: 0.85; }

.cover-subtitle { margin: 1.1rem 0 0; font-family: var(--serif); font-weight: 700; color: var(--paper-ink-dark); font-size: clamp(1.05rem, 2.8vw, 1.6rem); line-height: 1.3; letter-spacing: 0.015em; }

.cover-middle { position: relative; margin-top: 1rem; padding-top: 1rem; }
.cover-eyes {
  position: absolute; z-index: 0; top: -0.5rem; right: -4%; width: 78%;
  mix-blend-mode: multiply; opacity: 0.9; filter: saturate(0.7) brightness(1.06);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 52% 52%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 52% 52%, #000 55%, transparent 100%);
}
.cover-label {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  width: max-content; margin: 2.6rem 0 0 0;
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.15rem, 3vw, 1.9rem); color: var(--paper-ink);
}
.cover-label .ornament { width: 7.5em; height: 0.45em; color: var(--paper-ink); }

.scrolls { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-start; margin: 0.5rem 0 0; }
.scroll {
  position: relative; display: grid; place-items: center;
  width: clamp(9.5rem, 40vw, 17rem); aspect-ratio: 300 / 330;
  filter: drop-shadow(0 10px 12px rgb(80 40 5 / 0.35));
}
.scroll-ar { transform: rotate(-3.5deg); z-index: 1; }
.scroll-he { transform: rotate(4.5deg) translateY(1.2rem); margin-left: -1.5rem; }
.scroll-paper { position: absolute; inset: 0; width: 100%; height: 100%; }
.scroll p { position: relative; margin: 0; padding: 0 8%; color: var(--paper-ink); font-weight: 700; font-size: clamp(1rem, 3.6vw, 1.75rem); }
.scroll-ar p { font-family: "Noto Naskh Arabic", var(--serif); line-height: 1.75; }
.scroll-he p { font-family: "Noto Serif Hebrew", var(--serif); line-height: 1.3; }

.cover-tagline { margin: 2.6rem 0 0; font-family: var(--serif); font-weight: 700; font-style: italic; color: var(--paper-ink-dark); font-size: clamp(1.45rem, 4vw, 2.3rem); line-height: 1.2; }
.cover-author { margin: 1.4rem 0 0; font-family: var(--serif); font-weight: 700; color: var(--paper-ink); font-size: clamp(1.6rem, 4.4vw, 2.6rem); }
.cover-hero .actions { justify-content: center; margin-top: 2rem; }
.cover-hero .button { background: var(--paper-ink); color: #fcf1da; }
.cover-hero .button:hover { background: #4f2d0b; }
.cover-hero .button.secondary { background: rgb(255 240 210 / 0.35); color: var(--paper-ink); box-shadow: inset 0 0 0 1.5px var(--paper-ink); }
.cover-hero .button.secondary:hover { background: rgb(255 240 210 / 0.6); }
.cover-hero .button.disabled { background: rgb(113 65 18 / 0.14); color: var(--paper-ink); box-shadow: inset 0 0 0 1px rgb(113 65 18 / 0.35); }
.cover-hero :focus-visible { outline-color: #1f5fa8; }

@media (max-width: 639px) {
  .cover-eyes { width: 100%; right: -22%; top: 0; }
  .cover-label { margin-top: 1.6rem; }
  .scroll-he { margin-left: -1rem; }
}

/* ---------- Fallback hero (used when book.json has no cover_art) ---------- */
.hero {
  padding: 3rem 0 4rem; color: #2a1c0d;
  background: var(--grain), radial-gradient(ellipse 80% 70% at 35% 40%, #f9d49c 0%, #f1c07a 45%, #e3a456 100%);
  border-bottom: 1px solid rgb(113 65 18 / 0.35);
}
.hero h1 { color: #714112; }
.hero .eyebrow { color: #8a3f10; }
.hero .subtitle { color: #1a120b; font-weight: 700; font-style: normal; }
.hero .byline, .hero .tagline { color: #2a1c0d; }
.hero .tagline { font-style: italic; font-weight: 700; }
.hero .epigraph { color: #4a3216; border-left-color: #714112; }
.hero .button { background: #714112; color: #fcf1da; }
.hero .button:hover { background: #4f2d0b; color: #fcf1da; }
.hero .button.secondary { background: rgb(255 240 210 / 0.4); color: #714112; box-shadow: inset 0 0 0 1.5px #714112; }
.hero .button.disabled { background: rgb(113 65 18 / 0.14); color: #714112; box-shadow: inset 0 0 0 1px rgb(113 65 18 / 0.35); }
.hero-inner { display: grid; gap: 2.5rem; align-items: center; }
.cover { width: min(100%, 320px); justify-self: center; border-radius: 4px; box-shadow: 0 2px 4px rgb(0 0 0 / 0.2), 0 24px 50px -14px rgb(60 30 0 / 0.65); }
.cover-figure { margin: 0; justify-self: center; width: min(100%, 320px); display: flex; flex-direction: column; align-items: center; }
.cover-figure .cover { width: 100%; }
.cover-caption { margin-top: 1rem; font-size: 0.8rem; line-height: 1.45; color: #3a2710; text-align: center; }
.cover-caption p { margin: 0 0 0.55rem; }
.cover-caption .cc-head { font-weight: 600; font-style: italic; margin-bottom: 0.6rem; }
.cover-caption .cc-orig { display: block; font-size: 1rem; line-height: 1.6; color: #2a1c0d; }
.cover-caption .cc-orig[lang="ar"] { font-family: "Noto Naskh Arabic", var(--serif); font-weight: 700; }
.cover-caption .cc-orig[lang="he"] { font-family: "Noto Serif Hebrew", var(--serif); font-weight: 700; }
.cover-caption .cc-tr { display: block; font-family: var(--serif); }
.cover-caption .cc-src { font-size: 0.75rem; color: #5a4220; white-space: nowrap; }
.footer-inner .credit { margin-left: auto; opacity: 0.75; }
@media (max-width: 559px) { .footer-inner .credit { margin-left: 0; } }
.subtitle { font-family: var(--serif); font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-style: italic; color: var(--muted); }
.byline { font-size: 1.15rem; }
.tagline { font-size: 1.2rem; max-width: var(--measure); font-family: var(--serif); }
.epigraph { margin: 1.5rem 0 0; padding: 0.25rem 0 0.25rem 1.1rem; border-left: 3px solid var(--warm); font-family: var(--serif); font-style: italic; color: var(--muted); max-width: 34rem; }
.epigraph p { margin: 0; }
@media (min-width: 760px) {
  .hero { padding: 4rem 0 4.5rem; }
  .hero-inner { grid-template-columns: minmax(0, 380px) 1fr; gap: 4rem; align-items: start; }
  .cover-figure { width: 100%; }
  .cover { width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section + .section { border-top: 1px solid var(--border); }
.page-head { padding: 3.5rem 0 1rem; }
.page-head + .section { padding-top: 1.5rem; }
.prose strong { color: var(--accent); }

/* About the book */
.two-col { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 20rem; align-items: start; } }
.details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.details-cover { display: block; width: 100%; max-width: 15rem; margin: 0 auto 1.25rem; border-radius: 3px; box-shadow: 0 12px 28px -10px rgb(60 30 5 / 0.55); }
.details h3 { font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.details dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.details dd:last-of-type { white-space: nowrap; }

/* Story cards */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); margin-top: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.card .eyebrow { margin-bottom: 0.35rem; }
.card > p:not(.eyebrow) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; margin-bottom: 0.5rem; }
.card .more { margin-top: auto; padding-top: 0.75rem; color: var(--accent); font-weight: 600; font-size: 0.95rem; }

/* Author */
.author { display: grid; gap: 1.5rem; align-items: start; }
.author-photo { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; }
@media (min-width: 640px) { .author.has-photo { grid-template-columns: 160px 1fr; gap: 2.5rem; } }

/* Buy band */
.buy-band { background: var(--spine); color: var(--on-spine); padding: 3rem 0; }
.buy-band h2 { color: var(--on-spine); }
.buy-band p { opacity: 0.92; max-width: var(--measure); }
.buy-band .button { background: var(--on-spine); color: var(--spine); }
.buy-band .button:hover { background: #fff; color: var(--spine); }
.buy-band .button.secondary { background: transparent; color: var(--on-spine); box-shadow: inset 0 0 0 1.5px var(--on-spine); }
.buy-band .button.disabled { background: rgb(255 255 255 / 0.12); color: var(--on-spine); }
.buy-inner { display: flex; gap: 2rem; align-items: center; }
.buy-cover { width: 120px; flex: none; border-radius: 3px; box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.6); }
@media (max-width: 559px) { .buy-cover { display: none; } }

/* ---------- Story reading page ---------- */
.extract-head { padding-top: 3.5rem; padding-bottom: 1.5rem; }
.extract-body { max-width: var(--measure); font-family: var(--serif); font-size: 1.15rem; line-height: 1.8; }
.extract-body p { margin: 0 0 1.25rem; }
.extract-body blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 3px solid var(--border); color: var(--muted); font-style: italic; }
.extract-body hr { border: 0; margin: 2.5rem 0; text-align: center; }
.extract-body hr::after { content: "⁂"; color: var(--muted); font-size: 1.3rem; }
.extract-body h2, .extract-body h3 { margin-top: 2rem; }
.continue { max-width: var(--measure); margin: 3rem 0 2rem; padding: 1.5rem; text-align: center; background: var(--accent-soft); border-radius: var(--radius); }
.continue-lead { font-family: var(--serif); font-size: 1.3rem; margin: 0; }
.continue .actions { justify-content: center; margin-top: 1rem; }
.pager { max-width: var(--measure); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pager-more { max-width: var(--measure); margin: 1.25rem 0 0; padding-bottom: 3rem; text-align: center; font-size: 0.95rem; }
.pager a { display: block; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); background: var(--surface); }
.pager a:hover { border-color: var(--accent); color: var(--text); }
.pager span { display: block; font-size: 0.85rem; color: var(--muted); }
.pager .next { text-align: right; grid-column: 2; }

/* ---------- Story themes & art ---------- */
:root { --theme-muslim: #1e6b5a; --theme-jewish: #2b3a7a; --theme-love: #a3354d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --theme-muslim: #6cc3a8; --theme-jewish: #9fb0f0; --theme-love: #f0a0b2; }
}
:root[data-theme="dark"] { --theme-muslim: #6cc3a8; --theme-jewish: #9fb0f0; --theme-love: #f0a0b2; }


/* Story page background: the theme art, fixed behind the text at high transparency. */
.extract { position: relative; isolation: isolate; }
.site-header, .site-footer, .buy-band { position: relative; z-index: 2; }
.story-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 1; }
.story-bg .art-photo, .story-bg .art-svg { display: block; width: 100%; height: 100%; }
.story-bg .art-photo { object-fit: cover; object-position: 50% 50%; }
.story-bg .art-photo.pos-top { object-position: 50% 25%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .story-bg { opacity: 0.8; } }
:root[data-theme="dark"] .story-bg { opacity: 0.8; }

/* The story text sits on a soft paper panel so it stays easy to read over the picture. */
:root { --panel: rgb(250 238 212 / 0.84); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --panel: rgb(28 20 11 / 0.86); } }
:root[data-theme="dark"] { --panel: rgb(28 20 11 / 0.86); }
.reading {
  max-width: calc(var(--measure) + 4rem); margin: 2.5rem 0 0; padding: 2.25rem 2rem 1.75rem;
  background: var(--panel); border-radius: 14px; box-shadow: 0 12px 40px -18px rgb(40 20 0 / 0.55);
}
.reading .extract-head { padding: 0 0 1.25rem; }
.reading .art-note { margin-top: 2rem; }
/* On phones the panel fills the width, so leave the top of the picture uncovered. */
@media (max-width: 639px) { .reading { margin-top: 42vh; padding: 1.5rem 1.15rem 1.25rem; } }
.extract .continue, .extract .pager { max-width: calc(var(--measure) + 4rem); }
.extract .pager-more { max-width: calc(var(--measure) + 4rem); }
.extract .pager-more a { display: inline-block; padding: 0.35rem 0.9rem; border-radius: 999px; background: var(--panel); }

.art-note { max-width: var(--measure); margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.art-note-label { font-weight: 600; }
.art-note [lang="ar"] { font-family: "Noto Naskh Arabic", var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.art-note [lang="he"] { font-family: "Noto Serif Hebrew", var(--serif); font-weight: 700; color: var(--text); }
.art-note [lang="fr"] { font-family: var(--serif); font-style: italic; color: var(--text); }
.art-credit { display: block; font-size: 0.82rem; letter-spacing: 0.02em; }

/* Story cards: the same art, faint, behind the card text. */
.card { position: relative; isolation: isolate; overflow: hidden; }
.card-bg { position: absolute; inset: 0; z-index: -1; opacity: 0.22; pointer-events: none; }
.card-bg .art-photo, .card-bg .art-svg { display: block; width: 100%; height: 100%; }
.card-bg .art-photo { object-fit: cover; }

/* ---------- Stories page: compact table of contents ---------- */
.browse-all { margin: 1.75rem 0 0; text-align: center; }
.story-list { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.story-list li + li { border-top: 1px solid var(--border); }
.story-list a { display: block; padding: 0.85rem 0; color: var(--text); text-decoration: none; }
.story-list .story-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; line-height: 1.3; color: var(--accent); }
.story-list a:hover .story-title { text-decoration: underline; }
.story-list .story-teaser {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  margin-top: 0.2rem; color: var(--muted); font-size: 0.95rem; line-height: 1.5;
}

/* ---------- 404 ---------- */
.not-found { padding: 5rem 0; text-align: center; }
.not-found .lede { margin: 0 auto; }
.not-found .actions { justify-content: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
