@font-face {
  font-family: HebrewFallback;
  src: url('assets/NotoSerifHebrew.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Frank;
  src: url('assets/FrankRuhlLibre.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Heebo;
  src: url('assets/Heebo.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --paper: #f6f3eb;
  --sheet: #fbf9f3;
  --ink: #263d34;
  --muted: #616e62;
  --line: #d7dcce;
  --accent: #806b39;
  --wash: #e8ece0;
  --button: #294b3e;
  --button-text: #f9f7ee;
  --veil: rgba(246, 243, 235, 0.97);
  --reading-size: 27px;
  --reading-leading: 1.85;
  --display: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --ui: Heebo, Arial, sans-serif;
  --header: 76px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --paper: #162820;
  --sheet: #1b2f27;
  --ink: #e9e9d9;
  --muted: #b4c0ae;
  --line: #3b4f42;
  --accent: #c7b57f;
  --wash: #293d31;
  --button: #d4dcc7;
  --button-text: #1b3026;
  --veil: rgba(22, 40, 32, 0.97);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 0;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--ui);
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p,
fieldset {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 500;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button,
a {
  transition:
    background-color 0.16s,
    border-color 0.16s,
    color 0.16s;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
[tabindex='-1']:focus {
  outline: none;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
}
.skip-link:focus {
  top: 12px;
}
.loading {
  padding: 80px 24px;
  text-align: center;
}
.loading p {
  margin: 16px 0 24px;
}
.boot-notice {
  position: fixed;
  inset: auto 12px 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px;
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--ui);
  font-size: 15px;
}
.boot-notice p {
  margin: 0;
}
/* The one line a pre-built page of a newer release carries at its very end (app.js, unknownPage). */
.update-line {
  max-width: 560px;
  margin: 24px auto 32px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
/* Shared controls: 44px targets, explicit selection, and native keyboard behavior. */
.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: 500 12px/1.25 var(--ui);
  text-decoration: none;
  white-space: nowrap;
}
.control--icon {
  width: 44px;
  padding: 10px;
}
.control--icon:hover,
.control--quiet:hover {
  background: var(--wash);
}
.control--toolbar {
  background: var(--sheet);
  border-color: var(--line);
}
.control--toolbar:hover,
.control--stepper:hover:not(:disabled) {
  background: var(--wash);
  border-color: var(--muted);
}
.control[aria-pressed='true'] {
  background: var(--wash);
  border-color: var(--accent);
  color: var(--ink);
}
.control--primary,
.primary-link {
  background: var(--button);
  color: var(--button-text);
  padding: 12px 24px;
  min-height: 44px;
  font: 500 13px var(--ui);
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.control--primary:hover,
.primary-link:hover {
  filter: brightness(1.12);
}
.control--stepper {
  border-color: var(--line);
  background: var(--sheet);
  width: 44px;
  padding: 10px;
}
.control--contents {
  justify-content: flex-start;
  padding: 9px 10px;
  max-width: calc(100% - 58px);
  font-size: 12px;
}
.control--contents span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.control--contents::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-top: -4px;
  flex-shrink: 0;
}
.text-button {
  font: 400 12px/1.4 var(--ui);
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 44px;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
}
.text-button:hover {
  color: var(--accent);
}
.choice-field {
  border: 0;
  padding: 0;
  min-width: 0;
}
.choice-field legend {
  font-size: 13px;
  font-weight: 500;
  padding: 0;
  margin-bottom: 12px;
}
.choice-group {
  display: flex;
  gap: 4px;
  background: var(--wash);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.choice {
  position: relative;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  inset: 50%;
}
.choice-face {
  min-height: 44px;
  padding: 10px 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.4;
  transition:
    background-color 0.16s,
    box-shadow 0.16s;
  white-space: nowrap;
}
.choice:hover .choice-face {
  background: var(--sheet);
}
.choice input:checked + .choice-face {
  background: var(--sheet);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 2px 4px #1022190c;
  font-weight: 600;
}
.choice input:focus-visible + .choice-face {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* The English shell flows LTR; Hebrew direction is scoped to prayer text. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand > svg {
  width: 29px;
  height: 31px;
  color: var(--accent);
}
.brand-word {
  font: 500 29px/1 var(--display);
  letter-spacing: -0.8px;
}
.brand small {
  display: block;
  font: 400 10px/1.4 var(--ui);
  color: var(--muted);
  margin-top: 7px;
}
.home {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 52% 48%;
}
.home-content {
  display: flex;
  flex-direction: column;
  padding: 35px clamp(34px, 5.3vw, 86px) 24px;
  min-width: 0;
}
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.home-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}
.home-intro {
  margin: 65px 0 34px;
}
.home-intro .nusach {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 18px;
}
.home-intro h1 {
  font: 400 clamp(48px, 5.8vw, 80px)/1.07 var(--display);
  letter-spacing: -2.7px;
}
.home-intro > p:last-child {
  margin-top: 23px;
  color: var(--muted);
  font-size: 14px;
}
.services {
  border-top: 1px solid var(--line);
}
.service-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding: 22px 4px;
  gap: 16px;
  border-radius: 0;
}
.service-link:hover {
  background: var(--wash);
}
.service-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.service-symbol svg {
  width: 24px;
  height: 24px;
}
.service-name {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}
.service-name h2 {
  font: 500 29px/1.2 var(--display);
  letter-spacing: -0.5px;
}
.service-name > span {
  font-size: 10px;
  color: var(--muted);
}
.service-link p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}
.service-link .arrow {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 8px;
  transition: transform 0.16s;
}
.service-link:hover .arrow {
  transform: translateX(4px);
}
.resume {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  margin-top: 22px;
  color: var(--ink);
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
}
.resume:hover {
  border-color: var(--accent);
}
.resume strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.resume small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.resume > svg {
  margin-left: auto;
  width: 17px;
}
.resume-icon {
  color: var(--accent);
  display: flex;
}
.home-bottom {
  margin-top: auto;
  padding-top: 32px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.home-bottom .text-button {
  font-size: 11px;
}
.preview-badge {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 10px;
}
.home-landscape {
  position: relative;
  min-height: 0;
  margin: 16px 16px 16px 0;
  border-radius: 4px;
  overflow: hidden;
  background: #82917b url('assets/landscape.svg') center/cover;
}
.home-landscape::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 44, 32, 0.45), transparent 45%);
}
[data-theme='dark'] .home-landscape {
  background-image: url('assets/night.svg');
}
.landscape-caption {
  position: absolute;
  bottom: 48px;
  left: 42px;
  right: 30px;
  color: #f1edda;
  z-index: 1;
}
.fine-rule {
  width: 36px;
  height: 1px;
  background: #d3c596;
  margin-bottom: 20px;
}
.landscape-caption p {
  font: 400 28px/1.4 var(--display);
}
.landscape-caption small {
  font-size: 10px;
  opacity: 0.8;
  display: block;
  margin-top: 16px;
}
/* Reader navigation */
.reader-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: var(--header);
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--veil);
  backdrop-filter: blur(16px);
}
.back-home {
  justify-self: start;
  color: var(--muted);
}
.reader-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}
.reader-title strong {
  font: 500 25px var(--display);
}
.reader-title > span {
  font-size: 11px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 13px;
}
.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}
.progress-track {
  position: fixed;
  top: calc(var(--header) - 1px);
  left: 0;
  height: 2px;
  background: var(--accent);
  width: 0;
  z-index: 6;
}
.reader-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}
.reader-sidebar {
  position: sticky;
  top: var(--header);
  height: calc(100svh - var(--header));
  padding: 32px 20px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.reader-sidebar > .brand {
  padding-left: 10px;
  margin-bottom: 38px;
}
.reader-sidebar .brand-word {
  font-size: 25px;
}
.reader-sidebar .brand > svg {
  width: 23px;
}
.reader-sidebar .brand small {
  display: none;
}
.sidebar-label {
  font-size: 11px;
  color: var(--muted);
  margin: 0 12px 14px;
}
.section-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.section-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 11px 12px;
  text-decoration: none;
  font-size: 12px;
  border-radius: 7px;
  border: 1px solid transparent;
}
.section-link:hover {
  background: var(--wash);
}
.section-link[aria-current='location'] {
  border-color: var(--line);
  background: var(--wash);
}
.section-number {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.section-name {
  flex: 1;
  line-height: 1.5;
}
.section-name small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.section-marker {
  color: var(--accent);
  display: none;
}
.section-marker svg {
  width: 15px;
  height: 15px;
}
.section-link[aria-current='location'] .section-marker {
  display: flex;
}
.sidebar-bottom {
  margin-top: auto;
  color: var(--muted);
  font-size: 11px;
}
.switch-service {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px;
  font-size: 12px;
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.switch-service svg {
  width: 17px;
}
.switch-service svg:last-child {
  margin-left: auto;
}
.sidebar-bottom .text-button {
  padding-inline: 10px;
  font-size: 11px;
}
.mobile-sectionbar {
  display: none;
}
.reader-body {
  width: 100%;
  min-width: 0;
}
.reader-inner {
  max-width: 800px;
  margin: auto;
  padding: 32px 54px 70px;
}
.service-opening {
  position: relative;
  min-height: 210px;
  border-radius: 7px;
  overflow: hidden;
  background: #718670 url('assets/landscape.svg') center 48% / cover;
  color: #fff8e5;
  display: flex;
  align-items: flex-end;
  padding: 30px 32px;
  margin-bottom: 10px;
}
.service-opening.night {
  background-image: url('assets/night.svg');
}
.service-opening::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(16, 43, 31, 0.75), rgba(16, 43, 31, 0.03) 85%);
}
.service-opening > div {
  position: relative;
}
.service-opening h1 {
  font: 400 51px/1.15 var(--display);
  letter-spacing: -1px;
}
.service-opening p {
  font-size: 11px;
  opacity: 0.95;
  margin-bottom: 5px;
}
.service-opening .service-symbol {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #f5efcf;
  border-color: #b6c0a380;
  width: 36px;
  height: 36px;
}
.service-opening .service-symbol svg {
  width: 19px;
}
.reader-note {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}
.reader-note > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.reader-note .text-button {
  font-size: 11px;
  white-space: nowrap;
}
.status-dot {
  display: block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.reading-context {
  padding-top: 22px;
}
.context-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.context-field legend {
  float: left;
  margin: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.context-field .choice-group {
  margin-left: auto;
}
.context-field .choice-face {
  padding-inline: 15px;
}
.reading-context > p {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  margin-top: 7px;
}
/* Prayer typography. Only the liturgical text is RTL. */
.prayer-section {
  padding-top: 42px;
  scroll-margin-top: calc(var(--header) + 22px);
}
.section-heading {
  text-align: center;
  margin-bottom: 30px;
}
.ornament {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: 10px;
  margin-bottom: 14px;
}
.ornament::before,
.ornament::after {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--line);
}
.section-heading h2 {
  font: 400 34px/1.25 var(--display);
  letter-spacing: -0.6px;
}
.section-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.prayer-text {
  font:
    400 var(--reading-size)/var(--reading-leading) Frank,
    HebrewFallback,
    'Times New Roman',
    serif;
  letter-spacing: 0;
  word-spacing: normal;
  overflow-wrap: break-word;
}
.prayer-text [lang='he'] {
  text-align: right;
  unicode-bidi: isolate;
}
.prayer-text p {
  margin-bottom: 24px;
}
.prayer-text b,
.prayer-text strong {
  font-weight: 650;
}
.prayer-text [lang='en'] {
  font-family: var(--ui);
  text-align: left;
  unicode-bidi: isolate;
}
.prayer-text .blessing-title {
  font: 500 12px/1.5 var(--ui);
  color: var(--accent);
  padding: 25px 0 16px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.prayer-text .instruction,
.prayer-text .editor-note {
  font: 400 12px/1.8 var(--ui);
  color: var(--muted);
  margin: 15px 0 26px;
}
.editor-note {
  border-left: 2px solid var(--line);
  padding-left: 15px;
}
.prayer-text .invocation {
  font-size: 1.1em;
  text-align: center;
  line-height: 1.9;
  margin: 24px 0 34px;
}
.prayer-text .quiet {
  font-size: 0.85em;
  text-align: center;
  margin: 10px 0 28px;
}
.prayer-text .closing {
  font-weight: 550;
  margin-top: -6px;
}
.prayer-text .poem {
  margin: 14px 0 30px;
}
.poem p {
  margin-bottom: 8px;
}
.psalm-line {
  display: block;
  margin-bottom: 0.2em;
}
.prayer-text .optional,
.prayer-text .alternatives {
  margin: 20px 0 28px;
  padding: 15px 20px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.prayer-text .optional p {
  margin-bottom: 8px;
}
.prayer-text .optional p:last-child {
  margin-bottom: 0;
}
.rubric {
  display: block;
  font: 400 11px/1.6 var(--ui);
  color: var(--muted);
  margin-bottom: 12px;
}
.prayer-text .optional {
  font-size: 0.87em;
}
.prayer-text .alternatives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  font-family: Frank, HebrewFallback, serif;
  font-size: 0.85em;
}
.alternative + .alternative {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.alternative p {
  margin: 0;
}
.next-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  font-family: var(--ui);
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  margin-top: 34px;
  min-height: 76px;
  background: var(--sheet);
}
.next-section:hover {
  background: var(--wash);
  border-color: var(--muted);
}
.next-section small {
  display: block;
  font-size: 10px;
  margin-bottom: 3px;
}
.next-section strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.next-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wash);
  color: var(--accent);
}
.next-arrow svg {
  width: 17px;
}
.sample-end {
  border-top: 1px solid var(--line);
  margin-top: 46px;
  padding: 36px 0;
  text-align: center;
}
.sample-end > svg {
  color: var(--accent);
  width: 26px;
  height: 30px;
  margin-bottom: 15px;
}
.sample-end h2 {
  font: 400 29px var(--display);
}
.sample-end p {
  font-size: 12px;
  color: var(--muted);
  margin: 14px auto 24px;
  max-width: 360px;
  line-height: 1.9;
}
.end-home {
  display: block;
  font-size: 12px;
  min-height: 44px;
  margin-top: 10px;
  padding: 10px;
  color: var(--muted);
}
.reader-footer {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}
.reader-footer .text-button {
  font-size: 10px;
}
.is-focused .reader-sidebar,
.is-focused .service-opening,
.is-focused .reading-context,
.is-focused .reader-note {
  display: none;
}
.is-focused .reader-grid {
  display: block;
}
.is-focused .reader-inner {
  padding-top: 10px;
}
.is-focused .mobile-sectionbar {
  display: flex;
}
.is-focused .prayer-section {
  scroll-margin-top: calc(var(--header) + 72px);
}
/* Dialogs retain a visible exit and an independently scrolling body. */
dialog {
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 17px;
  width: min(470px, calc(100% - 32px));
  padding: 0;
  max-height: calc(100svh - 48px);
  overflow: auto;
  box-shadow: 0 25px 90px #0003;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: rgba(13, 29, 23, 0.42);
  backdrop-filter: blur(5px);
}
.dialog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 25px 21px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.dialog-top h2 {
  font: 500 25px/1.25 var(--display);
  letter-spacing: -0.4px;
}
.dialog-top p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 8px;
  max-width: 290px;
}
.dialog-top .control {
  margin-top: -7px;
  margin-right: -9px;
}
.dialog-body {
  padding: 23px 26px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--sheet);
  flex-shrink: 0;
}
.dialog-footer--end {
  justify-content: flex-end;
}
.dialog-footer .control--primary {
  min-width: 98px;
}
.setting {
  padding: 23px 0;
}
.setting-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}
.setting-heading output {
  font-size: 11px;
  color: var(--accent);
  background: var(--wash);
  padding: 3px 9px;
  border-radius: 5px;
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.size-control {
  display: flex;
  align-items: center;
  gap: 16px;
}
.size-control input {
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--accent);
  min-width: 0;
  cursor: pointer;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  padding: 5px 60px 0;
  font-size: 10px;
  color: var(--muted);
}
.preview-label {
  font-size: 10px;
  color: var(--muted);
  margin: 24px 0 9px;
}
.type-preview {
  font:
    400 var(--reading-size)/var(--reading-leading) Frank,
    HebrewFallback,
    serif;
  text-align: center;
  background: var(--wash);
  border: 1px solid var(--line);
  padding: 20px 16px;
  border-radius: 7px;
  min-height: 100px;
}
.dialog-copy {
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}
.dialog-copy p {
  margin-bottom: 16px;
}
.dialog-copy h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin: 25px 0 10px;
}
.dialog-copy a {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.dialog-copy ul {
  padding-left: 18px;
  margin: 15px 0;
}
.dialog-copy li {
  padding-bottom: 9px;
}
.dialog-copy p:last-child {
  margin-bottom: 0;
}
.section-dialog-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  overflow: auto;
}
.section-link--dialog {
  padding: 14px 17px;
  min-height: 59px;
  font-size: 13px;
  border-color: var(--line);
}
.section-link--dialog .section-number {
  font-size: 11px;
}
.section-link--dialog .section-marker {
  margin-left: 10px;
}
.mobile-sectionbar {
  position: sticky;
  top: var(--header);
  z-index: 4;
  background: var(--veil);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  padding: 3px 22px;
  min-height: 52px;
}
.section-counter {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (min-width: 1500px) {
  .reader-inner {
    max-width: 830px;
  }
  .home-intro {
    margin-top: 85px;
  }
}
@media (max-width: 1100px) {
  .home-content {
    padding: 30px 36px 22px;
  }
  .home-intro {
    margin-top: 56px;
  }
  .service-name > span {
    display: none;
  }
  .reader-header {
    grid-template-columns: 190px 1fr 250px;
    padding: 0 18px;
  }
  .reader-grid {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .reader-sidebar {
    padding: 28px 14px;
  }
  .reader-inner {
    padding: 26px 36px 60px;
  }
  .section-link {
    padding: 11px 10px;
    gap: 9px;
  }
  .header-actions [data-action='focus'] span {
    display: none;
  }
}
@media (max-width: 800px) {
  .reader-header {
    grid-template-columns: 145px 1fr 175px;
  }
  .reader-title > span {
    display: none;
  }
  .reader-grid {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .reader-sidebar {
    padding: 28px 10px;
  }
  .reader-sidebar > .brand {
    padding-left: 4px;
  }
  .reader-sidebar .brand-word {
    font-size: 23px;
  }
  .section-link {
    font-size: 11px;
  }
  .reader-inner {
    padding-inline: 28px;
  }
  .context-field {
    display: block;
  }
  .context-field legend {
    float: none;
    min-height: 0;
    margin-bottom: 10px;
  }
  .reading-context > p {
    text-align: left;
  }
  .home {
    grid-template-columns: 55% 45%;
  }
  .home-content {
    padding-inline: 26px;
  }
  .home-controls .control--toolbar span {
    display: none;
  }
  .home-controls .control {
    width: 44px;
    padding: 10px;
  }
  .service-link .arrow {
    padding: 0;
  }
  .service-link {
    gap: 12px;
  }
}
@media (max-width: 700px) {
  :root {
    --header: 64px;
  }
  .home {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    position: relative;
  }
  .home-content {
    padding: 22px 24px 18px;
    flex: 1;
  }
  .home-top {
    position: relative;
    z-index: 1;
    gap: 15px;
  }
  .brand-word {
    font-size: 27px;
  }
  .brand > svg {
    width: 26px;
  }
  .brand small {
    font-size: 10px;
  }
  .home-controls .control--toolbar span {
    display: inline;
  }
  .home-controls .control--toolbar {
    width: auto;
    padding: 10px 12px;
  }
  .home-landscape {
    position: absolute;
    top: 100px;
    left: 20px;
    right: 20px;
    margin: 0;
    height: 206px;
    border-radius: 90px 90px 5px 5px;
    background-position: center 44%;
    pointer-events: none;
  }
  .home-landscape::after {
    background: linear-gradient(0deg, rgba(20, 44, 32, 0.32), transparent 65%);
  }
  .landscape-caption {
    bottom: 19px;
    left: 23px;
    right: 23px;
  }
  .landscape-caption p {
    font-size: 20px;
    line-height: 1.3;
    max-width: 220px;
  }
  .landscape-caption small,
  .fine-rule {
    display: none;
  }
  .home-intro {
    margin: 255px 0 25px;
  }
  .home-intro h1 {
    font-size: 45px;
    line-height: 1.12;
    letter-spacing: -1.7px;
  }
  .home-intro h1 br {
    display: none;
  }
  .home-intro .nusach {
    display: none;
  }
  .home-intro > p:last-child {
    font-size: 12px;
    margin-top: 13px;
  }
  .service-link {
    padding: 20px 2px;
    gap: 13px;
  }
  .service-name h2 {
    font-size: 27px;
  }
  .service-name > span {
    display: inline;
    font-size: 10px;
  }
  .service-link p {
    font-size: 10px;
    max-width: 235px;
  }
  .service-link .arrow {
    padding: 0;
  }
  .service-link .arrow svg {
    width: 18px;
  }
  .service-symbol {
    width: 42px;
    height: 42px;
  }
  .service-symbol svg {
    width: 22px;
  }
  .resume {
    margin-top: 20px;
    padding: 13px;
    gap: 10px;
  }
  .resume strong {
    font-size: 11px;
  }
  .resume small {
    font-size: 10px;
  }
  .home-bottom {
    padding-top: 25px;
    gap: 12px;
  }
  .home-bottom .text-button {
    font-size: 10px;
  }
  .preview-badge {
    font-size: 9px;
  }
  .reader-header {
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    gap: 6px;
  }
  .back-home {
    padding: 10px;
    width: 44px;
    min-width: 44px;
  }
  .back-home span {
    display: none;
  }
  .reader-title {
    margin-right: auto;
    margin-left: 3px;
  }
  .reader-title strong {
    font-size: 23px;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions .control {
    padding: 10px;
  }
  .header-actions [data-action='settings'] {
    padding-inline: 11px;
  }
  .header-actions [data-action='settings'] svg {
    width: 18px;
  }
  .header-actions [data-action='focus'] {
    border-color: transparent;
    background: transparent;
  }
  .header-actions [data-action='focus'][aria-pressed='true'] {
    background: var(--wash);
    border-color: var(--accent);
  }
  .header-actions [data-action='focus'] span {
    display: none;
  }
  .reader-grid {
    display: block;
  }
  .reader-sidebar {
    display: none;
  }
  .mobile-sectionbar {
    display: flex;
    padding-inline: 15px;
  }
  .reader-inner {
    padding: 20px 25px 45px;
  }
  .service-opening {
    min-height: 169px;
    margin-bottom: 8px;
    padding: 23px 25px;
    background-position: center 49%;
    border-radius: 6px;
  }
  .service-opening h1 {
    font-size: 41px;
  }
  .service-opening p {
    font-size: 10px;
  }
  .service-opening .service-symbol {
    top: 20px;
    right: 20px;
  }
  .reader-note {
    font-size: 10px;
    gap: 7px;
    min-height: 45px;
  }
  .reader-note .text-button {
    font-size: 10px;
  }
  .status-dot {
    display: none;
  }
  .reading-context {
    padding-top: 18px;
  }
  .context-field {
    display: flex;
  }
  .context-field legend {
    float: left;
    min-height: 50px;
    margin-bottom: 0;
    font-size: 11px;
  }
  .context-field .choice-face {
    font-size: 11px;
    padding-inline: 12px;
  }
  .reading-context > p {
    text-align: right;
    font-size: 9px;
  }
  .prayer-section {
    padding-top: 35px;
    scroll-margin-top: calc(var(--header) + 68px);
  }
  .section-heading {
    margin-bottom: 25px;
  }
  .section-heading h2 {
    font-size: 30px;
  }
  .ornament {
    margin-bottom: 11px;
  }
  .section-heading p {
    font-size: 10px;
  }
  .prayer-text p {
    margin-bottom: 22px;
  }
  .prayer-text .blessing-title {
    font-size: 11px;
  }
  .prayer-text .instruction,
  .prayer-text .editor-note {
    font-size: 11px;
  }
  .prayer-text .optional,
  .prayer-text .alternatives {
    padding: 14px 15px;
  }
  .rubric {
    font-size: 10px;
  }
  .prayer-text .alternatives {
    gap: 13px;
  }
  .alternative + .alternative {
    padding-left: 13px;
  }
  .prayer-text .invocation {
    font-size: 1.04em;
  }
  .poem p {
    margin-bottom: 12px;
  }
  .next-section {
    padding: 15px 17px;
    margin-top: 28px;
  }
  .sample-end {
    margin-top: 32px;
  }
  .sample-end h2 {
    font-size: 25px;
  }
  .reader-footer {
    font-size: 9px;
  }
  .reader-footer .text-button {
    font-size: 10px;
  }
  .is-focused .reader-inner {
    padding-top: 0;
  }
  dialog {
    max-height: calc(100svh - 28px);
    width: calc(100% - 24px);
    border-radius: 14px;
  }
  .dialog-top {
    padding: 23px 22px 19px;
  }
  .dialog-top h2 {
    font-size: 23px;
  }
  .dialog-top p {
    font-size: 10px;
  }
  .dialog-body {
    padding: 21px 22px;
  }
  .dialog-footer {
    padding: 14px 20px;
  }
  .choice-face {
    padding-inline: 14px;
  }
  .dialog-copy {
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .home-content {
    padding-inline: 20px;
  }
  .brand-word {
    font-size: 25px;
  }
  .brand {
    gap: 8px;
  }
  .home-controls {
    gap: 0;
  }
  .home-controls .control--toolbar {
    padding: 10px;
  }
  .home-intro h1 {
    font-size: 39px;
  }
  .service-name > span {
    display: none;
  }
  .service-link p {
    max-width: 175px;
  }
  .reader-header {
    padding-inline: 7px;
  }
  .reader-title {
    margin-left: 0;
  }
  .reader-title strong {
    font-size: 21px;
  }
  .header-actions {
    gap: 1px;
  }
  .header-actions [data-action='settings'] {
    padding: 10px;
  }
  .header-actions [data-action='settings'] svg {
    display: none;
  }
  .reader-inner {
    padding-inline: 21px;
  }
  .reader-note {
    align-items: flex-start;
  }
  .reader-note > span {
    padding-top: 13px;
    font-size: 9px;
  }
  .reader-note .text-button {
    font-size: 9px;
  }
  .context-field {
    display: block;
  }
  .context-field legend {
    float: none;
    min-height: 0;
    margin-bottom: 10px;
  }
  .context-field .choice-face {
    font-size: 12px;
  }
  .reading-context > p {
    text-align: left;
  }
  .prayer-text .alternatives {
    grid-template-columns: 1fr;
  }
  .alternative + .alternative {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 10px;
  }
  .dialog-top {
    padding-inline: 18px;
  }
  .dialog-top h2 {
    font-size: 21px;
  }
  .dialog-body {
    padding-inline: 18px;
  }
  .size-control {
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  .reader-header,
  .reader-sidebar,
  .mobile-sectionbar,
  .progress-track,
  .reading-context,
  .reader-note,
  .next-section,
  .sample-end,
  dialog {
    display: none !important;
  }
  .reader-grid {
    display: block;
  }
  .reader-inner {
    padding: 0;
    max-width: 100%;
  }
  .service-opening {
    background: none;
    color: #000;
    min-height: 0;
    padding: 10px;
  }
  .service-opening::before {
    display: none;
  }
  .prayer-text p {
    orphans: 3;
    widows: 3;
  }
  :root {
    --paper: white;
    --ink: black;
    --muted: #444;
    --reading-size: 20px;
  }
}

/* Book composition: denser prose, subordinate rubrics, and responsive verse pairs. */
:root {
  --reading-leading: 1.58;
}
.prayer-section {
  padding-top: 30px;
}
.section-heading {
  margin-bottom: 24px;
}
.section-heading h2 {
  font-size: 29px;
}
.section-heading p {
  margin-top: 7px;
}
.ornament {
  margin-bottom: 10px;
}
.prayer-text {
  line-height: var(--reading-leading);
}
.prayer-text p {
  margin-bottom: 0.72em;
}
.prayer-text [data-compose='prose'] {
  text-align: right;
  text-align-last: auto;
}
.typeset-word {
  display: inline-block;
  white-space: nowrap;
  vertical-align: baseline;
}
.phrase-group {
  white-space: nowrap;
  display: inline-block;
}
.typeset-line {
  display: block;
  white-space: nowrap;
  text-align: right;
  text-align-last: auto;
  letter-spacing: 0;
}
.typeset-line.line-center {
  text-align: center;
}
.typeset-line.line-justify {
  text-align: right;
}
.prayer-text b,
.prayer-text strong {
  font-weight: 650;
}
.prayer-text .blessing-title {
  border-top: 0;
  padding: 12px 0 7px;
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}
.prayer-text .editor-note {
  font-size: 11px;
  line-height: 1.65;
  margin: 8px 0 22px;
  padding-left: 12px;
}
.prayer-text .instruction {
  font-size: 11px;
  line-height: 1.55;
  margin: 10px 0 9px;
}
.prayer-text .text-invocation {
  font-size: var(--rc-size-secondary);
  line-height: 1.5;
  text-align: center;
  margin: 12px auto 16px;
  max-width: 94%;
  font-weight: 400;
}
.prayer-text .text-proclamation {
  font-size: 1.08em;
  line-height: 1.5;
  text-align: center;
  margin: 24px 0 12px;
  font-weight: 500;
  text-wrap: balance;
}
.prayer-text .text-quiet {
  font-size: var(--rc-size-secondary);
  line-height: 1.5;
  text-align: center;
  margin: 9px 0 25px;
  font-weight: 400;
  text-wrap: balance;
}
.prayer-text .text-blessing {
  margin-bottom: 0.6em;
}
.prayer-text .closing {
  font-weight: 400;
  margin-top: 12px;
}
.prayer-text .optional {
  padding: 0 12px;
  margin: 10px 0 15px;
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 1em;
}
.prayer-text .optional {
  border-inline-start: 1px solid var(--line);
}
.prayer-text .text-addition {
  font-size: var(--rc-size-secondary);
  line-height: 1.45;
  margin-bottom: 0;
}
.prayer-text .text-response {
  font-size: var(--rc-size-secondary);
  line-height: 1.5;
  text-align: center;
  margin: 6px 0;
}
.rubric {
  font-size: 10px;
  line-height: 1.5;
  margin-bottom: 5px;
  color: var(--muted);
}
.prayer-text .alternatives {
  font-size: 1em;
  gap: 22px;
  padding: 0 12px;
  margin: 8px 0 16px;
  border: 0;
  background: none;
}
.alternative + .alternative {
  padding-left: 22px;
}
.prayer-text .poem {
  margin: 12px 0 22px;
  font-size: 0.9em;
  line-height: 1.5;
}
.prayer-text .text-poetry {
  margin-bottom: 0.23em;
  text-align: center;
  text-wrap: balance;
}
.psalm {
  line-height: 1.45;
}
.psalm-line {
  display: block;
  margin-bottom: 0.28em;
  white-space: normal;
  text-align: right;
  text-indent: 0;
  padding: 0;
  word-spacing: normal;
}
.verse-half {
  display: inline;
}
.psalm-line.verse-stacked .verse-half {
  display: block;
}
.psalm-line.verse-stacked .verse-half + .verse-half {
  padding-inline-start: 0.55em;
}
.psalm-line.verse-paired {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.1em;
  direction: rtl;
}
.psalm-line.verse-paired .verse-half {
  display: block;
}
.psalm-preface {
  font-size: 0.9em;
  margin-bottom: 0.3em;
}
.psalm-start {
  margin-top: 0.75em;
}
.psalm-conclusion {
  margin-top: 0.65em;
}
@media (max-width: 700px) {
  .prayer-section {
    padding-top: 25px;
  }
  .section-heading {
    margin-bottom: 22px;
  }
  .section-heading h2 {
    font-size: 27px;
  }
  .prayer-text p {
    margin-bottom: 0.72em;
  }
  .prayer-text .editor-note {
    font-size: 10px;
    margin-bottom: 20px;
  }
  .prayer-text .instruction {
    font-size: 10px;
  }
  .prayer-text .text-invocation {
    font-size: var(--rc-size-secondary);
    margin: 10px auto 15px;
  }
  .prayer-text .text-proclamation {
    font-size: 1.08em;
    margin: 19px 0 12px;
  }
  .prayer-text .text-quiet {
    font-size: var(--rc-size-secondary);
    margin: 8px 0 22px;
  }
  .prayer-text .optional {
    padding: 0 8px;
    margin: 9px 0 14px;
  }
  .prayer-text .alternatives {
    padding: 0 8px;
    gap: 15px;
    margin: 8px 0 16px;
  }
  .alternative + .alternative {
    padding-left: 15px;
  }
  .prayer-text .blessing-title {
    padding: 10px 0 6px;
    margin-top: 12px;
    font-size: 10px;
  }
  .prayer-text .text-poetry {
    margin-bottom: 0.23em;
  }
  .rubric {
    font-size: 10px;
  }
}
@media (max-width: 360px) {
  .prayer-text .alternatives {
    grid-template-columns: 1fr;
  }
  .alternative + .alternative {
    padding-left: 0;
    padding-top: 8px;
  }
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
@media (max-width: 700px) {
  .prayer-section,
  .is-focused .prayer-section {
    scroll-margin-top: calc(var(--header) + 52px);
  }
}

/* Psalms are read chapter by chapter; the grid remains a separate contents page. */
.contents-page {
  max-width: 900px;
  margin: auto;
  padding: 24px 32px 48px;
}
.collection-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.collection-top > div {
  display: flex;
}
.collection-title {
  text-align: center;
  padding: 40px 0 30px;
}
.collection-title h1 {
  font: 400 48px/1.2 var(--display);
  margin: 8px 0;
}
.collection-title p {
  color: var(--muted);
  font-size: 13px;
}
.collection-hebrew {
  font:
    500 32px Frank,
    HebrewFallback,
    serif;
  color: var(--accent);
}
.chapter-jump {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin: 26px 0 34px;
  flex-wrap: wrap;
}
.chapter-jump label {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.chapter-jump input {
  width: 110px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet);
  color: var(--ink);
}
.chapter-jump .control {
  gap: 10px;
}
.psalm-book {
  margin: 30px 0;
}
.psalm-book h2 {
  font: 400 25px var(--display);
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}
.psalm-book h2 > span {
  font: 400 11px var(--ui);
  color: var(--muted);
}
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}
.chapter-grid a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--sheet);
  font: 400 19px var(--display);
}
.chapter-grid a:hover,
.chapter-grid a[aria-current] {
  border-color: var(--accent);
  background: var(--wash);
}
.reader-sidebar .chapter-jump {
  margin-top: 0;
  gap: 12px;
}
.reader-sidebar .chapter-jump .control {
  padding-inline: 16px;
}
.psalms-reader .section-heading h1 {
  font: 400 34px var(--display);
}
.prayer-text .psalm-verse {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  text-align: right;
  line-height: var(--reading-leading);
  margin-bottom: 0.75em;
}
.verse-number {
  font: 400 10px/2 var(--ui);
  color: var(--muted);
  padding-top: 8px;
  user-select: none;
}
.psalm-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 20px;
}
.psalm-navigation a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  text-decoration: none;
  font-size: 13px;
}
.psalm-navigation small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.psalm-navigation .all-chapters {
  font-size: 11px;
  text-decoration: underline;
}
.psalms-complete {
  text-align: center;
  font: 400 23px var(--display);
  margin: 30px 0;
}
.service-coverage {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 700px) {
  .contents-page {
    padding: 18px 22px 35px;
  }
  .collection-title {
    padding: 28px 0 20px;
  }
  .collection-title h1 {
    font-size: 38px;
  }
  .chapter-grid {
    gap: 7px;
    grid-template-columns: repeat(auto-fill, minmax(43px, 1fr));
  }
  .chapter-jump .control {
    padding-inline: 16px;
  }
  .prayer-text .psalm-verse {
    grid-template-columns: 15px minmax(0, 1fr);
    gap: 8px;
  }
  .verse-number {
    font-size: 9px;
  }
  .psalm-navigation {
    gap: 6px;
  }
  .psalm-navigation a {
    font-size: 11px;
  }
  .psalm-navigation a svg {
    width: 16px;
  }
  .psalm-navigation .all-chapters {
    font-size: 10px;
  }
  .psalms-reader .section-heading h1 {
    font-size: 30px;
  }
}

/* Shared interaction feedback, with native disabled and keyboard states. */
.control:not(:disabled):active,
.primary-link:active,
.chapter-grid a:active {
  background: var(--wash);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.control:disabled {
  opacity: 0.5;
}
.collection-label {
  font-size: 13px;
  color: var(--accent);
}
#font-size {
  min-height: 44px;
  accent-color: var(--button);
  cursor: pointer;
}
@media (max-width: 700px) {
  .prayer-text .instruction,
  .prayer-text .editor-note {
    font-size: 13px;
    line-height: 1.65;
  }
  .prayer-text .rubric {
    font-size: 12px;
  }
  .dialog-top p {
    font-size: 12px;
  }
  .section-heading p {
    font-size: 12px;
  }
  .reading-context > p {
    font-size: 11px;
  }
}

/* Quiet continuous prayer: a single source heading, compact navigation. */
.options-list {
  display: grid;
  gap: 6px;
}
.options-list > .control {
  justify-content: flex-start;
  width: 100%;
  font-size: 14px;
  min-height: 50px;
}
.service-title {
  padding: 15px 0 5px;
  text-align: center;
}
.service-title h1 {
  font:
    500 34px/1.3 Frank,
    HebrewFallback,
    serif;
}
.quiet-reader .prayer-section {
  padding-top: 26px;
}
.quiet-reader .section-heading {
  margin-bottom: 16px;
}
.quiet-reader .section-heading h2 {
  font:
    600 25px/1.35 Frank,
    HebrewFallback,
    serif;
}
.reader-sidebar .section-list {
  max-height: calc(100svh - 220px);
  overflow-y: auto;
  scrollbar-width: thin;
  margin-top: 24px;
}
.quiet-reader .reader-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.prayer-text .source-heading {
  font:
    600 22px/1.4 Frank,
    HebrewFallback,
    serif;
  text-align: center;
  margin: 20px 0 12px;
}
@media (max-width: 700px) {
  .quiet-reader {
    padding-top: 12px;
  }
  .service-title h1 {
    font-size: 29px;
  }
  .quiet-reader .section-heading h2 {
    font-size: 23px;
  }
}

.prayer-text .source-mixed {
  text-align: right;
  line-height: var(--reading-leading);
}

.source-credit {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin: 3px 0 10px;
}

.conditional-prayer > summary {
  cursor: pointer;
  list-style-position: inside;
  min-height: 44px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
.conditional-prayer > summary h2 {
  display: inline;
}
.condition-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 7px;
}
.conditional-prayer[open] > summary {
  margin-bottom: 20px;
}

.conditional-prayer > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.psalms-reader .section-heading h1[lang='he'] {
  font-family: Frank, HebrewFallback, serif;
}

.source-choice-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font: 400 12px/1.5 var(--ui);
  color: var(--muted);
  margin: 15px 0;
  direction: ltr;
}
.source-choice-label select {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 28px 8px 12px;
  font: 400 14px var(--ui);
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.source-choice-label select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.prayer-text [hidden] {
  display: none !important;
}

/* Editorial composition: full prose lines, natural source breaks, modest spacing. */
.prayer-text {
  font-weight: 450;
}
.quiet-reader .prayer-text p {
  margin-bottom: 0.55em;
}
.typeset-fallback {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: justify !important;
  text-align-last: center !important;
}
.typeset-fallback .typeset-word {
  white-space: normal;
}
.quiet-reader .prayer-text .source-heading {
  margin: 18px 0 9px;
  font-size: 0.8em;
  font-weight: 600;
}
.prayer-text .source-mixed {
  text-align: justify;
  text-align-last: center;
}

html {
  scrollbar-gutter: stable;
}
html.has-modal {
  overflow: hidden;
}
dialog::backdrop {
  backdrop-filter: none;
  background: rgba(13, 29, 23, 0.38);
}
dialog .dialog-body,
dialog .section-dialog-list {
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
@media (min-width: 1000px) {
  .reader-inner {
    max-width: 780px;
    padding-inline: 48px;
  }
}

/* English rubrics follow the book's right edge while retaining English reading order. */

bdi[lang='he'] {
  font-family: Frank, HebrewFallback, serif;
  font-size: 1.2em;
}

/* Hebrew section navigation lives at the right; English controls retain LTR order. */
@media (min-width: 701px) {
  .reader-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .reader-sidebar {
    grid-column: 2;
    grid-row: 1;
    border-right: 0;
    border-left: 1px solid var(--line);
  }
  .reader-body {
    grid-column: 1;
    grid-row: 1;
  }
  .is-focused .reader-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .reader-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
  }
}
@media (min-width: 701px) and (max-width: 800px) {
  .reader-grid {
    grid-template-columns: minmax(0, 1fr) 185px;
  }
}
.section-link {
  flex-direction: row-reverse;
  text-align: right;
}
.section-link .section-number,
.section-link small {
  direction: ltr;
  unicode-bidi: isolate;
}
.section-name bdi {
  display: inline-block;
}
.section-link small {
  text-align: right;
}
#sections {
  margin-left: auto;
  margin-right: 14px;
  max-width: 430px;
  width: calc(100% - 28px);
}
#sections .dialog-top {
  flex-direction: row-reverse;
}
#sections .dialog-top > div {
  text-align: right;
}
#sections .dialog-top p {
  direction: ltr;
}
#sections .chapter-jump {
  justify-content: flex-end;
}
@media (max-width: 700px) {
  .mobile-sectionbar {
    flex-direction: row-reverse;
  }
  .mobile-sectionbar [data-action='sections'] {
    flex-direction: row-reverse;
  }
  .mobile-sectionbar [data-action='sections'] span {
    direction: rtl;
  }
  .mobile-sectionbar .section-counter {
    direction: ltr;
  }
}

/* Left-aligned English marginal notes, separate from the Hebrew prayer measure. */

/* Reading settings: a non-modal panel. A bottom sheet on a phone (never above 45% of the screen, so
   the prayer text stays visible and is the live preview), a small panel at the side on a desktop. */
#settings {
  position: fixed;
  z-index: 40;
  margin: 0;
  padding: 0;
  overflow: hidden;
  inset: auto 0 0 0;
  width: 100%;
  max-width: none;
  max-height: 45dvh;
  border-radius: 18px 18px 0 0;
  border-width: 1px 0 0;
  box-shadow: 0 -12px 40px #0003;
}
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 0 20px;
  flex-shrink: 0;
}
.panel-top h2 {
  font: 500 19px/1.25 var(--display);
  letter-spacing: -0.2px;
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.panel-top .control {
  min-height: 44px;
}
.panel-top .control--primary {
  min-width: 78px;
}
.panel-tabs {
  display: flex;
  gap: 4px;
  margin: 10px 20px 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--wash);
  flex-shrink: 0;
}
.panel-tab {
  position: relative;
  flex: 1;
}
.panel-tab input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.panel-tab span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.panel-tab input:checked + span {
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
}
.panel-tab input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.panel-body {
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  scrollbar-width: thin;
}
.panel-body fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.panel-body legend,
.custom-bg summary,
.panel-body .setting-heading,
.slider-row label {
  font-size: 13px;
  font-weight: 500;
}
.bg-current {
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  margin: 0 0 8px;
}
.bg-grid {
  clear: both;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.bg-swatch {
  position: relative;
  display: block;
  min-width: 44px;
  height: 44px;
  cursor: pointer;
}
.saved-color .bg-swatch {
  width: 64px;
}
.bg-swatch input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.bg-face {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--s-bg);
  color: var(--s-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s-ink) 24%, transparent);
  font:
    600 21px/1 Frank,
    HebrewFallback,
    serif;
}
.bg-face svg {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  padding: 2px;
  border-radius: 50%;
  background: var(--s-ink);
  fill: none;
  stroke: var(--s-bg);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}
.bg-swatch input:checked + .bg-face {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--s-ink) 24%, transparent),
    0 0 0 2px var(--sheet),
    0 0 0 4px var(--ink);
}
.bg-swatch input:checked + .bg-face svg {
  visibility: visible;
}
.bg-swatch input:focus-visible + .bg-face {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.device-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  margin-top: 8px;
  cursor: pointer;
}
.device-toggle input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--button);
}
.device-text {
  display: grid;
  gap: 2px;
  font-size: 14px;
  font-weight: 500;
}
.device-text small,
.panel-hint,
.adjusted-note,
.saved-hex {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--muted);
}
.custom-bg {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.custom-bg summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
}
.custom-bg summary:focus-visible,
.device-toggle input:focus-visible,
#settings .size-control input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.custom-body {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
}
.custom-pick {
  display: flex;
  align-items: center;
  gap: 14px;
}
.custom-pick .bg-face {
  width: 64px;
  flex: none;
}
.custom-pick .control {
  margin-inline-start: auto;
}
.custom-pick input[type='color'] {
  width: 64px;
  height: 44px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sheet);
  cursor: pointer;
}
.slider-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.slider-row input {
  width: 100%;
  min-height: 36px;
  accent-color: var(--button);
}
.adjusted-note {
  min-height: 0;
  color: var(--ink);
  margin: 0;
}
.adjusted-note:empty {
  display: none;
}
.custom-pick .control {
  min-height: 44px;
  border: 1px solid var(--line);
}
.saved-field legend {
  margin-bottom: 6px;
}
.saved-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.saved-color {
  display: flex;
  align-items: center;
  gap: 12px;
}
.saved-hex {
  flex: 1;
  font-variant-numeric: tabular-nums;
}
.saved-color .control {
  min-height: 44px;
}
.panel-body .setting {
  padding: 6px 0 14px;
}
.panel-body .choice-field {
  margin: 4px 0 0;
}
.panel-body .choice-group {
  width: 100%;
}
.panel-body .choice {
  flex: 1;
}
.panel-body .choice-face {
  justify-content: center;
  min-height: 44px;
}
@media (min-width: 701px) {
  #settings {
    inset: calc(var(--header) + 10px) 22px auto auto;
    width: 372px;
    max-height: calc(100dvh - var(--header) - 32px);
    border-radius: 16px;
    border-width: 1px;
    box-shadow: 0 18px 60px #0003;
  }
}
@media (max-width: 700px) {
  html.has-panel body {
    padding-bottom: 45dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  #settings * {
    transition: none;
  }
}

/* Tehillim navigation: one bounded, native scroll surface. */
.bilingual-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  direction: ltr;
}
.bilingual-label bdi,
.psalm-book h2 > bdi {
  font-family: Frank, HebrewFallback, serif;
  font-size: 1.25em;
}
.chapter-browser {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.book-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.book-picker select {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--sheet);
  color: var(--ink);
  padding: 8px;
  font: inherit;
}
.chapter-scroll-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0;
}
.psalm-books {
  height: min(520px, 60dvh);
  overflow: auto;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sheet);
  scroll-padding-top: 75px;
}
.psalm-books:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.psalm-books .psalm-book {
  margin: 0;
}
.psalm-books .psalm-book h2 {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 16px;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
  font: 500 19px var(--ui);
}
.psalm-books .psalm-book h2 > span {
  font: inherit;
  color: var(--ink);
}
.psalm-book h2 small {
  display: block;
  font: 400 11px var(--ui);
  color: var(--muted);
  margin-top: 4px;
}
.chapter-list {
  display: flex;
  flex-direction: column;
}
.chapter-list a {
  position: relative;
  display: block;
  padding: 15px 18px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 15px;
  scroll-margin: 80px 0 10px;
}
.chapter-list a:hover {
  background: var(--wash);
}
.chapter-list a[aria-current] {
  background: var(--wash);
  box-shadow: inset -3px 0 var(--accent);
  font-weight: 600;
}
.chapter-list a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}
.current-chapter {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.chapter-jump label {
  display: block;
  line-height: 1.8;
}
.chapter-jump input {
  display: block;
  margin-top: 6px;
}
#sections.psalm-chooser {
  height: calc(100dvh - 28px);
  max-height: 850px;
  overflow: hidden;
}
#sections.psalm-chooser .dialog-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding: 16px;
  min-height: 0;
}
#sections.psalm-chooser .chapter-jump {
  flex-shrink: 0;
  margin: 0 0 16px;
  justify-content: space-between;
}
#sections.psalm-chooser .chapter-browser {
  flex: 1;
}
#sections.psalm-chooser .psalm-books {
  height: auto;
  flex: 1;
  min-height: 0;
}
#sections.psalm-chooser .dialog-top h2 {
  font-size: 21px;
}
.reader-title > .bilingual-label {
  font-size: 11px;
  gap: 8px;
}
.psalm-navigation .bilingual-label {
  flex-wrap: wrap;
  gap: 2px 8px;
}
.psalm-navigation .all-chapters {
  font-size: 11px;
  line-height: 1.7;
  min-height: 44px;
}
.reader-sidebar [data-action='sections'] {
  white-space: normal;
  text-align: left;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
@media (max-width: 400px) {
  .book-picker {
    display: block;
  }
  .book-picker select {
    display: block;
    width: 100%;
    margin-top: 6px;
  }
  .psalm-books .psalm-book h2 {
    font-size: 16px;
    padding: 12px;
  }
  .chapter-list a {
    padding-inline: 12px;
  }
  .psalm-navigation .bilingual-label {
    display: block;
  }
  .psalm-navigation .bilingual-label bdi {
    display: block;
  }
  .reader-title > .bilingual-label {
    gap: 4px;
    font-size: 10px;
  }
}
#sections.psalm-chooser .chapter-jump {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
#sections.psalm-chooser .chapter-jump label {
  font-size: 11px;
}
#sections.psalm-chooser .chapter-jump input {
  width: 100%;
}
#sections.psalm-chooser .dialog-top {
  padding: 18px 16px 14px;
}
#sections.psalm-chooser .dialog-top h2 {
  font-size: 18px;
}
#sections.psalm-chooser .dialog-top p {
  margin-top: 4px;
}
#sections.psalm-chooser .book-picker {
  display: block;
}
#sections.psalm-chooser .book-picker select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
#sections.psalm-chooser .chapter-scroll-hint {
  margin: 8px 0;
}
.chapter-index .collection-title {
  padding: 24px 0 18px;
}
.chapter-index .chapter-jump {
  margin: 18px 0;
}
@media (max-height: 620px) {
  #sections.psalm-chooser .dialog-top p {
    display: none;
  }
  #sections.psalm-chooser .dialog-top {
    padding: 12px 16px;
  }
  #sections.psalm-chooser .dialog-body {
    padding: 12px;
  }
  #sections.psalm-chooser .chapter-jump {
    margin-bottom: 10px;
  }
  #sections.psalm-chooser .chapter-scroll-hint {
    font-size: 10px;
    margin: 6px 0;
  }
  .psalm-books .psalm-book h2 {
    padding: 9px 12px;
  }
}
.chooser-hebrew-title {
  display: block;
  font:
    400 20px/1.25 Frank,
    HebrewFallback,
    serif;
  margin-top: 3px;
}
.reading-flow-choice {
  padding: 18px 20px;
  margin: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  direction: ltr;
  text-align: left;
}
.reading-flow-choice p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 10px 0;
}
.reading-flow-choice select {
  max-width: 100%;
}

/* Source notes stay inline in mixed Hebrew passages; never split a parenthesis with a full-width block. */
.prayer-text .source-mixed {
  text-align: right;
  text-align-last: right;
  overflow-wrap: break-word;
}

.prayer-text .text-poetry {
  margin-block: 0 0.18em;
  text-align: right;
  text-align-last: right;
  text-wrap: wrap;
}

/* One disclosure affordance everywhere; navigation arrows remain separate. */
details > summary {
  position: relative;
  list-style: none !important;
  padding-right: 42px !important;
  min-height: 44px;
  cursor: pointer;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::marker {
  content: '';
}
details > summary::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 15px;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center/14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center/2px 14px no-repeat;
  pointer-events: none;
}
details[open] > summary::after {
  background: linear-gradient(currentColor, currentColor) center/14px 2px no-repeat;
}
details > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
