:root {
  /* Colours */
  --main: #349fa5;
  --main-hover: #25848a;
  --main-light: #ecf8f9;
  --dark-grey: #222;
  --default-text: #333;
  --grey: #888;
  --light-grey: #ccc;
  --lightest-grey: #f8f8f8;
  --green: #a4d037;
  --red: #f05230;
  --page-bg: #fff;
  --input-bg: var(--page-bg);
  /* Fonts */
  --sans-serif-font: system-ui, sans-serif;
  --serif-font: Georgia, serif;
  --post-body-font: var(--sans-serif-font);
  --title-font: var(--sans-serif-font);
  /* Misc */
  --box-corner-radius: 3px;
}

@media (prefers-color-scheme: dark) {
  /* Dark mode colours */
  :root {
    --main-light: #4b696b;
    --dark-grey: #ececec;
    --default-text: #f8f8f8;
    --grey: #aaa;
    --light-grey: #555;
    --lightest-grey: #333;
    --page-bg: #222;
    --input-bg: var(--lightest-grey);
  }
}

.container {
  max-width: 1000px;
  margin: auto;
}

.container--narrow {max-width: 600px}

* {box-sizing: border-box;}

body { 
  margin: 0;
  padding: 1rem;
  font: 16px/1.4 var(--sans-serif-font);
  color: var(--default-text);
  background-color: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 500px) {
  body { font-size: 15px }
}
@media (min-width:501px) {
  body {
    padding: 2rem 1rem;
  }
}


h1, h2, h3, h4, h5, h6 { color: var(--dark-grey); font-family: var(--title-font) }
h1 {font-size: 2.5em; }
.fs24, .fslarge { font-size: 1.5em }
.fs32 { font-size: 2em; }
.fssmall { font-size: 0.875em; }
.fsinitial {font-size: 1rem}
.fsmedium { font-size: 1.2em; }
.lhtitle {line-height: 1.2}
.tc{text-align: center;}
.tl{text-align: left;}
.tr{text-align: right;}
.b{font-weight: bold;}

figure { margin: 0; }
hr { border: 0; border-top: 1px solid var(--light-grey) }

img { width: 100%; }

a:link:not(.button),
a:visited:not(.button) { 
  color: var(--main); 
  border-bottom: 1px solid;
  text-decoration: none;
  transition: border-color 0.3s;
}
a:hover:not(.button) { border-color: var(--light-grey) }

.normal { font-weight: normal; }
.mb0 {margin-bottom: 0}
.mb1 {margin-bottom: 1rem}
.mb2 {margin-bottom: 2rem}
.mb3 {margin-bottom: 3rem}
.mb4 {margin-bottom: 4rem}
.mt0 {margin-top: 0;}
.mt1 {margin-top: 1rem}
.mt2 {margin-top: 2rem}
.mt3 {margin-top: 3rem}
.mt4 {margin-top: 4rem}
.mt6 {margin-top: 6rem}
.mv0{margin-top: 0;margin-bottom: 0 }
.mv1{margin-top: 1rem;margin-bottom: 1rem }
.b0 {border:none !important;}

.head__logo a { color: var(--dark-grey) !important; }
.color--grey { color: var(--grey); }
.color--grey a:link, .color--grey a:visited { color: var(--dark-grey); }
.color--dark-grey, .color--dark-grey a:link, .color--dark-grey a:visited { color: var(--dark-grey); border-color: var(--dark-grey); }

.tag, a.tag { padding: 1px 4px; display: inline-block; background-color: var(--main-light); border-radius: 10px; border-bottom: 0; }

pre {overflow: auto;padding: 1em;background-color: var(--main-light); border-radius: 3px;}
pre code { padding: 0 }
code { padding: 0.12em 0.25em; color: var(--dark-grey); background-color: var(--main-light); font-size: 0.88em; font-family: monospace; border-radius: 3px;}

hr {margin: 4rem 0;}

.svg-fill-path path { fill: var(--main); }

.button, input {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem; 
  appearance:none; 
  -webkit-appearance: none; 
  -moz-appearance: none; 
  font-size: inherit; 
  font-family: inherit;
  color: inherit; 
  border-radius: 3px;
  line-height: 32px;
  padding: 6px 14px;
  text-align: center;
}
input, select, textarea {border: 1px solid var(--grey); background-color: var(--input-bg) }
input:focus, select:focus, textarea:focus {outline:none;border-color: var(--grey);}
.button {
  border: 1px solid var(--main); 
  cursor: pointer; 
  background-color: var(--main);
  color: #fff !important;
  white-space: nowrap;
  text-decoration: none;
}
.button:not([disabled]):hover { 
  background-color: var(--main-hover);
  border-color: var(--main-hover);
  color: #fff !important;
  transition: background-color 0.3s, border-color 0.3s; 
}
.button.loading {
  opacity: 0.8;
}

.subscribe-form {max-width: 400px;margin-left: auto;margin-right: auto}
.subscribe-email, .subscribe-name {text-align: center}

.subscribe-form--inline .cols { display: flex; justify-content: space-between; }
.subscribe-form--inline .cols button { flex: 1 0 28%; margin-left: 0.5rem; }

.subscribe-form .button-loader,
.subscribe-form .message-success,
.subscribe-form .message-error {
  display: none;
}
.subscribe-form .button-loader svg {
  vertical-align: middle;
}
.subscribe-form.loading .button-loader {
  display: inline-block;
}
.subscribe-form.loading .button-content {
  display: none;
}
.subscribe-form.success .message-success {
  display: block;
}
.subscribe-form.error .message-error {
  display: block;
}

.page-head {margin-bottom: 3rem}
ul.nav {padding-left: 0;list-style: none;margin: 0}
.nav-current, .nav-current-parent {font-weight: bold}
.logo {width: 300px;box-shadow: none !important}
.page-head {display: flex;align-items: center}
.head__logo {width: 40%;font-weight: bold}
.head__nav {width: 60%; text-align: right; position: relative;}
.head__logo .logo {width: 200px}

.nav-trigger { padding: 0.5rem; }
.nav-wrapper { display: inline-block; }
.nav-wrapper .nav {
  position: absolute;
  display: none;
  right: 0;
  border: 1px solid var(--light-grey);
  border-radius: var(--box-corner-radius);
}
.nav-wrapper:hover .nav {
  display: block;
}
.nav-wrapper .nav li a {
  padding: 0.4rem 1rem;
  display: block;
  border: 0;
  background-color: var(--page-bg);
  min-width: 140px;
}
.nav-wrapper .nav li:first-of-type a {
  border-radius: var(--box-corner-radius) var(--box-corner-radius) 0 0;
}
.nav-wrapper .nav li:last-of-type a {
  border-radius: 0 0 var(--box-corner-radius) var(--box-corner-radius);
}
.nav-wrapper .nav li a:hover {
  background-color: var(--main-light)
}

.box {border-radius: var(--box-corner-radius);background-color: var(--main-light);padding: 3rem 2rem;position: relative;}


/* Home */

.home-template .hero, .home-template .hero img {
  width: 100%;
}
@media (max-width: 700px) {
  .home-template .main-content {
    text-align: center;
  }
  .home-template .main-cols > div {
    margin-bottom: 3rem;
  }
}
@media (min-width: 701px) {
  .home-template .main-cols {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .home-template .main-cols > div {
    width: 46%;
  }
  .home-template .main-cols > div:last-of-type {
    min-height: 440px;
    display: flex;
    align-items: center;
  }
  .home-template .main-cols .subscribe-form {
    margin: 0;
  }
  .home-template .main-cols .subscribe-email,
  .home-template .main-cols .subscribe-name {
    text-align: left;
  }
}

/* Authors */

.author-avatar { width: 100px;border-radius: 50% !important; }
.author-avatar--mini {width: 32px;border-radius: 50% !important; vertical-align: middle;}


/* Post list */

.post-card {
  margin: 3rem auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--light-grey);
}
.post-card .box {
  height: 200px;
}
.post-card .box p {
  position: relative;
}
.post-card--access .box,
.box .image-cover {
  background-size: cover;
  background-position: center;
}
.box .image-cover {
  opacity: 0.3;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  border-radius: var(--box-corner-radius);
}
.pagination { margin-top: 3rem }

.main-content img {border-radius: 3px;}


/* Post */

.post-title { font-size: 2.4rem; }
.post-content:not(.page) { margin: 3rem auto;line-height: 1.6;max-width: 600px }

.post-header {max-width: 600px;margin-left: auto;margin-right: auto}
.post-header img { width: 100% }
@media (min-width: 701px) {
  .post-header {max-width:none;display: flex;flex-direction: row-reverse;justify-content: space-between;align-items: center;}
  .post-left{width: 40%;padding-right: 2rem}
  .post-right{width: 60%}
}

@media (min-width: 791px) {
  .post-hero {
    margin-left: -10vw;
    width: calc(100% + 20vw);
  }
}
.post-hero img {width: 100%}

.home-feature {
  margin: 3rem 0 5rem;
  padding: 2rem;
}
.home-feature .post-card { margin: 0 }


.post-arrows { display: flex; justify-content: space-between; }
.post-nav {width: 50%}


.post-content p,
.post-content ul,
.post-content ol {
  font-family: var(--post-body-font);
}

.post-content pre,
.post-content blockquote,
.post-content .kg-card,
.post-content table,
.post-content ul,
.post-content ol {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.post-content h1 {
  font-size: 2rem;
}
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 2rem;
  margin-bottom: 0;
}

.post-content p {
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}

.post-content blockquote {
  margin-left: 0;
  padding: 0.5rem 1.5rem;
  font-size: 1.2rem;
  border-left: 0.5rem solid var(--main-light);
}

.post-content table {
  border-spacing: 0;
  border-collapse: collapse;
  width:100%;
  font-size: 0.88em;
}
.post-content table th,
.post-content table td {
  padding: 0.5rem;
  border: 1px solid var(--light-grey);
}
.post-content table tr:nth-of-type(2n) {
  background-color: var(--lightest-grey);
}

.kg-width-wide,
.kg-width-full {
  position: relative;
  width: 75vw;
  min-width: 100%;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
  width: 90vw;
}

article figure {
  margin: 0;
}

article figcaption {
  text-align: center;
}

.plan {
  max-width: 400px;
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid var(--light-grey);
  border-radius: var(--box-corner-radius)
}
@media (min-width: 660px) {
  .plans {
    display: flex;
    justify-content: space-between;
  }
  .plan {
    flex: 0 1 50%;
    margin: 0;
    max-width: 3  60px;
  }
  .plan+.plan {
    margin-left: 2rem;
  }
  .plan-features {
    min-height: 182px;
  }
}
.plan-features {
  list-style: none;
  padding-left: 0;
}
.plan-features li {
  padding-left: 24px;
  margin-bottom: 4px;
}
.plan-features li:before {
  display: inline-block;
  content: '✓';
  width: 24px;
  margin-left: -24px;
  color: var(--main);
}


/* Member icons */
.icon-unlock{display: none}
.icon-lock.vis-members.paidmember-false,
.icon-lock.paidmember-true {display: none}
.icon-unlock.paidmember-true,
.icon-unlock.vis-members.paidmember-false {display: inline;}

.active-check svg path {fill: var(--main) }


/* Subscribe Message and Overlay */

.notification {
  visibility: hidden;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 9000;
  padding: 22px 60px;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1.3em;
  font-weight: 500;
  text-align: center;
  background: var(--green);
  transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1) 0.5s;
  transform: translateY(-175%);
  font-size: 1rem;
}

.notification a {
  border: 0 !important;
}

.subscribe-success .notification-subscribe {
  visibility: visible;
  transform: translateY(0);
}
.signup-success .notification-signup {
  visibility: visible;
  transform: translateY(0);
}
.signin-success .notification-signin {
  visibility: visible;
  transform: translateY(0);
}
.checkout-success .notification-checkout {
  visibility: visible;
  transform: translateY(0);
}
.billing-success .notification-billing-update {
  visibility: visible;
  transform: translateY(0);
}

.billing-cancel .notification-billing-update-cancel {
  visibility: visible;
  background: var(--red);
  transform: translateY(0);
}

.notification.closed {
  visibility: hidden;
  transition: all 1.35s cubic-bezier(0.19, 1, 0.22, 1);
  transform: translateY(-175%);
}

.notification-close {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
}

.notification-close:before {
  content: "";
  position: absolute;
  top: 29px;
  right: 25px;
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transform: rotate(45deg);
}

.notification-close:after {
  content: "";
  position: absolute;
  top: 29px;
  right: 25px;
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transform: rotate(-45deg);
}


/* Post cards */

.kg-card {
  margin: 3rem 0;
}

.kg-card img {
  height: auto;
}

.kg-width-wide,
.kg-width-full {
  position: relative;
  width: 63vw;
  min-width: 100%;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  transform: translateX(calc(50vw - 50%));
}

.toc-content .kg-width-wide,
.toc-content .kg-width-full {
  width: auto;
  margin-left: 0;
  margin-right: 0;
  transform: initial;
}

.kg-width-full {
  width: 90vw;
}

.kg-bookmark-card {
    width: 100%;
    margin: 3rem 0;
    position: relative;
}

.kg-bookmark-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    color: currentColor !important;
    font-family: inherit;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.kg-bookmark-container:hover {
    text-decoration: none;
}

.kg-bookmark-content {
    flex-basis: 0;
    flex-grow: 999;
    padding: 20px;
    order: 1;
}

.kg-bookmark-title {
    font-weight: 600;
}

.kg-bookmark-metadata,
.kg-bookmark-description {
    margin-top: .5em;
}

.kg-bookmark-metadata {
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kg-bookmark-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.kg-bookmark-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: text-bottom;
    margin-right: .5em;
    margin-bottom: .05em;
}

.kg-bookmark-thumbnail {
    display: flex;
    flex-basis: 24rem;
    flex-grow: 1;
}

.kg-bookmark-thumbnail img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
    object-fit: cover;
    box-shadow: none;
}

.kg-bookmark-author {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.kg-bookmark-publisher::before {
    content: "•";
    margin: 0 .5em;
}

.kg-image-card figcaption,
.kg-gallery-card figcaption {
    margin: 0 0 1.5em;
    font-size: 0.88em;
    text-align: center;
}

.kg-embed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5em 0 3em;
    min-width: 100%;
}

.kg-embed-card figcaption {
    margin: 0.5em 0 0;
}

.kg-embed-card .fluid-width-video-wrapper {
    margin: 0;
}


.kg-image-full + figcaption {
    padding: 0 1.5em;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    margin: 1.5em auto;
    max-width: 1040px;
    width: 100%;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}
.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
}

.kg-gallery-row:not(:first-of-type) {
    margin: 0.75em 0 0 0;
}

.kg-gallery-image:not(:first-of-type) {
    margin: 0 0 0 0.75em;
}


footer.container {margin-top: 6rem;}
footer p {line-height: 2}