@font-face {
  font-family: 'Sweden Sans';
  font-weight: bold;
  src: url(/static/fonts/sweden-sans/swedensansbold-webfont.woff) format('woff');
}
@font-face {
  font-family: 'Sweden Sans';
  font-weight: normal;
  src: url(/static/fonts/sweden-sans/swedensans-webfont.woff) format('woff');
}

/* Base formatting */
body {
  font: normal 24px 'Sweden Sans', serif;
  line-height: 150%;
  width: 100%;
  height: 100%;
  text-align: inherit;
  position: relative;
}
nav, html, body, input,
ul, ol, li, dl,
form,
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  border-style: none;
}
a, h1, h2, h3, h4, h5, h6 {
  text-decoration: none;
  page-break-after: avoid;
  margin-bottom: 0;
  font-weight: inherit;
}
a:hover {
  text-decoration: underline;
}
h1, h2 { font-size: 2.7em; font-weight: bold; }
h3 { font-size: 1.7em; font-weight: bold; }
h4 { font-size: 1.7em; font-weight: bold; }
p {
  margin-bottom: 0;
}
pre {
  white-space: pre-wrap;
}
pre, blockquote, .line-block /* rst class */ {
  padding: 0.5em;
  margin: 1em;
}
blockquote > p {
  margin: 0;
}

/* Main content styles */
main {
  margin-bottom: 21px;
  margin-left: auto;
  margin-right: auto;
}
main ul, main ol {
  margin-left: 1.5em;
}

/* Tables */
col { width: auto; }
table {
  border-left: none;
  border-right: none;
  border-top: solid 2px;
  border-bottom: solid 2px;
  margin-left: auto;
  margin-right: auto;
}
td { border: none; }
table tr:first-child th, table tr:first-child td { border-bottom: solid 1px; }

/* Nav bar */
nav ul, nav .search-form {
  display: block;
  height: 21px;
  margin-left: auto;
  margin-right: auto;
}
nav li {
  display: inline-block;
}
nav ul, nav .search-form { text-align: center; }
nav li { margin: 0; }
nav {
  height: 63px;
}

/* Footer */
footer {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  text-align: center;
}

/* Root page */
#index-main .search ul {
  margin-left: 0;
  text-align: center;
}
#index-main .search li {
  display: inline;
  font-size: 16px;
}
#index-main .search {
  height: 160px;
  position: absolute;
  top: 0;
  right: 0;
}
#index-main .search h1 {
  text-align: center;
  height: 36px;
  margin-top: 16px;
  margin-bottom: 4px;
}

/* Two-column layout */
article section.column {
  width: 49%;
  margin: 0;
  padding: 0;
}
article section.column:nth-child(even) {
  float: left;
}
article section.column:nth-child(odd) {
  float: right;
}

/* Haystack search page */
.haystack-search form {
  width: 340px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.haystack-search form input[type=search] {
  display: block;
  width: 99%;
  height: 63px;
}
.haystack-search form input[type=submit] {
  height: 63px;
  width: 126px;
}
.haystack-search form > ul {
  text-align: center;
  margin: 0;
  padding: 0;
}
.haystack-search form > ul li {
  display: inline-block;
}
.haystack-search .highlighted {
  border: dashed 1px #fe57a1;
  background-color: #333;
  padding-top: 2px;
  padding-bottom: 0px;
  padding-left: 5px;
  padding-right: 5px;
}

/* Article styles */
article {
  text-align: justify;
}
article img, article video {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 80%;
}
article iframe {
  width: 100%;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
article img.wide,
article video.wide {
  max-height: none;
  max-width: none;
  width: 100%;
}

/* Mail styles */
section.message dt { float: left; width: 170px; }
section.message dd { margin-left: 170px; }
section.email-body {
  white-space: pre-wrap;
  padding: 0.5em;
  margin-top: 0.5em;
}
section.thread > ul ul {
  margin-left: 1em;
  margin-top: 0;
}
section.thread > ul {
  margin-left: 0;
}
section.thread li .date {
  margin-top: 0.25em;
  white-space: nowrap;
}

article h1, .centered-heading, section.message dl {
  border-bottom: solid 1px #666;
}
article h1, .centered-heading {
  text-align: center;
  margin-top: 0.25em;
  margin-bottom: 0.25em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}
h2.centered-heading {
  border-top: solid 1px #666;
  margin-top: 0.75em;
}

/* Search form */
nav .search-form input[type=search] {
  padding-left: 8px; /* Doesn't affect width */
  width: 264px;
}
nav .search-form input[type=submit] {
  width: 72px;
}

/* Matching colors */
a, h1, h2, h3, h4, h5, h6 {
  color: #fe57a1;
}
body {
  color: #888;
  background-color: #111;
}
nav { border-bottom: solid 1px #666; }
#index-main nav { border-bottom: none; }
footer {
  padding-top: 0.5em;
  border-top: solid 1px #666;
}
nav .search-form input, .haystack-search input {
  border: solid 1px #666;
}
nav .search-form input[type=search] {
  color: #111;
/* Show it brightly all the time.
  background-color: #888;
}
nav .search-form input[type=search]:focus {
*/
  background-color: white;
}
article iframe, article img, article video {
  background-color: #BBB;
}
.transparent {
  background-color: inherit;
}
section.email-body, pre, blockquote, .line-block /* rst class */ {
  color: #BBB;
  background-color: #333;
}
#index-main .search {
  background-color: white;
}
strong { color: white; font-weight: normal; }


p, h1, h2, h3, h4, h5, h6,
article ul, article ol, article dl {
  margin-top: 0.5em;
}

/* Respond */
#index-main { background-color: white; }
#index-main .search { left: 17px; }

@media screen {
  main { width: 98%; }
  nav .search-form, #index-main .search { width: 340px; }
  #index-main form input[type=search] {
    margin-left: 18px;
    margin-top: 6px;
    width: 240px;
  }
  #index-main form input[type=submit] { width: 63px; }
  #index-main form input { height: 63px; }
  nav { height: 95px; }
  article img, article video { max-height: 340px; }
}
@media screen and (min-width: 540px) {
  nav ul {
    display: inline-block;
  }
  nav .search-form, nav .search-form input {
    display: inline-block;
    float: left;
  }
  nav li {
    margin-top: 0.75em;
    margin-left: 0.5em;
    margin-right: 0.5em;
  }
  main { width: 90%; }
  article img, article video { max-height: 540px; }
}
@media screen and (min-width: 630px) {
  #index-main {
    background-image: url(/static/tom-pictures/2014-12-11.jpg);
    background-repeat: no-repeat;
    background-color: #888;
  }
  #index-main .search { top: 130px; }
  article img, article video { max-height: 630px; }
}
@media screen and (min-width: 720px) {
  nav .search-form {
    float: right;
  }
  nav { height: 63px; }
  nav .search-form input {
    box-sizing: border-box; /* http://stackoverflow.com/a/7543302/407226 */
    height: 63px;
  }
  nav .search-form {
    width: 200px;
  }
  nav .search-form input[type=search] {
    width: 122px; /* 354px; */
  }
  article img, article video { max-height: 720px; }
}

@media screen and (min-width: 900px) {
  nav .search-form {
    width: 330px;
  }
  nav .search-form input[type=search] {
    width: 252px; /* 354px; */
  }
}

@media print {
  body { font-size: 4em !important; font-family: serif; }
  .more-like-this, nav, footer { display: none; }
  a, p, h1, h2, h3, h4, h5 { color: black !important; }
  strong { font-weight: bold; }
  .webonly { display: none; }
  a[href]:after {
    content: " (" attr(href) ")";
  }
}
