/* === Base === */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 1rem;
  background: #000;
  color: #e0e0e0;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.85rem;
  font-family: Monaco, Menlo, "BitStream Vera Sans", Verdana, sans-serif;
  line-height: 1.6;
}

a {
  color: #cfff00;
  text-decoration: none;
  padding: 1px;
}
a:hover {
  text-decoration: underline;
}

/* === Content wrapper === */
div#content {
  background: #111;
  margin: auto;
  text-align: center;
  padding: 0 0.5rem;
}

/* === Header === */
div.title {
  margin: -1rem -1rem 0.5rem;
  font-weight: bold;
  background: #369;
  padding: 0.75rem;
  font-family: "BitStream Vera Sans", Verdana, sans-serif;
  letter-spacing: 0.1em;
  text-align: center;
}

h1 {
  background: #cfff00;
  color: #000;
  font-weight: bold;
  letter-spacing: 0.1em;
  margin: 0.5rem 0;
  padding: 0.75rem;
  font-size: 1.3rem;
}

h2, h3, h4, h5, h6 {
  font-weight: bold;
  color: #ff0;
  margin-top: 1.5rem;
  text-align: left;
}

h2 { font-size: 1.2rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

/* === Outline / Indentation === */
.outline-text-2,
.outline-3,
.outline-4,
.outline-5,
.outline-text-3,
.outline-text-4,
.outline-text-5,
.outline-3,
.outline-4,
.outline-5 {
  margin-left: 1.5rem;
  text-align: left;
}

/* === Lists & paragraphs === */
p {
  text-align: left;
}

li {
  text-align: left;
  margin-left: 1.5rem;
}

table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
  display: block;
  overflow-x: auto;
}

th, td {
  border: 1px solid #777;
  padding: 0.4rem 0.6rem;
  margin: 0;
  text-align: left;
}

th {
  background: #cfff00;
  color: #000;
}

td, th {
  vertical-align: top;
}

/* === Code / verbatim === */
code {
  color: #cfff00;
  font-weight: bold;
  background-color: #000;
}

.title code {
  color: #cfff00;
}

pre {
  border: 1pt solid #80c800;
  background-color: #000;
  padding: 0.75rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  font-family: monospace, "DejaVu Sans Mono", Inconsolata, monospace;
  font-size: 0.8rem;
  margin: 0.75rem 0;
}

.verbatim {
  margin: 0.75rem 0;
}

.verbatim pre {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.verbatim-caption {
  border: 1px solid #ccc;
  border-bottom: 0;
  background: #fff;
  display: block;
  padding: 0.25rem;
  color: #000;
}

/* === TOC === */
#table-of-contents {
  margin: 1rem 0;
  padding: 0.5rem;
}

#table-of-contents li a,
#table-of-contents li a:hover,
#table-of-contents li a:visited {
  border: 0;
  color: #9fc800;
  font-weight: bold;
}

/* === Sidebar === */
.sidebar {
  float: right;
  width: 25em;
  background-color: #a02f6c;
  color: #fff;
  margin: 2em -2em 2em 2em;
  padding: 1em;
  position: relative;
  overflow: hidden;
}

.sidebar a {
  border: 0;
  color: #3ff;
}

.sidebar a:visited { color: #3cc; }
.sidebar a:hover  { color: #ff6; }
.sidebar a:active { color: #900; }

/* === Miscellaneous === */
.fixme {
  background: #ff0;
  font-weight: bold;
  color: #000;
}

.tag {
  background-color: #add8e6;
  font-weight: normal;
  color: #000;
}

.target {
  background-color: #551a8b;
  color: #fff;
}

.todo { color: red; }
.done  { color: green; }
.timestamp { color: gray; }
.timestamp-kwd { color: #f59ea0; }

span.underline { text-decoration: underline; }

.footpara { text-align: left; }
.footdef sup { float: left; margin-right: 9px; text-align: left; }

.ra { text-align: right; }

tt { color: #00f; }

.title { text-align: center; }

p#postamble {
  margin: 1rem auto;
  text-align: left;
  color: #888;
  font-size: 0.75rem;
}

/* === Emacs org-mode colors === */
.org-info-search-highlight { background-color: #adefef; color: #000; font-weight: bold; }
.org-bbdb-company { font-style: italic; }
.org-bbdb-name { text-decoration: underline; }
.org-bold { font-weight: bold; }
.org-bold-italic { font-weight: bold; font-style: italic; }
.org-border { background-color: #000; }
.org-buffer-menu-buffer { font-weight: bold; }
.org-builtin { color: #da70d6; }
.org-button { text-decoration: underline; }
.org-c-nonbreakable-space { background-color: red; font-weight: bold; }
.org-calendar-today { text-decoration: underline; }
.org-comment { color: #b22222; }
.org-comment-delimiter { color: #b22222; }
.org-constant { color: #5f9ea0; }
.org-cursor { background-color: #000; }
.org-default { color: #000; background-color: #fff; }
.org-diary { color: red; }
.org-doc { color: #bc8f8f; }
.org-escape-glyph { color: #a52a2a; }
.org-file-name-shadow { color: #7f7f7f; }
.org-fringe { background-color: #f2f2f2; }
.org-function-name { color: #00f; }
.org-header-line { color: #333; background-color: #e5e5e5; }
.org-help-argument-name { font-style: italic; }
.org-highlight { background-color: #b4eeb4; }
.org-holiday { background-color: #ffc0cb; }
.org-info-header-node { color: #a52a2a; font-weight: bold; font-style: italic; }
.org-info-header-xref { color: #00f; text-decoration: underline; }
.org-info-menu-header { font-weight: bold; }
.org-info-menu-star { color: red; }
.org-info-node { color: #a52a2a; font-weight: bold; font-style: italic; }
.org-info-title-1 { font-weight: bold; }
.org-info-title-2 { font-weight: bold; }
.org-info-title-3 { font-weight: bold; }
.org-info-title-4 { font-weight: bold; }
.org-info-xref { color: #00f; text-decoration: underline; }
.org-isearch { color: #b0e2ff; background-color: #cd00cd; }
.org-italic { font-style: italic; }
.org-keyword { color: #a020f0; }
.org-lazy-highlight { background-color: #afeeee; }
.org-link { color: #00f; text-decoration: underline; }
.org-link-visited { color: #8b008b; text-decoration: underline; }
.org-match { background-color: #ff0; }
.org-message-cited-text { color: red; }
.org-message-header-cc { color: #191970; }
.org-message-header-name { color: #6495ed; }
.org-message-header-newsgroups { color: #00008b; font-weight: bold; font-style: italic; }
.org-message-header-other { color: #4682b4; }
.org-message-header-subject { color: navy; font-weight: bold; }
.org-message-header-to { color: #191970; font-weight: bold; }
.org-message-header-xheader { color: #00f; }
.org-message-mml { color: #228b22; }
.org-message-separator { color: #a52a2a; }
.org-minibuffer-prompt { color: #0000cd; }
.org-mm-uu-extract { color: #006400; background-color: #ffffe0; }
.org-mode-line { color: #000; background-color: #bfbfbf; }
.org-mode-line-buffer-id { font-weight: bold; }
.org-mode-line-inactive { color: #333; background-color: #e5e5e5; }
.org-mouse { background-color: #000; }
.org-next-error { background-color: #eedc82; }
.org-nobreak-space { color: #a52a2a; text-decoration: underline; }
.org-org-agenda-date { color: #00f; }
.org-org-agenda-date-weekend { color: #00f; font-weight: bold; }
.org-org-agenda-restriction-lock { background-color: #ff0; }
.org-org-agenda-structure { color: #00f; }
.org-org-archived { color: #7f7f7f; }
.org-org-code { color: #7f7f7f; }
.org-org-column { background-color: #e5e5e5; }
.org-org-column-title { background-color: #e5e5e5; font-weight: bold; text-decoration: underline; }
.org-org-date { color: #a020f0; text-decoration: underline; }
.org-org-done { color: #228b22; font-weight: bold; }
.org-org-drawer { color: #00f; }
.org-org-ellipsis { color: #b8860b; text-decoration: underline; }
.org-org-formula { color: #b22222; }
.org-org-headline-done { color: #bc8f8f; }
.org-org-hide { color: #e5e5e5; }
.org-org-latex-and-export-specials { color: #8b4513; }
.org-org-level-1 { color: #00f; }
.org-org-level-2 { color: #b8860b; }
.org-org-level-3 { color: #a020f0; }
.org-org-level-4 { color: #b22222; }
.org-org-level-5 { color: #228b22; }
.org-org-level-6 { color: #5f9ea0; }
.org-org-level-7 { color: #da70d6; }
.org-org-level-8 { color: #bc8f8f; }
.org-org-link { color: #a020f0; text-decoration: underline; }
.org-org-scheduled-previously { color: #b22222; }
.org-org-scheduled-today { color: #006400; }
.org-org-sexp-date { color: #a020f0; }
.org-org-special-keyword { color: #bc8f8f; }
.org-org-table { color: #00f; }
.org-org-tag { font-weight: bold; }
.org-org-target { text-decoration: underline; }
.org-org-time-grid { color: #b8860b; }
.org-org-todo { color: red; }
.org-org-upcoming-deadline { color: #b22222; }
.org-org-verbatim { color: #7f7f7f; text-decoration: underline; }
.org-org-warning { color: red; font-weight: bold; }
.org-outline-1 { color: #00f; }
.org-outline-2 { color: #b8860b; }
.org-outline-3 { color: #a020f0; }
.org-outline-4 { color: #b22222; }
.org-outline-5 { color: #228b22; }
.org-outline-6 { color: #5f9ea0; }
.org-outline-7 { color: #da70d6; }
.org-outline-8 { color: #bc8f8f; }
.org-preprocessor { color: #da70d6; }
.org-query-replace { color: #b0e2ff; background-color: #cd00cd; }
.org-regexp-grouping-backslash { font-weight: bold; }
.org-regexp-grouping-construct { font-weight: bold; }
.org-region { background-color: #eedc82; }
.org-scroll-bar { background-color: #bfbfbf; }
.org-secondary-selection { background-color: #ff0; }
.org-shadow { color: #7f7f7f; }
.org-show-paren-match { background-color: #40e0d0; }
.org-show-paren-mismatch { color: #fff; background-color: #a020f0; }
.org-string { color: #bc8f8f; }
.org-texinfo-heading { color: #00f; }
.org-tool-bar { color: #000; background-color: #bfbfbf; }
.org-tooltip { color: #000; background-color: #ffffe0; }
.org-trailing-whitespace { background-color: red; }
.org-type { color: #228b22; }
.org-underline { text-decoration: underline; }
.org-variable-name { color: #b8860b; }
.org-warning { color: red; font-weight: bold; }

/* ============================================
   Responsive
   ============================================ */

/* tablets y below */
@media (max-width: 768px) {
  body {
    font-size: 0.9rem;
    padding: 0.75rem;
    max-width: 100%;
  }

  div#content {
    padding: 0 0.25rem;
  }

  div.title {
    margin: -0.75rem -0.75rem 0.5rem;
    padding: 0.5rem;
    font-size: 1rem;
  }

  h1 {
    font-size: 1.1rem;
    padding: 0.5rem;
    margin: 0.4rem 0;
  }

  h2 { font-size: 1rem; }
  h3 { font-size: 0.95rem; }

  pre {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.3rem 0.4rem;
  }

  .sidebar {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }

  #table-of-contents {
    font-size: 0.85rem;
  }
}

/* mobile */
@media (max-width: 480px) {
  body {
    font-size: 1rem;
    padding: 0.5rem;
    max-width: 100%;
  }

  div#content {
    padding: 0;
    margin: 0;
    width: 100%;
  }

  div.title {
    margin: -0.5rem -0.5rem 0.4rem;
    padding: 0.4rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
  }

  h1 {
    font-size: 1rem;
    padding: 0.4rem;
    margin: 0.3rem 0;
    letter-spacing: 0.05em;
  }

  h2 { font-size: 0.95rem; margin-top: 1rem; }
  h3 { font-size: 0.9rem; }
  h4 { font-size: 0.85rem; }

  pre {
    font-size: 0.7rem;
    padding: 0.4rem;
    margin: 0.5rem -0.5rem;
    border-radius: 0;
  }

  .outline-text-2,
  .outline-3,
  .outline-4,
  .outline-5 {
    margin-left: 1rem;
  }

  li {
    margin-left: 1rem;
  }

  table {
    font-size: 0.75rem;
  }

  th, td {
    padding: 0.25rem 0.3rem;
  }

  .sidebar {
    width: 100%;
    margin: 0.75rem 0;
    padding: 0.75rem;
  }

  #table-of-contents {
    font-size: 0.8rem;
    margin: 0.75rem 0;
  }
}

/* landscape phones */
@media (max-width: 480px) and (orientation: landscape) {
  body {
    font-size: 0.95rem;
    padding: 0.5rem;
  }

  h1 { font-size: 1.1rem; }
}