@import "fonts";
@import "rouge-github";
@import "colors";

body {
  background-color: var(--clr-bg);
  padding:50px;
  font: 15px/1.5 "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--clr-text);
  font-weight:400;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--clr-h1-and-bold);
  margin:0 0 20px;
}

p, ul, ol, table, pre, dl {
  margin:0 0 20px;
}

h1, h2, h3 {
  line-height:1.1;
}

h1 {
  font-size:32px;
}

h2 {
  color: var(--clr-h2);
}

h3, h4, h5, h6 {
  color: var(--clr-h-3-6);
}

a {
  color:var(--clr-a-text);
  text-decoration:none;
}

a:hover, a:focus {
  color: var(--clr-a-text-hvr);
}

a small {
  font-size:11px;
  color:var(--clr-small-in-a);
  margin-top:-0.3em;
  display:block;
}

a:hover small {
  color:var(--clr-small-in-a);
}

.addr a:hover, a:focus {
  text-decoration: underline;
}

p.link {
  margin:0 0 4px;
}

ul.link {
  list-style-type: none; /* Remove bullets */
  margin: 0; /* To remove default bottom margin */ 
  padding: 0.4px; /* To remove default left padding */
}

ul.link li + li {
  margin-top: 6px;
}

ul.link:last-child {
  margin-bottom: 6px;
}

.wrapper {
  width:860px;
  margin: 0 auto;
}

blockquote {
  border-left:1px solid var(--clr-splitter-blockquote-and-section);
  margin:0;
  padding:0 0 0 20px;
  font-style:italic;
}

code, pre {
  font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New, monospace;
  color: var(--clr-code-text);
}

pre {
  padding:8px 15px;
  background: var(--clr-code-bg);
  border-radius:5px;
  border:1px solid var(--clr-code-border);
  overflow-x: auto;
}

table {
  width:100%;
  border-collapse:collapse;
}

th, td {
  text-align:left;
  padding:5px 10px;
  border-bottom:1px solid var(--clr-splitter-blockquote-and-section);
}

dt {
  color:var(--clr-table-header-and-dt);
  font-weight:700;
}

th {
  color:var(--clr-table-header-and-dt);
}

img {
  max-width:90%;
}

kbd {
  background-color: var(--clr-kbd-bg) ;
  border: 1px solid var(--clr-kbd-border);
  border-bottom-color: var(--clr-kbd-border-bottom-and-shadow);
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 var(--clr-kbd-border-bottom-and-shadow);
  color: var(--clr-kbd-text);
  display: inline-block;
  font-size: 11px;
  line-height: 10px;
  padding: 3px 5px;
  vertical-align: middle;
}

.sidebar {
  width:250px;
  float:left;
  position:fixed;
  -webkit-font-smoothing:subpixel-antialiased;
  top: 0;
  padding: 58px 0 50px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100vh - 108px);
  overflow-x: hidden;
  overflow-y: scroll;
  -ms-overflow-style: -ms-autohiding-scrollbar; // IE10+
}

// Disables the scrollbar in Firefox
// HTML-Proofer fails without "@-moz-document url-prefix()"
// because scrollbar-width is still experimental in Firefox.
@-moz-document url-prefix() {
  .sidebar {
    scrollbar-width: none;
  }
}

.sidebar::-webkit-scrollbar {
  /* Chrome, Safari, Edge */
  display: none;
}

strong {
  color:var(--clr-h1-and-bold);
  font-weight:700;
}

section {
  width: 550px;
  float:right;
  padding-bottom:30px;
}

small {
  font-size:11px;
}

hr {
  border:0;
  background:var(--clr-splitter-blockquote-and-section);
  height:1px;
  width:30%;
  margin:10px auto 30px;
}

.sidebar-footer {
  width:250px;
  float:left;
  bottom:30px;
  -webkit-font-smoothing:subpixel-antialiased;
}

.sidebar-footer {
  flex-basis: content;
}


@media print, screen and (max-width: 960px) {
  
  .wrapper {
    width: 610px;
  }

  .sidebar {
    width: 200px;
    height: calc(100vh - 50px);  
  }

  section {
    width: 375px;
  }

  .sidebar-footer {
    width: auto;
  }
}

@media print, screen and (max-width: 720px) {

  .sidebar {
    float: none;
    position: static;
    width: auto;
    padding: initial;
    display: initial;
    height: initial;
    overflow: initial;    
  }

  .sidebar-footer {
    display: none;
  }

  div.wrapper {
    width:auto;
    margin:0;
  }

  header, section, .wrapper {
    float:none;
    position:static;
    width:auto;
    overflow-x: hidden;
  }

  header {
    padding-right:320px;
  }

  section {
    border:1px solid var(--clr-splitter-blockquote-and-section);
    border-width:1px 0;
    padding:20px 0;
    margin:0 0 20px;
  }

  header a small {
    display:inline;
  }

  header ul {
    right:50px;
    top:52px;
  }

  .logo {
    display: none !important;
  }
}

@media print, screen and (max-width: 720px) {
  body {
    word-wrap:break-word;
  }

  header {
    padding:0;
    overflow-x: hidden;
  }

  header ul, header p.view {
    position:static;
  }

  pre, code {
    word-wrap:normal;
  }
}


@media print, screen and (max-width: 480px) {
  body {
    padding:15px;
  }
}

@media print {
  body {
    padding:0.4in;
    font-size:12pt;
    color:#444;
  }
}