/* === קורא הזוהר - עיצוב RTL עברי === */
:root {
  --bg: #1a1a2e;
  --surface: #16213e;
  --accent: #e94560;
  --accent-soft: #0f3460;
  --text: #eaeaea;
  --text-muted: #a0a0a0;
  --font-he: 'Segoe UI', 'David', 'Arial', sans-serif;
  --font-scale: 1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-he);
  font-size: calc(16px * var(--font-scale));
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  direction: rtl;
}

html[data-theme='light'] {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --accent: #1f4c99;
  --accent-soft: #d8e1f4;
  --text: #1f2430;
  --text-muted: #4f5b6d;
}

html[data-theme='ocean'] {
  --bg: #021c28;
  --surface: #033649;
  --accent: #2fd3c9;
  --accent-soft: #0a4d68;
  --text: #ddf6ff;
  --text-muted: #9fc7d8;
}

html[data-theme='sunset'] {
  --bg: #2a1418;
  --surface: #4a1f2d;
  --accent: #ff9f1c;
  --accent-soft: #7a2e3f;
  --text: #fff0e1;
  --text-muted: #f2c8b7;
}

html[data-theme='forest'] {
  --bg: #0f1f17;
  --surface: #183626;
  --accent: #57cc99;
  --accent-soft: #27503a;
  --text: #e7f7ef;
  --text-muted: #aed9c3;
}

html.a11y-high-contrast {
  --bg: #000000;
  --surface: #111111;
  --accent: #ffd600;
  --accent-soft: #2a2a2a;
  --text: #ffffff;
  --text-muted: #e6e6e6;
}

html.a11y-readable-font {
  --font-he: Arial, 'Noto Sans Hebrew', 'Segoe UI', sans-serif;
}

html.a11y-underline-links a {
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

html.a11y-stop-animations *,
html.a11y-stop-animations *::before,
html.a11y-stop-animations *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 10px;
  z-index: 9999;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
}

/* כותרת ותחתית לע"נ – נרות משני הצדדים */
.dedication-header,
.dedication-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--accent-soft);
  font-size: 1rem;
  color: var(--text-muted);
}

.dedication-footer {
  border-bottom: none;
  border-top: 1px solid var(--accent-soft);
  margin-top: auto;
}

.dedication-header .candles,
.dedication-footer .candles {
  font-size: 1.25rem;
  opacity: 0.9;
}

.dedication-header .dedication-text,
.dedication-footer .dedication-text {
  font-weight: 600;
  color: var(--text);
}

/* === Reader Hero Banner (דף הבית) – גרפיקה אחת: לוגו (רקע לבן→שקוף) + טקסט === */
.reader-hero-banner {
  background: var(--surface);
  border-bottom: 2px solid var(--accent-soft);
  padding: 0.75rem 1rem;
  text-align: center;
  color: var(--text);
}

.reader-hero-banner-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* הסרת רקע לבן: multiply גורם ללבן בתמונה להצטבר עם רקע הסקשן → נראה שקוף */
.reader-hero-logo {
  flex-shrink: 0;
  height: auto;
  max-height: 100px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
}

html[data-theme='light'] .reader-hero-logo {
  mix-blend-mode: multiply;
}

html[data-theme='ocean'] .reader-hero-logo,
html[data-theme='sunset'] .reader-hero-logo,
html[data-theme='forest'] .reader-hero-logo {
  mix-blend-mode: multiply;
}

html.a11y-high-contrast .reader-hero-logo {
  mix-blend-mode: multiply;
}

.reader-hero-cta {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  flex: 1;
  min-width: 200px;
}

html[data-theme='light'] .reader-hero-banner {
  background: #e8eef9;
}

html[data-theme='light'] .reader-hero-cta {
  color: #1e3a5f;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
}

html.a11y-high-contrast .reader-hero-cta {
  color: #fff;
  text-shadow: none;
}

@media (min-width: 600px) {
  .reader-hero-banner {
    padding: 1rem 1.5rem;
  }
  .reader-hero-banner-inner {
    flex-wrap: nowrap;
    gap: 1.25rem;
  }
  .reader-hero-logo {
    max-height: 120px;
  }
  .reader-hero-cta {
    font-size: 1.4rem;
    text-align: right;
  }
}

.site-header {
  background: var(--surface);
  padding: 1.5rem 1rem;
  text-align: center;
  border-bottom: 2px solid var(--accent-soft);
}

.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.tagline {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.home-main {
  flex: 1;
  padding: 1.5rem 1rem;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.hebrew-month-block {
  text-align: center;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border-radius: 16px;
  border: 2px solid var(--accent-soft);
}

.month-label {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hebrew-month {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}

.where-we-are {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 12px;
}

.where-we-are h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.where-text {
  margin: 0;
  font-size: 1.1rem;
}

.month-options {
  margin-bottom: 1.5rem;
}

.month-options h3 {
  margin: 0 0 0.5rem;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 500px) {
  .quick-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  border: 1px solid var(--accent-soft);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.main-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  display: block;
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--text-muted);
}

.btn-secondary:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.about {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-footer {
  padding: 1rem;
  text-align: center;
  border-top: 1px solid var(--accent-soft);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .sep {
  margin: 0 0.5rem;
  color: var(--text-muted);
}

/* === Reader page === */
.reader-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--accent-soft);
}

.reader-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.reader-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.reader-nav .btn {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
}

.reader-nav .btn-nav,
.reader-nav .btn-fullscreen,
.reader-nav .btn-landscape-read,
.reader-nav .btn-open-tab {
  white-space: nowrap;
}

/* כפתור קריאה אופקית – רק במובייל */
.btn-landscape-read {
  display: none;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--text-muted);
}

.btn-landscape-read:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .btn-landscape-read {
    display: block;
  }
}

.reader-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: auto;
}

.reader-quick-actions .btn-quick {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  color: var(--text);
  font-family: var(--font-he);
  cursor: pointer;
}

.reader-quick-actions .btn-read-quick:hover:not(:disabled) {
  background: #2d6a4f;
  border-color: #2d6a4f;
  color: #fff;
}

.reader-quick-actions .btn-partial-quick:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.reader-quick-actions .btn-continue-later {
  text-decoration: none;
}
.reader-quick-actions .btn-continue-later:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

.reader-quick-actions .btn-quick:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-nav:disabled,
.btn-nav[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .reader-header {
    flex-direction: column;
    align-items: stretch;
  }
  .reader-nav {
    flex-wrap: wrap;
  }
  .reader-quick-actions {
    margin-right: 0;
    width: 100%;
    justify-content: flex-end;
  }
}

/* PDF viewer toolbar (above iframe) */
.pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  width: 100%;
  max-width: 100%;
  direction: rtl;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.6rem 1rem;
}

.pdf-toolbar .btn-toolbar {
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.pdf-toolbar .btn-toolbar:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pdf-toolbar-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Main viewer area */
.reader-viewer-wrap {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 60vh;
  gap: 0;
  direction: rtl;
}

.pdf-thumbnails-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pdf-thumbnails-list .pdf-thumb-item {
  display: block;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
}

.pdf-thumbnails-list .pdf-thumb-item:hover,
.pdf-thumbnails-list .pdf-thumb-item.current {
  border-color: var(--accent);
}

.reader-viewer-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem;
  direction: rtl;
}

.pdf-container {
  flex: 1;
  min-height: 60vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
}

.pdf-container {
  position: relative;
}

.pdf-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.pdf-container.loaded .pdf-loading {
  display: none;
}

.pdf-fallback {
  margin: 1rem 0 0;
  color: var(--accent);
}

.pdf-container .pdf-js-viewer {
  width: 100%;
  min-height: 75vh;
  flex: 1;
}

.pdf-container object,
.pdf-container iframe {
  width: 100%;
  height: 85vh;
  min-height: 75vh;
  border: none;
  border-radius: 8px;
  background: #fff;
}

/* Fullscreen: container fills viewport, hide rest */
.pdf-container.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pdf-container.fullscreen .pdf-loading {
  position: absolute;
}

.pdf-container.fullscreen .pdf-toolbar {
  max-width: 100%;
  margin: 0 0 0.5rem;
}

.pdf-container.fullscreen object,
.pdf-container.fullscreen iframe {
  max-width: 100%;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.pdf-container.fullscreen .pdf-js-viewer {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* קריאה אופקית: מתך ה-PDF לרוחב המסך – כתב גדול */
.pdf-container.fullscreen.landscape-fit .pdf-js-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.pdf-container.fullscreen.landscape-fit .pdf-js-viewer .pdf-js-page {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.pdf-container.fullscreen .pdf-fallback {
  margin: 1rem;
}

.pdf-container.fullscreen .fullscreen-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--accent-soft);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-he);
}

.pdf-container.fullscreen .fullscreen-close:hover {
  background: var(--accent-soft);
}

.reader-actions {
  padding: 1rem;
  background: var(--surface);
  border-top: 1px solid var(--accent-soft);
}

.reader-actions h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.action-buttons button {
  font-family: var(--font-he);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.1s, box-shadow 0.15s;
}

.action-buttons button:active {
  transform: scale(0.98);
}

.btn-download {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--text-muted);
}

.btn-read {
  background: #2d6a4f;
  color: #fff;
}

.btn-print {
  background: #1d3557;
  color: #fff;
}

.btn-partial {
  background: #6c757d;
  color: #fff;
}

/* === Stats page === */
.stats-page {
  padding: 1.5rem 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.stats-page h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.stats-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stats-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--accent-soft);
}

.stats-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.stats-card .big {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stats-card p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stats-page h2 {
  font-size: 1.35rem;
  color: var(--text);
}

.stats-page h2:not(:first-of-type) {
  margin-top: 2rem;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Admin */
.admin-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.admin-form label {
  display: block;
  margin-top: 0.75rem;
}

.admin-form input {
  width: 100%;
  max-width: 280px;
  padding: 0.5rem;
  font-size: 1rem;
  margin-top: 0.25rem;
}

.admin-form .btn {
  margin-top: 1rem;
}

.error-msg {
  color: var(--accent);
  margin-top: 0.5rem;
}

.admin-warn {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.admin-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.settings-form {
  margin-bottom: 2rem;
}

.settings-form label {
  display: block;
  margin-top: 0.75rem;
}

.settings-form input {
  width: 100%;
  max-width: 100%;
}

.settings-msg {
  margin-top: 0.5rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.booklet-list-wrap {
  max-height: 50vh;
  overflow: auto;
  margin: 1rem 0;
}

.booklet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.booklet-chip {
  font-family: var(--font-he);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--accent-soft);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
}

.booklet-chip.read {
  background: #2d6a4f;
  border-color: #2d6a4f;
}

.booklet-chip:hover {
  opacity: 0.9;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.reader-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
  max-width: 320px;
}

.reader-progress-bar {
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--accent-soft);
}

.reader-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.25s ease-out;
}

.reader-progress-pct {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.reading-timer {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 1rem;
}

.user-strip {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.user-info {
  margin-left: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--accent-soft);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-he);
}

.btn-small:hover {
  background: var(--accent-soft);
}

.auth-main {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.auth-form-wrap {
  margin-bottom: 1rem;
}

.auth-form label,
.register-fields label {
  display: block;
  margin-top: 0.75rem;
}

.auth-form input,
.register-fields input {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  margin-top: 0.25rem;
}

.auth-form .btn,
.register-fields .btn {
  margin-top: 1rem;
}

.auth-divider {
  text-align: center;
  margin: 1rem 0;
  color: var(--text-muted);
}

.social-auth-buttons {
  display: grid;
  gap: 0.65rem;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid #d2d6dc;
  background: #fff;
  color: #1f1f1f;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.6rem 1rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.btn-social:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-social:active {
  transform: scale(0.99);
}

.social-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

.btn-google {
  border-color: #dadce0;
}

.btn-google:hover {
  background: #f8f9fa;
}

.btn-apple {
  border-color: #1f2937;
  background: #000;
  color: #fff;
}

.btn-apple:hover {
  background: #111827;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.report-table th,
.report-table td {
  border: 1px solid var(--accent-soft);
  padding: 0.5rem;
  text-align: right;
}

.report-table th {
  background: var(--accent-soft);
}

.draw-section {
  margin: 1.5rem 0;
}

.draw-section input[type="number"] {
  width: 60px;
  padding: 0.4rem;
  margin-left: 0.5rem;
}

.draw-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--accent-soft);
}

.lead-form-section {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
}

.lead-form-section h3 {
  margin: 0 0 0.35rem;
}

.lead-form-subtitle {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lead-form {
  display: grid;
  gap: 0.5rem;
}

.lead-form label {
  font-weight: 600;
}

.lead-form input,
.lead-form textarea {
  width: 100%;
  max-width: 100%;
  font-family: var(--font-he);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.lead-checkboxes {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.4rem;
}

.lead-checkboxes label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lead-checkboxes input[type='checkbox'] {
  width: 1.05rem;
  height: 1.05rem;
}

.a11y-widget {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 1200;
}

.a11y-toggle {
  border: 1px solid var(--accent-soft);
  background: var(--surface);
  color: var(--text);
}

.a11y-panel {
  margin-top: 0.5rem;
  width: min(320px, calc(100vw - 28px));
  background: var(--surface);
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.a11y-panel h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.a11y-row select,
.a11y-row button {
  font-family: var(--font-he);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}

.a11y-buttons {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.read-status {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .stat-number { font-size: 1.5rem; }
  .stat-card { padding: 1rem; }
  .reader-header { flex-direction: column; align-items: stretch; }
  .reader-nav { justify-content: center; }
}
