/* Scale authored type independently of spacing, artwork and browser/system zoom. */
:root {
  --reading-size: 17px;
  --grounded-system-text-scale: 1;
  --grounded-ui-choice: 1;
  --grounded-prose-choice: 1;
  --grounded-ui-scale: max(var(--grounded-ui-choice), var(--grounded-system-text-scale));
  --grounded-prose-scale: max(var(--grounded-prose-choice), var(--grounded-system-text-scale));
  --grounded-reading-size: max(var(--reading-size), calc(17px * var(--grounded-system-text-scale)));
  --grounded-type-scale: var(--grounded-ui-scale);
}
:root[data-reading="medium"] {
  --reading-size: 18.5px;
  --grounded-ui-choice: 1.09;
  --grounded-prose-choice: 1.088235;
}
:root[data-reading="large"] {
  --reading-size: 20px;
  --grounded-ui-choice: 1.18;
  --grounded-prose-choice: 1.176471;
}
:root[data-reading="xl"] {
  --reading-size: 23px;
  --grounded-ui-choice: 1.3;
  --grounded-prose-choice: 1.352941;
}

body { font-size: calc(100% * var(--grounded-ui-scale)); }

:where(
  .editorial-prose, .editorial-body, .editorial-lead, .editorial-anchor, .editorial-closing,
  .cr-verse, .scripture-card .scripture-text, .spx-pass-verse, .verse-fs-text, .cqf-quote,
  .todays-walk-body, .todays-walk-prayer, .todays-walk-prompt, .todays-walk-verse,
  .study-reading-verses, .study-reading-vtxt, .isg-quote, .isg-paragraph,
  .bw-teaching-p, .bw-context, .bw-scripture-text, .bg-intro, .bg-scripture-text,
  .vb-explain-text, .vb-quote, .daily-arrival-verse-text, .daily-arrival-reflect-prompt,
  .grounded-guidance-flow__thought, .grounded-guidance-flow__response-text,
  .prayer-body, .prayer-text, .reflect-answer, .snr-entry-body
) { --grounded-type-scale: var(--grounded-prose-scale); }

/* Image and print layouts use their own type and dimensions. */
:where(.grounded-share-capture, .verse-fs-share-capture, #cqfShareExportRoot,
  #truths-card, #shareCard, #shareScreen, [data-grounded-fixed-art]) {
  --grounded-type-scale: 1;
  --grounded-reading-size: 17px;
}
@media print {
  :root[data-reading] {
    --grounded-reading-size: 17px;
    --grounded-ui-scale: 1;
    --grounded-prose-scale: 1;
  }
}

.profile-text-size { margin: 16px 0; border: 0; min-inline-size: 0; }
.profile-text-size .profile-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-text-size .profile-pill {
  position: relative;
  min-height: 44px;
  max-width: 100%;
  justify-content: center;
  padding-inline: 8px;
  text-align: center;
  cursor: pointer;
  white-space: normal;
}
.profile-text-size .profile-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.profile-text-size .profile-pill:focus-within {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.profile-text-size .profile-pill.selected {
  background: var(--text);
  color: var(--card);
}
.profile-text-size .profile-pill.selected::after {
  content: "";
  width: 0.4em;
  height: 0.68em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-0.06em) rotate(45deg);
}
.profile-text-preview { margin: 12px 0 0; overflow-wrap: anywhere; }
.profile-text-preview .sv-label {
  margin: 0 0 8px;
  color: var(--text-light);
  font-size: calc(11px * var(--grounded-ui-scale));
}
#readingSizePreview .sv-text { font-size: max(var(--preview-reading-size, 17px), calc(17px * var(--grounded-system-text-scale))) !important; }
[data-reading-preview="medium"] { --preview-reading-size: 18.5px; }
[data-reading-preview="large"] { --preview-reading-size: 20px; }
[data-reading-preview="xl"] { --preview-reading-size: 23px; }

:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) {
  --layout-pad-bottom: max(100px, calc(var(--grounded-bottom-nav-height, 88px) + 12px + env(safe-area-inset-bottom)));
}

:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) :where(
  .bottom-nav .nav-item span, .nav-drawer__row-text, .profile-section-title h3,
  .profile-toggle-label, .study-connected-item__reason, .reflect-explore-card__desc,
  .grounded-premium-plan-btn__label, .grounded-premium-plan-btn__price,
  .todays-walk-pi-label
) {
  white-space: normal;
  overflow-wrap: anywhere;
}

:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) .bottom-nav .nav-item {
  align-self: stretch;
  justify-content: center;
  min-width: 0;
  max-width: none;
}
:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) .bottom-nav .nav-item span {
  font-size: calc(10px * var(--grounded-ui-scale));
}
:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) .word-bible-shell {
  bottom: max(var(--bible-shell-bottom, 96px), var(--grounded-bottom-nav-height, 0px));
}
:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) .settings-save-bar {
  bottom: max(108px, calc(var(--grounded-bottom-nav-height, 0px) + 16px));
}

:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) :is(
  .study-connected-item__reason, #reflectContent .reflect-explore-card__desc,
  .isg-collection-take, .spx-bw-search-description, .spx-continue-title,
  .sp-day-lesson, .sn-yt-preview__title, .jny-highlight-card__title,
  .jny-highlight-card__body, .jny-mvrow-verse__text
) {
  display: block;
  -webkit-line-clamp: unset;
  white-space: normal;
  max-height: none;
  overflow: visible;
}

:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) .snr-header-title {
  max-height: none;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}
:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) #groundedPremiumSheet .gpc .grounded-premium-plan-btn__badge {
  position: static;
  display: inline-block;
  margin-top: 2px;
}

:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) .todays-walk-root:focus-within {
  padding-bottom: max(14px, env(safe-area-inset-bottom), var(--grounded-ime-inset, 0px));
}
:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text]) .todays-walk-optional-input {
  scroll-margin-bottom: 20px;
}

html:has(.settings-save-bar.visible) {
  scroll-padding-bottom: calc(max(108px, var(--grounded-bottom-nav-height, 0px) + 16px) + 64px);
}
:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text])
.todays-walk-progress-track .todays-walk-pi-label {
  text-overflow: clip;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}
:root:is([data-reading="medium"], [data-reading="large"], [data-reading="xl"], [data-system-large-text])
.todays-walk-progress-item:not(.todays-walk-progress-item--current) {
  opacity: 0.8;
}

@media (max-width: 380px) {
  :root:is([data-reading="large"], [data-reading="xl"], [data-system-large-text])
  .todays-walk-progress-track {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  :root:is([data-reading="large"], [data-reading="xl"], [data-system-large-text])
  .todays-walk-progress-item {
    flex: 1 0 30%;
  }
}
