:root {
  --a-deep-background-color: #dbdbdb; /*#d0d0d0;*/
  --a-content-background-color: #ffffff;
  --a-content-border-color: #c0c0c0;
  --a-font-color: #000000;
  --a-divider-color: #808080;

  --a-max-width: 880px;

  --a-menu-background-color:#e8e8e8;
  --a-menu-border-color: #c0c0c0;
  --a-menu-font-color: #404040;
  --a-menu-font-select: #ffffff;
  --a-menu-background-select: #c0c0c0;
  --a-menu-background-subselect: #d8d8d8;
}

html {
  background-color: var(--a-deep-background-color);
  background-image: url(/pics/clouds.jpg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  height: 100%;
}
body {
  background-color: var(--a-content-background-color);
  color: var(--a-font-color);
  font-family: Merriweather, Garamond, serif;
  /*font-size: 11pt;*/ /*0.9em;*/
  font-size: 11pt;
  font-weight: 300;
  display: flex;
  flex-direction: column;
  max-width: var(--a-max-width);
  min-height: 100%;
  border-style: solid;
  border-color: var(--a-content-border-color);
  margin: 0 auto;
}
@media (min-width: 881px) {
  html {
    overflow-y: scroll;
  }
  body {
    border-width: 0 1px 0 1px;
  }
}
@media (max-width: 880px) {
  html {
  }
  body {
    border-width: 0;
  }
}

@media (min-width: 881px) {
  .small-screen {
    display: none;
  }
  .large-screen {
  }
}
@media (max-width: 880px) {
  .small-screen {
  }
  .large-screen {
    display: none;
  }
}

section#header {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: var(--a-max-width);
}

header {
  font-family: 'IM Fell English', Garamond, serif;
  font-size: 2.2em;
  text-align: left;
  background-color: var(--a-content-background-color);
}
header a {
  display: inline-block;
  color: var(--a-font-color);
  text-decoration: none;
  padding: 0.3em 16px 0.2em 16px;
  border: 0;
}

/* Menu [b] */

@media (min-width: 881px) {
  #l-menu {
    font-size: 0.9em;
    background-color: var(--a-menu-background-color);
    width: 100%;
    max-width: var(--a-max-width);
    border-style: solid;
    border-color: var(--a-menu-border-color);
    border-width: 1px 0 1px 0;
  }

  #l-menu ul, #l-menu li {
    list-style-type: none;
    padding: 0;
    border: 0;
    margin: 0;
  }
  #l-menu ul > li {
    display: inline-block;
    position: relative;
  }

  #l-menu a {
    display: block;
    text-decoration: none;
    background-color: var(--a-menu-background-color);
    cursor: pointer;
    padding: 0.55em 12px 0.55em 12px;
    border: 0;
    /*transition-property: color,background-color;
    transition-duration: 0.2s;
    transition-timing-function: linear;
    transition-delay: 0;*/
  }
  #l-menu a.selected {
    color: var(--a-menu-font-select);
    background-color: var(--a-menu-background-select);
    cursor: default;
  }
  #l-menu a.subselected {
    color: var(--a-menu-font-color);
    background-color: var(--a-menu-background-subselect);
  }
  #l-menu a:hover {
    color: var(--a-menu-font-select);
    background-color: var(--a-menu-background-select);
  }

  #l-menu a.menu0 {
    font-weight: 700;
  }
  #l-menu a.booktitle {
    font-style: italic;
    padding-left: 16px;
    padding-right: 16px;
  }
  #l-menu a.menu1 {
    font-weight: 400;
  }
  #l-menu ul.menu2, #l-menu ul.menu3 {
    position: absolute;
    opacity: 0;
    z-index: -1;
    height: 0;
    overflow: hidden;
    /*transition-property: opacity,z-index,height;
    transition-duration: 0.2s;
    transition-timing-function: linear;
    transition-delay: 0.1s;*/
    border-style: solid;
    border-color: var(--a-menu-border-color);
  }
  #l-menu ul.menu2, #l-menu ul.menu3 {
    border-width: 1px;
  }
  #l-menu li ul.menu2 {
    top: 100%;
    left: 0;
  }
  #l-menu ul.menu2 > li, #l-menu ul.menu3 > li {
    display: inline-block;
    width: 100%;
    position: relative;
  }
  #l-menu ul.menu2 li ul.menu3 {
    top: 0;
    left: 100%;
  }
  #l-menu li:hover ul.menu2, #l-menu ul.menu2 li:hover ul.menu3 {
    opacity: 1;
    z-index: 1;
    height: auto;
    overflow: inherit;
  }
}
@media (max-width: 880px) {
  #s-menu {
    font-size: 0.9em;
    background-color: var(--a-menu-background-color);
    width: 100%;
    max-width: var(--a-max-width);
    border-style: solid;
    border-color: var(--a-menu-border-color);
    border-width: 1px 0 1px 0;
  }
  
  #s-menu ul, #s-menu li {
    list-style-type: none;
    padding: 0;
    border: 0;
    margin: 0;
  }
  #s-menu ul > li {
    display: inline-block;
    position: relative;
  }
  #s-menu div.submenu {
    display: none;
    position: absolute;
    border-width: 1px;
    border-style: solid;
    border-color: var(--a-menu-border-color);
    /*transition: opacity 0.2s linear 0.1s;*/
  }
  #s-menu div.submenu > ul > li {
    display: inline-block;
    width: 100%;
    position: relative;
  }

  #s-menu a {
    display: block;
    text-decoration: none;
    background-color: var(--a-menu-background-color);
    cursor: pointer;
    padding: 0.55em 12px 0.55em 12px;
    border: 0;
    /*transition: color,background-color 0.2s linear 0s;*/
  }
  #s-menu a.selected {
    color: var(--a-menu-font-select);
    background-color: var(--a-menu-background-select);
    cursor: default;
  }
  #s-menu a.subselected {
    color: var(--a-menu-font-color);
    background-color: var(--a-menu-background-subselect);
  }
  #s-menu a:hover {
    color: var(--a-menu-font-select);
    background-color: var(--a-menu-background-select);
  }

  #s-menu a.menu0 {
    font-weight: 700;
  }
  #s-menu a.booktitle {
    font-style: italic;
    padding-left: 12px;
    padding-right: 12px;
  }
  #s-menu a.menu1 {
    /*font-weight: 700;*/
  }
  #s-menu a.menu2 {
    padding-left: 24px;
  }
  #s-menu a.menu3 {
    padding-left: 36px;
  }
}

/* Menu [e] */

section#content {
  flex: 1 0 auto;
}
@media (min-width: 881px) {
  section#content {
    padding: 128px 0 0 0;
    margin: 0 96px 0 96px;
  }
}
@media (max-width: 880px) {
  section#content {
    padding: 128px 0 0 0;
    margin: 0 24px 0 24px;
  }
}

/* Page Title, Table & Image formatting [b] */

div.page-title {
  padding: 0 0 1.6em 0;
  border-bottom: 1px solid var(--a-divider-color);
  margin: 0 0 2em 0;
}

img.page-image {
  display: block;
  max-width: 90%;
  margin: 0 auto 1.6em auto;
}

@media (min-width: 541px) {
  div.page-table {
    display: table;
    padding: 0 24px;
    margin: 0 auto;
  }
  div.page-row {
    display: table-row;
  }
  div.page-cell {
    display: table-cell;
    text-align: center;
    vertical-align: top;
  }
  span.page-item {
    width: 120px;
  }
}
@media (max-width: 540px) {
  div.page-table {
  }
  div.page-row {
  }
  div.page-cell {
    text-align: center;
  }
  span.page-item {
    width: 90px;
  }
}
span.page-item {
  display: inline-block;
  line-height: 1.8;
  margin: 0 0 1.6em 0;
}
div.page-cell > span.page-item > img {
  max-height: 2.4em;
}

/* Page Title, Table & Image formatting [e] */

h1 {
  font-family: 'IM Fell English', Garamond, serif;
  font-size: 2em; /*1.78em;*/
  font-weight: 400;
  text-align: center;
  padding: 0;
  margin: 0;
}
h2 {
  font-family: 'IM Fell English', Garamond, serif;
  font-size: 1.27em; /*1.44em;*/
  font-weight: 400;
  text-align: center;
  padding: 0.8em 0 0 0;
  margin: 0;
}
h3 {
  font-size: 1em;
  font-weight: 700;
  text-decoration: underline;
  text-align: left;
  padding: 0;
  margin: 0 0 0.8em 0;
}

/* Generic Responsive Table formatting [b] */

@media (min-width: 881px) {
  div.div-table {
    display: table;
    padding: 0 24px;
    margin: 0 auto;
  }
  div.div-row {
    display: table-row;
  }
  div.div-cell {
    display: table-cell;
    text-align: center;
    vertical-align: top;
  }
}
@media (max-width: 880px) {
  div.div-table {
  }
  div.div-row {
  }
  div.div-cell {
    text-align: center;
  }
}

/* Generic Responsive Table formatting [e] */

p {
  line-height: 1.8;
  margin: 0 0 0.8em 0;
}

a, a:focus, a:visited {
  color: var(--a-font-color);
  text-decoration: none;
  border-bottom: 1px solid var(--a-content-border-color);
}

/* List formatting [b] */

ol, ul {
  padding: 0 0 0 0;
  margin: 0 0 0 16px;
}
li {
  line-height: 1.8;
  padding: 0 0 0 8px;
  margin: 0 0 0.8em 0;
}
ul li {
  list-style-type: circle;
}

.list-img {
  max-height: 0.8em;
}
.list-item {
  font-weight: 700;
}
.list-subitem {
  font-style: italic;
}

/* List formatting [e] */

/* Inline Table & Image formatting [b] */

img.inline-image {
  display: block;
  max-width: 90%;
  margin: 0.8em auto 1.6em auto;
}

@media (min-width: 541px) {
  div.inline-table {
    display: table;
    padding: 0 24px;
    margin: 0 auto;
  }
  div.inline-row {
    display: table-row;
  }
  div.inline-cell {
    display: table-cell;
    text-align: center;
    vertical-align: top;
  }
  span.inline-item {
    padding: 0 30px;
  }
}
@media (max-width: 540px) {
  div.inline-table {
  }
  div.inline-row {
  }
  div.inline-cell {
    text-align: center;
  }
  span.inline-item {
    padding: 0 20px;
  }
}
span.inline-item {
  display: inline-block;
  line-height: 1.8;
  margin: 0.8em 0 1.6em 0;
}
div.inline-cell > span.page-item > img {
  max-height: 2.4em;
}

/* Inline Table & Image formatting [e] */

/* Spell formatting [b] */

section.spell p {
  text-align: center;
}
p.spl-items {
}
p.spl-number {
}
p.spl-person {
  margin-bottom: 0;
}
p.spl-instruction {
  font-style: italic;
}
p.spl-spoken {
  font-weight: 700;
}
span.spl-variable {
  font-style: italic;
}
p.spl-end {
}

/* Spell formatting [e] */

.sabbatdate {
  font-size: 0.85em;
}

section#footer {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  margin: 0;
}
footer {
  background-color: var(--a-menu-background-color);
  font-size: 0.8em;
  text-align: center;
  line-height: 1.33;
  padding: 0.9em 16px 0.9em 16px;
  border-top: 1px solid var(--a-menu-border-color);
  margin: 2em 0 0 0;
}
