:root {
  --page: #f3eee3;
  --ink: #1f2a3d;
  --ink-2: #6f6a5e;
  --hairline: #e2dac8;
  --card: #ffffff;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.page { max-width: 1060px; margin: 0 auto; padding: 20px 16px 64px; display: flex; flex-direction: column; gap: 28px; }
a { color: #2e6e63; }

/* top nav */
.topbar { background: #0d1b33; border-radius: 16px; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 8px; z-index: 20; flex-wrap: wrap; }
.topbar-brand { font-family: Georgia, 'Times New Roman', serif; color: #e8b13f; font-size: 18px; letter-spacing: 0.05em; white-space: nowrap; }
.topbar-links { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar-links a { color: #f5f0e6; text-decoration: none; font-size: 13px; }
.topbar-links a:hover { color: #e8b13f; }

/* hero */
.hero { background: #f8f4ea; border: 1px solid #e5dccb; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.hero-photo { width: 100%; max-width: 320px; border-radius: 16px; border: 3px solid #0d1b33; object-fit: cover; aspect-ratio: 4 / 5; }
.hero-eyebrow { color: #8a6a1f; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.hero-name { font-family: Georgia, 'Times New Roman', serif; font-size: 40px; line-height: 46px; color: #0d1b33; letter-spacing: 0.03em; }
.hero-rule { width: 72px; height: 2px; background: #e8b13f; margin: 8px auto; }
.hero-tag { color: #2e6e63; font-size: 16px; line-height: 22px; }
.hero-intro { color: #3a4a63; font-size: 14px; line-height: 21px; margin: 4px 0 0; max-width: 46ch; }
@media (min-width: 768px) {
  .hero { flex-direction: row; text-align: left; padding: 40px 44px; gap: 40px; }
  .hero-photo { max-width: 300px; flex: none; }
  .hero-name { font-size: 54px; line-height: 60px; }
  .hero-tag { font-size: 18px; line-height: 26px; }
  .hero-rule { margin: 8px 0; }
}

/* speaking photos band */
.band { display: grid; grid-template-columns: 1fr; gap: 12px; }
.band-item { margin: 0; position: relative; border-radius: 16px; overflow: hidden; background: #0d1b33; }
.band-item img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 38%; }
.band-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; color: #f5f0e6; font-size: 13px; background: linear-gradient(transparent, rgba(13, 27, 51, 0.9)); }
@media (min-width: 768px) { .band { grid-template-columns: repeat(4, 1fr); } }

/* sections */
.section h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 28px; line-height: 36px; color: #0d1b33; margin: 0 0 12px; font-weight: 600; }

/* chabura */
.chabura-card { background: #12294f; border-radius: 16px; padding: 20px; color: #fff; }
.chabura-eyebrow { color: #e8b13f; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.chabura-title { font-family: Georgia, 'Times New Roman', serif; font-size: 22px; line-height: 30px; font-weight: 600; margin-top: 6px; }
.chabura-sub { color: #9fc5bb; margin-top: 4px; }
.chabura-note { color: rgba(255, 255, 255, 0.72); font-size: 12px; line-height: 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.16); }

/* search + choice pills */
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.text-input { width: 100%; max-width: 420px; padding: 9px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--card); font-size: 14px; color: var(--ink); }
.text-input:focus { outline: 2px solid #2e6e63; outline-offset: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.choice-row button { border: 1px solid var(--hairline); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.choice-row button[aria-pressed="true"] { background: #0d1b33; color: #f5f0e6; border-color: #0d1b33; }

/* library + sheets */
.lib-group { margin-top: 8px; }
.lib-cat { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin: 16px 0 2px; }
.lib-cat span { color: var(--ink-2); font-weight: 400; font-size: 12px; }
.shiur-list { list-style: none; margin: 0; padding: 0; }
.shiur-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.shiur-num { width: 24px; color: var(--ink-2); flex: none; font-size: 12px; }
.shiur-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.shiur-meta { color: var(--ink-2); font-size: 12px; }
.text-link { color: #2e6e63; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.section-note { font-size: 13px; line-height: 19px; margin: 0 0 10px; color: var(--ink); }

/* seforim */
.book-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.book-card { background: #f8f4ea; border: 1px solid #e5dccb; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.book-card img { width: 100%; max-height: 340px; object-fit: contain; border-radius: 8px; background: #efe9da; }
.book-title { font-family: Georgia, 'Times New Roman', serif; font-size: 17px; line-height: 24px; color: #0d1b33; font-weight: 600; }
.book-sub { color: var(--ink-2); font-size: 13px; line-height: 19px; }
.book-card .hebrew { direction: rtl; text-align: right; }
@media (min-width: 768px) { .book-grid { grid-template-columns: repeat(3, 1fr); } }

/* accent strips */
.accent img { display: block; width: 100%; max-height: 90px; object-fit: cover; object-position: 50% 45%; border-radius: 12px; opacity: 0.9; }
.accent.tall img { max-height: 300px; object-position: 50% 30%; }

/* callout + footer */
.callout { border-left: 3px solid #e8b13f; background: #fbf7ec; border-radius: 8px; padding: 12px 16px; font-size: 13px; line-height: 19px; }
.callout strong { display: block; margin-bottom: 2px; }
.closing { color: var(--ink-2); font-size: 13px; line-height: 19px; text-align: center; padding-top: 8px; border-top: 1px solid var(--hairline); }

/* --- polish pass: clean library look (white surfaces, navy serif, gold accents) --- */
body { background: #fbfaf6; }
.topbar { background: #ffffff; border: 1px solid #ece5d3; box-shadow: 0 1px 3px rgba(13,27,51,0.06); }
.topbar-brand { color: #0d1b33; font-size: 20px; }
.topbar-links a { color: #33415c; }
.topbar-links a:hover { color: #b8933f; }

.hero-tag { color: #b8933f; font-style: italic; font-family: Georgia, 'Times New Roman', serif; font-size: 19px; }
@media (min-width: 768px) { .hero-tag { font-size: 22px; line-height: 28px; } }

.section h2 { font-family: Georgia, 'Times New Roman', serif; color: #0d1b33; font-size: 30px; line-height: 38px; padding-bottom: 10px; }
.section h2::after { content: ""; display: block; width: 56px; height: 3px; background: #b8933f; margin-top: 8px; border-radius: 2px; }

.chabura-card { box-shadow: 0 4px 14px rgba(13,27,51,0.18); }
.chabura-title { font-size: 24px; line-height: 32px; }

.lib-group { background: #ffffff; border: 1px solid #ece5d3; border-radius: 16px; padding: 4px 18px 12px; box-shadow: 0 1px 3px rgba(13,27,51,0.06); margin-top: 14px; }
.lib-cat { font-family: Georgia, 'Times New Roman', serif; color: #0d1b33; font-size: 18px; }
.lib-cat span { color: #b8933f; font-weight: 600; }
a.text-link { background: #f5ead0; color: #8a6a1f; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
a.text-link:hover { background: #ecd9ac; text-decoration: none; }

.book-card { background: #ffffff; border: 1px solid #ece5d3; box-shadow: 0 1px 3px rgba(13,27,51,0.06); }
.book-card img { background: #f7f2e6; }
.book-title { font-size: 18px; }
.lib-sub { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; color: #8a6a1f; margin: 14px 0 0; letter-spacing: 0.02em; }
.lib-sub span { font-weight: 400; font-size: 11px; color: #b8933f; }

/* blended photo backgrounds behind content (faded + slightly blurred, text stays sharp) */
.photo-bg { position: relative; overflow: hidden; }
.photo-bg::before { content: ''; position: absolute; inset: -12px; background-image: var(--bg); background-size: cover; background-position: 50% 30%; filter: blur(3px); opacity: 0.16; }
.photo-bg > * { position: relative; }

/* home link cards */
.link-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.link-card { display: block; background: #0d1b33; border-radius: 16px; padding: 22px 24px; text-decoration: none; border: 1px solid #0d1b33; }
.link-card:hover { border-color: #e8b13f; }
.link-card-title { font-family: Georgia, 'Times New Roman', serif; color: #e8b13f; font-size: 20px; letter-spacing: 0.02em; }
.link-card-sub { color: #f5f0e6; font-size: 13px; line-height: 19px; opacity: 0.85; margin-top: 6px; }
@media (min-width: 768px) { .link-cards { grid-template-columns: 1fr 1fr; } }
