body {
  margin: 40px;
  color: #eee;
  background: #222;
}
a[href] {
  color: #6df;
}
a:visited {
  color: #aae;
}
@media screen and (min-width: 500px) {
  body { max-width: 5.5in; }
}

/*
  BREADCRUMBS
*/

.crumbs {
  padding: 0;
  font-size: 0.8em;
}
.crumbs li {
  display: inline-block;
}
.crumbs li + li::before {
  display: inline-block;
  margin: 0 4px;
  content: '|';
  font-size: 1.2em;
  line-height: 1em;
}

/*
  TYPOGRAPHY
*/

caps, play-script ch {
  font-size: 0.9em;
  text-transform: uppercase;
}

/*
  POETRY FORMATTING
*/

poem {
  counter-reset: footnote;
}
poem, poem-author {
  display: inline-block;
  white-space: pre;
  max-width: 100%;
}
poem-author {
  width: 100%;
}
poem.center-titles poem-heading {
  width: 100%;
  text-align: center;
}
poem[w='5'].center-titles poem-heading { width: 50%; }
poem[w='6'].center-titles poem-heading { width: 60%; }
poem[w='7'].center-titles poem-heading { width: 80%; }
poem[w='8'].center-titles poem-heading { width: 80%; }
poem[w='9'].center-titles poem-heading { width: 90%; }
l, poem-heading {
  display: inline-block;
  padding-right: 2em;
}
l {
  line-height: 1.3em;
}
l > i {
  word-spacing: 4px;
}
[i='-9'] { text-indent: -9em; }
[i='-8'] { text-indent: -8em; }
[i='-7'] { text-indent: -7em; }
[i='-6'] { text-indent: -6em; }
[i='-5'] { text-indent: -5em; }
[i='-4'] { text-indent: -4em; }
[i='-3'] { text-indent: -3em; }
[i='-2'] { text-indent: -2em; }
[i='-1'] { text-indent: -1em; }
[i='00'] { text-indent: 0em; }
[i='005'] { text-indent: 0.5em; }
[i='01'] { text-indent: 1em; }
[i='015'] { text-indent: 1.5em; }
[i='02'] { text-indent: 2em; }
[i='03'] { text-indent: 3em; }
[i='04'] { text-indent: 4em; }
[i='05'] { text-indent: 5em; }
[i='06'] { text-indent: 6em; }
[i='07'] { text-indent: 7em; }
[i='08'] { text-indent: 8em; }
[i='09'] { text-indent: 9em; }
[i='10'] { text-indent: 10em; }
[i='11'] { text-indent: 11em; }
[i='12'] { text-indent: 12em; }
[i='13'] { text-indent: 13em; }
[i='14'] { text-indent: 14em; }
[i='15'] { text-indent: 15em; }
[i='16'] { text-indent: 16em; }
[i='17'] { text-indent: 17em; }
[i='18'] { text-indent: 18em; }
[i='19'] { text-indent: 19em; }
[i='20'] { text-indent: 20em; }

/*
  SCRIPT FORMATTING
*/

play-script {
  counter-reset: footnote;
}
play-script,
play-bit-heading,
play-script direction {
  display: block;
}
play-bit-heading, script-author {
  margin: 1em 0;
}
play-script direction {
  margin-top: .5em;
  margin-bottom: .5em;
}
play-script direction::before { content: '[' }
play-script direction::after { content: ']' }
play-script direction[b]::before { content: '' }
play-script direction[b]::after { content: '' }
play-script ch::after {
  content: ':';
}
/* 'c' attribute indicates colon is already present */
play-script ch[c]::after {
  content: ''
}
play-script > line {
  display: block;
  text-indent: -2em;
  padding-left: 2em;
}
play-script direction {
  text-indent: 0;
  font-size: 0.9em;
}
play-script > direction {
  text-indent: 2em;
}
play-script line + line {
  margin-top: .3em;
}
script-author {
  display: block;
}

/*
  SCRIPTS WRITTEN IN VERSE (SHAKESPEARE)
*/

play-script[verse] > line,
play-script[verse] > ch,
play-script[verse] > line > direction {
  display: inline-block;
  white-space: pre;
  max-width: 100%;
  text-indent: 0;
  padding-left: 0;
}
play-script[verse] > line {
  display: block;
}
play-script[verse] l,
play-script[verse] > line > direction {
  padding-left: 2em;
}

/*
  SCRIPT / POETRY FORMATTING
*/

script-author, poem-author {
  text-align: right;
  position: relative;
  right: 2em;
}

poem-heading.title,
play-bit-heading {
  font-size: 1.2em;
}
/* dynamically generate footnote numbers: */
l > sup > a::before {
  counter-increment: footnote;
  content: counter(footnote);
}

/*
  JOURNAL FORMATTING
*/

.journal-heading {
  font-size: 1.5em;
}

/*
  PLANNER FORMATTING
*/

pre.planning {
  font-size: 1.3em;
}