/*
 * The Website's page layout. Page defaults and components, the Bible text among
 * them, come from the design system's components.css; every value is a setting
 * from its tokens.css.
 */

/* One column of text, as on the old site. */
.page {
  box-sizing: content-box;
  max-width: var(--width-measure);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

/* The site's name, which leads home, at one end of the top, and Bible,
   Chronological, Topics, Dictionary and the visitor's settings (the gear) at
   the other, as wide as the homepage on every page; on a phone, the ☰ menu
   (#514) in their place. The globe (ADR 0035), where there is one, is after
   the gear, and before the ☰ on a phone, at every width. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: var(--width-border) solid var(--color-border);
}

.site-nav-end {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

@media (width < 48rem) {
  .site-nav-end > a,
  .site-settings > .icon-button {
    display: none;
  }
}

@media (width >= 48rem) {
  .site-menu {
    display: none;
  }
}

/* Dark mode's choices share the panel's width, unless a script hides them. */
.site-settings .segmented:not([hidden]) {
  display: flex;
}

.site-settings .segmented button {
  flex: 1;
}

.settings-content {
  display: grid;
  gap: var(--space-2);
}

.settings-content .input {
  width: 100%;
  min-width: 0;
}

.settings-content .note {
  margin: 0 0 var(--space-2);
  overflow-wrap: anywhere;
}

.site-settings .settings-panel {
  max-height: calc(100% - var(--space-4) - var(--space-4));
  overflow-y: auto;
}

html:has(#settings[open]) {
  overflow: hidden;
}

/* Without JavaScript the settings can't be kept, so neither the gear nor the
   menu's Settings is shown; nor the globe, whose Website languages only the
   browser names in their own names. */
@media (scripting: none) {
  .site-settings,
  .language-menu,
  .site-menu .rule,
  .site-menu [data-open-settings] {
    display: none;
  }
}

.site-nav > a,
.site-nav-end > a {
  color: var(--color-text);
  font-weight: var(--weight-bold);
  text-decoration: none;
}

@media (hover: hover) {
  .site-nav > a:hover,
  .site-nav-end > a:hover {
    color: var(--color-accent);
  }
}

main.page {
  padding-block: var(--space-6) var(--space-12);
}

/* The footer: the site pages and the YouTube channel, then the copyright. */
.site-footer {
  padding-block: var(--space-6);
  border-top: var(--width-border) solid var(--color-border);
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
}

.site-footer a {
  color: var(--color-muted);
}

@media (hover: hover) {
  .site-footer a:hover {
    color: var(--color-accent);
  }
}

.site-footer p {
  margin: var(--space-3) 0 0;
}

/* A page laid out wider than the column of text, such as the homepage, has its
   footer as wide; the navigation is as wide on every page. */
.page.wide {
  max-width: var(--width-page);
}

/* The homepage (#70): a band across the page holding the search and the Groups;
   then the Daily Topic, the cards ("Most Searched Topics") and the videos. A
   phone shows them one under another, the Groups as an accordion. From a tablet
   up the Groups are folder tabs, the Daily Topic lies on its side and the cards
   are three across; from a desktop up the cards sit 2 × 3 beside the Daily
   Topic, as tall as it. */

.home-band {
  border-bottom: var(--width-border) solid var(--color-border);
  background: var(--color-accent-soft);
}

.home-band-inner {
  padding-block: var(--space-6) var(--space-8);
}

.home-search {
  text-align: center;
}

/* The heading stands as far under the header as the other pages the header
   leads to: Topics', the Dictionary's and the Chronological Bible's. */
.home-search h1 {
  margin: var(--space-6) 0 var(--space-1);
  text-wrap: balance;
}

.home-search p {
  margin: 0 0 var(--space-6);
  color: var(--color-muted);
  text-wrap: balance;
}

#search-topics .search-field input {
  padding-inline: var(--space-4);
}

/* The search is in the Groups' folder tabs (#345), filling a phone's width, and
   from a tablet up as wide as a column of text and centred: Read the Bible,
   Search the Bible and Search Topics, each over its panel. A panel's own name,
   like an open Group's, heads it only without JavaScript, when every panel
   shows (below). */
.home-tabs {
  max-width: var(--width-measure);
  margin-inline: auto;
  text-align: start;
}

.home-tabs .folder-tab-panel > h2,
.home-browse .folder-tab-panel > h3 {
  display: none;
  margin: 0 0 var(--space-3);
}

/* The reader's search sits in its panel as in the reader's bar, without the
   room the bar keeps above and below it beside the Guide. */
.home-tabs .reader-search-group {
  padding-block: 0;
}

/* Read Bible: Book, Chapter and Go in one row. Book takes the rest of it, and
   Chapter is as wide as three digits, as the reader's is on a phone, so that
   choosing a book never widens it. */
.home-read {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(var(--width-number-choice), auto) auto;
  align-items: end;
  gap: var(--space-2);
}

.home-read .button {
  min-height: var(--size-target);
}

/* Under them, the way into the Chronological Bible (#759), a line of text; it
   takes its own margin, not the one .home-search p gives the line under the
   heading. */
.home-search .home-chronological {
  margin: var(--space-3) 0 0;
}

@media (width < 48rem) {
  /* The search's field and button take the reader's two columns on a phone. */
  .home-tabs .reader-search-group {
    grid-template-columns: minmax(0, 1fr) minmax(var(--width-number-choice), auto);
  }
}

/* On a narrow phone, the Topic search's placeholder still fits. */
@media (width < 24rem) {
  .home-tabs .folder-tab-panel {
    padding: var(--space-2);
  }

  #search-topics .search-field :is(input, .button) {
    padding-inline: var(--space-3);
  }
}

/* "Quick help:", set apart from the search by a rule, then the
   Groups. */
.home-browse {
  max-width: var(--width-panel);
  margin: var(--space-8) auto 0;
  padding-top: var(--space-6);
  border-top: var(--width-border) solid var(--color-border-strong);
}

.home-browse h2 {
  margin: 0 0 var(--space-3);
  line-height: var(--line-height-tight);
}

.home-browse .folder-tabs {
  display: none;
}

.home-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8);
  padding-block: var(--space-8) var(--space-12);
}

/* The body's headings sit well below the page's: the body's size, in bold. */
.home-cards h2,
.daily-card-head h2 {
  margin: 0;
  font-size: var(--step-0);
  line-height: var(--line-height-tight);
}

.home-cards h2 {
  margin-bottom: var(--space-3);
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Today's Bible Topic: its heading and the date, its question over its photo,
   then its top Passage, clamped, and a link to all its Passages. */
.daily-card {
  padding: var(--space-4);
  border: var(--width-border) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
}

.daily-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-3);
}

.daily-card-head time {
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  font-variant-numeric: tabular-nums;
}

/* The question, all one link with the photo under it (laid out with the Topic
   page's heading, below). Without a photo it is a heading of its own. */
.daily-topic {
  display: block;
  color: var(--color-text);
  text-decoration: none;
}

.daily-topic-title {
  display: block;
  font-size: var(--step-1);
  line-height: var(--line-height-1);
  font-weight: var(--weight-bold);
}

@media (hover: hover) {
  .daily-topic:hover .daily-topic-title {
    color: var(--color-accent);
  }
}

/* Over its photo, the question keeps its size against the photo, and stays white
   when pointed at. */
.daily-topic:has(.topic-photo) {
  container-type: inline-size;
}

.daily-topic:has(.topic-photo) .daily-topic-title {
  font-size: var(--text-on-photo);
  line-height: var(--line-height-tight);
  text-align: center;
  text-wrap: balance;
}

@media (hover: hover) {
  .daily-topic:has(.topic-photo):hover .daily-topic-title {
    color: var(--color-on-photo);
    text-decoration: underline;
  }
}

/* The photo is a corner nested in the card. */
.daily-card .daily-topic:has(.topic-photo),
.daily-card .topic-photo {
  border-radius: var(--radius-inset);
}

.daily-card-text {
  padding-top: var(--space-3);
}

.daily-card .passage-reference {
  margin-bottom: var(--space-2);
}

/* The Passage is carried in every Translation; the visitor's lays out as though it
   were alone (layout.html's script shows it, and hides the others). */
[data-in-translation]:not([hidden]) {
  display: contents;
}

/* The Passage keeps to about 45 to 75 characters a line, and five lines. */
.daily-passage,
.daily-source .passage-scripture {
  display: -webkit-box;
  overflow: hidden;
  max-width: var(--width-scripture);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.daily-more {
  display: inline-block;
  margin-top: var(--space-3);
  font-weight: var(--weight-medium);
}

.home-videos {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  text-align: center;
}

@media (width >= 48rem) {
  .home-browse .folder-tabs {
    display: block;
  }

  .home-browse .accordion {
    display: none;
  }

  .home-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .daily-card {
    padding: var(--space-6);
  }

  .home-videos {
    font-size: var(--step-0);
    line-height: var(--line-height-0);
  }
}

/* On a tablet, the Daily Topic lies on its side: its photo, as tall as its text,
   left of it. */
@media (48rem <= width < 68.75rem) {
  .daily-card-body {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: var(--space-6);
  }

  .daily-card .daily-topic,
  .daily-card .topic-photo {
    height: 100%;
  }

  .daily-card .topic-photo {
    aspect-ratio: auto;
  }

  .daily-card-text {
    padding-top: 0;
  }
}

/* On a desktop, the cards fill the Daily Topic's height beside it, under their
   heading, which the cards' section takes the row above for (a subgrid). With
   no Daily Topic beside them (alone), as on a day the visitor's Translation
   cannot offer its Topic (#316), they keep the tablet's grid. */
@media (width >= 68.75rem) {
  .home-body {
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    grid-template-areas:
      "cards ."
      "cards daily"
      "videos videos";
    gap: 0 var(--space-8);
  }

  .home-cards {
    display: grid;
    grid-area: cards;
    grid-template-rows: subgrid;
  }

  .daily-card {
    grid-area: daily;
  }

  .home-videos {
    grid-area: videos;
    margin-top: var(--space-8);
  }

  .home-card-grid:not(.alone) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  .home-card-grid:not(.alone) .photo-card {
    aspect-ratio: auto;
  }
}

/* Without JavaScript, every panel of the search shows, in the tabs' order, and
   every Group, with all its Topics, each under its name. */
@media (scripting: none) {
  :is(.home-tabs, .home-browse) :is(.folder-tab-list, .accordion) {
    display: none;
  }

  :is(.home-tabs, .home-browse .folder-tabs) {
    display: grid;
    gap: var(--space-4);
  }

  :is(.home-tabs, .home-browse) .folder-tab-panel {
    display: block;
    border-radius: var(--radius-card);
  }

  .home-tabs .folder-tab-panel > h2,
  .home-browse .folder-tab-panel > h3 {
    display: block;
  }
}

/* The site pages: About, Contact, Terms and Privacy. */

.site-page h1 {
  margin: 0 0 var(--space-6);
}

.site-page h2 {
  margin: var(--space-8) 0 var(--space-2);
}

.site-page h3 {
  margin: var(--space-6) 0 var(--space-2);
}

/* The library's pages: the heading, the search and the letters, then the library's
   text, a letter's Topics or the search's results. The Dictionary page (#512) is
   laid out as they are, with a short line under its heading. Each starts as far
   under the header as the homepage and the Chronological Bible's contents page:
   its heading, or the Dictionary page's choice of Dictionaries over it. */

.library-title {
  margin: var(--space-6) 0 var(--space-6);
  text-align: center;
  text-wrap: balance;
}

.library-title:has(+ .library-line) {
  margin-bottom: var(--space-1);
}

.library-line {
  margin: 0 0 var(--space-6);
  color: var(--color-muted);
  text-align: center;
  text-wrap: balance;
}

.library-find {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* The Dictionary page's choice of Dictionaries (#675), under the letters,
   needs its script. */
@media (scripting: none) {
  .library-find .checkbox-row {
    display: none;
  }
}

.library-about h2 {
  margin: var(--space-8) 0 var(--space-2);
}

/* The Dictionary page's note names each Dictionary over its few sentences. */
.library-about h3 {
  margin: var(--space-6) 0 var(--space-1);
}

.library-about h3 + p {
  margin-top: 0;
}

/* A Topic's page: its heading and its Translation over its photo, then the
   reader's tools above its Passages, and in Meditate the way between them. */

.topic-header {
  margin-bottom: var(--space-6);
}

.topic-title {
  margin: 0;
  text-align: center;
  text-wrap: balance;
}

.topic-title-tag {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-muted);
  font-size: var(--step-1);
  line-height: var(--line-height-1);
  font-weight: var(--weight-medium);
}

/* A Topic with a photo has its heading laid over the photo, which is darkened
   so that the heading can be read, on its page and as the homepage's Daily Topic.
   A long heading makes the photo taller rather than spilling out of it. */
.topic-header:has(.topic-photo),
.daily-topic:has(.topic-photo) {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.topic-header:has(.topic-photo) > *,
.daily-topic:has(.topic-photo) > * {
  grid-area: 1 / 1;
}

.topic-header:has(.topic-photo) .topic-title,
.daily-topic:has(.topic-photo) .daily-topic-title {
  z-index: 1;
  display: grid;
  align-content: center;
  padding: var(--space-4);
  background: var(--color-photo-scrim);
  color: var(--color-on-photo);
}

.topic-header:has(.topic-photo) .topic-title-tag {
  color: var(--color-on-photo);
}

.topic-photo {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--ratio-photo);
  object-fit: cover;
  border-radius: var(--radius-card);
}

/* The page's Translation, a small line under the title, at the foot of the photo
   in the photo's words' colour where there is one (#141), as on a chapter's page
   too. Change opens the gear, so it is hidden without JavaScript, as the gear is. */
.topic-translation {
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  text-align: center;
}

.topic-header:has(.topic-photo) .topic-title {
  padding-block: var(--space-12);
}

.topic-header:has(.topic-photo) .topic-translation {
  z-index: 1;
  align-self: end;
  margin: 0;
  padding: var(--space-3);
  color: var(--color-on-photo);
}

.topic-header:has(.topic-photo) .topic-translation .link-button,
.topic-header:has(.topic-photo) .topic-translation .link-button:hover {
  color: var(--color-on-photo);
}

.topic-header:has(.topic-photo) .topic-translation .link-button:focus-visible {
  outline-color: var(--color-on-photo);
}

/* Change after a line of text (translation-change), which opens the gear on
   the Translations: a whole target tall, and hidden without JavaScript, as the
   gear is. */
.topic-translation-change .link-button {
  min-height: var(--size-target-min);
}

@media (scripting: none) {
  .topic-translation-change {
    display: none;
  }
}

.passage-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.meditate-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

/* After the Passages of a Translation that leaves books out, how many more
   are in books it doesn't include (#315), with Change, which opens the gear. */
.topic-more {
  margin: var(--space-8) 0 0;
}

/* The hint at the foot of the screen (#144), saying how to reach a Passage's
   actions, until a reader first does: muted words after a tap in the accent,
   wrapping beside Hide. */
.passage-hint p {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
}

.passage-hint svg {
  flex: none;
  width: var(--step-1);
  height: var(--step-1);
  color: var(--color-accent);
}

/* Without JavaScript a Passage can be read in context, but not shared or copied. */
@media (scripting: none) {
  .passage-actions [data-action] {
    display: none;
  }
}

/* Reader navigation (#211), below the top-nav separator. On a phone Book and
   Chapter sit straight under the search, as far below it as they are apart,
   their choices naming them without labels. From the tablet width they share
   the search's row, where their labels line up with its label, and their
   choices with its field. Beside the Guide, Book and Chapter sit in its column,
   under the rule that runs on up from it. Each label sits close over its field,
   so the block stays small above the chapter. */
.page.reader-navigation {
  max-width: calc(var(--width-measure) + var(--space-12) + var(--width-sidebar));
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-3);
}

.navigation-label,
.reader-selectors label,
.home-read label {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--size-target-min);
  margin: 0 0 var(--space-1);
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
}

/* "(tips)", after the search's label and in its colour, opens Search Help;
   its word is underlined, its brackets not. */
.reader-help-button {
  min-height: var(--size-target-min);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.reader-help-button span {
  text-decoration: underline;
}

.reader-search svg {
  display: block;
  width: var(--step-0);
  height: var(--step-0);
}

/* The button is a square as tall as the field beside it, which is a line of
   words between its padding and borders, or a target, whichever is taller. */
.reader-search button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
  width: max(var(--size-target), calc(var(--line-height-0) * var(--step-0) + var(--space-2) + var(--space-2) + var(--width-border) + var(--width-border)));
}

.reader-search-group {
  min-width: 0;
}

.reader-search-group .note {
  margin-block: var(--space-2) 0;
}

.reader-jump {
  min-width: 0;
}

/* Chapter is as wide as its longest number, and Book takes the rest. */
.reader-selectors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
}

.reader-selectors .field {
  gap: var(--space-1);
}

.reader-selectors label,
.home-read label {
  margin: 0;
  font-weight: var(--weight-regular);
}

.reader-selectors select,
.home-read select {
  width: 100%;
  min-width: 0;
  min-height: var(--size-target);
  text-overflow: ellipsis;
}

/* On a phone the labels are for a screen reader alone, as .visually-hidden's
   words are; the homepage's Read Bible's too. */
@media (width < 48rem) {
  .reader-selectors label,
  .home-read label {
    position: absolute;
    width: var(--size-unseen);
    height: var(--size-unseen);
    min-height: 0;
    overflow: hidden;
    clip-path: inset(100%);
    white-space: nowrap;
  }
}

/* On a phone the search's button and Chapter share a column, wide enough for
   three digits from the start, so that their edges line up and the Psalms
   widen neither: each row lays its field and its button, or Book and Chapter,
   in the navigation's two columns. */
@media (width < 48rem) {
  .page.reader-navigation {
    grid-template-columns: minmax(0, 1fr) minmax(var(--width-number-choice), auto);
  }

  .reader-search-group,
  .reader-search-group > *,
  .reader-jump,
  .reader-selectors {
    grid-column: 1 / -1;
  }

  .reader-search-group,
  .reader-search,
  .reader-jump,
  .reader-selectors {
    display: grid;
    grid-template-columns: subgrid;
  }

  .reader-search button {
    width: auto;
    min-width: max(var(--size-target), calc(var(--line-height-0) * var(--step-0) + var(--space-2) + var(--space-2) + var(--width-border) + var(--width-border)));
  }
}

.reader-selectors select:dir(rtl),
.home-read select:dir(rtl) {
  padding-left: calc(var(--space-2) + var(--size-caret) + var(--size-caret) + var(--space-3));
  padding-right: var(--space-3);
  background-image: var(--gradient-caret-right), var(--gradient-caret-left);
  background-position: left calc(var(--space-3) + var(--size-caret)) center, left var(--space-3) center;
}

dialog.reader-help {
  width: var(--width-measure);
  max-width: calc(100% - var(--space-4) - var(--space-4));
  height: fit-content;
  max-height: calc(100% - var(--space-4) - var(--space-4));
  margin: auto;
  overflow-y: auto;
}

.reader-help section + section {
  margin-top: var(--space-6);
}

.reader-help h3 {
  font-size: var(--step-0);
  margin-block: var(--space-4) var(--space-2);
}

/* Each example is a button that runs its search: in a row under Examples, or
   over what it finds. */
.reader-help-tries {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.reader-help-example {
  padding-inline: var(--space-3);
}

.reader-help section > .reader-help-example {
  display: block;
  margin-top: var(--space-4);
}

.reader-help section > .reader-help-example + p {
  margin-top: var(--space-1);
}

html:has(#reader-help[open]) {
  overflow: hidden;
}

@media (scripting: none) {
  .reader-help-button {
    display: none;
  }
}

/* On one row, Book and Chapter are as wide as their longest choices, and the
   search takes the rest. */
@media (width >= 48rem) {
  .page.reader-navigation {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-8);
  }

  .reader-jump {
    border-inline-start: var(--width-border) solid var(--color-border);
    padding-inline-start: var(--space-8);
  }
}

/* Beside the Guide, the columns are the chapter's: the search over the text,
   and Book and Chapter over the Guide, as far from the rule as its words, which
   runs from the top-nav separator down. As the Guide does, they stay on the
   right in a right-to-left Language. */
@media (width >= 60rem) {
  .page.reader-navigation {
    direction: ltr;
    grid-template-columns: minmax(0, var(--width-measure)) var(--width-sidebar);
    gap: var(--space-12);
    padding-block: 0;
  }

  [dir='rtl'] .page.reader-navigation > * {
    direction: rtl;
  }

  .reader-search-group {
    padding-block: var(--space-3);
  }

  .reader-jump {
    border-inline-start: 0;
    border-left: var(--width-border) solid var(--color-border);
    padding: var(--space-3) 0 var(--space-3) var(--space-4);
  }
}

/* A chapter's page (#142): its name between arrows to the chapters before and
   after it, as Bible Hub has it, and its Translation; then its Sections, each
   under its heading. The verses after the # of its address are tinted. */

/* The chapter, a Section or the header takes focus only to carry a screen reader
   on to where a Topic or the Outline takes the reader; none is a control, so
   none shows a ring. */
:is(#chapter, .chapter-section, .chapter-header):focus-visible {
  outline: none;
}

/* So too a sermon's Head, or its start, when the menu's dialog closes on it. */
.sermon-page :is(#introduction, .book-head):focus-visible {
  outline: none;
}

.chapter-header {
  margin-bottom: var(--space-8);
}

.chapter-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.chapter-title {
  min-width: 0;
  margin: 0;
  text-align: center;
  text-wrap: balance;
}

/* An arrow: an icon button in the Theme's colour. One that leads nowhere, before
   Genesis 1 or after Revelation 22, is an empty space of its size, so that the
   name stays centred. */
.chapter-arrow {
  flex: none;
  width: var(--size-chip);
  height: var(--size-chip);
}

.icon-button.chapter-arrow {
  color: var(--color-accent);
}

@media (hover: hover) {
  .icon-button.chapter-arrow:hover {
    color: var(--color-accent-strong);
  }
}

.chapter-arrow svg {
  width: var(--step-0);
  height: var(--step-0);
}

.chapter-section + .chapter-section {
  margin-top: var(--space-8);
}

/* The tint, behind the words as a highlighter would put it. */
.chapter-mark,
.bible-search-result mark {
  background: var(--color-highlight);
  color: inherit;
  border-radius: var(--radius-control);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Words the visitor selects take the same tint. */
::selection {
  background: var(--color-highlight);
}

/* A chapter page shows one highlight at a time: a newer one takes the tint
   away (chapter.js), leaving the words where they are, so that a selection
   being made over them holds. Naming the element outweighs the verse Layout's
   shadow. */
.chapter[data-untinted] mark.chapter-mark {
  background: none;
  box-shadow: none;
}

/* Complete Bible results, with filters separate from passage navigation, and a
   Verse list's verses, laid out as they are. Their title is centred over the
   Translation's line, as a chapter's name is. */
.bible-search-page > h1,
.verse-list-page > h1 {
  margin-bottom: 0;
  text-align: center;
  text-wrap: balance;
}

/* What a Verse list's Meaning is, under the Translation's line. */
.verse-list-about {
  margin-block-start: var(--space-6);
}

/* The words of a Verse list's verse that translate its Meaning: underlined in
   the Theme's colour, as a tapped Dotted word is. */
.verse-list-item .word {
  text-decoration-line: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: var(--width-focus);
  text-underline-offset: var(--space-x6);
  text-decoration-skip-ink: none;
}

.bible-search-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-block: var(--space-6);
}

.bible-search-filters label {
  flex-basis: 100%;
}

.bible-search-filters select {
  flex: 1;
  min-width: 0;
}

.bible-search-result,
.verse-list-item {
  padding-block: var(--space-6);
  border-bottom: var(--width-border) solid var(--color-border);
}

.bible-search-result h2,
.verse-list-item h2 {
  font-size: var(--step-0);
  margin-block: 0 var(--space-3);
}

/* A result's heading, which opens its chapter, is a control: at least
   --size-target-min tall, on a phone too. */
.bible-search-result h2 a {
  display: inline-block;
  min-height: var(--size-target-min);
}

/* The page of an address into a book outside the Translation's Coverage
   (#311): each Translation it offers is a control too, a long name wrapping. */
.not-in-translation .bullet a {
  display: inline-block;
  min-height: var(--size-target-min);
  overflow-wrap: anywhere;
}

.bible-search-result .scripture,
.verse-list-item .scripture {
  overflow-wrap: anywhere;
}

.bible-search-pages,
.verse-list-pages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

/* Verse by verse, the visitor's Layout under the gear: each verse starts a line,
   its number at the left edge, under its heading's first letter, and so do the
   rest of its lines. The tint then reaches a little past the words, without
   moving them. */
/* Source-specific alignment, such as a right-aligned refrain, still wins. */
:where(:root[data-layout='verses'] .chapter) .scripture {
  text-align: start;
}

:root[data-layout='verses'] .chapter :is(.verse, .chapter-mark) {
  display: block;
}

:root[data-layout='verses'] .chapter :is(.verse, .chapter-mark) + :is(.verse, .chapter-mark) {
  margin-top: var(--space-2);
}

:root[data-layout='verses'] .chapter-mark {
  box-shadow: 0 0 0 var(--space-1) var(--color-highlight);
}
/* Long source revision identifiers on Credits must fit narrow screens. */
.credits-page {
  overflow-wrap: anywhere;
}

.chapter-notes {
  margin-block-start: var(--space-6);
  padding-block-start: var(--space-3);
  border-block-start: var(--width-border) solid var(--color-border);
}

.chapter-notes ol,
.bible-search-notes ol {
  list-style: none;
  padding: 0;
}

.chapter-notes li + li,
.bible-search-notes li + li {
  margin-block-start: var(--space-2);
}

/* A Bible search result's translator's notes (#516), under its verses, as
   small as the Verse panel's. */
.bible-search-notes {
  margin-block-start: var(--space-3);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
}

.bible-search-notes ol {
  margin: 0;
}

/* A Dictionary article's page (#317), laid out as a chapter page is: the
   article's title, centred; then its text (components.css's .article-text).
   Its menu, In this article, takes the Guide's place and its two homes
   (below): beside the text from 60rem, in a column every article keeps,
   menu or not (#734), and opened from the bar at the foot below that. A
   sermon's page (#348) is laid out as an article's, with the collection's
   name, small and muted, over its title, its number and the day and place it
   was preached, small and muted, under it, and its text line, set apart as
   its hymns are (#521, components.css's .book-hymn), over its body; its own
   menu (#470), in the same two homes, holds the switch between its wordings,
   where they differ, and under it its Heads, In this sermon (#522). */
.dictionary-text,
.sermon-text {
  min-width: 0;
}

.dictionary-header,
.sermon-header {
  margin-bottom: var(--space-8);
  text-align: center;
}

.dictionary-trail {
  margin-bottom: var(--space-4);
}

.dictionary-trail ol {
  justify-content: center;
}

.dictionary-name {
  margin: var(--space-2) 0 var(--space-3);
}

.sermon-source {
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
}

.dictionary-title,
.sermon-title {
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.sermon-facts {
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  text-wrap: balance;
}

/* A sermon carries both its wordings (#470, #488), each paragraph they print
   differently in each (dictionary.html's article-node): Spurgeon Updated
   shows, and Spurgeon Original, hidden after it, shows in its place where the
   visitor chose it, as layout.html's head reads before the page is drawn.
   A paragraph Spurgeon Updated splits (#500) is its parts, each a paragraph
   like any other, in one block that shows and hides as one. */
:root[data-spurgeon='original'] .wording-updated {
  display: none;
}

:root[data-spurgeon='original'] .wording-original {
  display: block;
}

/* The switch's two choices share its menu's width, and stack, each as wide,
   where they don't fit side by side. In the dialog, it keeps the room over
   the bar that the Guide's Settings keep. */
.sermon-wordings {
  display: flex;
}

#guide-menu .sermon-menu {
  padding-bottom: var(--space-4);
}

/* The menu's entries or headings are numbered, and those within one bulleted
   under it, with muted markers that hang before their first lines; each is a
   link of a page's menu (components.css's .page-menu). */
.article-menu ol {
  margin: 0;
  padding-inline-start: var(--space-6);
}

.article-menu ul {
  margin: 0;
  padding-inline-start: var(--space-4);
  list-style: disc;
}

.article-menu li::marker {
  color: var(--color-muted);
}

/* A sermon's Heads in its menu, In this sermon (#522), drawn to scale
   (components.css's .heads-list), under the switch, where it has one, and in
   the dialog set off from it by a rule. */
.sermon-wordings + .sermon-heads {
  margin-top: var(--space-6);
}

#guide-menu .sermon-wordings + .sermon-heads {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: var(--width-border) solid var(--color-border);
}

/* Where the page has no margin beside a sermon's text for a Head's numeral to
   hang in (components.css's .book-head), on phones, and from 60rem, where its
   menu sits beside the text, to 68.75rem, the text keeps room for it on its
   left. */
@media (width < 48rem), (60rem <= width < 68.75rem) {
  .sermon-page .book-text:has(.book-head) {
    padding-inline-start: var(--width-head-numeral);
  }
}

/* No Book and Chapter over the article or sermon for the Guide's rule to run
   up to. */
.dictionary-page #guide-home::before,
.sermon-page #guide-home::before {
  content: none;
}

/* From 60rem, every article's page, with a menu or without, is as wide as
   the text and the menu's column beside it (#734), the column empty where
   there is no menu, so that the text starts at the same edge, as wide, on
   every article. A sermon's page is that wide only with its menu. */
@media (width >= 60rem) {
  .dictionary-page,
  .sermon-page:has(.sermon-menu) {
    max-width: calc(var(--width-measure) + var(--space-12) + var(--width-sidebar));
  }
}

/* Without JavaScript the switch can't work, so a sermon's page is one
   centred column, as wide as a page without a menu, in Spurgeon Updated. */
@media (scripting: none) {
  .sermon-page:has(.sermon-menu) {
    max-width: var(--width-measure);
  }

  .sermon-page .reader-columns {
    display: block;
  }

  .sermon-page #guide-home {
    display: none;
  }
}

/* The current-book Guide (#215): a quiet margin at 60rem, or a modal menu
   above the chapter bar. The one Guide moves between these two homes. */
.reader-text, #guide-home, #guide-menu-slot {
  min-width: 0;
}

.reader-text {
  padding-block-start: var(--reader-keep-before);
}
.reader-guide {
  overflow-anchor: none;
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  overflow: auto;
  overscroll-behavior: contain;
  padding-inline: var(--space-3);
  /* What an open row holds starts under its arrow: the row's own inset, and
     about as far again, where the arrow sits centred in its box. */
  --guide-indent: calc(var(--space-2) + var(--space-2));
}
/* The book's name over its Outline, and "In Romans 1" over the chapter's own
   rows, so that the Outline reads as the whole book's. */
.guide-heading {
  margin: 0 0 var(--space-2);
  font-size: var(--step-0);
  font-weight: var(--weight-bold);
  line-height: var(--line-height-tight);
}
.guide-row + .guide-heading {
  margin-top: var(--space-6);
}
/* A row's tint reaches as far as the links' under it do, and their words start
   under its arrow. */
.guide-row > summary {
  padding: var(--space-2);
  text-align: start;
  list-style: none;
}
.guide-row > summary::-webkit-details-marker,
.about-fold > summary::-webkit-details-marker {
  display: none;
}
.guide-row[open] > summary .accordion-chevron::before,
.panel-fold[open] > summary .accordion-chevron::before,
.about-fold[open] > summary .accordion-chevron::before {
  content: '▾';
}
.guide-row .accordion-chevron {
  font-size: var(--step-0);
  line-height: var(--line-height-tight);
}
.guide-row + .guide-row,
.about-fold + .about-fold {
  border-top: var(--width-border) solid var(--color-border);
}
/* Beside the text, a row's arrow and the words it holds line up with the
   headings over them, and the tints reach out past them into the margin,
   where they reached before. */
#guide-home .reader-guide {
  --guide-indent: var(--space-2);
  --guide-keep-after: 0;
  padding-inline: var(--space-4);
  padding-block-end: var(--guide-keep-after);
}
#guide-home :is(.guide-row > summary, .guide-about, .guide-outline, .guide-topics, .guide-sermons, .guide-chronological) {
  width: auto;
  margin-inline: calc(0px - var(--space-2));
}
/* The Topics' and Spurgeon Sermons' bullets (components.css) sit under the
   row's arrow, where its other rows' words start. */
.reader-guide .bullets {
  --bullet-at: var(--guide-indent);
}
#guide-home .guide-row .accordion-chevron {
  width: auto;
}
.guide-outline {
  padding-bottom: var(--space-3);
}
.guide-topics {
  padding-bottom: var(--space-3);
}
.guide-topic + .guide-topic {
  margin-top: var(--space-1);
}
.guide-topic-name {
  margin: 0;
  overflow-wrap: anywhere;
}
/* A Topic's line, and a sermon's (below), each one to choose. */
.chapter-topic-link,
.guide-sermon-choice {
  min-height: var(--size-target-min);
  padding-block: var(--space-1);
  padding-inline-end: var(--space-2);
  border-radius: var(--radius-control);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.chapter-topic-link {
  display: block;
  text-decoration: none;
}
/* The chosen Topic, its next stop and its Topic page share one tint, the
   Theme's highlight, as its verses take, all in the words' colour, so the
   chain reads as one quiet block. Every line of the Guide that is chosen or
   pointed at takes the same tint. */
.guide-topic:has(.chapter-topic-link[aria-current='true']) {
  border-radius: var(--radius-control);
  background: var(--color-highlight);
}
.topic-chain {
  margin: 0;
  padding-block: var(--space-1);
  padding-inline-end: var(--space-2);
  overflow-wrap: anywhere;
}
.topic-chain a {
  display: block;
  min-height: var(--size-target-min);
  color: var(--color-text);
  text-decoration: none;
}
@media (hover: hover) {
  .chapter-topic-link:hover,
  .guide-sermon-choice:hover,
  .reader-guide .accordion-button:hover {
    background: var(--color-highlight);
    color: var(--color-text);
  }
  .topic-chain a:hover {
    color: var(--color-text);
  }
}
/* Spurgeon Sermons (#348): each sermon a line to choose, its title and then
   its verses, grey, in brackets, both upright. Choosing it gives its line
   a chosen Topic's tint and shows its ↗, at the line's end, inside the tint. */
.guide-sermons {
  padding-bottom: var(--space-3);
}
.guide-sermon {
  display: flex;
  align-items: center;
  border-radius: var(--radius-control);
}
.guide-sermon + .guide-sermon {
  margin-top: var(--space-1);
}
.guide-sermon:has(> .guide-sermon-choice[aria-pressed='true']) {
  background: var(--color-highlight);
}
.guide-sermon-choice {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.guide-sermon-choice cite {
  font-style: normal;
}
.guide-sermon-verses {
  color: var(--color-muted);
  white-space: nowrap;
}
.guide-sermon-open {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: var(--size-target-min);
  min-height: var(--size-target-min);
  margin-inline-end: var(--space-1);
  border-radius: var(--radius-control);
  /* The deeper red, which reads on the tint in dark mode too. */
  color: var(--color-accent-strong);
  font-weight: var(--weight-bold);
  text-decoration: none;
}
.guide-sermon-open[hidden] {
  display: none;
}
.outline-chapter + .outline-chapter {
  margin-top: var(--space-3);
}
.outline-name {
  margin: 0;
  font-weight: var(--weight-bold);
}
.outline-chapter ul {
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
}
.outline-link {
  display: block;
  min-height: var(--size-target-min);
  padding-block: var(--space-1);
  padding-inline-end: var(--space-2);
  border-radius: var(--radius-control);
  color: var(--color-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
/* A chapter's name starts under the row's arrow, and its sections are
   bulleted as the Topics are (.bullet), the bullets under the name's start. */
.outline-name .outline-link {
  padding-inline-start: var(--guide-indent);
}
/* The Section being read, or its chapter before the book's first heading. */
.outline-link:is([aria-current='location'], [data-location]) {
  background: var(--color-highlight);
}
@media (hover: hover) {
  .outline-link:hover {
    background: var(--color-highlight);
    color: var(--color-text);
  }
  .guide-bar-button:hover {
    background: var(--color-hover);
    color: var(--color-text);
  }
}
/* About [Book] (#339): the book's Book introduction, its summary line, then a
   fold for each of its fields, divided by the border line as the Guide's rows
   are. A fold's arrow is the rows' own, at their size, but hollow
   (.accordion-chevron-hollow). */
.guide-about,
.guide-chronological {
  padding-block-end: var(--space-4);
  padding-inline: var(--guide-indent) var(--space-2);
  overflow-wrap: break-word;
}
.guide-about :is(p, ul),
.guide-chronological p {
  margin: 0;
}
.guide-about .about-summary {
  margin-bottom: var(--space-3);
}
/* A fold's tint reaches past its arrow and words as far as its row's does,
   leaving them where they are. */
.about-fold > summary {
  width: auto;
  margin-inline: calc(0px - var(--space-2));
  padding-block: var(--space-1);
  padding-inline: var(--space-2);
  list-style: none;
}
.about-value {
  padding-block-end: var(--space-2);
}
.guide-about .about-list {
  padding: 0;
  list-style: none;
}
.about-list li {
  position: relative;
  border-radius: var(--radius-control);
}
.about-list li + li {
  margin-top: var(--space-1);
}
.about-name {
  font-weight: var(--weight-medium);
}
.about-reference {
  color: var(--color-muted);
  white-space: nowrap;
}
.guide-about .about-overview {
  margin-top: var(--space-4);
  font-weight: var(--weight-bold);
}
/* The Chronological Bible row (#759): the heading the chapter's first verse
   is read under, a link as Full overview is, then its era and Part, grey. */
.guide-chronological-link {
  font-weight: var(--weight-bold);
}
.guide-chronological-line {
  color: var(--color-muted);
}
.about-overview a,
.guide-chronological-link a {
  display: inline-block;
  min-height: var(--size-target-min);
  padding-block: var(--space-1);
  border-radius: var(--radius-control);
}
/* Its links, as the Outline's and the Topics' are: in the words' colour, a
   chapter grey, with no underline. A list's row is one link reaching across
   it (about-row): a person's, place's or book's name, or a Key Event's
   chapter. Under the pointer the whole row takes the Theme's highlight, and
   the link the pointer is on is underlined: a Key Place's chapter sits above
   its row's link, so that on the chapter only the chapter is. A Word to Know
   and Full overview are tinted on their own. */
.guide-about a,
.guide-chronological a {
  color: var(--color-text);
  text-decoration: none;
}
.guide-about .about-reference a {
  color: var(--color-muted);
}
.about-row::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: '';
}
.about-reference a:not(.about-row) {
  position: relative;
  z-index: 1;
}
.about-words a {
  border-radius: var(--radius-control);
}
@media (hover: hover) {
  .about-list li:has(a:hover),
  :is(.about-words, .about-overview, .guide-chronological-link) a:hover {
    background: var(--color-highlight);
  }
  :is(.guide-about, .guide-chronological) a:hover {
    text-decoration: underline;
  }
}
/* Beside the text, the tints reach a little past the words, as the Outline's
   do. */
@media (width >= 60rem) {
  .about-list li,
  .about-overview a,
  .guide-chronological-link a {
    margin-inline: calc(0px - var(--space-2));
    padding-inline: var(--space-2);
  }
  .about-list li {
    padding-block: var(--space-1);
  }
  .about-list li + li {
    margin-top: 0;
  }
}
/* In the phone menu, what a fold holds starts under its arrow, and its lists
   are bulleted, the bullets grey. */
@media (width < 60rem) {
  .about-value {
    padding-inline-start: var(--space-1);
  }
  .guide-about .about-list {
    padding-inline-start: var(--space-4);
    list-style: disc;
  }
  .about-list ::marker {
    color: var(--color-muted);
  }
}
#guide-home, .guide-bar, .guide-settings-row {
  display: none;
}
#guide-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  overflow: hidden;
}
#guide-menu::backdrop {
  background: var(--color-backdrop);
}
/* The menu rises from the bar no wider than the text's measure, centred over it,
   so a tablet's isn't the whole screen wide. */
.guide-menu-content {
  position: absolute;
  inset-inline: 0;
  bottom: var(--reader-bar-height);
  box-sizing: border-box;
  width: min(100%, var(--width-measure));
  max-height: calc(100% - var(--reader-bar-height) - var(--space-12));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-3) 0;
  background: var(--color-surface);
  border: var(--width-border) solid var(--color-border);
  border-bottom: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: var(--shadow-2);
}
.guide-menu-head {
  display: grid;
  grid-template-columns: var(--size-target) minmax(0, 1fr) var(--size-target);
  align-items: center;
  margin-bottom: var(--space-2);
}
.guide-menu-head h2 {
  grid-column: 2;
  margin: 0;
  text-align: center;
  font-size: var(--step-0);
  line-height: var(--line-height-0);
  overflow-wrap: anywhere;
}
#guide-menu-slot {
  overflow: auto;
}
#guide-menu .reader-guide {
  max-height: calc(100vh - var(--reader-bar-height) - var(--space-12) - var(--size-target) - var(--space-8));
}
#guide-menu .guide-settings-row {
  display: block;
}
/* The menu has no headings: its title names the chapter, and each row says
   what it covers, as "Outline for all of Romans" does; beside the text the
   headings say it, and the row is just "Outline". */
.guide-menu-only,
#guide-menu :is(.guide-heading, .guide-wide-only) {
  display: none;
}
#guide-menu .guide-menu-only {
  display: inline;
}
#guide-menu .guide-row ~ .guide-row {
  border-top: var(--width-border) solid var(--color-border);
}
#guide-settings {
  padding-bottom: var(--space-4);
  padding-inline-start: var(--guide-indent);
}
#guide-settings .segmented:not([hidden]) {
  display: flex;
}
#guide-settings .segmented button {
  flex: 1;
}
.guide-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 25;
  grid-template-columns: var(--size-target) minmax(0, 1fr) var(--size-target);
  align-items: center;
  gap: var(--space-1);
  min-height: var(--reader-bar-height);
  padding: var(--space-1) var(--space-2) calc(var(--space-1) + var(--inset-safe-bottom));
  border-top: var(--width-border) solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
}
.guide-bar .chapter-arrow {
  justify-self: center;
}
.guide-bar-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-width: 0;
  min-height: var(--size-target);
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  font-weight: var(--weight-bold);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.guide-bar-button[aria-expanded='true'] {
  background: var(--color-hover);
}
.guide-grab {
  width: var(--size-guide-grab);
  height: var(--height-guide-grab);
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
}
html:has(#guide-menu[open]) {
  overflow: hidden;
}
/* Every other page, such as a Topic's, keeps the same room at either end, where
   a change of Text size would otherwise leave it too short to scroll the line
   being read back to its height (reading-position.js). */
#topic-passages {
  padding-block-start: var(--reader-keep-before, 0);
}
body:not(:has(#guide-bar)) {
  padding-bottom: var(--reader-keep-after, 0);
}
body:has(#guide-bar) {
  --reader-keep-before: 0;
  --reader-keep-after: 0;
  --reader-bar-height: calc(var(--size-target) + var(--space-1) + var(--space-1) + var(--inset-safe-bottom));
  padding-bottom: var(--reader-keep-after);
}
@media (width < 60rem) and (scripting: enabled) {
  body:has(#guide-bar) {
    padding-bottom: calc(var(--reader-bar-height) + var(--reader-keep-after));
  }
  .guide-bar {
    display: grid;
  }
  .chapter-heading .chapter-arrow,
  .chapter-pager {
    display: none;
  }
}
@media (width >= 60rem) {
  .chapter-page:has(.reader-guide) {
    max-width: calc(var(--width-measure) + var(--space-12) + var(--width-sidebar));
  }
  .reader-columns {
    display: grid;
    direction: ltr;
    grid-template-columns: minmax(0, var(--width-measure)) var(--width-sidebar);
    gap: var(--space-12);
    align-items: start;
  }
  [dir='rtl'] .reader-columns > * {
    direction: rtl;
  }
  #guide-home {
    display: block;
    position: sticky;
    top: var(--space-4);
    border-left: var(--width-border) solid var(--color-border);
  }
  /* Its rule runs on up through the page's space above it to the reader
     navigation's, over Book and Chapter. */
  #guide-home::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: calc(0px - var(--width-border));
    height: var(--space-6);
    border-left: var(--width-border) solid var(--color-border);
  }
  /* The sidebar scrolls by wheel, trackpad or keyboard, with no scroll bar of
     its own beside the Guide. */
  #guide-home .reader-guide {
    max-height: calc(100vh - var(--space-4) - var(--space-4));
    scrollbar-width: none;
  }
  #guide-home .reader-guide::-webkit-scrollbar {
    display: none;
  }
}
@media (scripting: none) {
  #guide-home {
    display: block;
  }
}

/* The verse panel is non-modal: Scripture and the Guide remain available. */
.verse-chosen {
  background: var(--color-highlight);
  border-radius: var(--radius-control);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.verse-number[role='button'] {
  cursor: pointer;
}
/* The words a Bible search matched stay marked in the verse whose panel is
   open (#516), a shade deeper than its tint. */
.bible-search-result .verse-chosen mark {
  background: var(--color-border-strong);
}
.verse-panel {
  position: fixed;
  bottom: 0;
  z-index: 24;
  max-width: var(--width-measure);
  height: var(--height-verse-panel);
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--space-3);
  border: var(--width-border) solid var(--color-border);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-1);
}
.verse-panel-head {
  display: grid;
  grid-template-columns: var(--size-target) minmax(0, 1fr) var(--size-target);
  align-items: center;
  margin-bottom: var(--space-2);
}
.verse-panel-head h2 {
  grid-column: 2;
  margin: 0;
  font-size: var(--step-0);
  line-height: var(--line-height-0);
  text-align: center;
  overflow-wrap: anywhere;
}
.verse-panel ol {
  list-style: none;
  padding: 0;
}
.verse-panel li + li {
  margin-block-start: var(--space-3);
}
/* Its parts' headings, such as Cross-references, in small bold words flush with
   what is under them, a row's chevron after its name; and the Bible text they
   quote, the References over it and the translator's notes, a step smaller than
   the chapter's, at that step's line height. */
.verse-panel .section-heading {
  font-size: var(--step--1);
  line-height: var(--line-height-tight);
}
.verse-panel .accordion-button {
  min-height: var(--size-target-min);
  padding: var(--space-2) 0;
  font-size: var(--step--1);
  line-height: var(--line-height-tight);
}
.verse-panel .accordion-name {
  flex: 0 1 auto;
}
.verse-panel .accordion-chevron {
  width: auto;
  font-size: var(--step-0);
}
.panel-fold ol {
  margin: 0;
}
/* Its links are in the words' colour, underlined, never the Theme's, and stay
   so under the pointer; the map's credit keeps its own grey. */
.verse-panel a:not(.place-map-credit a) {
  color: var(--color-text);
  text-decoration-line: underline;
}
/* An aligned Translation's Dotted words, while their verse's panel is open:
   underlined with dots in the Theme's colour, solid where pointed at or tapped,
   and nothing more. */
.word.dotted {
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: var(--width-focus);
  text-underline-offset: var(--space-x6);
  text-decoration-skip-ink: none;
}
.word.dotted.chosen {
  text-decoration-style: solid;
}
@media (hover: hover) {
  .word.dotted:hover {
    text-decoration-style: solid;
  }
}
.word.dotted:focus-visible {
  outline: var(--width-focus) solid var(--color-accent);
  outline-offset: var(--width-border);
  border-radius: var(--radius-control);
}
/* The keyboard's way into the verse's Dotted words, seen only when it has the
   focus. */
.verse-panel-to-words:not(:focus-visible) {
  position: absolute;
  width: var(--size-unseen);
  height: var(--size-unseen);
  overflow: hidden;
  clip-path: inset(100%);
  white-space: nowrap;
}
.verse-panel-to-words {
  display: block;
  min-height: var(--size-target-min);
  margin-block-end: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border: var(--width-border) solid var(--color-accent);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-accent);
  font: inherit;
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  cursor: pointer;
}
/* What a tapped word shows, above the notes and cross-references: the English
   tapped as its heading, as the panel's other parts are headed, then a label
   beside each thing, on one baseline. */
.verse-panel-word:empty {
  display: none;
}
.verse-panel-word {
  margin-block-end: var(--space-3);
  padding-block-end: var(--space-3);
  border-bottom: var(--width-border) solid var(--color-border);
}
.word-rows {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  align-items: baseline;
  margin: 0;
}
/* A phrase that is several things, as a KJV tag may name two Original words,
   shows each one's rows after the other's. */
.word-rows + .word-rows {
  margin-block-start: var(--space-3);
}
.word-row {
  display: contents;
}
.word-rows dt {
  color: var(--color-muted);
  font-size: var(--step--2);
  line-height: var(--line-height--2);
  text-transform: uppercase;
}
/* A row of several lines, as the Verses row's for each Meaning or the Read
   row's for each article, has each under the one before, beside its label. */
.word-rows dd {
  grid-column: 2;
  margin: 0;
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  overflow-wrap: anywhere;
}
/* A tap of two or more Meanings has a rule between one Meaning's rows and the
   next's (#806's approved tap), across both columns. */
.word-rows > .rule {
  grid-column: 1 / -1;
  margin-block: var(--space-1);
}
/* The Read and Verses rows (#743's approved row): a line for each article or
   Verse list, its link, which wraps within its column, never under its label,
   and is never under a control's least size. */
.word-read dd,
.word-verses dd {
  display: flex;
  gap: var(--space-1);
  align-items: baseline;
  overflow-wrap: normal;
}
.word-read a,
.word-verses a {
  min-width: var(--size-target-min);
  min-height: var(--size-target-min);
  overflow-wrap: anywhere;
}
/* A tapped place's Map row (#332's approved map): its label above, and the map
   as wide as the panel, at a share card's shape, with the line under it. */
.word-map > dt,
.word-map > dd {
  grid-column: 1 / -1;
}
.word-map > dd > * + * {
  margin-block-start: var(--space-1);
}
.place-map {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio-photo);
  border: var(--width-border) solid var(--color-border);
  border-radius: var(--radius-inset);
  background: var(--color-accent-soft);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.place-map.dragging {
  cursor: grabbing;
}
.place-map:focus-visible {
  outline: var(--width-focus) solid var(--color-accent);
  outline-offset: var(--width-focus);
}
.place-map.satellite {
  background: var(--color-text);
}
.place-map-drawn,
.place-map-tiles,
.place-map-marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.place-map-tiles,
.place-map.satellite .place-map-drawn {
  display: none;
}
/* The pictures take no pointer, as the marks don't: a drag that starts on one
   moves the map, rather than the browser picking the picture up, and a long
   press opens no picture's menu. */
.place-map.satellite .place-map-tiles {
  display: block;
  pointer-events: none;
}
.place-map-tiles img {
  position: absolute;
  max-width: none;
}
.place-map-marks {
  z-index: 2;
  pointer-events: none;
}
/* The pin in the Theme's colour, and the names: the place's in bold, other
   towns' beside their dots, the waters' in italic; white over the pictures. */
.place-map-pin {
  position: absolute;
  z-index: 1;
  width: var(--size-target-min);
  height: var(--height-pin);
  transform: translate(var(--shift-half), var(--shift-whole));
}
.place-map-pin svg {
  display: block;
  width: 100%;
  height: 100%;
}
.place-map-pin path {
  fill: var(--color-accent);
  stroke: var(--color-bg);
  stroke-width: var(--width-focus);
}
.place-map-pin circle {
  fill: var(--color-bg);
}
.place-map-dot {
  position: absolute;
  width: var(--space-1);
  height: var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-text);
  transform: translate(var(--shift-half), var(--shift-half));
}
.place-map-name {
  position: absolute;
  padding-inline-start: var(--space-2);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: var(--step--2);
  line-height: var(--line-height--2);
  white-space: nowrap;
  text-shadow: var(--shadow-text);
  transform: translateY(var(--shift-half));
}
.place-map-name.place-map-here {
  font-weight: var(--weight-bold);
}
.place-map-name.place-map-left {
  padding-inline: 0 var(--space-2);
  transform: translate(var(--shift-whole), var(--shift-half));
}
.place-map-name.place-map-water {
  padding: 0;
  color: var(--color-muted);
  font-style: italic;
  transform: translate(var(--shift-half), var(--shift-half));
}
.place-map.satellite .place-map-name {
  color: var(--color-on-photo);
  text-shadow: var(--shadow-text), var(--shadow-text), var(--shadow-text);
}
.place-map.satellite .place-map-dot {
  background: var(--color-on-photo);
  box-shadow: var(--shadow-text);
}
/* The controls, each a chip's size: + and − at the top left, back to the place
   at the bottom left, and Map or Satellite at the top right. */
.place-map-zoom,
.place-map-home,
.place-map-layers {
  position: absolute;
  z-index: 3;
  box-shadow: var(--shadow-1);
}
.place-map-zoom {
  top: var(--space-2);
  left: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--width-border);
  overflow: hidden;
  border: var(--width-border) solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-border);
}
.place-map-zoom button,
.place-map-home {
  display: grid;
  place-items: center;
  width: var(--size-chip);
  height: var(--size-chip);
  padding: 0;
  border: 0;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}
.place-map-home {
  bottom: var(--space-2);
  left: var(--space-2);
  border: var(--width-border) solid var(--color-border);
  border-radius: var(--radius-control);
}
.place-map-zoom svg,
.place-map-home svg {
  width: var(--step-0);
  height: var(--step-0);
}
.place-map-layers {
  top: var(--space-2);
  right: var(--space-2);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
}
.place-map-layers button {
  min-height: var(--size-chip);
}
@media (hover: hover) {
  .place-map-zoom button:hover,
  .place-map-home:hover {
    background: var(--color-hover);
  }
}
.place-map-zoom button:focus-visible,
.place-map-home:focus-visible,
.place-map-layers button:focus-visible {
  outline: var(--width-focus) solid var(--color-accent);
  outline-offset: var(--offset-focus-inside);
}
/* The pictures' credit, in the corner while they show; Credits gives their
   licence. */
.place-map-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: none;
  margin: 0;
  padding: 0 var(--space-1);
  border-top-left-radius: var(--radius-inset);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: var(--step--2);
  line-height: var(--line-height--2);
}
.place-map-credit a {
  color: inherit;
}
.place-map.satellite .place-map-credit {
  display: block;
}
/* Said for a moment when the wheel scrolls the page past the map. */
.place-map-hint {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  margin: 0;
  padding: var(--space-2);
  background: var(--color-photo-scrim);
  color: var(--color-on-photo);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  text-align: center;
  pointer-events: none;
}
.place-map-hint[hidden] {
  display: none;
}
.place-map-where {
  margin: 0;
}
/* A verse's word list, where its Translation has no Word alignment: a line for
   each word, its label in the words' colour, regular and underlined, with any
   mark small and muted after it and its first other gloss muted beside it, no
   rules between the lines; each opens the rows a tap shows under it. */
.verse-panel .word-lines li + li {
  margin-block-start: 0;
}
/* A Matched Translation's Other words say first, above their lines, why each
   is another Translation's word. */
.word-list > .note {
  margin: 0 0 var(--space-2);
}
.word-line {
  display: grid;
  grid-template-columns: fit-content(100%) minmax(0, 1fr);
  gap: var(--space-3);
  align-items: baseline;
  width: 100%;
  min-height: var(--size-target-min);
  padding: var(--space-1) 0;
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: var(--step--1);
  line-height: var(--line-height--1);
  text-align: start;
  cursor: pointer;
}
@media (hover: hover) {
  .word-line:hover {
    background: var(--color-hover);
  }
}
.word-line-label {
  color: var(--color-text);
  font-weight: var(--weight-regular);
  overflow-wrap: anywhere;
}
.word-line-word {
  text-decoration-line: underline;
}
.word-line-from {
  color: var(--color-muted);
  font-size: var(--step--2);
  font-weight: var(--weight-regular);
  line-height: var(--line-height--2);
}
.word-line-gist {
  overflow: hidden;
  color: var(--color-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.word-line-open {
  padding: var(--space-2) 0 var(--space-3);
}
.verse-panel :is(.scripture, .cross-reference-link, .cross-reference-range, .cross-reference-absent),
#verse-panel-notes li {
  font-size: var(--step--1);
  line-height: var(--line-height--1);
}
.verse-panel .scripture sup {
  font-size: var(--step--2);
  line-height: 0;
}
/* The text column a page hands the Verse panel (verse-panel.js) is a
   .reader-text: on a phone, the panel holds it above itself while it is open. */
.reader-text {
  scroll-padding-top: var(--space-1);
}
html.reader-verse-open {
  overflow: hidden;
}
.reader-verse-open .reader-text {
  position: fixed;
  top: 0;
  z-index: 23;
  padding-block-start: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-bg);
}
/* Phones and tablets: as wide as the text's measure at most, centred, as the
   Guide's menu is. */
@media (width < 60rem) {
  .verse-panel {
    inset-inline: 0;
    box-sizing: border-box;
    width: min(100%, var(--width-measure));
    height: auto;
    margin-inline: auto;
  }
}
.passage-source:lang(ar) {
  direction: rtl;
}

/* The Chronological Bible's contents page (#758): its title, the
   Translation's line and Continue centred over the time line (.timeline),
   Continue's line under its button, muted. */
.chronological-contents-header {
  margin-block: var(--space-6) var(--space-8);
  text-align: center;
}

.chronological-contents-title {
  margin: 0;
}

.chronological-continue {
  margin: var(--space-4) 0 0;
}

.chronological-continue-button {
  min-height: var(--size-target);
  overflow-wrap: anywhere;
}

.chronological-continue-line {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
}

/* A Chronological page (#754): like a chapter's page, at the reading width,
   its breadcrumb and its title centred, the headings it starts with over the
   title, muted, and the date in force under it. A long title is set a step
   smaller. Its later headings stand well apart from the verses before them,
   each with its date; each run of verses has its Reference over it, small,
   in the UI's face. Previous and Next are at its foot (.pager). */
.chronological-trail {
  margin-block: var(--space-6) var(--space-3);
}

.chronological-trail ol {
  justify-content: center;
}

.chronological-header {
  margin-block-end: var(--space-8);
  text-align: center;
}

.chronological-opening {
  display: block;
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: var(--step-1);
  font-weight: var(--weight-medium);
  line-height: var(--line-height-1);
  text-wrap: balance;
}

.chronological-title {
  margin: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.chronological-title.chronological-long {
  font-size: var(--step-1);
  line-height: var(--line-height-1);
}

.chronological-date {
  margin: var(--space-1) 0 0;
}

.chronological-heading {
  margin: var(--space-12) 0 var(--space-2);
  overflow-wrap: anywhere;
}

.chronological-heading-date {
  white-space: nowrap;
}

.chronological-run {
  margin-block-start: var(--space-6);
}

.chronological-reference {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  line-height: var(--line-height--1);
}

.chronological-reference a {
  font-weight: var(--weight-medium);
}

/* An Event of the Gospels read in one column (#755): under its heading, each
   Gospel that tells it, under its name and its verses, small, a link at least
   a target wide; then its Rows in turn, a sub-heading, styled as the page's
   later headings, over the first of its verses under it. */
.chronological-gospel {
  margin-block-start: var(--space-6);
}

.chronological-gospel-head {
  margin: 0;
  font-family: var(--font-ui);
}

.chronological-gospel-name {
  font-weight: var(--weight-bold);
}

.chronological-gospel-head a {
  justify-content: center;
  min-width: var(--size-target-min);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  line-height: var(--line-height--1);
}

.chronological-subheading {
  margin: var(--space-6) 0 var(--space-2);
  overflow-wrap: anywhere;
}

/* The Harmony in columns (#757). Below 60rem, or where the visitor reads the
   Gospels in one column (the root's data-gospel-columns, kept in hs-gospel-columns), each
   Event reads in one column, as above, and the page is the reading width;
   the rails, the sub-headings that span their Rows and the switch are
   hidden. From 60rem each Event stands on its grid (chronologicalEventView):
   a column for each Gospel, Matthew, Mark, Luke and John, each no wider than
   the reading width, and a rail for a Gospel that tells nothing of it, all
   from the left edge; each Gospel a subgrid of the Event's rows, so that its
   cells sit level with the others', a cell blank where it tells nothing in a
   Row. Its heading and each Row's sub-heading span the columns; each
   Gospel's own copy of a sub-heading is for a screen reader alone, but one
   with a full wording behind it (#763), whose spanning copy a tap opens,
   shows where a keyboard reaches it. An Event
   whose columns would be too narrow (chronological.js) drops its rails
   (data-rails="none"), or else reads in one column (data-gave-way), at the
   reading width; the page is that width too where every Event does
   (data-one-column). */
.chronological-rail,
.chronological-row-heading,
.chronological-columns {
  display: none;
}

@media (width >= 60rem) {
  :root:not([data-gospel-columns='one']) .chronological-harmony:not([data-one-column]) {
    max-width: var(--width-page);
  }

  /* Over a wide page, the title and what stands over it keep the reading
     width, centred; the switch stands beside the Translation line, at the
     right, and under it where the page is the reading width. */
  .chronological-harmony :is(.chronological-trail, .chronological-header > :not(.chronological-translation)) {
    max-width: var(--width-measure);
    margin-inline: auto;
  }

  .chronological-translation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-2) var(--space-4);
    align-items: start;
  }

  .chronological-translation .topic-translation {
    grid-column: 2;
  }

  .chronological-columns {
    display: grid;
    grid-column: 3;
    justify-items: end;
    gap: var(--space-1);
  }

  .chronological-columns-line {
    margin: 0;
    text-align: end;
  }

  :root[data-gospel-columns='one'] .chronological-translation,
  .chronological-harmony[data-one-column] .chronological-translation {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  :root[data-gospel-columns='one'] .chronological-translation > *,
  .chronological-harmony[data-one-column] .chronological-translation > * {
    grid-column: 1;
    justify-items: center;
  }

  :root[data-gospel-columns='one'] .chronological-columns-line,
  .chronological-harmony[data-one-column] .chronological-columns-line {
    text-align: center;
  }

  /* The headings between Events, an Event that reads in one column, and the
     notes at the foot keep the reading width on a wide page. */
  .chronological-harmony :is(.chronological-heading, .note-heading, .chronological-event, .chapter-notes) {
    max-width: var(--width-measure);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) {
    --chronological-matthew: minmax(0, var(--width-measure));
    --chronological-mark: minmax(0, var(--width-measure));
    --chronological-luke: minmax(0, var(--width-measure));
    --chronological-john: minmax(0, var(--width-measure));

    display: grid;
    grid-template-columns: var(--chronological-matthew) var(--chronological-mark) var(--chronological-luke) var(--chronological-john);
    column-gap: var(--space-4);
    justify-content: start;
    max-width: none;
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]):not([data-tells~='matthew']) {
    --chronological-matthew: var(--size-target);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]):not([data-tells~='mark']) {
    --chronological-mark: var(--size-target);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]):not([data-tells~='luke']) {
    --chronological-luke: var(--size-target);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]):not([data-tells~='john']) {
    --chronological-john: var(--size-target);
  }

  /* Without its rails, the Gospels that tell it share the whole width. */
  :root:not([data-gospel-columns='one']) .chronological-event[data-rails='none'][data-count='1']:not([data-gave-way]) {
    grid-template-columns: minmax(0, var(--width-measure));
  }

  :root:not([data-gospel-columns='one']) .chronological-event[data-rails='none'][data-count='2']:not([data-gave-way]) {
    grid-template-columns: repeat(2, minmax(0, var(--width-measure)));
  }

  :root:not([data-gospel-columns='one']) .chronological-event[data-rails='none'][data-count='3']:not([data-gave-way]) {
    grid-template-columns: repeat(3, minmax(0, var(--width-measure)));
  }

  :root:not([data-gospel-columns='one']) .chronological-event[data-rails='none'][data-count='4']:not([data-gave-way]) {
    grid-template-columns: repeat(4, minmax(0, var(--width-measure)));
  }

  /* Each Gospel, and each rail, takes its column itself: a Row's sub-heading
     spans the row it shares with every Gospel's subgrid, so none would be
     placed beside another by the grid. Matthew's is the first, John's the
     last; without the rails, each Gospel that tells it in turn. */
  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) > [data-gospel='matthew'] {
    grid-column: 1;
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) > [data-gospel='mark'] {
    grid-column: 2;
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) > [data-gospel='luke'] {
    grid-column: 3;
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) > [data-gospel='john'] {
    grid-column: 4;
  }

  :root:not([data-gospel-columns='one']) .chronological-event[data-rails='none']:not([data-gave-way]) > .chronological-gospel:nth-of-type(1) {
    grid-column: 1;
  }

  :root:not([data-gospel-columns='one']) .chronological-event[data-rails='none']:not([data-gave-way]) > .chronological-gospel:nth-of-type(2) {
    grid-column: 2;
  }

  :root:not([data-gospel-columns='one']) .chronological-event[data-rails='none']:not([data-gave-way]) > .chronological-gospel:nth-of-type(3) {
    grid-column: 3;
  }

  :root:not([data-gospel-columns='one']) .chronological-event[data-rails='none']:not([data-gave-way]) > .chronological-gospel:nth-of-type(4) {
    grid-column: 4;
  }

  /* An Event's heading spans its columns, as wide as they are together. */
  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) > :is(.chronological-heading, .note-heading:not(.chronological-row-heading)) {
    grid-column: 1 / -1;
    grid-row: 1;
    max-width: none;
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) > .chronological-row-heading {
    position: relative;
    z-index: 1;
    display: block;
    grid-column: 1 / -1;
    margin: 0;
    max-width: none;
    padding: var(--space-6) 0 var(--space-2);
    background: var(--color-bg);
    overflow-wrap: anywhere;
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]):not([data-rails='none']) > .chronological-rail {
    display: flex;
    grid-row: 2 / -1;
    margin-block-start: var(--space-6);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) > .chronological-gospel {
    display: grid;
    grid-row: 2 / -1;
    grid-template-rows: subgrid;
    align-content: start;
    min-width: 0;
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) .chronological-gospel-head {
    grid-row: 1;
    align-self: end;
    padding-block-end: var(--space-1);
    border-block-end: var(--width-focus) solid var(--color-text);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) .chronological-gospel-head a {
    color: var(--color-muted);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) .chronological-cell {
    min-width: 0;
    padding-block: var(--space-2);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) .chronological-cell + .chronological-cell {
    border-block-start: var(--width-border) solid var(--color-border);
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) .chronological-cell .scripture {
    text-align: start;
  }

  :root:not([data-gospel-columns='one']) .chronological-event:not([data-gave-way]) .chronological-cell > :is(.chronological-subheading, .chronological-subheading-note:not(:focus-within)) {
    position: absolute;
    width: var(--size-unseen);
    height: var(--size-unseen);
    margin: 0;
    overflow: hidden;
    clip-path: inset(100%);
    white-space: nowrap;
  }
}
