/* Same look as chitas.day (3.25+ "one blue"): tokens, hero, panels, rows, segments, reader, bottom bar, launch screen. */
@font-face { font-family: Heebo; src: url(../fonts/heebo-hebrew.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Heebo; src: url(../fonts/heebo-latin.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+20AC; }
@font-face { font-family: Frank; src: url(../fonts/frank-hebrew.woff2) format('woff2'); font-weight: 300 900; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
/* the faces of the text, as in חת״ת (picked in תצוגה; loaded only when used) */
@font-face { font-family: Ezra; src: url(../fonts/ezra-hebrew.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Noto; src: url(../fonts/noto-hebrew.woff2) format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Cardo; src: url(../fonts/cardo-hebrew.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: NotoSans; src: url(../fonts/notosans-hebrew.woff2) format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: DavidLibre; src: url(../fonts/david-hebrew.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Alef; src: url(../fonts/Alef-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }

:root {
  --bg: #f1f4f8; --card: #fff; --ink: #1c2430; --muted: #5c6777; --line: #e0e5ed; --navy: #16304f; --navy2: #24507f; --accent: #2d6bb4; --red: #b3412e;
  --b9: #16304f; --b7: #2560a6; --b5: #3a7fcb; --b2: #d6e5f6; --b1: #eef4fb;
  --r: 18px; --shadow: 0 1px 2px rgba(22, 48, 79, .06), 0 6px 18px rgba(22, 48, 79, .07);
  --sans: Heebo, system-ui, "Segoe UI", Arial, sans-serif; --serif: Frank, "Frank Ruehl CLM", "David", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --bg: #0f141b; --card: #182029; --ink: #ebe6dc; --muted: #a3acb7; --line: #2a3440; --navy: #a9c8ee; --navy2: #6f9fd6; --accent: #5b9be0; --red: #ec8a76;
  --b7: #5b9be0; --b5: #7fb2ea; --b2: #22405f; --b1: #1b2c40; --shadow: none; } }
:root[data-theme=dark] { --bg: #0f141b; --card: #182029; --ink: #ebe6dc; --muted: #a3acb7; --line: #2a3440; --navy: #a9c8ee; --navy2: #6f9fd6; --accent: #5b9be0; --red: #ec8a76;
  --b7: #5b9be0; --b5: #7fb2ea; --b2: #22405f; --b1: #1b2c40; --shadow: none; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
body.reading { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main { max-width: 640px; margin: 0 auto; padding: 0 14px; outline: none; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.small { font-size: 12px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: block; flex: none; }
[dir=rtl] .ic.dir { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Today's top: the blue block with the date and the day arrows */
.hero { margin: 0 -14px 14px; padding: calc(14px + env(safe-area-inset-top)) 16px 18px; color: #fff; border-radius: 0 0 28px 28px;
  background: radial-gradient(85% 75% at 92% 0%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 62%), linear-gradient(165deg, #3a7fcb 0%, #2560a6 50%, #1c4b87 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .hero { background: radial-gradient(85% 75% at 92% 0%, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 62%), linear-gradient(165deg, #2a609e, #1c4577 50%, #15365c); } }
:root[data-theme=dark] .hero { background: radial-gradient(85% 75% at 92% 0%, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 62%), linear-gradient(165deg, #2a609e, #1c4577 50%, #15365c); }
@media (min-width: 668px) { .hero { margin: 12px 0 14px; border-radius: 28px; } }
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daybar .date { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.daybar h1 { font-size: 23px; margin: 0; font-weight: 800; }
.daybar small { opacity: .85; font-size: 13.5px; }
.nav-arrow { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; padding: 0; }
.totoday { margin-top: 6px; padding: 4px 12px; border: 1px solid var(--b2); border-radius: 999px; background: var(--card); color: var(--b7); font-size: 13px; font-weight: 700; }
.summary { display: flex; align-items: center; gap: 14px; margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, .2); padding: 14px 2px 0; }
.summary b { display: block; font-size: 17px; }
.summary small { opacity: .85; }
.ring { --p: 0; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 360deg), rgba(255, 255, 255, .22) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); }
.ring span { position: relative; font-weight: 800; font-size: 14px; }
/* page tops (books, settings, about): no colored block, the title in navy */
.page-hero { padding: calc(14px + env(safe-area-inset-top)) 2px 6px; margin: 0 0 6px; }
.page-hero h1 { margin: 10px 2px 0; font-size: 26px; font-weight: 800; color: var(--navy); }
.page-hero .muted { margin: 2px 2px 0; }
.backrow { display: inline-flex; align-items: center; gap: 6px; color: var(--b7); font-weight: 700; font-size: 14px; }
.backrow .ic { width: 18px; height: 18px; }
.glbl { margin: 16px 4px 6px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* Today: rows in one white panel; a round check at the end */
.cards { list-style: none; margin: 0; padding: 0; display: grid; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.card { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; }
.card + .card { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.card .open { flex: 1; min-width: 0; display: flex; flex-direction: column; background: none; border: 0; padding: 2px; text-align: start; border-radius: 12px; }
.card .h3 { font-size: 13px; color: var(--muted); font-weight: 600; }
.card .portion { font-size: 16px; font-weight: 700; color: var(--ink); }
.card.big .portion { font-family: var(--serif); font-size: 21px; }
.card .sub { font-size: 14px; color: var(--muted); }
.check { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--card) calc(100% - 3px), transparent calc(100% - 2.5px)), var(--line); transition: transform .12s, background .15s; }
.check svg { width: 18px; height: 18px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check:hover svg { stroke: var(--line); }
.check:active { transform: scale(.9); }
.check.on { background: #2560a6; }
.check.on svg { stroke: #fff; }
.cards > li.empty { padding: 16px; color: var(--muted); text-align: center; }

/* panels and rows */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.panel.rows { padding: 4px 16px; }
.panel.rows > .row, .panel.rows > .lrow { padding: 14px 0; border-top: 1px solid var(--line); }
.panel.rows > :first-child { border-top: 0; }
.rl { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--navy); }
.rl.sechead { font-size: 17px; margin: 0; padding: 14px 0 12px; }
.row .rl { margin-bottom: 10px; }
.pick { display: grid; }
.pickrow { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); cursor: pointer; position: relative; }
.pick .pickrow:first-child { border-top: 0; padding-top: 2px; }
.pickrow input { position: absolute; opacity: 0; pointer-events: none; }
.pickrow .ptext { flex: 1; }
.pickrow b { font-size: 16px; font-weight: 600; }
.pickrow .box { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; background: var(--card); }
.pickrow .box svg { width: 18px; height: 18px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pickrow input:checked ~ .box { background: #2560a6; border-color: #2560a6; }
.pickrow input:checked ~ .box svg { stroke: #fff; }
.pickrow input:focus-visible ~ .box { outline: 2px solid var(--b7); outline-offset: 2px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 999px; padding: 4px; gap: 4px; background: var(--b1); border: 1px solid var(--b2); }
.seg button { border: 0; background: transparent; border-radius: 999px; min-height: 38px; padding: 8px 10px; font-size: 14.5px; font-weight: 700; color: var(--b7); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.seg button:hover:not(.on) { background: color-mix(in srgb, var(--b2) 60%, transparent); }
.seg button.on { background: #2560a6; color: #fff; box-shadow: 0 2px 6px rgba(37, 96, 166, .28); }
.seg button:disabled { color: var(--ink); cursor: default; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; background: var(--b1); color: var(--b7); border-radius: 12px; padding: 10px 16px; font-weight: 700; }
.btn:hover { background: var(--b2); }
.btn.primary { background: #2560a6; border-color: #2560a6; color: #fff; }
.btn.primary:hover { background: #1f5492; }
.btn.danger { background: color-mix(in srgb, var(--red) 10%, var(--card)); color: var(--red); }
.row.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row.split .rl { margin: 0; }
.icon { flex: none; min-width: 42px; height: 42px; border-radius: 12px; border: 1px solid transparent; background: var(--b1); color: var(--b7); font-weight: 700; font-size: 15px; padding: 0 8px; display: grid; place-items: center; }
.about-src p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.about-src p:last-child { margin: 0; }

/* books: a search field, filter chips, a tile per book; a book's chapters as a grid */
.bfilter { position: sticky; top: 0; z-index: 5; margin: 0 -14px 4px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; gap: 10px; }
.bsearch { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1px solid var(--b2); border-radius: 14px; background: var(--card); color: var(--b7); box-shadow: var(--shadow); }
.bsearch:focus-within { border-color: var(--b5); }
.bsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); }
.bsearch input::-webkit-search-cancel-button { display: none; }
.bsearch input::placeholder { color: var(--muted); }
.bclear { border: 0; background: var(--b1); color: var(--b7); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.bclear .ic { width: 16px; height: 16px; }
.bclear[hidden] { display: none; }
.fchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.fchips::-webkit-scrollbar { display: none; }
.fchips button { flex: none; border: 0; border-radius: 999px; padding: 7px 15px; background: var(--b1); color: var(--b7); font-size: 14px; font-weight: 700; white-space: nowrap; }
.fchips button.on { background: #2560a6; color: #fff; }
.bgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.btile { position: relative; display: grid; gap: 2px; padding: 12px 14px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .1s, border-color .15s; }
.btile:hover { border-color: var(--b2); }
.btile:active { transform: scale(.98); }
.btile b { font-size: 16.5px; font-weight: 700; color: var(--ink); padding-inline-end: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btile small { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.btile.open small, .btile.full small { color: var(--b7); font-weight: 600; }
.bbar { display: block; height: 4px; margin-top: 8px; border-radius: 9px; background: var(--b1); overflow: hidden; }
.bbar i { display: block; height: 100%; width: calc(var(--p) * 100%); background: #2560a6; border-radius: 9px; }
.btile.full { border-color: color-mix(in srgb, #2560a6 40%, var(--line)); }
.bdone { position: absolute; top: 10px; inset-inline-end: 10px; width: 22px; height: 22px; border-radius: 50%; background: #2560a6; display: grid; place-items: center; }
.bdone svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.jump { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 4px; padding: 14px 16px; border-radius: 16px; background: #2560a6; color: #fff; font-size: 15px; box-shadow: 0 6px 18px rgba(37, 96, 166, .25); }
.jump b { font-family: var(--serif); font-size: 18px; }
.bempty { text-align: center; color: var(--muted); padding: 30px 0; }
.bhead { display: grid; gap: 2px; margin: 2px 2px 14px; }
.bbar.wide { height: 6px; margin-top: 6px; }
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.chgrid a { display: grid; place-items: center; height: 48px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 17px; color: var(--ink); box-shadow: var(--shadow); }
.chgrid a.done { background: #2560a6; border-color: #2560a6; color: #fff; }
.chgrid a.today { border: 2px solid var(--b5); background: var(--b1); color: var(--b7); }
.chgrid a.done.today { background: #2560a6; color: #fff; }

/* about */
.promo { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.promo:first-of-type { border-top: 0; }
.promo img { border-radius: 12px; flex: none; }
.promo b { display: block; font-size: 16px; }
.promo small { color: var(--muted); font-size: 13px; }
.promo > span:nth-of-type(1) { flex: 1; }
.promo .go, .lrow .go { color: var(--b5); display: grid; place-items: center; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; text-align: start; color: inherit; min-height: 56px; }
.lrow .lt { flex: 1; display: grid; }
.lrow .lt b { font-size: 15px; color: var(--navy); }
.lrow .lt small { font-size: 13px; color: var(--muted); }
.lic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--b1); color: var(--b7); }
.lic .ic { width: 20px; height: 20px; stroke-width: 2; }
.lic.wa { background: #25d366; color: #fff; }
.waic { width: 22px; height: 22px; }

/* the dedication: three lines and the surname in the book font, a solid navy block */
.dedic { display: grid; justify-items: center; gap: 4px; text-align: center; margin: 0 auto; max-width: 380px; font-family: var(--serif); color: var(--ink); }
.dedic small { font-size: 17px; color: var(--muted); }
.dedic b { font-size: 26px; font-weight: 700; line-height: 1.3; color: var(--navy); }
.dedic .f { font-size: 19px; }
.dedic b.sur { font-size: 22px; }
.panel.dedic-card { padding: 22px 16px; background: linear-gradient(160deg, #24507f, #16304f); border: 0; box-shadow: 0 6px 18px rgba(22, 48, 79, .18); }
.dedic-card .dedic, .dedic-card .dedic b { color: #fff; }
.dedic-card .dedic small, .dedic-card .dedic .f { color: rgba(255, 255, 255, .85); }

/* launch screen */
.splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px;
  padding: calc(24px + env(safe-area-inset-top)) 28px calc(24px + env(safe-area-inset-bottom)); color: #fff; background: radial-gradient(90% 60% at 90% 0%, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, 0) 60%), linear-gradient(170deg, #3a7fcb 0%, #2560a6 50%, #1c4b87 100%); transition: opacity .5s ease; }
.splash .sbrand { display: grid; justify-items: center; gap: 14px; }
.splash img { border-radius: 22px; box-shadow: 0 8px 24px rgba(10, 30, 60, .25); }
.splash .sname { font-family: var(--serif); font-size: 34px; font-weight: 700; }
.splash .dedic { width: min(100%, 460px); gap: 8px; color: rgba(255, 255, 255, .92); }
.splash .dedic b { color: #fff; font-size: clamp(32px, 10.5vw, 44px); }
.splash .dedic b.sur { font-size: clamp(26px, 8.5vw, 36px); }
.splash .dedic small { color: rgba(255, 255, 255, .78); font-size: clamp(19px, 6vw, 23px); }
.splash .dedic .f { font-size: clamp(20px, 6.2vw, 27px); }
.splash.out { opacity: 0; pointer-events: none; }
.splash img { animation: splash-in .7s cubic-bezier(.2, .7, .2, 1) both; }
.splash .sname { animation: splash-up .6s .2s cubic-bezier(.2, .7, .2, 1) both; }
.splash .dedic { animation: splash-fade .9s .45s ease-out both; }
.splash .sbrand { transition: transform .5s ease; }
.splash.out .sbrand { transform: scale(1.04); }
@keyframes splash-in { from { opacity: 0; transform: scale(.88); } }
@keyframes splash-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes splash-fade { from { opacity: 0; } }
.splash .sbrand img { width: min(66vw, 300px); height: auto; border-radius: 0; box-shadow: none; }
.splash .sbrand .sname { font-family: var(--sans); font-size: clamp(40px, 11.5vw, 54px); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; opacity: 1; }
@media (orientation: landscape) and (max-height: 520px) { .splash .sbrand img { width: min(42vh, 180px); } .splash .sbrand .sname { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { .splash, .splash .sbrand { transition: none; } .splash img, .splash .sname, .splash .dedic { animation: none; } }

/* bottom bar */
.nav { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; justify-content: center; gap: 2px; background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tab { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); padding: 6px 2px; border-radius: 14px; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current=page] { color: var(--navy); font-weight: 700; background: color-mix(in srgb, var(--navy2) 10%, transparent); }

/* reader: a quiet top with round light buttons and chips; the text scrolls; one light bar floats at the bottom */
.reader { position: fixed; inset: 0; z-index: 20; background: var(--card); display: flex; flex-direction: column; }
.reader[hidden] { display: none; }
.rhead { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 6px; background: var(--card); }
.rhead > .icon { width: 40px; min-width: 40px; height: 40px; border-radius: 50%; padding: 0; }
.rtitle { flex: 1; min-width: 0; }
.rtitle small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.rtitle h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--b9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .rtitle h2 { color: var(--navy); } }
:root[data-theme=dark] .rtitle h2 { color: var(--navy); }
.rtools { display: flex; gap: 6px; flex: none; }
.rtools .icon { width: 40px; min-width: 40px; height: 40px; border-radius: 50%; padding: 0; }
.rtools .icon:hover { background: var(--b2); }
.fsl { font-family: var(--serif); font-weight: 700; line-height: 1; }
.fsl.sm { font-size: 15px; } .fsl.lg { font-size: 25px; }
.ropts { flex: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 2px 12px 8px; background: var(--card); }
.ropts label { position: relative; padding: 6px 14px; border-radius: 999px; background: var(--b1); color: var(--b7); font-weight: 700; font-size: 13px; cursor: pointer; transition: background .15s, color .15s; }
.ropts label input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ropts label:has(input:checked) { background: var(--b7); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .ropts label:has(input:checked) { background: #2560a6; } }
:root[data-theme=dark] .ropts label:has(input:checked) { background: #2560a6; }
.ropts label:has(input:checked)::before { content: "✓"; font-size: 12px; margin-inline-end: 4px; }
.ropts label:has(input:focus-visible) { outline: 2px solid var(--b7); outline-offset: 2px; }
.rbody { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.text { max-width: 720px; margin: 0 auto; padding: 12px 18px 24px; font: var(--font, 21px)/1.85 var(--read, var(--serif)); }
.verse > p { margin: 0 0 .25em; }
.vn { font-family: var(--sans); font-size: .6em; font-weight: 800; color: var(--b7); margin-inline-end: .3em; vertical-align: .25em; }
.pm { font-family: var(--sans); font-size: .6em; color: var(--muted); margin: 0 .3em; }
.cms { margin: .1em 0 .7em; }
details.cm { font-size: .78em; line-height: 1.65; }
details.cm:not([open]) { display: inline-block; margin-inline-end: .4em; }
details.cm > summary { list-style: none; display: inline-flex; align-items: center; gap: .35em; cursor: pointer; font-family: var(--sans); font-size: .8em; font-weight: 700; color: #fff; background: #2560a6; border-radius: 999px; padding: .25em .9em; }
details.cm > summary::-webkit-details-marker { display: none; }
details.cm > summary::after { content: "+"; font-weight: 800; }
details.cm[open] > summary::after { content: "−"; }
details.cm > summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
details.cm[open] { display: block; background: var(--bg); border-radius: 12px; padding: .5em .8em; margin: .2em 0 .5em; }
details.cm[open] > summary { margin-bottom: .4em; }
details.cm p { margin: 0 0 .35em; }
.rfoot { position: absolute; inset-inline: 0; bottom: 0; pointer-events: none; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }
.rpill { pointer-events: auto; display: flex; align-items: center; gap: 4px; max-width: 520px; margin: 0 auto; padding: 5px; border-radius: 999px; background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--b2); box-shadow: 0 8px 26px rgba(22, 48, 79, .16); }
.rpill .dnav { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0; background: var(--b1); color: var(--b7); display: grid; place-items: center; }
.rpill .dnav:disabled { opacity: .35; cursor: default; }
.rpill .btn { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 14px; border-radius: 999px; font-size: 15px; }
.err { color: var(--muted); text-align: center; font-family: var(--sans); font-size: 16px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* wide screens: the reader's top lines up with the text column */
.rhead, .ropts { padding-inline: max(12px, calc((100% - 744px) / 2)); }
/* a book not started: no empty bar */
.btile:not(.open):not(.full) .bbar { display: none; }
body.reading .toast { bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 30; }

/* install prompt (js/install.js) */
.install { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid color-mix(in srgb, var(--navy2) 45%, var(--line)); border-radius: var(--r); padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.install img { border-radius: 12px; flex: none; }
.install > div:nth-of-type(1) { flex: 1; min-width: 0; }
.install b { display: block; color: var(--navy); }
.install small { color: var(--muted); font-size: 13px; }
.ibtns { display: flex; flex-direction: column; gap: 6px; }
.ibtns .btn { padding: 5px 12px; font-size: 14px; border-radius: 999px; }
.ibtns .btn:not(.primary) { background: transparent; border-color: transparent; color: var(--muted); }
.lrow .lic img { border-radius: 6px; }
.isheet { position: fixed; inset: 0; z-index: 80; background: rgba(10, 18, 30, .45); display: flex; align-items: flex-end; justify-content: center; }
.isheet[hidden] { display: none; }
.isheet-card { width: min(100%, 480px); max-height: 88vh; overflow: auto; background: var(--card); color: var(--ink); border-radius: 22px 22px 0 0; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .2); display: grid; gap: 16px; }
@media (min-width: 668px) { .isheet { align-items: center; } .isheet-card { border-radius: 22px; } }
.isheet-head { display: flex; align-items: center; justify-content: space-between; }
.isheet-head h2 { margin: 0; font-size: 18px; color: var(--navy); }
.iclose { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--b1); color: var(--b7); display: grid; place-items: center; cursor: pointer; }
.iclose svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.isteps { display: grid; gap: 10px; margin: 0; padding-inline-start: 22px; list-style: decimal; font-size: 15px; }
.isteps small { display: block; color: var(--muted); font-size: 13px; }
.isteps svg { width: 20px; height: 20px; vertical-align: -4px; margin-inline-start: 6px; fill: none; stroke: var(--navy2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iwide { width: 100%; padding: 13px; }

/* the day's study in the reader: a heading per daf */
.tyrange { font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.chap { font-family: var(--sans); font-size: 15px; font-weight: 800; color: var(--b7); margin: 1.1em 0 .5em; padding-bottom: 4px; border-bottom: 1px solid var(--b2); }
.tyrange + .chap { margin-top: .4em; }
/* the random chapter: a round light button to pick another */
.card .shuf { width: 34px; min-width: 34px; height: 34px; border-radius: 50%; padding: 0; }
.card .shuf .ic { width: 18px; height: 18px; stroke-width: 2; }
.legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 18px 0 6px; font-size: 14px; }
.legal a { color: var(--navy2); }
/* the QR code in About */
.isheet-card.qrcard { display: grid; justify-items: center; gap: 10px; text-align: center; }
.isheet-card.qrcard img { width: min(70vw, 260px); height: auto; border-radius: 12px; border: 1px solid var(--line); }
.isheet-card.qrcard .isheet-head { justify-self: stretch; }

/* ---------- display (as in חת״ת): the reader's תצוגה sheet, the face list, the size with a sample ---------- */
:root { --green: #23805a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --green: #4fbf8c; } }
:root[data-theme=dark] { --green: #4fbf8c; }
:root[data-face=ezra] { --read: Ezra, var(--serif); }
:root[data-face=noto] { --read: Noto, var(--serif); }
:root[data-face=cardo] { --read: Cardo, var(--serif); }
:root[data-face=sans] { --read: NotoSans, var(--sans); }
:root[data-face=david] { --read: DavidLibre, Noto, var(--serif); }
:root[data-face=alef] { --read: Alef, NotoSans, var(--sans); }
.facebtn.frank { font-family: var(--serif); } .facebtn.ezra { font-family: Ezra, var(--serif); } .facebtn.noto { font-family: Noto, var(--serif); }
.facebtn.cardo { font-family: Cardo, var(--serif); } .facebtn.sans { font-family: NotoSans, var(--sans); }
.facebtn.david { font-family: DavidLibre, Noto, var(--serif); } .facebtn.alef { font-family: Alef, NotoSans, var(--sans); }
.rhead .fsz .fszt { display: block; font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1; white-space: nowrap; }
.rhead .fsz .fszt small { font-size: 14px; margin-inline-start: 1px; }
.isheet-card.vsheet, .isheet-card.fsheet { gap: 12px; }
.vgrp { display: grid; gap: 8px; }
.vgrp .vlbl { font-size: 13px; font-weight: 700; color: var(--muted); padding-inline: 4px; }
.fsrow { display: flex; align-items: center; gap: 10px; }
.fsrow .fsz { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--b1); color: var(--b7); }
.fsrow .fsz:hover { background: var(--b2); }
.fsample { flex: 1; min-width: 0; margin: 0; text-align: center; font-family: var(--read, var(--serif)); line-height: 1.5; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.locpick { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 4px 14px; border: 1px solid var(--b2); border-radius: 12px; background: var(--card); color: var(--ink); text-align: start; }
.locpick > span { flex: 1; min-width: 0; display: grid; }
.locpick b.facebtn { font-size: 19px; font-weight: 500; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.locpick small { font-size: 12.5px; color: var(--muted); }
.locpick .ic { width: 16px; height: 16px; color: var(--b7); stroke-width: 2; }
.facelist { display: grid; max-height: min(60vh, 520px); overflow-y: auto; border-top: 1px solid var(--b2); }
.facelist .lrow { padding: 6px 4px; border-bottom: 1px solid var(--line); min-height: 60px; }
.facelist .lrow b.facebtn { font-size: 22px; font-weight: 500; line-height: 1.6; color: var(--ink); }
.facelist .lrow.on b.facebtn { color: var(--b7); }
.facelist .lrow .go { color: var(--b7); font-weight: 800; }
.fsheet > .fsrow { padding-bottom: 4px; }

/* ---------- the reader's progress bar: where you are inside it, the % at its end, the fill from blue to green ---------- */
.reader > .rtop { flex: none; display: grid; grid-template-rows: 1fr; transition: grid-template-rows .32s cubic-bezier(.22, 1, .36, 1), opacity .22s ease; }
.reader > .rtop > .rtopin { min-height: 0; overflow: hidden; }
.reader.fold > .rtop { grid-template-rows: 0fr; opacity: 0; pointer-events: none; }
.rwhere { flex: none; padding: 2px 12px 8px; padding-inline: max(12px, calc((100% - 744px) / 2)); background: var(--card); transition: padding-top .32s cubic-bezier(.22, 1, .36, 1); }
.reader.fold .rwhere { padding-top: calc(8px + env(safe-area-inset-top)); }
.reader.fold .rprog { cursor: pointer; }
.rprog { position: relative; height: 26px; border-radius: 999px; background: color-mix(in srgb, var(--line) 75%, var(--card)); overflow: hidden; }
.rprog .rtrack { position: absolute; inset: 0; }
.rprog i { display: block; height: 100%; width: 0; transition: width .25s; background: color-mix(in srgb, color-mix(in srgb, var(--green) calc(var(--p, 0) * 1%), var(--b5)) 34%, var(--card)); }
.rprog.full i { background: color-mix(in srgb, var(--green) 34%, var(--card)); }
.rprog .rlbl { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; padding-inline: 10px 44px; font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.rprog .rwt { overflow: hidden; text-overflow: ellipsis; }
.rprog .rpct { position: absolute; inset-inline-end: 12px; top: 50%; translate: 0 -50%; font-size: 12px; color: color-mix(in srgb, var(--ink) 60%, transparent); font-variant-numeric: tabular-nums; }
.rprog.full .rpct { color: var(--green); }
/* while the text loads, a run goes inside the bar */
.reader:has(#rbody > .loading) .rprog i { position: absolute; inset-block: 0; width: 40% !important; background: linear-gradient(90deg, transparent, var(--b5), var(--b7), transparent); transition: none; animation: lrun 1.4s ease-in-out infinite; opacity: .5; }
.reader:has(#rbody > .loading) .rprog .rlbl { visibility: hidden; }
@keyframes lrun { from { inset-inline-start: -40%; } to { inset-inline-start: 100%; } }
@media (prefers-reduced-motion: reduce) { .reader > .rtop, .rwhere { transition: none; } }
.rbody { border-top: 0; }
/* a verse opened from the search: lit for a moment, its words marked */
.verse.flash { animation: vflash 2.4s ease-out; border-radius: 8px; }
@keyframes vflash { 0%, 45% { background: color-mix(in srgb, var(--b5) 16%, transparent); } 100% { background: transparent; } }
.text mark.hit { background: color-mix(in srgb, var(--b5) 22%, transparent); color: inherit; border-radius: 4px; }

/* ---------- books: how far each part is; the verses found ---------- */
.pparts { display: grid; gap: 6px; margin: 12px 2px 4px; }
.ppart { display: grid; grid-template-columns: 4.6em 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.ppart b { font-weight: 700; color: var(--navy); }
.ppart .bbar { margin: 0; height: 6px; background: var(--b2); }
.ppart small { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 6.5em; text-align: end; }
.fchips button { display: inline-flex; align-items: center; gap: 6px; }
.fchips .fcount { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--card); color: var(--b7); font-size: 12px; font-weight: 800; text-align: center; }
.fchips .fcount[hidden] { display: none; }
.fchips button.on .fcount { background: rgba(255, 255, 255, .22); color: #fff; }
.vres { padding-bottom: 12px; }
.vwait { text-align: center; padding: 18px 0; }
.vlist .card { padding: 10px 14px; }
.vlist .vtext { font-family: var(--read, var(--serif)); font-size: 17px; line-height: 1.6; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vlist mark { background: color-mix(in srgb, var(--b5) 20%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; font-weight: 700; }
.vlist .vmore { padding: 10px; text-align: center; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.btn.tiny { min-height: 34px; padding: 4px 14px; border-radius: 999px; font-size: 14px; }
.rz { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 0 4px 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
.tgl { appearance: none; -webkit-appearance: none; position: relative; flex: none; inline-size: 46px; block-size: 28px; margin: 0; border-radius: 14px; background: var(--b2); cursor: pointer; transition: background .15s; }
.tgl::after { content: ''; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 22px; block-size: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: inset-inline-start .15s; }
.tgl:checked { background: var(--b7); }
.tgl:checked::after { inset-inline-start: 21px; }
.tgl:focus-visible { outline: 2px solid var(--b7); outline-offset: 2px; }
.pick .rz.srow { margin: 0; padding: 4px 2px; font-size: 16px; border-top: 1px solid var(--line); }
.pick .rz.srow:first-child { border-top: 0; }

/* ---------- Today's top as in חת״ת: no colored block; the ring of the day beside the date, the dedication as a blue strip ---------- */
.hero.today, :root[data-theme] .hero.today { background: none !important; color: var(--ink); padding: calc(10px + env(safe-area-inset-top)) 2px 4px; margin: 0 0 12px; border-radius: 0; }
.hero.today .daybar { gap: 4px; }
.hero.today .nav-arrow { border-color: var(--line); background: var(--card); color: var(--navy); }
.hero.today .date { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 12px; }
.hero.today .dtext { display: flex; flex-direction: column; align-items: flex-start; text-align: start; }
.hero.today h1 { font-size: 23px; color: var(--navy); white-space: nowrap; }
.hero.today .dtext small { color: var(--muted); opacity: 1; font-size: 13.5px; font-weight: 500; }
.hero.today .totodayrow { display: flex; justify-content: center; margin: 8px 0 2px; }
.hero.today .totoday { margin: 0; min-height: 32px; padding: 0 14px; border: 1px solid var(--b2); background: var(--card); }
a.dring { flex: none; width: 58px; height: 58px; border-radius: 50%; display: block; }
a.dring svg { display: block; width: 100%; height: 100%; }
a.dring .track { stroke: var(--line); }
a.dring circle { transition: stroke-dasharray .4s ease; }
a.dring text { font: 800 13px var(--sans); fill: var(--navy); }
a.dring .dhalo { fill: var(--b2); }
a.dring .dfull { fill: #2560a6; }
a.dring .dtick { fill: none; stroke: #fff; stroke-width: 4.6; stroke-linecap: round; stroke-linejoin: round; }
a.dring:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
@media (max-width: 400px) { .hero.today h1 { font-size: clamp(16px, 5vw, 21px); } .hero.today .date { gap: 8px; } .hero.today .nav-arrow { width: 38px; height: 38px; } a.dring { width: 48px; height: 48px; } .hero.today .dtext small { font-size: 12.5px; } }
.dedline { display: grid; gap: 1px; justify-items: center; margin: 10px 0 0; padding: 11px 16px 12px; border-radius: 14px; text-align: center; background: linear-gradient(150deg, #2f6fbd, #1f4f8c); box-shadow: 0 4px 14px rgba(31, 79, 140, .22); }
.dedline small { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .82); letter-spacing: .3px; }
.dedline b { font-family: var(--serif); font-size: 17px; font-weight: 700; color: #fff; line-height: 1.35; }
.dedline span { font-family: var(--serif); font-size: 15px; color: rgba(255, 255, 255, .92); line-height: 1.35; }
.findbar { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; margin: 0 0 12px; padding: 0 14px; border: 1px solid var(--b2); border-radius: 12px; background: var(--card); color: var(--muted); font-size: 15px; text-align: start; }
.findbar .ic { width: 20px; height: 20px; color: var(--b7); stroke-width: 2; }
/* a study's circle fills as far as it is read */
.check.part { background: radial-gradient(closest-side, var(--card) calc(100% - 3px), transparent calc(100% - 2.5px)), conic-gradient(#2560a6 calc(var(--f) * 360deg), var(--line) 0); }
/* ---------- progress as חת״ת's "לפי לימוד": a row per part, its count at the end, a thin track ---------- */
.panel h2 { margin: 0; font-size: 17px; color: var(--navy); }
.tstudies { display: grid; gap: 16px; }
.srow { display: flex; align-items: center; gap: 12px; }
.sbody { flex: 1; min-width: 0; display: grid; gap: 7px; }
.stop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.stop b { font-size: 15px; font-weight: 600; }
.stop small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.strack { block-size: 7px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.strack i { display: block; block-size: 100%; border-radius: 99px; background: #2560a6; }
/* the books' bars in the same look as the progress rows */
.bbar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.bbar i { border-radius: 99px; }

/* ---------- the commentaries, as Rashi in חת״ת: open under the verse in a soft box, each with its name on top ---------- */
.cms { font-size: .78em; line-height: 1.65; background: var(--b1); border-radius: 12px; padding: .5em .8em; margin: .2em 0 .9em; color: var(--ink); }
.cms .cm + .cm { margin-top: .45em; padding-top: .45em; border-top: 1px solid var(--b2); }
.cms .rl { display: block; margin: 0; font-family: var(--sans); font-size: .7em; font-weight: 800; color: var(--b7); }
.cms p { margin: 0 0 .35em; }
.cms p:last-child { margin-bottom: 0; }

/* each part's heading in Books with its progress (in place of a panel) */
.phead { display: grid; gap: 6px; margin: 18px 4px 10px; }
.phead h2 { margin: 0; font-size: 17px; font-weight: 800; color: var(--navy); }
.phead .stop small { font-size: 13px; font-weight: 600; }
.phead .strack { block-size: 6px; }

/* a book's chapters: a row each, its number in a soft circle, the opening words in the book font */
.chlist .chrow { padding: 8px 12px 8px 14px; }
.chlist .open { flex-direction: row; align-items: center; gap: 12px; }
.chlist .cnum { flex: none; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; background: var(--b1); color: var(--b7); font-weight: 800; font-size: 16px; }
.chlist .chrow.done .cnum { background: #2560a6; color: #fff; }
.chlist .ctext { flex: 1; min-width: 0; display: grid; }
.chlist .cfirst { font-family: var(--read, var(--serif)); font-size: 18px; line-height: 1.5; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chlist .sub { font-size: 13px; }
.chlist .sub b { color: var(--b7); }
.page-hero .phead { margin: 8px 2px 4px; }
/* the daf: "עמוד א" / "עמוד ב" between the passages; the explanation (Steinsaltz) a little larger than the commentaries */
.amud { font-family: var(--sans); font-size: 13px; font-weight: 800; color: var(--b7); margin: 1em 0 .5em; display: flex; align-items: center; gap: 10px; }
.amud::after { content: ""; flex: 1; border-top: 1px solid var(--b2); }
.chap + .amud { margin-top: .4em; }
.cms .cm-s, .cms .cm-bt { font-size: 1.12em; }
