/* Contents, Home and the navigation chrome. Existing tokens only (--paper, --sheet, --ink, --muted,
   --line, --accent, --display, --ui). Hairlines and whitespace, no fills. Transitions are under
   150ms and touch only color, opacity and transform, and are removed under reduced motion. */

.contents {
  --contents-pad: 20px;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--contents-pad) 72px;
}

/* The header of the page is small on purpose: the prayer names are the largest text on it. */
.contents-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  min-height: 52px;
  margin-bottom: 4px;
}
.contents-head h1 {
  margin: 0;
  font: 500 15px/1.4 var(--ui);
  letter-spacing: 0;
}
.contents-nusach {
  margin: 0;
  font:
    400 15px/1.4 Frank,
    HebrewFallback,
    serif;
  color: var(--muted);
}
.contents-search {
  display: none;
  align-items: center;
  gap: 8px;
  width: 11rem;
  margin-inline-start: auto;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: border-color 0.12s;
}
.js .contents-search {
  display: flex;
}
.contents-search svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.contents-search input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 14px/1.4 var(--ui);
}
.contents-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.contents-search:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.contents-search input:focus-visible {
  outline: 0;
}
.contents-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* Continue reading: one hairline row, not a card. */
.contents-resume .resume {
  margin: 8px 0 4px;
  padding: 10px 0;
  gap: 12px;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.contents-resume .resume strong {
  font-size: 13px;
}
.contents-resume .resume small {
  margin-top: 1px;
  font-size: 13px;
}
.contents-resume .resume-icon svg,
.contents-resume .resume > svg {
  width: 16px;
}
.contents-resume .resume:hover strong {
  color: var(--accent);
}

/* The jump list. A row that scrolls sideways under the header on a phone, a column beside the list
   on a desktop. */
.contents-jump {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 calc(-1 * var(--contents-pad));
  padding: 0 var(--contents-pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.contents-jump::-webkit-scrollbar {
  display: none;
}
.contents-jump ul {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}
.contents-jump a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font: 400 13px/1.3 var(--ui);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.12s;
}
.contents-jump a[aria-current='location'] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.contents-jump a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 4px;
}
.contents-layout[data-searching='true'] .contents-jump {
  display: none;
}

/* The list. Each entry is the Hebrew name and the English line joined by a hairline. */
.catalog-list,
.catalog-group-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.catalog-group-heading {
  scroll-margin-top: 56px;
  margin: 28px 0 2px;
  font: 500 13px/1.4 var(--ui);
  color: var(--muted);
}
.catalog-list > li:first-child .catalog-group-heading {
  margin-top: 20px;
}
.catalog-link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 52px;
  padding: 8px 0;
  color: var(--ink);
  text-decoration: none;
}
.catalog-name {
  order: 3;
  flex: none;
  font:
    400 26px/1.25 Frank,
    HebrewFallback,
    serif;
  transition: color 0.12s;
}
.catalog-english {
  order: 1;
  flex: 0 1 auto;
  min-width: 0;
  font: 400 14px/1.4 var(--ui);
  color: var(--muted);
  transition: color 0.12s;
}
.catalog-leader {
  order: 2;
  flex: 1;
  min-width: 16px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.12s;
}
.catalog-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.catalog-link:active .catalog-name {
  color: var(--accent);
}
@media (hover: hover) {
  .catalog-link:hover .catalog-name {
    color: var(--accent);
  }
  .catalog-link:hover .catalog-english {
    color: var(--ink);
  }
  .catalog-link:hover .catalog-leader {
    border-bottom-color: var(--accent);
  }
}
.catalog-empty {
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 520px) {
  .contents {
    --contents-pad: 16px;
  }
  /* Long English lines and wide Hebrew names do not share a line on a phone: the name leads, the
     English line sits under it on the same edge. */
  .catalog-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 0;
  }
  .catalog-name {
    order: 1;
    font-size: 25px;
  }
  .catalog-english {
    order: 2;
  }
  .catalog-leader {
    display: none;
  }
}

/* A desktop: the jump list becomes a column that stays beside the list while it is read. */
@media (min-width: 900px) {
  .contents {
    max-width: calc(44rem + 2 * var(--contents-pad));
  }
  .contents-layout {
    display: grid;
    grid-template-columns: 11rem minmax(0, 30rem);
    gap: 0 3rem;
    align-items: start;
  }
  .contents-jump {
    top: 24px;
    z-index: auto;
    margin: 20px 0 0;
    padding: 0;
    background: none;
    border-bottom: 0;
    overflow: visible;
  }
  .contents-jump ul {
    flex-direction: column;
    gap: 0;
    white-space: normal;
  }
  .contents-jump a {
    min-height: 36px;
    border-bottom: 0;
    border-inline-start: 1px solid var(--line);
    padding-inline-start: 14px;
    margin-inline-start: -1px;
  }
  .contents-jump a[aria-current='location'] {
    border-inline-start-color: var(--accent);
  }
  .catalog-group-heading {
    scroll-margin-top: calc(var(--header) + 24px);
  }
  .contents-layout[data-searching='true'] {
    grid-template-columns: minmax(0, 30rem);
    justify-content: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contents *,
  .contents *::after {
    transition: none !important;
  }
}

/* ---------------------------------------------------------------------------------------------
   The chrome around every page. A website on a desktop (header, breadcrumbs, side list, footer),
   an app on a phone (slim top bar, bottom bar, bottom sheet). One markup; these rules choose.
   --------------------------------------------------------------------------------------------- */
:root {
  --header: 64px;
  --bar: 56px;
}
.bottom-bar,
.site-header,
.site-footer {
  font-family: var(--ui);
}

/* Desktop and tablet */
@media (min-width: 701px) {
  .book-top,
  .reader-header,
  .collection-top,
  .bottom-bar {
    display: none;
  }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    height: var(--header);
    border-bottom: 1px solid var(--line);
    background: var(--veil);
    backdrop-filter: blur(16px);
  }
  .site-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
  }
  .site-header .brand-word {
    font-size: 24px;
  }
  .site-nav {
    display: flex;
    gap: 4px;
  }
  .site-nav a,
  .site-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.12s;
  }
  .site-nav a[aria-current] {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 var(--accent);
    border-radius: 0;
  }
  .site-nav a:hover,
  .site-search:hover {
    color: var(--ink);
  }
  .site-nav a:focus-visible,
  .site-search:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }
  .site-search svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
  }
  .site-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
  }
  /* The reader's side list is part of the site on every desktop width. */
  body:not(.is-focused) .reader-grid {
    display: grid;
  }
  body:not(.is-focused) .reader-sidebar {
    display: flex;
  }
  .reader-sidebar {
    padding-top: 24px;
  }
  .breadcrumbs {
    margin: 0 0 20px;
    font: 400 13px/1.4 var(--ui);
    color: var(--muted);
  }
  .breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .breadcrumbs li + li::before {
    content: '›';
    margin: 0 8px;
    color: var(--line);
  }
  .breadcrumbs a {
    color: inherit;
    text-decoration: none;
    transition: color 0.12s;
  }
  .breadcrumbs a:hover {
    color: var(--ink);
  }
  .breadcrumbs a[aria-current='page'] {
    color: var(--ink);
  }
  .breadcrumbs a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
  }
  .site-footer {
    margin-top: 40px;
    padding: 20px 24px;
    border-top: 1px solid var(--line);
  }
  .site-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 24px;
    max-width: 1320px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 13px;
  }
  .site-footer .text-button,
  .site-footer a {
    min-height: 44px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    color: inherit;
    font-size: 13px;
    text-decoration: none;
  }
  .site-footer .text-button:hover,
  .site-footer a:hover {
    color: var(--ink);
  }
  .site-footer-keys {
    margin-inline-start: 16px;
    font-size: 12px;
  }
  kbd {
    padding: 1px 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font: 400 12px/1.4 var(--ui);
  }
}

/* The Text button sits in the bars without a box of its own. */
.site-header .control--toolbar,
.reader-header .control--toolbar {
  background: none;
  border-color: transparent;
}
.site-header .control--toolbar:hover,
.reader-header .control--toolbar:hover {
  background: var(--wash);
  border-color: transparent;
}

/* The end of a section and of a collection. */
.section-next,
.collection-end {
  margin: 8px 0 28px;
  font-family: var(--ui);
}
.section-next a,
.collection-next,
.collection-contents {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 0;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.section-next a svg,
.collection-next svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-inline-start: auto;
  color: var(--muted);
  transition:
    color 0.12s,
    transform 0.12s;
}
.next-label {
  flex: none;
  min-width: 3.2rem;
  color: var(--muted);
  font-size: 12px;
}
.next-title {
  font:
    400 22px/1.3 Frank,
    HebrewFallback,
    serif;
  transition: color 0.12s;
}
.next-english {
  color: var(--muted);
  font-size: 13px;
}
.collection-next {
  flex-wrap: wrap;
  gap: 2px 14px;
}
.collection-next .next-label {
  flex-basis: 100%;
}
.collection-contents {
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.collection-contents svg {
  width: 18px;
  height: 18px;
}
.section-next a:focus-visible,
.collection-next:focus-visible,
.collection-contents:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 4px;
}
.section-next a:active svg,
.collection-next:active svg {
  transform: translateX(2px);
}
@media (hover: hover) {
  .section-next a:hover .next-title,
  .collection-next:hover .next-title,
  .collection-contents:hover {
    color: var(--accent);
  }
  .section-next a:hover svg,
  .collection-next:hover svg {
    color: var(--accent);
  }
}

/* A phone: an app */
@media (max-width: 700px) {
  :root {
    --header: var(--bar);
  }
  .site-header,
  .site-footer,
  .breadcrumbs {
    display: none;
  }
  body {
    padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom));
  }
  /* Whatever is scrolled into view (a link, a section) clears the bars. */
  html {
    scroll-padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom));
  }
  .book-top {
    padding: 8px 8px 0 20px;
    min-height: var(--bar);
  }
  .book-top .brand-word {
    font-size: 22px;
  }

  .bottom-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 6;
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--veil);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    transition: transform 0.14s ease-out;
  }
  html[data-bar='hidden'] .bottom-bar,
  .has-panel .bottom-bar,
  .is-focused .bottom-bar {
    transform: translateY(100%);
  }
  .bottom-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: var(--bar);
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
    transition: color 0.12s;
  }
  .bottom-item svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .bottom-item[aria-current] {
    color: var(--ink);
  }
  .bottom-item[aria-current]::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--accent);
  }
  .bottom-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
    border-radius: 6px;
  }
  .bottom-item:active {
    color: var(--accent);
  }

  /* The reading bar: back, where you are, Text. Nothing else. */
  .reader-header {
    display: flex;
    align-items: center;
    gap: 2px;
    height: var(--bar);
    padding: 0 8px 0 4px;
  }
  .reader-header .back-home {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }
  .reader-header .back-home svg {
    width: 20px;
    height: 20px;
  }
  .reader-header .mobile-sectionbar {
    position: static;
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    backdrop-filter: none;
    flex-direction: row;
  }
  .reader-header .mobile-sectionbar .control--contents {
    flex: 1;
    max-width: none;
    min-height: 44px;
    border-color: transparent;
    background: none;
    flex-direction: row;
    justify-content: flex-start;
    text-align: start;
  }
  .reader-header .section-counter {
    display: none;
  }
  .bar-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    gap: 1px;
  }
  .bar-title small {
    font:
      400 11px/1.2 Frank,
      HebrewFallback,
      serif;
    color: var(--muted);
  }
  .bar-title > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 500 15px/1.3 var(--ui);
    direction: ltr;
  }
  .reader-header .header-actions {
    flex: none;
  }
  .reader-inner {
    padding-top: 12px;
  }
  .collection-end {
    margin-bottom: 8px;
  }

  /* The section list is a sheet that rises from the bottom. */
  #sections {
    margin: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 82svh;
    border-radius: 14px 14px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #sections::backdrop {
    background: rgba(0, 0, 0, 0.35);
  }
  .sheet-foot {
    padding: 8px 12px 12px;
    border-top: 1px solid var(--line);
  }
}
@media (min-width: 701px) {
  .sheet-foot {
    display: none;
  }
}

/* ---------------------------------------------------------------------------------------------
   Home
   --------------------------------------------------------------------------------------------- */
.home-page {
  min-height: 60svh;
}
.home-main {
  --home-pad: 20px;
  max-width: calc(44rem + 2 * var(--home-pad));
  margin: 0 auto;
  padding: 0 var(--home-pad) 56px;
}
.home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  min-height: 52px;
  padding-top: 14px;
}
.home-head h1 {
  margin: 0;
  font: 500 15px/1.4 var(--ui);
}
.home-nusach {
  margin: 0;
  font:
    400 15px/1.4 Frank,
    HebrewFallback,
    serif;
  color: var(--muted);
}
/* Slots for what depends on the moment: empty and hidden without scripts, a fixed height with them,
   so nothing below them moves when they fill. */
.home-slot {
  display: none;
}
.js .home-slot {
  display: block;
}
.home-today {
  /* The civil date, up to two lines of Hebrew date, and the occasion: sized for the longest. */
  min-height: 124px;
  margin-top: 8px;
}
.home-date {
  margin: 0;
  font: 400 28px/1.25 var(--display);
}
.home-hebrew {
  display: block;
  margin-top: 2px;
  font: 400 16px/1.4 var(--ui);
  color: var(--muted);
}
.home-occasion {
  min-height: 1.5em;
  margin: 6px 0 0;
  font: 500 15px/1.5 var(--ui);
  color: var(--accent);
}
.home-occasion a {
  color: inherit;
  text-underline-offset: 3px;
}
.js .home-now {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
/* A reader who has saved a place gets room for Continue before the app has started, so it appears
   without moving anything (index.html notes the saved places on the page). */
.has-places .home-now {
  min-height: 108px;
}
.now-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 108px;
  padding: 12px 16px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.12s;
}
@media (max-width: 700px) {
  .now-tile:only-child {
    grid-column: 1 / -1;
  }
}
.now-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: 500 12px/1.4 var(--ui);
}
.now-label svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.now-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font:
    400 24px/1.3 Frank,
    HebrewFallback,
    serif;
}
.now-where {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font: 400 13px/1.4 var(--ui);
}
.now-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.now-tile:active {
  border-color: var(--accent);
}
@media (hover: hover) {
  .now-tile:hover {
    border-color: var(--accent);
  }
}

.home-label {
  margin: 32px 0 12px;
  font: 500 13px/1.4 var(--ui);
  color: var(--muted);
}
.shelf {
  display: flex;
  gap: 22px;
  margin: 0 calc(-1 * var(--home-pad));
  padding: 6px var(--home-pad) 18px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--home-pad);
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar {
  display: none;
}
.shelf-book {
  flex: 0 0 auto;
  width: 148px;
  scroll-snap-align: start;
}
.shelf-book a {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s;
}
.shelf-book .siddur-cover {
  max-width: none;
  width: 100%;
}
.siddur-cover--shelf .cover-title {
  font-size: 25px;
  margin-top: 14px;
}
.siddur-cover--shelf .cover-lettering {
  top: 31%;
}
.shelf-caption {
  display: block;
  margin-top: 16px;
}
.shelf-title {
  display: block;
  font:
    400 20px/1.3 Frank,
    HebrewFallback,
    serif;
}
.shelf-english {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font: 400 13px/1.4 var(--ui);
}
.shelf-book a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 6px;
}
.shelf-book a:active {
  transform: translateY(1px);
}
@media (hover: hover) {
  .shelf-book a:hover {
    transform: translateY(-3px);
  }
}
.home-customize {
  min-height: 44px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
}
.home-customize:hover {
  color: var(--ink);
}

.library-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.library-list a,
.library-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  color: var(--ink);
  font: 400 15px/1.4 var(--ui);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.12s;
}
.library-count {
  color: var(--muted);
  font-size: 13px;
}
.library-all {
  margin-top: 8px;
  border-bottom: 0;
  color: var(--muted);
}
.library-all svg {
  width: 18px;
  height: 18px;
}
.library-list a:focus-visible,
.library-all:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 4px;
}
@media (hover: hover) {
  .library-list a:hover,
  .library-all:hover {
    color: var(--accent);
  }
}
@media (max-width: 700px) {
  .home-main {
    --home-pad: 16px;
  }
  .home-date {
    font-size: 25px;
  }
  .library-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 360px) {
  .home-date {
    font-size: 22px;
  }
}
@media (min-width: 701px) {
  .shelf {
    flex-wrap: wrap;
    overflow: visible;
    margin: 0;
    padding-inline: 0;
  }
  .shelf-book {
    width: 156px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-main *,
  .bottom-bar,
  .bottom-item,
  .site-header *,
  .section-next *,
  .collection-end *,
  .breadcrumbs * {
    transition: none !important;
  }
  .shelf-book a:hover,
  .shelf-book a:active {
    transform: none;
  }
}

/* With the site header sticky, the jump list and the group headings clear it. */
@media (min-width: 701px) {
  .contents-jump {
    top: var(--header);
  }
  .catalog-group-heading {
    scroll-margin-top: calc(var(--header) + 56px);
  }
}
@media (min-width: 900px) {
  .contents-jump {
    top: calc(var(--header) + 24px);
  }
  .catalog-group-heading {
    scroll-margin-top: calc(var(--header) + 24px);
  }
}

/* Print: the prayer, not the chrome around it. */
@media print {
  .site-header,
  .site-footer,
  .breadcrumbs,
  .section-next,
  .collection-end,
  .bottom-bar,
  #pwa-status {
    display: none !important;
  }
}

/* A hidden bottom bar is brought back by keyboard focus, so a focused control is never off-screen. */
@media (max-width: 700px) {
  html[data-bar='hidden'] .bottom-bar:focus-within {
    transform: none;
  }
}
