$border-color: #CCC
$color: #333
$active-background: #EEF
$heading-color: #666
$background-color: white
$code-background-color: #F9F9F9
$code-border-color: #DDD
$code-color: #888

$caption-highlight-code-border-color: #BBC
$caption-highlight-code-background-color: #E3E3FF
$caption-highlight-code-color: #666


/* borders and spacing

$border-style: 1px solid $border-color
#table-of-contents
  border-right: $border-style
#main-text
  border-right: $border-style
#navbar
  border-bottom: $border-style


/* document fonts

body
  background-color: $background-color
  font-family: 'Helvetica Neue', Helvetica, sans-serif
  font-size: 14px
  line-height: 1.5em
  letter-spacing: 0.05em
  color: $color
blockquote 
  border-left: 5px solid #888
  margin-left: 0
  padding-left: 2em
  color: #888 
a, a:link, a:visited
  text-decoration: none
  color: #99B
h1, h2, h3, h3, h4, h5, h6, h7
  font-size: 14px
  text-transform: uppercase
  color: $heading-color
  margin: 0
  margin-top: 4em
  margin-bottom: 0em
  font-weight: normal
  letter-spacing: 0.15em
  line-height: 1.2em
h1
  font-size: 24px
  margin-top: 120px
  margin-bottom: 10px
h2
  font-size: 16px
code 
  padding: 1px 4px 
pre 
  padding: 5px 20px 
code, pre 
  overflow: auto
  background-color: $code-background-color
  border: 1px solid $code-border-color
  border-radius: 5px
  color: $code-color
  font-size: 12px 
  line-height: 1.5em 
pre code
  border: 0px
.active
  background-color: $active-background
.fig-in-text 
  border-top: $border-style
  border-bottom: $border-style

@mixin caption
  font-size: 12px
  line-height: 1.2em
  code, pre
    font-size: 12px
    text-transform: none
  img
    padding-top: 10px

@mixin caption-highlight
  background-color: $active-background
  color: $color
  pre, code 
    border: 1px solid $caption-highlight-code-border-color
    background-color: $caption-highlight-code-background-color
    color: $caption-highlight-code-color


/* div font overrides

#navbar
  color: $heading-color
#table-of-contents
  font-size: 12px
  font-weight: normal
  line-height: 1.5em
  color: $heading-color
  a
    text-decoration: none
    &:link, &:visited
      color: $heading-color
  .toc 
    h1, h2
      text-transform: uppercase
      margin-top: 4px
    h3, h4, h5, h6, h7
      font-style: italic

#main-text
  a.figlink.active 
    padding: 4px 0px
    &:link, &:visited
      color: #99C
      text-decoration: underline
    margin-top: 6em
    text-align: right
  .fig-in-text
    @include caption
    @include caption-highlight

#figure-list 
  .fig-in-figlist
    @include caption
    &.active
      @include caption-highlight
  .reference
    font-size: 14px
    line-height: 1.2em
    margin-bottom: 0.4em
    text-indent: -1em
    margin-left: 1em


@media (max-width: 480px)
  h1
    font-size: 20px
    margin-top: 60px


