/* @pivotal/ui-shell — the shell's look, in theme tokens with zohar's values as fallbacks, so a
   legacy app restyled with this file looks the same as its own style.css (zohar public/style.css:
   .card .btn .seg .row-label .size #tabs #toast .yearbar .row-day .qbar .view .fine .ltr). */

.view { display: none; }
.view.on { display: block; }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: left; }
.fine { color: var(--mute, #8a7f6a); font-size: 12px; line-height: 1.6; }

/* cards and buttons */
.card { background: var(--paper, #fbf7ec); border: 1px solid var(--line, #e4dac3); border-radius: var(--radius, 16px); padding: 14px 16px; margin: 12px 0; display: block; color: inherit; text-decoration: none; }
.card h3 { margin: 0 0 10px; font-size: 16px; color: var(--accent, #7a3e12); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card h3 small { color: var(--mute, #8a7f6a); font-weight: 400; font-size: 12px; }
.btn { border: 1px solid var(--line, #e4dac3); background: var(--chipbg, #efe5cd); color: inherit; border-radius: var(--radius-sm, 10px); padding: 9px 14px; font: inherit; cursor: pointer; }
.btn.primary { background: var(--ink, #1d1a14); color: var(--bg, #f7f1e3); border-color: var(--ink, #1d1a14); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.bad { color: var(--bad, #b3263e); }
.btn.mark { width: 100%; margin-top: 14px; padding: 12px; font-size: 16px; }
.btn.mark.on { background: var(--ink, #1d1a14); color: var(--bg, #f7f1e3); }

/* settings rows */
.row-label { display: block; color: var(--mute, #8a7f6a); font-size: 12.5px; margin: 14px 0 6px; }
.row { display: flex; gap: 8px; align-items: center; }
.seg { display: flex; background: var(--chipbg, #efe5cd); border-radius: var(--radius-sm, 10px); padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 8px 4px; border-radius: 8px; font-size: 13.5px; background: none; border: 0; color: inherit; font-family: inherit; cursor: pointer; }
.seg button.on { background: var(--paper, #fbf7ec); box-shadow: 0 1px 3px #0002; font-weight: 600; }
.seg.fonts { flex-wrap: wrap; }
.seg.fonts button { flex: 1 1 30%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; }
.seg.fonts button b { font-size: 22px; font-weight: 400; line-height: 1.2; }
.seg.fonts button small { font-size: 11px; color: var(--mute, #8a7f6a); }
.size { display: flex; align-items: center; gap: 10px; }
.size button { background: var(--chipbg, #efe5cd); border: 0; border-radius: var(--radius-sm, 10px); padding: 7px 16px; font-family: var(--hfont, 'SBL Hebrew', 'Noto Serif Hebrew', serif); font-size: 18px; color: inherit; cursor: pointer; }
.size span { min-width: 3em; text-align: center; color: var(--mute, #8a7f6a); }

/* lists */
.qbar { height: 9px; border-radius: 6px; background: var(--chipbg, #efe5cd); overflow: hidden; border: 1px solid var(--line, #e4dac3); }
.qbar > div { height: 100%; background: var(--targ, #2f6b4f); }
.row-day { display: flex; gap: 10px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line, #e4dac3); text-decoration: none; color: inherit; font-size: 14px; }
.row-day .dt { flex: 0 0 7.5em; color: var(--mute, #8a7f6a); }
.row-day .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-day .ck { flex: 0 0 1.2em; color: var(--targ, #2f6b4f); }
.row-day.done .nm { color: var(--mute, #8a7f6a); }
.row-day.now { background: var(--mark, #f1d98c66); border-radius: 8px; }
.row-day .go { color: var(--mute, #8a7f6a); }
.yearbar { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; }

/* bottom tabs (#tabs in every app) */
#tabs, .tabs { position: fixed; bottom: 0; inset-inline: 0; display: flex; background: var(--tabbg, #f7f1e3ee); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line, #e4dac3); padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 10; margin: 0; }
#tabs button, .tabs button { flex: 1; background: none; border: 0; padding: 8px 0 9px; color: var(--mute, #8a7f6a); font-size: 12px; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; }
#tabs button .i, .tabs button .i { font-size: 19px; }
#tabs button.on, .tabs button.on { color: var(--accent, #7a3e12); }

/* toast with undo */
#toast, .toast { position: fixed; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; background: var(--ink, #1d1a14); color: var(--bg, #f7f1e3); padding: 9px 14px; border-radius: 12px; display: flex; gap: 12px; align-items: center; z-index: 20; max-width: calc(100vw - 32px); }
#toast.on, .toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button, .toast button { background: none; border: 0; color: var(--bg, #f7f1e3); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* date stepper (meah .dstep, benishchai .dayhead) */
.dstep { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-radius: var(--radius-sm, 10px); outline-offset: 2px; }
.dstep:focus-visible { outline: 2px solid var(--accent, #7a3e12); }
.dstep > button[data-dk="-1"], .dstep > button[data-dk="1"] { background: var(--chipbg, #efe5cd); border: 0; border-radius: var(--radius-sm, 10px); padding: 5px 14px; font-size: 18px; line-height: 1; color: inherit; cursor: pointer; }
.dstep-lbl { flex: 1; text-align: center; font-size: 14px; min-width: 0; }
.dstep.off-study .dstep-lbl { color: var(--mute, #8a7f6a); }
.dstep .now { margin-inline-start: 4px; }

/* occasion chips (meah .oc) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.oc { border: 1px solid var(--line, #e4dac3); background: var(--chipbg, #efe5cd); color: var(--mute, #8a7f6a); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-family: inherit; cursor: pointer; }
.oc.on { background: var(--ink, #1d1a14); color: var(--bg, #f7f1e3); border-color: var(--ink, #1d1a14); }

/* countdown and deadline strips (zmanim .hero, meah #zcard / .zstrip) */
.cd { position: relative; }
.cd-lbl { font-size: 18px; font-weight: 700; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.cd-pre { font-weight: 400; color: var(--mute, #8a7f6a); font-size: 14px; }
.cd-name2 { font-weight: 400; color: var(--mute, #8a7f6a); font-size: 14px; }
.cd-row { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 10px; gap: 10px; }
.cd-count { font: 700 40px/1 var(--f-mono, ui-monospace, 'SF Mono', Menlo, monospace); direction: ltr; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.cd-at { color: var(--mute, #8a7f6a); font-size: 15px; }
.cd-barwrap { height: 28px; background: var(--chipbg, #efe5cd); border-radius: 10px; overflow: hidden; border: 1px solid var(--line, #e4dac3); }
.cd-bar { height: 100%; width: 100%; border-radius: 9px; transition: width 1s linear, background-color 1s linear; background: var(--targ, #2f6b4f); }
.cd-foot { color: var(--mute, #8a7f6a); font-size: 12px; margin-top: 8px; display: flex; justify-content: space-between; gap: 8px; }
.cd-hour { font-family: var(--hfont, 'SBL Hebrew', 'Noto Serif Hebrew', serif); font-size: 15px; color: var(--ink, #1d1a14); }
.cd-after .cd-bar { width: 0 !important; }
.cd.flash { animation: cd-flash 1.2s ease-out; }
@keyframes cd-flash { from { box-shadow: 0 0 0 4px var(--mark, #f1d98c66); } to { box-shadow: none; } }
.cd-compact { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cd-compact .cd-lbl { font-size: 13px; font-weight: 600; }
.cd-compact .cd-pre, .cd-compact .cd-name2, .cd-compact .cd-at, .cd-compact .cd-foot .cd-prev { display: none; }
.cd-compact .cd-row { margin: 0; }
.cd-compact .cd-count { font-size: 15px; letter-spacing: 0; }
.cd-compact .cd-barwrap { flex: 1; height: 8px; border-radius: 4px; }
.cd-compact .cd-foot { margin: 0; }

/* split viewer (zmanim / siyum .split) */
.split { position: fixed; inset: 0; z-index: 30; background: var(--bg, #f7f1e3); color: var(--ink, #1d1a14); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.split-bar { display: flex; align-items: center; gap: 14px; padding: 6px 12px; border-bottom: 1px solid var(--line, #e4dac3); }
.split-title { flex: 1; font-family: var(--hfont, 'SBL Hebrew', 'Noto Serif Hebrew', serif); font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-bar a { color: var(--gold, #9a6b12); text-decoration: none; font-size: 14px; white-space: nowrap; }
.split-x { background: none; border: 0; color: inherit; font-size: 20px; padding: 4px 8px; cursor: pointer; }
.split-panes { flex: 1; display: flex; min-height: 0; --a: 50%; }
.split-a, .split-b { min-width: 0; min-height: 0; overflow: auto; background: var(--paper, #fbf7ec); }
.split-a { flex: 0 0 var(--a); }
.split-b { flex: 1; }
.split-panes iframe { border: 0; width: 100%; height: 100%; background: #fff; display: block; }
.split-div { flex: 0 0 12px; background: var(--line, #e4dac3); cursor: col-resize; touch-action: none; position: relative; }
.split-div::after { content: ''; position: absolute; inset: 50% 4px auto; height: 40px; margin-top: -20px; border-radius: 2px; background: var(--mute, #8a7f6a); }
.split-div:focus-visible { outline: 2px solid var(--accent, #7a3e12); }
.split-panes.dragging iframe { pointer-events: none; }
@media (max-width: 699px) { .split-panes { flex-direction: column; } .split-a { flex-basis: 50%; } .split-div { flex-basis: 12px; cursor: row-resize; } .split-div::after { inset: 4px 50% auto; width: 40px; height: 4px; margin: 0 0 0 -20px; } }

/* bottom sheet (ui-reader .rd-sheet) */
.sheet-back { position: fixed; inset: 0; background: #0002; z-index: 24; }
.sheet { position: fixed; inset-inline: 0; bottom: 0; max-height: 70%; background: var(--paper, #fbf7ec); color: var(--ink, #1d1a14); border-top: 1px solid var(--line, #e4dac3); border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px #0003; display: flex; flex-direction: column; z-index: 25; animation: sheet-up .22s ease-out; padding-bottom: env(safe-area-inset-bottom, 0px); }
:not(body) > .sheet, :not(body) > .sheet-back { position: absolute; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 4px; font-size: 13px; color: var(--mute, #8a7f6a); }
.sheet-h b { font-weight: 600; }
.sheet-x { background: none; border: 0; color: inherit; font-size: 16px; padding: 4px 8px; cursor: pointer; }
.sheet-b { overflow: auto; padding: 0 16px 16px; }
@media (prefers-reduced-motion: reduce) { .sheet, .cd-bar, .cd.flash { animation: none; transition: none; } }
