/* headings */

h1 {
  border: medium outset;
  padding: 0.5em;
}

h2 {
  border-left: thick solid;
  padding-left: 0.3em;
}

/* paragraph */

p.continued {
  text-indent: 0 !important;
}

/* paragraph, language-specific adjustments */

body > p:lang(ja){
  text-indent: 1em;
  margin-top: 0;
  margin-bottom: 0;
}

li > p:lang(ja),
.example p:lang(ja) {
  text-indent: 0;
}

/* examples */

.example {
  margin: 1em;
  padding: 0 1em;
  border-left: thin dashed black;
}

.example:has(> .set) {
  padding: 0 0.5em;
}

li .example {
  margin-left: 0;
}

.example .set {
  border-top: thin dotted gray;
  margin: 0;
  padding: 0.75em 0.5em;
  display: grid;
  grid-template-columns: min(48%, 40em) min(48%, 40em);
  column-gap: 1em;
}

.example .set:first-child {
  margin-top: 0;
}

.example .set:last-child {
  border-bottom: thin dotted gray;
  margin-bottom: 0;
}

.example .set .auth,
.example .set .edit {
  margin: 0;
}

.example .verse {
  text-align: center;
}

.example p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.example .set p:first-child {
  margin-top: 0;
}
.example .set p:last-child {
  margin-bottom: 0;
}

/* table of contents */

.toc .chapters > li {
  list-style-type: upper-roman;
}

/* translation in list items (Elementary Principles of Composition) */

ol li p:has(+ p:lang(ja)),
ol li p:lang(ja) {
  display: inline;
}

ol li > p:lang(ja) {
  text-indent: 0;
}

/* list of words (Words Often Misspelled) */

.words-often-misspelled {
  column-count: 3;
}

