/* Customise Water.css */
:root {
    --background-body: #fff;
    --background: #efefef;
    --text-main: #202020;
    --links: #cc0000;
    --focus: #cc0000ab;
    --border: #dbdbdb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-body: #000;
    --background: #161f27;
    --text-main: #dbdbdb;
    --links: #cc0000;
    --focus: #cc0000ab;
    --border: #dbdbdb;
    --code: #dbdbdb;
  }
}


html {
  border-top: 0.2rem solid var(--links);
}

body {
  max-width: 1200px;
  margin-top: 0;
  padding: 0;
  background-color: var(--background-body);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}
@media screen and (max-width: 768px) {
  body {
    font-size: 1.1rem;
  }
}

main {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.625rem;
}
@media screen and (min-width: 600px) {
  main {
  padding-left: 1rem;
  padding-right: 1rem;
  }
}

/* Prevent border around main content when focused */
main:focus {
  outline: none !important;
  box-shadow: none !important;
}


header img, header picture {
  margin-bottom: 0;
}

/* Crop header logo on mobile */
@media screen and (max-width: 768px) {
  .header-image {
  	max-width: 100%;
  	min-height: 65px;
  	object-fit: cover;
    object-position: center;
  	overflow: hidden;
  }
}

header {
  margin-bottom: 0.5rem;
}

header nav {
  font-size: 0.9rem;
  font-weight: bold;
}
header nav a {
  color: var(--text-main);
}
header nav a:hover{
  text-decoration: none;
  background-color: var(--background);
  border-radius: 0.25rem;
}

header nav svg {
  height: 1.1rem;
  vertical-align: middle;
  fill: var(--text-main);
}

/* Horizontal scrolling menu */
nav {
  overflow: auto;
  white-space: nowrap;
  text-align: center;
  padding: 0.25rem;
}
nav ul {
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
}
nav li {
  display: inline-block;
}
nav a {
  display: inline-block;
  padding: 0.6rem;
}
nav li.nolink {  /* For pagination on first and last pages */
  padding: 0.6rem;
}

/* Hide scrollbar on touchscreens */
@media (hover: none) {
  nav::-webkit-scrollbar {
    display: none;
  }
  nav {
    scrollbar-width: none;
  }
}

/* Style scrollbar on non-touchscreens */
@media (hover: hover) {
  nav::-webkit-scrollbar {
    height: 0.4rem;
  }
  nav::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 6px;
  }
  nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 6px;
  }
  nav {
    scrollbar-width: thin;
  }
}

footer.pagination { /* Pagination on excerpt pages */
  clear: both;
  font-size: 0.9rem;
  border-top: 0;
  padding-top: 0;
}
@media screen and (max-width: 320px) { /* iPhone 5/SE */
  footer.pagination {
    font-size: 0.8rem;
  }
}

/* Highlight the current page in navigation and pagination */
[aria-current] {
  cursor: text;
}

a:hover[aria-current] {
  text-decoration: none;
}


article {
  margin-bottom: 1.5rem;
}


h1 {
  font-family: "Mouse Memoirs";
  font-weight: normal;
  font-size: 2.5rem;
  line-height: normal;
  margin-top: 0;
}

/* @media screen and (min-width: 600px) {
  h1 {
    font-size: 2.5rem;
  }
} */

h2 {
  font-size: 1.3rem;
}


time {
  font-size: 0.875rem;
  white-space: nowrap;
}


blockquote {
  border-left: 4px solid var(--border);
  padding: 0 0.6rem;
}


hr {
  clear: both;
}


img {
  border-radius: 0.25rem;
}

/* Centre images by default (for small screens) */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* Right align small images on bigger screens */
@media screen and (min-width: 600px) {
  img.align-right,
  picture.align-right,
  figure.align-right {
    float: right;
    max-width: 50%;
    margin-top: 0.5rem;
    margin-right: 0;
    margin-bottom: 0.6rem;
    margin-left: 1rem;
  }
  /* figure.align-right img {
    max-height: 400px;
    width: auto;
  } */
}

/* Only if the figure is before the first paragraph */
article > h1+time+figure.align-right {
  padding-top: 2.2rem;
}

figure {
  margin-left: auto;
  margin-right: auto;
}

figure.align-right {
  margin-bottom: inherit;
}
figure.align-right p {
  margin-top: 0;
}

figcaption {
  font-size: 0.8rem;
  margin-top: -0.5rem;
  text-align: center;
  padding: 0 0.5rem;
}

figcaption a {
  color: var(--text-main);
}


/* Image gallery grid */
.gallery {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  margin-top: 0.75rem;
}

.gallery > p,
.gallery > div.video {
  flex: 1 1 auto;
  flex-direction: column;
  height: var(--height, 195px);
  margin: 1px;
  border-radius: 0.25rem;
}
@media screen and (min-width: 360px) {
  .gallery > p {
    height: var(--height, 220px);
  }
}
@media screen and (min-width: 390px) {
  .gallery > p {
    height: var(--height, 240px);
  }
}
@media screen and (min-width: 768px) {
  .gallery > p {
    height: var(--height, 250px);
  }
}


.gallery.contain > p {
  flex: 1 1 auto;
  max-width: var(--max-width, 32.5%);
  height: auto;
}
@media screen and (min-width: 600px) {
  .gallery.contain {
    justify-content: flex-start;
  }
  .gallery.contain > p {
    flex: 0 1 auto;
    height: var(--height, 260px);
  }
}

.gallery img {
  width: auto;
  height: 100%;
  min-width: 100%;
  object-fit: cover;
  margin: 0;
}
.gallery.contain img {
  object-fit: contain;
}

.gallery lite-youtube {
  min-width: 200px;
  height: 100%;
  margin: 0;
}

.video {
  margin: 1rem 0;
}
lite-youtube {
  max-width: 100% !important;
  border-radius: 0.25rem;
}

/* Make manually embedded videos (such as playlists) responsive */
.videowrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}
.videowrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


/* Posts card grid */
.card-grid { /* Fallback if no grid support */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.card-grid {
  display: grid;
  grid-gap: 1rem;
  margin: 1rem auto;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-template-rows: masonry;  /* Not yet supported */
}

.card { /* For the flex fallback layout*/
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 250px;
  max-width: 400px;
}
.card {
  border-radius: 0.25rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  margin-bottom: 0;
}
@media (prefers-color-scheme: dark) {
  .card {
    border: 1px solid var(--border);
    border-top: 0;
  }
}

.card img {
  border-radius: 0.25rem 0.25rem 0 0;
  border-top: 0.2rem solid var(--links);
  margin-bottom: 0;
  object-fit: contain;
  width: 100%;
  max-height: 400px;
  background-color: #efefef;
}

@media screen and (min-width: 600px) {
  .card img {
    max-height: 320px;
  }
}

.card article {
  padding: 0 0.8rem;
  margin-bottom: 0;
}

.card h2 {
  font-family: "Mouse Memoirs";
  font-size: 2rem;
  line-height: normal;
  margin-top: 1rem;
}
.card h2 a,
.card h2 a:visited {
  color: inherit;
  font-weight: normal;
}

.card time {
  font-size: 0.8rem;
}

.card p {
  margin-top: 0.5rem;
}


/* Hide default style while tweets are loading */
blockquote.twitter-tweet {
  border-left: none;
}


ul.tags-list {
  padding-left: 0;
}
ul.tags-list li {
  display: inline;
}

aside.recommended-posts h2 {
  clear: both;
  margin-bottom: 0.2rem;
}

aside.recommended-posts ul,
div.tag-page ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

aside.recommended-posts li {
  display: block;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-top: 0;
}
aside.recommended-posts li:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

div.tag-page li {
  margin-bottom: 1rem;
}


.home {
  margin-bottom: 1rem;
}

body > footer {
  clear: both;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  text-align: center;
}

body > footer a {
  /* color: var(--text-main); */
}

footer p {
  font-size: 0.75rem;
  color: var(--text-main);
}

body > footer svg {
  height: 2.5rem;
  margin: 0 0.2rem;
}



.skip-link:not(:focus):not(:active),
.visually-hidden:not(:focus):not(:active) {
    border: 0;
    clip: rect(0 0 0 0);
    height: auto;
    margin: 0;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
}

.skip-link:focus {
    display: inline-block;
    position: absolute;
    top: 2px;
    left: 2px;
    padding: 0.8rem 1.25rem 1rem 1.25rem;
    background-color: var(--background);
    color: var(--focus);
    line-height: 1;
    text-decoration: none;
    font-weight: 700;
}


.twitter-follow-button {
  vertical-align: middle;
}


/* Space above/below embedded Facebook posts */
div.fb-post {
  margin: 0.5em 0;
}


/* baguetteBox lightbox */
/* purgecss start ignore */
#baguetteBox-overlay .full-image figcaption {
  font-size: 1.2rem;
  line-height: inherit !important;
  padding: 1rem 0;
}

#baguetteBox-overlay button:focus {
  box-shadow: none;
}
/* purgecss end ignore */


/* Google Custom Search override Water CSS */
/* purgecss start ignore */
.gsc-search-box table {
  table-layout: auto;
}

input.gsc-input:focus {
  box-shadow: none;
}

table.gsc-input {
  margin-bottom: 0;
}

td.gsib_b {
  padding: 0;
}

button.gsc-search-button {
  margin-bottom: 0;
}

div.gsc-control-cse {
  padding: 1rem 0;
  border: 0;
  font-size: 0.875rem;
}

.gs-image {
  border: none !important;
}

img.gs-image {
  margin-top: 4px;
  margin-bottom: 0;
}

.gs-per-result-labels {
  display: none;
}
/* purgecss end ignore */
