*{box-sizing:border-box}body{margin:0;background:#fbfafa;color:#251f21;font-family:Arial,sans-serif;font-size:14px;line-height:1.7}button,input{font:inherit}button,a{touch-action:manipulation}.file-card{max-width:1040px;margin:0 auto;padding:24px}.file-group{margin:42px 0}.file-group-heading{font:normal 28px Georgia,serif;margin:0 0 26px;color:#0d1b33}.file-group-heading:after{content:'';display:block;width:52px;height:3px;background:#b8933f;margin-top:12px}.file-control label{display:block;margin:0 0 16px}.file-control input{width:100%;padding:12px}.file-closing{font-size:13px;color:#585254;margin-top:40px}.text-link{color:#8a6a1f;background:#f5ead0;padding:12px 16px;border-radius:24px;text-decoration:none;font-size:12px;font-weight:bold}.file-callout{padding:20px;border-left:2px solid #eee;margin:32px 0}.file-callout strong{display:block}.file-hover-underline:hover{text-decoration:underline}@media(min-width:768px){.file-card{padding:36px}}
html, body, #root { margin: 0; min-height: 100%; }
body { background: var(--ds-page); }
html { scroll-behavior: smooth; }

/* 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; }
.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 0; }
.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-text { min-width: 0; }
  .hero-photo { max-width: 300px; flex: none; }
  .hero-name { font-size: 54px; line-height: 60px; }
  .hero-tag { font-size: 18px; line-height: 26px; }
}

/* mobile hero: name and logo first, smaller photo below */
@media (max-width: 767px) {
  .hero { gap: 16px; }
  .hero-text { order: -1; }
  .hero-photo { order: 2; max-width: 220px; }
}

/* 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); } }

/* 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); }

/* 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(--ds-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(--ds-hairline); }
.shiur-num { width: 24px; color: var(--ds-ink-2); flex: none; font-size: 12px; }
.shiur-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.shiur-meta { color: var(--ds-ink-2); font-size: 12px; }
.section-note { font-size: 13px; line-height: 19px; margin: 0; }

/* 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: 460px; 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(--ds-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(2, 1fr); } }

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

/* --- 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; } }

h2.file-group-heading { font-family: Georgia, 'Times New Roman', serif; color: #0d1b33; font-size: 30px; line-height: 38px; padding-bottom: 10px; }
h2.file-group-heading::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; }
.shiur-item a, .book-card a { background: #f5ead0; color: #8a6a1f !important; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.shiur-item a:hover, .book-card a:hover { background: #ecd9ac; }

.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; }

.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; } }

/* this shabbos page graphic */
.shabbos-graphic { display: block; max-width: 400px; width: 100%; margin: 8px auto 0; border-radius: 16px; box-shadow: 0 4px 14px rgba(13,27,51,0.18); }
a.chabura-card { display: block; text-decoration: none; }

/* order form: cover links and Buy labels */
.book-card a.book-cover { background: none !important; padding: 0 !important; border-radius: 8px !important; display: block; }
.book-card a.book-cover:hover { background: none !important; opacity: 0.92; }
.book-card a.book-cover img { display: block; }

/* sefer prices */
.book-price { color: #8a6a1f; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; font-weight: 700; }

/* stay-connected contact line */
.chabura-contact { margin-top: 10px; font-size: 14px; color: var(--ds-ink-2); text-align: center; }
.chabura-contact a { color: #8a6a1f; font-weight: 600; text-decoration: none; }
.chabura-contact a:hover { text-decoration: underline; }

/* This Shabbos card title contrast fix (dark card) */
.chabura-card .chabura-title { color: #f7f2e6; }

/* Latest shiurim */
.latest-more { margin-top: 10px; text-align: center; }
.latest-more a { color: #8a6a1f; font-size: 13px; font-weight: 600; text-decoration: none; }
.latest-more a:hover { text-decoration: underline; }
.scbi-points { margin: 0 0 14px; padding-left: 20px; color: #3d4a63; font-size: 15.5px; line-height: 1.85; }
.scbi-year { margin: 18px 0 10px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a6d2f; font-weight: 600; }
.scbi-graphic { display: block; width: 100%; max-width: 720px; margin: 0 0 16px; border-radius: 10px; border: 1px solid #e5dcc8; }
.scbi-footer { margin-top: 6px; font-size: 12.5px; color: #6b7280; letter-spacing: 0.02em; }
.scbi-join { margin: 4px 0 8px; }
.scbi-join a { display: inline-block !important; background: #f5ead0 !important; color: #8a6a1f !important; border-radius: 999px; padding: 8px 18px; font-size: 13px !important; font-weight: 600; text-decoration: none !important; }
.scbi-join a:hover { background: #ecd9ac !important; }
.bio-photo { display: block; width: 220px; max-width: 60%; border-radius: 10px; border: 1px solid #e5dcc8; margin: 4px 0 14px; }

.hero-logo { display: block; width: 100%; max-width: 560px; height: auto; margin: 4px 0 6px; }
.topbar-mark { width: 26px; height: 26px; border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.topbar-brand { display: inline-flex !important; align-items: center; }

/* larger, bolder top menu */
.topbar { padding: 16px 24px; }
.topbar-links { gap: 10px 26px; }
.topbar-links a { font-size: 16px; font-weight: 700; letter-spacing: 0.01em; padding: 8px 2px; border-bottom: 2px solid transparent; }
.topbar-links a:hover { border-bottom-color: #e8b13f; }
@media (min-width: 768px) { .topbar-links a { font-size: 17px; } }
.topbar { flex-wrap: wrap; }
.topbar-links { flex: 1 1 100%; }
@media (min-width: 900px) { .topbar-links { flex: 0 1 auto; justify-content: flex-end; } }

/* name more prominent */
.hero-eyebrow { font-size: 20px; line-height: 26px; font-weight: 800; letter-spacing: 0.12em; color: #7a5a10; margin-bottom: 4px; }
@media (min-width: 768px) { .hero-eyebrow { font-size: 28px; line-height: 34px; } }

/* this shabbos: flyer download items */
.shabbos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; margin-bottom: 28px; }
.shabbos-item { margin-bottom: 0; }
.shabbos-item a { text-decoration: none; }
.shabbos-item a:hover .shabbos-graphic { opacity: 0.94; }
.shabbos-dl { text-align: center; margin-top: 10px; }

/* stronger top buttons (Oct 21): contrast, weight, pill, active page */
.topbar-links a { color: #0d1b33; font-weight: 800; font-size: 17px; letter-spacing: 0.01em; padding: 9px 15px; border-radius: 10px; background: rgba(232,177,63,0.16); border: 1px solid rgba(184,147,63,0.45); border-bottom: 1px solid rgba(184,147,63,0.45); }
.topbar-links a:hover { color: #0d1b33; background: rgba(232,177,63,0.38); border-bottom-color: rgba(184,147,63,0.45); }
.topbar-links a.active { background: #0d1b33; color: #e8b13f; border-color: #0d1b33; border-bottom-color: #0d1b33; }
@media (min-width: 768px) { .topbar-links a { font-size: 18px; } }

/* one-line nav (Oct 21): nowrap row, compact pills, horizontal scroll only if needed */
.topbar-links { flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.topbar-links::-webkit-scrollbar { display: none; }
.topbar-links a { font-size: 16px; padding: 8px 12px; white-space: nowrap; }
@media (max-width: 767px) { .topbar-links { gap: 6px; } .topbar-links a { font-size: 13px; padding: 6px 9px; } }
/* Compact navigation: primary pages and a secondary-page disclosure. */
.topbar-links { overflow: visible; flex-wrap: nowrap; align-items: center; }
.nav-more { position: relative; }
.nav-more > button { font: inherit; font-size: 16px; font-weight: 800; color: #0d1b33; padding: 8px 12px; border-radius: 10px; background: rgba(232,177,63,0.16); border: 1px solid rgba(184,147,63,0.45); white-space: nowrap; cursor: pointer; min-height: 44px; }
.nav-more > button.active { background: #0d1b33; color: #e8b13f; }
.nav-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 254px; max-width: calc(100vw - 64px); padding: 8px; border: 1px solid #e5dccb; border-radius: 12px; box-shadow: 0 8px 24px rgba(13,27,51,.16); background: #fff; z-index: 30; display: grid; gap: 4px; }
.topbar-links .nav-dropdown a { display: block; white-space: normal; padding: 12px; font-size: 14px; min-height: 44px; box-sizing: border-box; background: transparent; border: 0; }
.topbar-links .nav-dropdown a:hover { background: #f5ead0; }
.topbar-links .nav-dropdown a.active { background: #0d1b33; color: #e8b13f; }
.topbar-links a:focus-visible, .nav-more button:focus-visible { outline: 2px solid #8a6a1f; outline-offset: 3px; }
@media (max-width: 767px) { .topbar { padding: 12px; } .topbar-links { width: 100%; gap: 5px; } .topbar-links > a, .nav-more > button { font-size: 12px; padding: 6px 8px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; } }
/* User's five main pages, with Shiurim's three child pages. */
.topbar-links.main-pages { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; overflow: visible; gap: 8px; }
.topbar-links.main-pages > a { font-size: 14px; padding: 10px 12px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; white-space: normal; }
.shiur-section-nav { margin: 28px 0; }
.shiur-section-nav h2 { font-family: Georgia, 'Times New Roman', serif; color: #0d1b33; font-size: 28px; font-weight: 400; margin: 0 0 16px; }
.shiur-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.shiur-tabs a { padding: 12px 16px; min-height: 44px; box-sizing: border-box; color: #0d1b33; border: 1px solid #d6bf85; border-radius: 10px; background: #fbf4e4; font-size: 14px; font-weight: 700; text-decoration: none; }
.shiur-tabs a.active { background: #0d1b33; color: #e8b13f; border-color: #0d1b33; }
.shiur-tabs a:focus-visible { outline: 2px solid #8a6a1f; outline-offset: 3px; }
@media (max-width: 767px) { .topbar-links.main-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .topbar-links.main-pages > a { font-size: 12px; padding: 8px; line-height: 1.4; } }
.donation-block { margin: 28px 0; padding: 20px; border: 1px solid #d6bf85; border-radius: 12px; background: #fffaf0; color: #0d1b33; }
.donation-block h3 { margin: 0 0 14px; font-size: 20px; }
.donation-block p { line-height: 1.7; margin: 10px 0; overflow-wrap: anywhere; }
.donation-block a { color: #76591e; text-decoration: underline; }
.contact-block { margin: 28px 0; padding: 20px; border: 1px solid #d6bf85; border-radius: 12px; background: #fffaf0; color: #0d1b33; }
.contact-block h3 { margin: 0 0 14px; font-size: 20px; }
.contact-block p { line-height: 1.8; margin: 0; overflow-wrap: anywhere; }
.contact-block a { color: #76591e; text-decoration: underline; }

/* Explicit Home and Shiurim dropdown; supporting pages last. */
.topbar-links.main-pages > .shiur-menu { min-width: 0; }
.topbar-links.main-pages .shiur-menu > button { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.topbar-links.main-pages .shiur-menu > button.active { background: #0d1b33; color: #e8b13f; border-color: #0d1b33; }
.shiur-menu .nav-dropdown { left: 0; right: auto; width: 240px; }
@media (max-width: 767px) { .topbar-links.main-pages .shiur-menu > button { font-size: 12px; padding: 8px; } .shiur-menu .nav-dropdown { left: auto; right: 0; max-width: calc(100vw - 90px); } }

/* Mobile navigation is one top-right hamburger, desktop unchanged. */
.mobile-menu-toggle { display: none; }
@media (max-width: 899px) {
 .topbar { gap: 8px; justify-content: space-between; align-items: center; }
 .topbar-brand { font-size: 18px; letter-spacing: .02em; }
 .topbar-mark { width: 24px; height: 24px; margin-right: 6px; }
 .mobile-menu-toggle { display: inline-flex; width: 44px; height: 44px; flex: 0 0 44px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid #d6bf85; background: #fffaf0; border-radius: 8px; cursor: pointer; }
 .mobile-menu-toggle span { display: block; width: 21px; height: 2px; background: #0d1b33; }
 .mobile-menu-toggle:focus-visible { outline: 2px solid #8a6a1f; outline-offset: 3px; }
 .topbar-links.main-pages { display: none; }
 .topbar-links.main-pages.mobile-open { display: flex; flex-direction: column; align-items: stretch; width: 100%; flex: 1 1 100%; padding-top: 8px; gap: 6px; }
 .topbar-links.main-pages > a, .topbar-links.main-pages .shiur-menu > button { width: 100%; font-size: 14px; padding: 11px 12px; line-height: 1.4; text-align: left; justify-content: flex-start; }
 .shiur-menu .nav-dropdown { position: static; width: auto; max-width: none; margin: 6px 0 0 12px; box-shadow: none; }
}

.mobile-drawer-heading, .mobile-menu-backdrop { display: none; }
@media (max-width: 899px) {
 .mobile-menu-backdrop { display: block; position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(13,27,51,.45); z-index: 39; }
 .topbar-links.main-pages.mobile-open { position: fixed; left: 0; top: 0; bottom: 0; width: 84vw; max-width: 350px; background: #122d52; padding: 0; margin: 0; border-radius: 0; gap: 0; z-index: 40; overflow-y: auto; justify-content: flex-start; box-shadow: 6px 0 24px rgba(0,0,0,.2); }
 .mobile-drawer-heading { display: flex; justify-content: space-between; align-items: center; padding: 16px; min-height: 64px; box-sizing: border-box; color: #f5f0e6; font-size: 19px; border-bottom: 1px solid rgba(255,255,255,.15); }
 .mobile-drawer-heading button { width: 44px; height: 44px; font-size: 30px; color: #f5f0e6; background: transparent; border: 0; cursor: pointer; }
 .topbar-links.main-pages > a, .topbar-links.main-pages .shiur-menu > button { color: #f5f0e6; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.15); border-radius: 0; min-height: 58px; font-size: 16px; font-weight: 500; padding: 16px; }
 .topbar-links.main-pages > a.active, .topbar-links.main-pages .shiur-menu > button.active { background: rgba(255,255,255,.08); color: #e8b13f; }
 .topbar-links.main-pages .shiur-menu > button { display: flex; justify-content: space-between; }
 .shiur-menu .nav-dropdown { border: 0; border-radius: 0; margin: 0; padding: 0; gap: 0; background: #0d2341; }
 .topbar-links .nav-dropdown a { color: #f5f0e6; font-size: 15px; padding: 14px 16px 14px 30px; border-bottom: 1px solid rgba(255,255,255,.12); border-radius: 0; }
 .topbar-links.main-pages > a:hover, .topbar-links .nav-dropdown a:hover { color: #e8b13f; background: rgba(255,255,255,.08); }
}

.weinfeld-feature { display: grid; gap: 24px; align-items: center; margin: 22px 0 28px; }
.weinfeld-intro .section-note { margin: 0; font-size: 16px; line-height: 1.8; }
.weinfeld-links { display: grid; grid-template-columns: 1fr; gap: 12px; }
.weinfeld-links a { display: flex; flex-direction: column; gap: 8px; min-height: 92px; box-sizing: border-box; padding: 20px; border: 1px solid #d6bf85; border-radius: 12px; background: #0d1b33; text-decoration: none; color: #fffaf0; }
.weinfeld-links a strong { font-size: 18px; font-weight: 800; line-height: 1.4; }
.weinfeld-links a span { color: #e8b13f; font-size: 14px; }
.weinfeld-links a:hover { background: #193457; }
.weinfeld-links a:focus-visible { outline: 3px solid #b8933f; outline-offset: 3px; }
.weinfeld-email { margin-top: 28px; padding: 22px; border-radius: 12px; border: 1px solid #d6bf85; background: #fffaf0; }
.weinfeld-email h3 { margin: 0 0 12px; color: #0d1b33; font-size: 21px; }
.weinfeld-email p { margin: 0; line-height: 1.8; overflow-wrap: anywhere; }
.weinfeld-email a { color: #76591e; font-weight: 700; }
@media (min-width: 768px) { .weinfeld-links { grid-template-columns: 1fr 1fr; } }

.weinfeld-photo { display: block; width: 100%; max-width: 400px; height: auto; border-radius: 16px; }
@media (min-width: 768px) { .weinfeld-feature { grid-template-columns: minmax(240px, 360px) 1fr; gap: 36px; } }
/* Compact, paged recording browser. The sheet library is unchanged. */
.recording-browser { min-width: 0; }
.library-intro { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #33415c; }
.library-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.library-topics button { min-height: 54px; display: flex; gap: 8px; align-items: center; justify-content: space-between; text-align: left; border: 1px solid #d6bf85; background: #fffaf0; color: #0d1b33; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; }
.library-topics button:first-child { grid-column: 1 / -1; }
.library-topics button.selected { background: #0d1b33; color: #fff; border-color: #0d1b33; font-weight: 600; }
.topic-count { flex: none; font-size: 12px; color: #8a6a1f; background: #f5ead0; border-radius: 20px; padding: 2px 7px; }
.library-results-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; scroll-margin-top: 100px; margin-top: 20px; }
.library-results-header h3 { font-family: Georgia, serif; font-size: 22px; color: #0d1b33; font-weight: 400; margin: 0; }
.library-result-count { color: #585254; font-size: 13px; margin: 4px 0 12px; }
.library-reset, .library-empty button { min-height: 44px; border: 1px solid #d6bf85; background: #fffaf0; color: #0d1b33; border-radius: 8px; font: inherit; font-size: 13px; padding: 8px 12px; cursor: pointer; }
.recording-list { border: 1px solid #ece5d3; border-radius: 14px; background: white; padding: 0 14px; }
.recording-item { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 4px 8px; padding: 14px 0; align-items: start; }
.recording-item:last-child { border-bottom: 0; }
.recording-item .shiur-num { width: auto; padding-top: 3px; }
.recording-item .shiur-body strong { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.recording-item .shiur-meta { margin-top: 3px; font-size: 12px; line-height: 1.5; }
.recording-item a { grid-column: 2; justify-self: start; min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; margin-top: 6px; }
.library-pagination { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 18px 0 0; }
.library-pagination span { font-size: 12px; color: #33415c; text-align: center; }
.library-pagination button { min-height: 44px; border: 1px solid #0d1b33; background: #0d1b33; color: white; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.library-pagination button:disabled { opacity: .4; cursor: default; }
.library-empty { padding: 20px 14px; border: 1px solid #ece5d3; border-radius: 14px; background: white; font-size: 14px; }
.recording-browser button:focus-visible { outline: 3px solid #b8933f; outline-offset: 3px; }
@media (min-width: 768px) {
 .library-topics { grid-template-columns: repeat(5,minmax(0,1fr)); }
 .library-topics button:first-child { grid-column: auto; }
 .recording-item { grid-template-columns: 24px minmax(0,1fr) auto; gap: 12px; align-items: center; }
 .recording-item a { grid-column: 3; margin-top: 0; }
}
/* Section picker keeps the 252-sheet library short until a section is requested. */
.sheet-chooser { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 64px; margin: 0 0 18px; padding: 12px 16px; border: 1px solid #0d1b33; border-radius: 10px; background: #0d1b33; color: white; text-align: left; font: inherit; cursor: pointer; }
.sheet-chooser small { display: block; font-size: 12px; color: #e8b13f; }
.sheet-chooser strong { display: block; font-size: 16px; line-height: 1.5; font-weight: 600; }
.sheet-section-options { margin-top: -6px; }
.sheet-subtopics { margin: 0 0 20px; }
.sheet-item { grid-template-columns: minmax(0,1fr); }
.sheet-item a { grid-column: 1; }
@media (min-width: 768px) {
 .sheet-section-options { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .sheet-item { grid-template-columns: minmax(0,1fr) auto; }
 .sheet-item a { grid-column: 2; }
}
.library-search { position: relative; background: #fffaf0; border: 2px solid #b8933f; border-radius: 12px; padding: 14px; margin: 0 0 20px; }
.library-search > div { margin: 0 !important; }
.library-search label { color: #0d1b33 !important; font-size: 16px !important; font-weight: 600 !important; padding-right: 24px; }
.library-search input { min-height: 48px !important; border: 1px solid #a7adba !important; border-radius: 8px !important; background: white !important; color: #0d1b33 !important; font-size: 16px !important; width: 100%; box-sizing: border-box; }
.library-search input:focus { outline: 2px solid #0d1b33; outline-offset: 2px; }
.search-symbol { position: absolute; top: 9px; right: 14px; font-size: 28px; color: #8a6a1f; }
/* Learning hubs share the existing navy and gold site identity. */
.book-grid,.parsha-options,.learning-filter,.series-grid { display:grid; gap:8px; margin:18px 0; grid-template-columns:repeat(2,minmax(0,1fr)); }
.book-grid button,.parsha-options button,.learning-filter button,.series-grid button { min-height:48px; border:1px solid #d6bf85; background:#fffaf0; color:#0d1b33; border-radius:10px; padding:12px; font:inherit; font-size:14px; line-height:1.5; cursor:pointer; overflow-wrap:anywhere; }
.book-grid button.selected,.parsha-options button.selected,.learning-filter button.selected,.series-grid button.selected { background:#0d1b33; color:white; border-color:#0d1b33; font-weight:600; }
.parsha-options button { display:flex;flex-direction:column;text-align:left;gap:4px; }
.parsha-options button span:last-child { align-self:flex-end; }
.series-grid button { display:flex;flex-direction:column;text-align:left;gap:6px;padding:20px; }
.series-grid strong { font-size:18px; } .series-grid span { font-size:13px; }
.learning-heading { font-family:Georgia,serif;font-weight:400;color:#0d1b33;font-size:25px;margin:26px 0 10px; }
.learning-note { font-size:13px;line-height:1.6;color:#585254;margin:0 0 18px; }
.info-cards { display:grid;gap:16px;margin-top:24px; }
.info-cards section { padding:22px;border:1px solid #d6bf85;border-radius:14px;background:#fffaf0;min-width:0; }
.info-cards h3 { margin:0 0 12px;font-size:21px;color:#0d1b33; } .info-cards p { line-height:1.7;margin:0 0 14px; }
.info-cards a { overflow-wrap:anywhere;color:#76591e;font-weight:600;display:inline-flex;align-items:center;min-height:44px; }
.info-cards small { display:block;font-size:12px;line-height:1.6;color:#585254;margin-top:12px; }
@media(min-width:768px) { .book-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } .parsha-options { grid-template-columns:repeat(4,minmax(0,1fr)); } .learning-filter { display:flex;flex-wrap:wrap; } .contact-cards {grid-template-columns:1fr 1fr;} }
.sheet-hub-tabs { display:grid;grid-template-columns:1fr;gap:10px;margin:20px 0; }
.sheet-hub-tabs button { display:flex;flex-direction:column;gap:6px;text-align:left;min-height:78px;padding:16px;border-radius:12px;border:1px solid #d6bf85;background:#fffaf0;color:#0d1b33;font:inherit;cursor:pointer; }
.sheet-hub-tabs button strong {font-size:17px;} .sheet-hub-tabs button small {font-size:13px;line-height:1.5;}
.sheet-hub-tabs button.selected {background:#0d1b33;color:white;border-color:#0d1b33;}
@media(min-width:600px){.sheet-hub-tabs{grid-template-columns:1fr 1fr;}}
@media(min-width:900px){
 .topbar-links.main-pages {flex-wrap:nowrap;gap:5px;width:100%;flex:1 1 100%;justify-content:flex-start;}
 .topbar-links.main-pages > a,.topbar-links.main-pages .shiur-menu > button {font-size:12px;padding:10px 8px;white-space:nowrap;letter-spacing:0;min-height:44px;}
}

.site-footer { margin-top:36px;padding:22px 0;border-top:1px solid #d8ceb9;display:flex;flex-wrap:wrap;gap:12px 20px;font-size:13px;line-height:22px;color:#585254; }
.site-footer a { color:#89661d;text-decoration:underline;min-height:44px;display:inline-flex;align-items:center; }
.site-footer span { display:inline-flex;align-items:center; }
.privacy-page { max-width:760px; }
.privacy-page h3 { font-size:18px;margin:28px 0 10px;color:#0d1b33;line-height:26px; }
.privacy-page p { font-size:15px;line-height:25px;margin:12px 0;overflow-wrap:anywhere; }
.privacy-page a { color:#89661d;text-decoration:underline; }
.privacy-page .privacy-updated {font-size:13px;color:#585254;}
/* Three equal homepage cards on desktop, stacked on mobile. */
@media (min-width:768px){.link-cards{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;}.link-cards>a{height:100%;}}

.speaking-background { min-height: 620px; border-radius: 18px; padding: 18px; }
.speaking-background::before { inset: 0; filter: none; opacity: .3; background-position: center 28%; }
.speaking-background .section-note { color: #192e48; }
.speaking-background .info-cards > section { background: rgba(255,255,255,.94); }
@media(max-width:600px) { .speaking-background { padding: 12px; min-height: 690px; } .speaking-background::before { opacity: .24; background-position: 42% 20%; } }
.speaking-background .section-note { margin-bottom: 160px; }
.speaking-background::before { background-position: center 44%; }
@media(max-width:600px) { .speaking-background::before { background-position: 42% 36%; } }

.speaking-invitation { margin-top: 28px; padding: 28px; border: 1px solid #dcc38a; border-radius: 16px; background: rgba(255,255,255,.96); }
.speaking-invitation h3 { margin: 0 0 16px; font-size: 28px; color: #10233e; font-family: Georgia,serif; }
.speaking-invitation p { line-height: 1.7; margin: 0 0 24px; }
.speaking-invitation a { color: #785711; font-weight: 700; overflow-wrap:anywhere; }
.speaking-invitation img { display: block; width: auto; max-width: min(340px, 100%); max-height: 420px; object-fit: cover; object-position: center 20%; border-radius: 14px; margin: 0 auto; }
@media(max-width:600px) { .speaking-invitation { padding: 18px; } .speaking-invitation h3 { font-size: 25px; } .speaking-invitation img { max-width: min(260px, 100%); max-height: 340px; } }

.contact-background::before { height: 620px; bottom: auto; }
@media(max-width:600px) { .contact-background::before { height: 690px; } }

.contact-background .speaking-invitation { margin-top: 0; }
.contact-background .speaking-invitation + .section-note { margin-top: 36px; }
.contact-background .contact-cards { margin-top: 24px; }
.contact-background .speaking-invitation h3 { font-size: 38px; font-weight:700; line-height:1.12; }
.contact-background .speaking-invitation p { font-size:22px; font-weight:600; line-height:1.6; }
.contact-background .speaking-invitation + .section-note { font-size:22px; font-weight:600; margin-bottom:20px; }
.contact-background .contact-cards h3 { font-size:25px; font-weight:700; }
.contact-background .contact-cards a { font-size:20px; font-weight:700; }
@media(max-width:600px) { .contact-background .speaking-invitation h3 {font-size:31px;} .contact-background .speaking-invitation p,.contact-background .speaking-invitation + .section-note {font-size:20px;} .contact-background .contact-cards a {font-size:18px;overflow-wrap:anywhere;} }
.contact-background .contact-cards { padding-top:0; }
@media(max-width:360px) { .contact-background .speaking-invitation {padding:12px;} .contact-background .speaking-invitation a {font-size:17px;letter-spacing:-.025em;} .contact-background .contact-cards a {font-size:16px;letter-spacing:-.02em;} }

.scbi-full-size { margin: -8px 0 24px; } .scbi-full-size a { display:inline-flex;align-items:center;min-height:44px;color:#76591e;text-decoration:underline;font-weight:600; }

.scbi-full-size summary {display:list-item;cursor:pointer;min-height:44px;padding:12px 0;color:#76591e;font-weight:600;text-decoration:underline;} .scbi-zoom {overflow:auto;max-height:80vh;max-width:100%;background:white;} .scbi-zoom img {display:block;width:900px;max-width:none;}
@media(max-width:600px){.shabbos-grid{grid-template-columns:1fr;}.shabbos-dl a{display:inline-flex;align-items:center;min-height:44px;}}

.scbi-graphic {height:auto;object-fit:contain;box-sizing:border-box;}
.scbi-image-hint {font-size:12px;line-height:1.5;margin:0 0 12px;color:#6b7280;}

.shiur-audio {width:280px;max-width:100%;height:44px;flex-shrink:0;}
@media(max-width:600px){.shiur-item:has(.shiur-audio){flex-wrap:wrap;}.shiur-item .shiur-audio{width:100%;flex-basis:100%;margin-top:8px;}}
.recording-item .shiur-audio {grid-column:2;justify-self:start;}
.sheet-item .shiur-audio {grid-column:1;}
@media(min-width:768px){.recording-item .shiur-audio{grid-column:3;}.sheet-item .shiur-audio{grid-column:2;}}
@media(max-width:600px){.recording-item .shiur-audio{grid-column:1 / -1;}}

/* A L'chaim & A Chiddush - weekly Kiddush Torah recap */
.kiddush-issue { background: #ffffff; border: 1px solid #ece5d3; border-radius: 16px; box-shadow: 0 1px 3px rgba(13,27,51,0.06); padding: 26px 22px; margin-top: 18px; }
.kiddush-eyebrow { color: #8a6d2f; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; }
.kiddush-parsha { font-family: Georgia, 'Times New Roman', serif; color: #0d1b33; font-size: 26px; line-height: 34px; font-weight: 600; text-align: center; margin: 8px 0 2px; }
.kiddush-byline { color: #b8933f; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 16px; text-align: center; margin-bottom: 18px; }
.kiddush-pasuk { direction: rtl; text-align: right; font-size: 19px; line-height: 2; color: #0d1b33; font-weight: 600; margin: 0 0 8px; }
.kiddush-translation { font-size: 15px; line-height: 1.75; color: #33415c; margin: 0 0 20px; }
.kiddush-source { margin-bottom: 18px; }
.kiddush-src-label { color: #8a6d2f; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.kiddush-hebrew { direction: rtl; text-align: right; font-size: 17.5px; line-height: 1.95; color: #0d1b33; margin: 0 0 8px; }
.kiddush-source-english { font-size: 15px; line-height: 1.75; color: #33415c; margin: 0; }
.kiddush-divider { text-align: center; color: #b8933f; letter-spacing: 0.5em; margin: 22px 0 18px; }
.kiddush-body { font-size: 15.5px; line-height: 1.8; color: #22304a; margin: 0 0 14px; }
.kiddush-download { margin-top: 22px; padding-top: 18px; border-top: 1px solid #ece5d3; }
.kiddush-graphic { display: block; max-width: 380px; width: 100%; margin: 0 auto; border-radius: 12px; border: 1px solid #e5dccb; box-shadow: 0 4px 14px rgba(13,27,51,0.14); }
.kiddush-dl { text-align: center; margin-top: 12px; }
.kiddush-dl a { display: inline-flex; align-items: center; min-height: 44px; background: #f5ead0; color: #8a6a1f; border-radius: 999px; padding: 8px 18px; font-size: 13px; font-weight: 600; text-decoration: none; }
.kiddush-dl a:hover { background: #ecd9ac; }
@media (min-width: 768px) { .kiddush-issue { padding: 34px 40px; } .kiddush-parsha { font-size: 30px; line-height: 38px; } }

/* hero identity (ChatGPT rec 1) */
.hero-tagline { font-family: Georgia, 'Times New Roman', serif; font-style: italic; color: #8a6a1f; font-size: 19px; line-height: 27px; margin: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; justify-content: center; }
a.hero-cta { display: inline-block; border-radius: 999px; padding: 7px 16px; font-size: 18px; font-weight: 700; letter-spacing: 0.02em; text-decoration: none; text-transform: uppercase; max-width: 100%; }
a.hero-cta.primary { background: #0d1b33; color: #e8b13f; border: 2px solid #0d1b33; }
a.hero-cta.primary:hover { background: #12294f; }
a.hero-cta.secondary { background: transparent; color: #0d1b33; border: 2px solid #0d1b33; }
a.hero-cta.secondary:hover { background: rgba(13, 27, 51, 0.06); }
@media (min-width: 768px) { .hero-tagline { font-size: 23px; line-height: 31px; } .hero-ctas { justify-content: flex-start; } }

/* four destination cards (ChatGPT rec 2) */
.link-card-cover { display: block; width: 92px; height: auto; border-radius: 6px; margin-top: 12px; border: 1px solid rgba(232, 177, 63, 0.45); }
.link-card-featured { color: #e8b13f; font-size: 12px; margin-top: 8px; }
@media (min-width: 700px) { .link-cards.destinations { grid-template-columns: repeat(4, 1fr); } }

/* seforim descriptions (ChatGPT rec 3) */
.book-desc { color: #3d4a63; font-size: 13.5px; line-height: 20px; }

/* seforim grid: keep the parsha book-chooser rules from leaking in */
.book-grid.seforim-grid { grid-template-columns: 1fr; gap: 14px; margin: 0; }
@media (min-width: 768px) { .book-grid.seforim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* join community (home bottom) */
.join-email { margin-top: 6px; }
.join-email a { display: inline-block; background: #f5ead0; color: #8a6a1f; border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600; text-decoration: none; }
.join-email a:hover { background: #ecd9ac; }
.library-crumbs { display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:4px 0 10px;padding:10px 12px;border:1px solid #ece5d3;border-radius:10px;background:#fff; }
.library-crumbs button { min-height:44px;border:0;background:none;color:#8a6a1f;font:inherit;font-size:14px;font-weight:600;padding:6px 4px;cursor:pointer;text-decoration:underline;text-underline-offset:3px; }
.library-crumbs button:hover { color:#0d1b33; }
.library-crumbs .crumb-sep { color:#b8933f;font-size:14px; }
.library-crumbs .crumb-current { color:#0d1b33;font-size:14px;font-weight:700;padding:6px 4px; }
.library-crumbs .crumbs-reset { margin-left:auto; }

/* See more / See less toggle for long write-ups */
.kiddush-toggle-wrap { text-align: center; margin-top: 14px; }
.kiddush-toggle { appearance: none; border: none; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: #8a6a1f; text-decoration: underline; text-underline-offset: 3px; padding: 10px 14px; min-height: 44px; }
.kiddush-toggle:hover { color: #6d5417; }

/* share page card - single recording, no index number column */
.share-item { grid-template-columns: minmax(0,1fr); }
.share-item .shiur-body { grid-column: 1; }
.share-item .shiur-audio { grid-column: 1; justify-self: start; width: 320px; }
.share-item a { grid-column: 1; }
@media (min-width: 768px) {
  .share-item { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
  .share-item .shiur-body { grid-column: 1; }
  .share-item .shiur-audio { grid-column: 2; }
  .share-item a { grid-column: 1 / -1; }
}

/* Chabura action buttons (mareh mekomos email + WhatsApp group) */
.chabura-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 10px; }
.chabura-actions-label { margin-top: 16px; text-align: center; font-size: 21px; font-weight: 800; color: #0d1b33; letter-spacing: 0.01em; }
.chabura-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; min-width: 170px; padding: 14px 26px; border-radius: 14px; font-size: 17px; font-weight: 700; text-decoration: none; text-align: center; border: 2px solid #b8933f; box-shadow: 0 2px 10px rgba(13, 27, 51, 0.18); }
.chabura-btn-primary { background: #0d1b33; color: #f7f2e6; }
.chabura-btn-primary:hover { background: #16264a; text-decoration: none; }
.chabura-btn-whatsapp { background: #8a6a1f; color: #ffffff; border-color: #6e5417; }
.chabura-btn-whatsapp:hover { background: #77591a; text-decoration: none; }
@media (max-width: 767px) { .chabura-actions { flex-direction: column; } .chabura-btn { width: 100%; box-sizing: border-box; font-size: 16px; } .chabura-actions-label { font-size: 18px; } }

.shiur-video {width:300px;max-width:100%;max-height:70vh;border-radius:12px;background:#0d1b33;flex-shrink:0;}
@media(max-width:600px){.shiur-item:has(.shiur-video){flex-wrap:wrap;}.shiur-item .shiur-video{width:100%;flex-basis:100%;margin-top:8px;}}
.recording-item .shiur-video {grid-column:2;justify-self:start;}
@media(min-width:768px){.recording-item .shiur-video{grid-column:3;}}
@media(max-width:600px){.recording-item .shiur-video{grid-column:1 / -1;}}
.share-item .shiur-video {grid-column:1;justify-self:start;width:340px;}

.kiddush-subhead { font-weight: 700; margin: 1.2em 0 0.4em; }
