:root {
    border-top: 0px; /* Gets rid of top page border from neat.css */

    /* Light mode colors for carbon background */
    --colorlg15: #eaeaea;
    --colorlg22: #dddddd;
    --colorlg1b: #e4e4e4;
    --colorlg1d: #e2e2e2;
    --colorlg1a: #e5e5e5;
    --colorlg24: #dbdbdb;
    --colorlg13: #ececec;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark mode colors for carbon background */
        --colorlg15: #151515;
        --colorlg22: #222222;
        --colorlg1b: #1b1b1b;
        --colorlg1d: #1d1d1d;
        --colorlg1a: #1a1a1a;
        --colorlg24: #242424;
        --colorlg13: #131313;
    }
}


body {
  max-width: 1024px;
  margin-top: 12px;
  margin-bottom: 12px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  height: 100%;

  /* Carbon pattern from https://projects.verou.me/css3patterns/
     Modified to work in both dark and light mode */
  background:
    linear-gradient(27deg, var(--colorlg15) 5px, transparent 5px) 0 5px,
    linear-gradient(207deg, var(--colorlg15) 5px, transparent 5px) 10px 0px,
    linear-gradient(27deg, var(--colorlg22) 5px, transparent 5px) 0px 10px,
    linear-gradient(207deg, var(--colorlg22) 5px, transparent 5px) 10px 5px,
    linear-gradient(90deg, var(--colorlg1b) 10px, transparent 10px),
    linear-gradient(var(--colorlg1d) 25%, var(--colorlg1a) 25%, var(--colorlg1a) 50%, transparent 50%, transparent 75%, var(--colorlg24) 75%, var(--colorlg24));
  background-color: var(--colorlg13);
  background-size: 20px 20px;
}

* {
  box-sizing: border-box;
}

.row{
    background-color: var(--light);
    padding: 12px;
    border-radius: .333em;
    box-shadow: 2px 5px 5px 0px rgba(0,0,0,0.5);
}

.row::after {
  content: "";
  clear: both;
  display: table;
}

[class*="col-"] {
  float: left;
  padding-left: 15px;
  padding-right: 15px;
}


/* For mobile phones: */
[class*="col-"] {
  width: 100%;
}

@media only screen and (min-width: 600px) {
  /* For tablets: */
  .col-s-1 {width: 8.33%;}
  .col-s-2 {width: 16.66%;}
  .col-s-2-5 {width: 20%;}
  .col-s-3 {width: 25%;}
  .col-s-4 {width: 33.33%;}
  .col-s-5 {width: 41.66%;}
  .col-s-6 {width: 50%;}
  .col-s-7 {width: 58.33%;}
  .col-s-8 {width: 66.66%;}
  .col-s-9 {width: 75%;}
  .col-s-9-5 {width: 80%;}
  .col-s-10 {width: 83.33%;}
  .col-s-11 {width: 91.66%;}
  .col-s-12 {width: 100%;}
}
@media only screen and (min-width: 768px) {
  /* For desktop: */
  .col-1 {width: 8.33%;}
  .col-2 {width: 16.66%;}
  .col-2-5 {width: 20%;}
  .col-3 {width: 25%;}
  .col-4 {width: 33.33%;}
  .col-5 {width: 41.66%;}
  .col-6 {width: 50%;}
  .col-7 {width: 58.33%;}
  .col-8 {width: 66.66%;}
  .col-9 {width: 75%;}
  .col-9-5 {width: 80%;}
  .col-10 {width: 83.33%;}
  .col-11 {width: 91.66%;}
  .col-12 {width: 100%;}
}

img {
    border-radius: .333em;
    box-shadow: 2px 5px 5px 0px rgba(0,0,0,0.5);
}

button{
    border-radius: .333em;
    box-shadow: 2px 5px 5px 0px rgba(0,0,0,0.5);
}

.sidenav {
  background: var(--lesslight);
  border-radius: .333em;
  box-shadow: 2px 5px 5px 0px rgba(0,0,0,0.5);
  height: 100%;
}


.sidenav a {
  /*padding: 6px 8px 6px 16px;*/
  /*display: block;*/
}


.sidenav a:hover {
  color: var(--moredark);
}

.sidenav img {
    border-radius: 0;
    box-shadow: none;
}

#footer{
    padding-top: 10px;
    border-top: solid 1px var(--lesslight);
    color: var(--dark);
    text-align: center;
    font-size:small;
}


/* To make the website look more like the blog. */
blockquote{
    background-color:var(--lesslight);
    margin-left:12px;
    padding:12px 12px 12px 24px;
    border-radius: .333em;
    box-shadow: 2px 5px 5px 0px rgba(0,0,0,0.5);
}
blockquote img{
    margin:12px 0px;
}
blockquote iframe{
    margin:12px 0px;
}


/* For the Books pages to get the cover images aligned correctly, floating on the left side. */
.book-cover {
    float:left;
    padding-right: 12px;
    padding-bottom: 0px; 
}
.book-cover img {
    padding: 0px;
    margin: 0px;
}

.book-cover-right {
    float:right;
    padding-left: 12px;
    padding-bottom: 0px; 
}

.book-cover-right img {
    padding: 0px;
    margin: 0px;
}


/* Special button classes */
.buy{
    background-color: hsl(210, 75%, 50%);
    color: white;
}


/* Class for boxes to highlight text.
   Intended to be used for sales announcements. */
.banner{
  padding: 0 0.5em;
  line-height: 1.875em;
  background-color: var(--dark);
  color: var(--light);
  border-radius: 0.333em;
  box-shadow: 2px 5px 5px 0px rgba(0,0,0,0.5);
}

.banner a{
  color: var(--light);
}

.banner a:hover {
  color: var(--lesslight);
}


/* Sidebar buttons */
.sidenav button {
    display: inline-block;
    width: 100%;
    max-width: 250px;
    box-shadow: 2px 5px 5px 0px rgba(0,0,0,0.5);
}


/* Paragraph indent for prose */
.prose p {
  text-indent: 50px;
  margin: 0;
  margin-bottom: 0.1in
}

/* Heading centering for prose */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

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

table, th, td {
  border:1px solid;
  text-align: center;
}


