@font-face{font-family:DM Sans;src:url("./assets/fonts/dm-sans.woff2") format("woff2");font-weight:400 700;font-display:swap}
@font-face{font-family:DM Serif Text;src:url("./assets/fonts/dm-serif-text.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:Noto Serif Hebrew;src:url("./assets/fonts/noto-serif-hebrew.woff2") format("woff2");font-weight:400 600;font-display:swap}
:root {
  color-scheme: light;
  --canvas: #faf9f5;
  --ink: #282d28;
  --muted: #60645c;
  --rust: #a24730;
  --line: #dedfd5;
  --soft: #f1f1ea;
  --serif: "DM Serif Text", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --hebrew: "Noto Serif Hebrew", "Times New Roman", serif;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
[hidden], .symbols { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
input, button, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a { touch-action: manipulation; }
button { background: none; border: 0; }
:focus-visible { outline: 3px solid #347675; outline-offset: 3px; }
h1[tabindex]:focus, main[tabindex]:focus { outline: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font: 400 2rem/1.16 var(--serif); }
h1 { font-size: clamp(2.45rem, 4.3vw, 3.75rem); letter-spacing: -.045em; }
.shell { width: min(1180px, calc(100% - clamp(40px, 10vw, 144px))); margin-inline: auto; }
main { flex: 1; }
.icon { flex: none; width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.reverse { transform: rotate(180deg); }
.down { transform: rotate(90deg); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
.skip:focus { position: fixed; top: .5rem; left: .5rem; z-index: 20; background: white; padding: .6rem; }
.masthead { border-bottom: 1px solid var(--line); }
.mast-inner, nav, .wordmark, .nav-item, .primary, .collection-title, .search-box, .footer-inner, .back-link, .reader-heading, .reader-options, .page-step, .modes, .modal-top, .popup-head, .eyebrow, .card-meta, .card-bottom, .credit-links { display: flex; align-items: center; }
.mast-inner, .footer-inner, .reader-heading, .modal-top, .popup-head, .card-bottom { justify-content: space-between; }
.mast-inner { height: 72px; }
.wordmark { gap: 10px; font: 400 1.7rem/1 var(--serif); letter-spacing: -.055em; text-decoration: none; }
nav { height: 100%; gap: clamp(16px, 2.8vw, 36px); }
.nav-item { position: relative; height: 100%; padding: 0; gap: .5rem; text-decoration: none; font-size: .91rem; font-weight: 500; color: var(--muted); }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover, .nav-item.current { color: var(--rust); }
.nav-item.current::after { content: ""; position: absolute; bottom: -1px; height: 3px; inset-inline: 0; background: var(--rust); border-radius: 3px 3px 0 0; }
.intro { padding: clamp(25px, 3.5vw, 48px) 0 26px; }
.intro p { margin-top: 8px; color: var(--muted); font-size: 1.03rem; }
.feature { display: grid; grid-template-columns: .92fr 1.3fr; border: 1px solid #ddd5b9; background: #f7efd7; border-radius: 14px; overflow: hidden; }
.feature-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(26px, 3vw, 46px); }
.eyebrow { gap: .42rem; font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--rust); }
.eyebrow .icon { width: 14px; height: 14px; stroke-width: 2; }
.feature h2 { font-size: clamp(3.05rem, 4.8vw, 4.5rem); line-height: 1; letter-spacing: -.055em; margin-top: 13px; }
.featured-he, .card-he { font: 400 1.3rem/1.55 var(--hebrew); color: #6c624c; }
.featured-he { margin-top: 4px; }
.blurb { margin: 12px 0 20px; color: #4f5247; max-width: 39ch; font-size: .98rem; }
.primary { gap: 1rem; padding: 10px 17px; min-height: 43px; background: var(--rust); color: white; border-radius: 6px; text-decoration: none; font-size: .89rem; font-weight: 600; }
.primary:hover { background: #853c29; }
.feature-art { position: relative; min-height: 292px; overflow: hidden; }
.feature-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.collection { margin: clamp(32px, 3.2vw, 46px) 0 18px; }
.collection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.collection-title { gap: 14px; flex-wrap: wrap; }
.collection-title h2 { font-size: clamp(1.8rem, 2.7vw, 2.25rem); letter-spacing: -.04em; }
#count { font-size: .8rem; color: var(--muted); }
.search-box { gap: .55rem; border: 1px solid #d6d8ce; background: #fffefa; padding: 8px 12px; border-radius: 7px; color: var(--muted); }
.search-box:focus-within { outline: 2px solid #347675; outline-offset: 1px; }
.search-box input { outline: 0; border: 0; background: none; width: 132px; font-size: .87rem; padding: 1px 0; }
.search-box input::placeholder { color: var(--muted); }
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.card { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; background: #fffefa; border: 1px solid #dcdcd0; border-radius: 10px; }
.card:hover { border-color: #b79d88; box-shadow: 0 3px 12px #59452d10; }
.card-art { position: relative; aspect-ratio: 2.04; overflow: hidden; border-radius: 9px 9px 0 0; border-bottom: 1px solid #3332; background: var(--soft); }
.card-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card-copy { flex: 1; padding: 17px 20px 15px; display: flex; flex-direction: column; align-items: flex-start; }
.card-meta { color: var(--muted); font-size: .78rem; gap: .45rem; }
.card-meta .icon { width: 14px; height: 14px; }
.card h3 { margin-top: 7px; font-size: clamp(1.4rem, 2.1vw, 1.78rem); letter-spacing: -.035em; }
.card-bottom { width: 100%; margin-top: auto; padding-top: 3px; gap: 5px; }
.card-he { font-size: 1.06rem; text-align: left; color: #646459; }
.card-arrow { width: 29px; height: 29px; display: grid; place-items: center; flex: none; background: #f3f0e7; color: var(--rust); border-radius: 50%; }
.card:hover .card-arrow { color: white; background: var(--rust); }
#empty { padding: 2rem; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
#empty button { margin-top: .5rem; }
footer { margin-top: 46px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer-inner { min-height: 76px; gap: 20px; }
.footer-inner a, .text-button, .credit-links a { text-underline-offset: .2em; }
.text-button { font-weight: 500; padding: 0; text-decoration: underline; }
#reader {
  --mat-padding: clamp(5px, 1vw, 12px);
  --page-height: clamp(390px, calc(100svh - 205px), 900px);
  --page-width: calc(var(--page-height) * var(--page-ratio));
  width: min(100%, max(30rem, calc(var(--page-width) + 2 * var(--mat-padding) + 2px)));
  margin-inline: auto;
}
.back-link { flex: none; gap: .4rem; color: var(--rust); text-decoration: none; font-weight: 600; font-size: .85rem; }
.back-link:hover { text-decoration: underline; }
.reader-heading { gap: 16px; padding: 12px 2px; }
#story-title { display: flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: 0 .65rem; text-align: end; letter-spacing: normal; }
#story-he { font: 400 1.12rem/1.45 var(--hebrew); }
#story-en { font: 400 .85rem/1.4 var(--sans); color: var(--muted); }
.book-view { container-type: inline-size; border: 1px solid var(--line); border-radius: 10px; background: #fffefa; overflow: hidden; }
.paper-mat { display: grid; place-items: center; padding: var(--mat-padding); background: #eeeee7; }
.paper { position: relative; width: min(100%, var(--page-width)); aspect-ratio: var(--page-ratio); background: white; box-shadow: 0 2px 8px #35382927; }
#page-art, #hotspots { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hotspot { position: absolute; padding: 0; border-radius: 3px; color: transparent; white-space: nowrap; overflow: hidden; }
.hotspot:hover, .hotspot:focus-visible, .hotspot.selected { background: #ecac4160; box-shadow: inset 0 -2px #ac573c; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 12px; gap: 6px; border-top: 1px solid var(--line); }
.reader-options { gap: 8px; }
.page-step, .page-picker { border: 1px solid #d4d6ca; border-radius: 6px; min-height: 36px; background: #fffefa; font-size: .84rem; font-weight: 550; }
.page-step { gap: 4px; justify-self: start; padding: 5px 10px; }
#next { justify-self: end; }
.page-step:hover:not(:disabled), .page-picker:hover { border-color: #a18872; }
.page-step:disabled { color: #85867e; border-color: transparent; background: transparent; }
.page-picker { position: relative; display: inline-flex; align-items: center; border-color: transparent; }
.picker-caption { padding-left: 5px; }
.page-picker select { appearance: none; background: transparent; border: 0; border-radius: inherit; padding: 7px 23px 7px 4px; cursor: pointer; }
.page-picker svg { position: absolute; right: 7px; top: calc(50% - .5em); pointer-events: none; }
.modes { padding: 3px; border-radius: 7px; background: #efeee7; }
.modes button { border-radius: 5px; min-height: 32px; padding: 4px 9px; font-size: .8rem; font-weight: 600; }
.modes button[aria-pressed="true"] { background: #fffefa; color: var(--rust); box-shadow: 0 1px 5px #47473721; }
@container (max-width: 31rem) {
  .page-step { width: 36px; justify-content: center; padding: 0; }
  .page-step span { display: none; }
}
@container (max-width: 23rem) {
  .pagination { padding: 6px 4px; gap: 2px; }
  .reader-options { gap: 3px; }
  .picker-caption { display: none; }
  .modes button { padding-inline: 6px; }
}
#lookup, #info { border: 1px solid #d9d4c5; background: #fffefa; color: var(--ink); box-shadow: 0 10px 42px #292c2938; border-radius: 11px; }
#lookup { position: fixed; z-index: 5; width: min(315px, calc(100vw - 20px)); max-height: calc(100dvh - 22px); overflow-y: auto; padding: 14px 19px 19px; border-top: 3px solid var(--rust); overscroll-behavior: contain; }
.icon-button { background: var(--soft); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.icon-button:hover { background: #e9e4d8; }
#lookup-he { font: 500 1.7rem/1.55 var(--hebrew); margin: 4px 0 10px; }
#lookup dt { color: var(--muted); font-size: .76rem; font-weight: 600; }
#lookup dd { margin: 2px 0 9px; line-height: 1.45; }
#lookup dd:last-child { margin-bottom: 0; }
#lookup-reading { color: var(--rust); }
#info { width: min(570px, calc(100% - 28px)); max-height: min(80dvh, 760px); padding: clamp(20px, 3vw, 32px); }
#info::backdrop { background: #23272066; }
.modal-top { align-items: flex-start; gap: 18px; margin-bottom: 18px; }
#info-title { font-size: 2rem; letter-spacing: -.045em; }
#info-body p { color: #4d524a; margin: 8px 0 14px; }
#info-body h3 { font-size: 1.24rem; margin-top: 16px; }
#info-body section + section { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 5px; }
.credit-links { flex-wrap: wrap; gap: 7px 18px; }
.credit-links a, #info-body p a { color: var(--rust); font-size: .9rem; font-weight: 600; }
.credit-links a .icon { width: 13px; height: 13px; margin-left: 2px; }
@media(max-width: 900px) {
  .shell { width: calc(100% - 48px); }
  .shelf { gap: 15px; }
  .card-copy { padding: 13px 14px; }
}
@media(max-width: 720px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature-copy { padding: 24px; }
  .feature h2 { font-size: 3rem; }
  .feature-art { min-height: 250px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { margin-top: 30px; }
}
@media(max-width: 540px) {
  .shell { width: calc(100% - 32px); }
  .mast-inner { height: 62px; }
  .wordmark { font-size: 1.42rem; gap: 7px; }
  .wordmark img { width: 32px; height: 32px; }
  nav { gap: 12px; }
  .nav-item { font-size: .78rem; gap: 4px; }
  .nav-item .icon { width: 15px; height: 15px; }
  .nav-item.current { display: none; }
  .intro { padding: 24px 0 18px; }
  .intro p { font-size: .93rem; }
  .feature { display: flex; flex-direction: column; }
  .feature-art { order: -1; min-height: 0; aspect-ratio: 2.12; }
  .feature-copy { padding: 20px 22px 22px; }
  .feature h2 { font-size: 2.7rem; margin-top: 8px; }
  .featured-he { font-size: 1.1rem; margin-top: 3px; }
  .blurb { margin: 7px 0 14px; font-size: .92rem; }
  .collection-head { flex-wrap: wrap; gap: 13px; margin-bottom: 13px; }
  .collection-title { gap: 9px; }
  .search-box { width: 100%; padding: 8px 10px; gap: 6px; }
  .search-box input { width: 100%; font-size: .85rem; }
  .shelf { gap: 13px; }
  .card-copy { padding: 10px 11px; }
  .card h3 { font-size: 1.24rem; margin-top: 4px; }
  .card-he { font-size: .93rem; }
  .card-art { aspect-ratio: 1.45; }
  .card-arrow { display: none; }
  .card-meta { font-size: .7rem; }
  .footer-inner { min-height: 65px; font-size: .78rem; }
}
@media(max-width: 355px) {
  .collection-head { align-items: stretch; flex-direction: column; }
  .search-box input { width: 100%; }
  .shelf { grid-template-columns: 1fr; }
}
