/* --- General --- */

body {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 18px;
  color: #404040;
  position: relative;
  background: #FFF;
  display: flex;
  flex-flow: column;
  height: 100vh;
}

p {
  line-height: 1.5;
  margin: 6px 0;
}

p + p {
    margin: 24px 0 6px 0;
}

p a {
  color: #0066CC;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 800;
  line-height: 1.3;
  scroll-margin-top: 70px;
}

h1 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

h5 {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

h6 {
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
  margin-top: 0;
}

a {
  color: #0066CC;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #0085a1;
}

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

blockquote {
  color: #666;
  font-style: italic;
}

blockquote p:first-child {
  margin-top: 0;
}

hr.small {
  max-width: 100px;
  margin: 15px auto;
  border-width: 4px;
  border-color: inherit;
  border-radius: 3px;
}

img {
  display: block;
  margin: auto;
  max-width: 100%;
}

img::-moz-selection {
  color: white;
  background: transparent;
}

img::selection {
  color: white;
  background: transparent;
}

::-moz-selection {
  color: white;
  text-shadow: none;
  background: #0085a1;
}

::selection {
  color: white;
  text-shadow: none;
  background: #0085a1;
}

.hideme {
  display: none;
}

.intro-header .h1 {
  display: block;
  font-weight: bold;
}

@media only screen and (min-width: 768px) {
  .main-content {
    padding-top: 130px;
  }
}

[role="main"] {
  padding-bottom: 2rem;
}

.main-explain-area {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  padding: 15px inherit;
}

/* --- Navbar --- */

.navbar-custom {
  background: #F5F5F5;
  border-bottom: 1px solid #EAEAEA;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.navbar-custom .nav-link {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}

.navbar-custom .dropdown-menu {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #f5f5f5;
  border: 1px solid #eaeaea;
  border-radius: 0;
  padding: 0;
}

.navbar-custom .dropdown-item {
  color: #404040;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 20px;
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
  color: #0085a1;
  background: #eee;
}

.navbar-custom .dropdown-item.active,
.navbar-custom .dropdown-item:active {
  color: #0085a1;
  background: #eee;
}

@media only screen and (min-width: 768px) {
  .navbar-custom .dropdown-menu.dropdown-menu-end {
    right: 0;
    left: auto;
  }
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: .25rem .75rem;
  font-size: 1.25rem;
  line-height: 1;
  color: inherit;
}

@media only screen and (max-width: 768px) {
  .theme-toggle {
    padding: .5rem;
  }
  .container {
    max-width: 95%;
  }
}

.theme-toggle:focus {
  outline: 2px solid #0085a1;
  outline-offset: 2px;
}

.theme-toggle .fas {
  pointer-events: none;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
  font-weight: 800;
  color: #404040;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus ,
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
  color: #0085a1;
}

.navbar-custom .navbar-brand-logo {
  padding-top: 0;
  transition: padding .5s ease-in-out;
}

.navbar-custom .navbar-brand-logo img {
  height: 50px;
  transition: height .5s ease-in-out;
}

.navbar-custom.top-nav-short .navbar-brand-logo {
  padding-top: 5px;
}

.navbar-custom.top-nav-short .navbar-brand-logo img {
  height: 40px;
}

@media (prefers-reduced-motion: reduce) {
  .navbar-custom .navbar-brand-logo,
  .navbar-custom .navbar-brand-logo img {
    transition: none;
  }
}

@media only screen and (min-width: 768px) {
  .navbar-custom {
    padding: 20px 0;
    transition: background .5s ease-in-out,padding .5s ease-in-out;
  }

  .navbar-custom.top-nav-short {
    padding: 0;
  }

  body.nav-short-permanent .navbar-custom {
    padding: 0;
  }
}

@media only screen and (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .navbar-custom {
    transition: none;
  }
}

.navbar-custom .avatar-container {
  opacity: 1;
  visibility: visible;
  position: absolute;
  transition: visibility 0.5s, opacity 0.5s ease-in-out;
  left: 50%;
  bottom: -25px;
  width: 50px;
}

@media (prefers-reduced-motion: reduce) {
  .navbar-custom .avatar-container {
    transition: none;
  }
}

.navbar-custom .avatar-container  .avatar-img-border {
  width: 100%;
  border-radius: 50%;
  margin-left: -50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(0, 0, 0, .8);
}

.navbar-custom .avatar-container  .avatar-img {
  width: 100%;
  border-radius: 50%;
  display: block;
}

.navbar-custom.top-nav-short .avatar-container{
  opacity: 0;
  visibility: hidden;
}

.navbar-custom.top-nav-expanded .avatar-container  {
  display: none;
}

@media only screen and (min-width: 768px) {
  .navbar-custom .avatar-container {
    width: 100px;
    bottom: -50px;
  }

  .navbar-custom .avatar-container  .avatar-img-border {
    width: 100%;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, .8);
  }

  .navbar-custom .avatar-container  .avatar-img {
    width: 100%;
  }
}

/* --- Post preview --- */

.post-preview {
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

@media only screen and (min-width: 768px) {
  .post-preview {
    padding: 35px 0;
  }
}

.post-preview:last-child {
  border-bottom: 0;
}

.post-preview a {
  color: #404040;
}

.post-preview a:focus,
.post-preview a:hover {
  color: #0085a1;
}

.post-preview .post-title {
  font-size: 30px;
  margin-top: 0;
}

.post-preview .post-subtitle {
  margin: 0;
  font-weight: 300;
  margin-bottom: 10px;
}

.post-preview .post-meta,
.post-heading .post-meta,
.page-meta {
  color: #666;
  font-size: 18px;
  font-style: italic;
  margin: 0 0 10px;
}

.page-meta {
  align-self: center;
}

.post-preview .post-meta a,
.post-heading .post-meta a,
.page-meta a {
  color: #404040;
}

.post-preview .post-entry {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.post-preview .post-entry h1 {
  font-size: 1.5rem;
  margin: 0.75rem 0 0.35rem;
}

.post-preview .post-entry h2 {
  font-size: 1.3rem;
  margin: 0.6rem 0 0.3rem;
}

.post-preview .post-entry h3 {
  font-size: 1.15rem;
  margin: 0.5rem 0 0.25rem;
}

.post-preview .post-entry h4 {
  font-size: 1.05rem;
  margin: 0.4rem 0 0.2rem;
}

.post-preview .post-entry h5,
.post-preview .post-entry h6 {
  font-size: 1rem;
  margin: 0.35rem 0 0.15rem;
}

.post-preview .post-entry h1:first-child,
.post-preview .post-entry h2:first-child,
.post-preview .post-entry h3:first-child,
.post-preview .post-entry h4:first-child,
.post-preview .post-entry h5:first-child,
.post-preview .post-entry h6:first-child {
  margin-top: 0;
}

.post-entry-container {
  display: inline-block;
  width: 100%;
}

.post-entry {
  width: 100%;
  margin-top: 10px;
}

.post-image {
  float: right;
  height: 192px;
  width: 192px;
  margin-top: -35px;
  filter: grayscale(90%);
}

.post-image:hover {
  filter: grayscale(0%);
}

@media (prefers-reduced-motion: reduce) {
  .post-image:hover {
    filter: grayscale(90%);
  }
}

.post-image img {
  border-radius: 100px;
  height: 192px;
  width: 192px;
}

.post-preview .post-read-more {
  font-weight: 800;
  float: right;
}

@media only screen and (min-width: 768px) {
  .post-preview .post-title {
    font-size: 36px;
  }
}

@media only screen and (max-width: 500px) {
  .post-image, .post-image img {
    height: 100px;
    width: 100px;
  }

  .post-image {
    width: 100%;
    text-align: center;
    margin-top: 0;
    float: left;
  }
}

/* --- Post and page headers --- */

.intro-header {
  margin: 80px 0 20px;
  position: relative;
}

.intro-header.big-img {
  background: no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;
  -o-background-size: cover;
  margin-top: 54px; /* Match Bootstrap 5 fixed navbar height */
  margin-bottom: 35px;
}

.intro-header.big-img  .big-img-transition {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  background: no-repeat center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;
  -o-background-size: cover;
  -webkit-transition: opacity 1s linear;
  -moz-transition: opacity 1s linear;
  transition: opacity 1s linear;
}

@media (prefers-reduced-motion: reduce) {
  .intro-header.big-img  .big-img-transition {
    -webkit-transition: none;
    -moz-transition: none;
    transition: none;
  }
}

.intro-header .page-heading,
.intro-header .tags-heading,
.intro-header .categories-heading {
  text-align: center;
}

.intro-header.big-img .container {
  position: relative;
  z-index: 1;
}

.intro-header.big-img .img-desc {
  position: relative;
  z-index: 1;
}

.intro-header.big-img .page-heading,
.intro-header.big-img .post-heading {
  padding: 100px 0;
  color: #FFF;
  text-shadow: 1px 1px 3px #000;
}

.intro-header .page-heading h1,
.intro-header .page-heading .h1,
.intro-header .tags-heading h1,
.intro-header .categories-heading h1 {
  margin-top: 0;
  font-size: 50px;
}

.intro-header .post-heading h1 {
  margin-top: 0;
  font-size: 35px;
}

.intro-header .page-heading .page-subheading,
.intro-header .post-heading .post-subheading {
  font-size: 27px;
  line-height: 1.1;
  display: block;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  margin: 10px 0 0;
}

.intro-header .post-heading .post-subheading {
  margin-bottom: 20px;
}

.intro-header.big-img .page-heading .page-subheading,
.intro-header.big-img .post-heading .post-subheading {
  font-weight: 400;
}

.intro-header.big-img .page-heading hr {
  box-shadow: 1px 1px 3px #000;
  -webkit-box-shadow: 1px 1px 3px #000;
  -moz-box-shadow: 1px 1px 3px #000;
}

.intro-header.big-img .post-heading .post-meta {
  color: #EEE;
}

.intro-header.big-img.narrow-img .page-heading,
.intro-header.big-img.narrow-img .post-heading {
  padding: 50px 0;
}

.intro-header.big-img .img-desc {
  background: rgba(30, 30, 30, 0.6);
  position: absolute;
  padding: 5px 10px;
  font-size: 11px;
  color: #EEE;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  right: 0;
  bottom: 0;
  display: none;
}

@media only screen and (min-width: 768px) {
  .intro-header {
    margin-top: 130px;
  }
  .intro-header.big-img {
    margin-top: 78px;  /* Match expanded Bootstrap 5 navbar height */
  }
  .intro-header.big-img .page-heading,
  .intro-header.big-img .post-heading  {
    padding: 150px 0;
  }
  .intro-header .page-heading h1,
  .intro-header .page-heading .h1,
  .intro-header .tags-heading h1,
  .intro-header .categories-heading h1 {
    font-size: 72px;
  }
.intro-header .post-heading h1,
.intro-header .post-heading .h1 {
    font-size: 46px;
  }
  .intro-header.big-img.narrow-img .page-heading,
  .intro-header.big-img.narrow-img .post-heading {
    padding: 50px 0;
  }
  .intro-header.big-img .img-desc {
    font-size: 14px;
  }
}

.header-section.has-img .no-img {
  margin-top: 0;
  margin: 0 0 40px;
  padding: 20px 0;
  box-shadow: 0 0 5px #AAA;
}

/* Many phones are 320 or 360px, so make sure images are a proper aspect ratio in those cases */
.header-section.has-img .intro-header.no-img {
  display: none;
}

@media only screen and (max-width: 365px) {
  .header-section.has-img .intro-header.no-img {
    display: block;
  }
  .intro-header.big-img {
    width: 100%;
    height: 220px;
  }
  .intro-header.big-img .page-heading,
  .intro-header.big-img .post-heading {
    display: none;
  }
  .header-section.has-img .big-img {
    margin-bottom: 0;
  }
}

@media only screen and (max-width: 325px) {
  .intro-header.big-img {
    height: 200px;
  }
}

/* --- Tags --- */

.blog-tags {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #666;
  font-size: 15px;
  margin-bottom: 30px;
}

.blog-tags a {
  color: #0066CC;
  padding: 0px 5px;
}

.blog-tags a:before {
  content: "#";
}

.blog-tags-category:before {
  content: none !important;
}

.blog-tags a:hover {
  border-radius: 2px;
  color: #004C99;
  background-color: #CCC;
}

.blog-categories {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #666;
  font-size: 15px;
  margin-bottom: 5px;
}

.blog-categories a {
  color: #0066CC;
  padding: 0px 5px;
}

.blog-categories a:hover {
  border-radius: 2px;
  color: #004C99;
  background-color: #CCC;
}

.post-preview .blog-tags {
  margin-top: 5px;
  margin-bottom: 0;
}

@media only screen and (min-width: 768px) {
  .post-preview .blog-tags {
    margin-top: 10px;
  }
}

/* --- Side navigation arrows (wide screens) --- */

.nav-side-arrow {
  position: fixed;
  top: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-content: center;
  flex-direction: column;
  width: 90px;
  max-width: 150px;
  font-size: 2.5em;
  text-align: center;
  text-decoration: none;
  color: #999;
  z-index: 50;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-side-arrow:hover,
.nav-side-arrow:focus {
  color: #404040;
  background-color: rgba(0, 0, 0, 0.03);
  text-decoration: none;
}

.nav-side-prev {
  left: 0;
}

.nav-side-next {
  right: 0;
}

@media only screen and (min-width: 768px) {
  .post-pager.blog-post-pager {
    display: none;
  }
}

@media only screen and (max-width: 767px) {
  .nav-side-arrow {
    display: none;
  }
}

/* --- Pager (narrow screens) --- */

.post-pager {
  padding-left: 0;
  list-style: none;
  text-align: center;
  margin: 10px 0 0;
}

.post-pager.blog-post-pager {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-pager li {
  display: inline;
}

.post-pager .pager-prev > a,
.post-pager .pager-prev > span {
  float: left;
}

.post-pager .pager-next > a,
.post-pager .pager-next > span {
  float: right;
}

.post-pager .pager-center {
  flex: 0 0 auto;
}

.post-pager .pager-center .view-source {
  margin-top: 0;
}

.post-pager li {
  display: inline;
}

.post-pager .pager-prev > a,
.post-pager .pager-prev > span {
  float: left;
}

.post-pager .pager-next > a,
.post-pager .pager-next > span {
  float: right;
}

.post-pager li a {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 5px;
  background: #FFF;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  color: #404040;
}

.post-pager li a:hover,
.post-pager li a:focus {
  color: #FFF;
  background: #0085a1;
  border-color: #0085a1;
}

@media only screen and (min-width: 768px) {
  .post-pager li a {
    padding: 15px 25px;
  }
}

@media only screen and (min-width: 768px) {
  .post-pager.blog-post-pager  {
    margin-top: 40px;
  }
}

/* --- Footer --- */

footer {
  padding: 30px 0;
  background: #F5F5F5;
  border-top: 1px #EAEAEA solid;
  margin-top: auto;
  font-size: 14px;
  position: relative;
  z-index: 51;
}

footer a {
  color: #404040;
}

footer .list-inline {
  margin: 0;
  padding: 0;
}

.footer-links {
  --bs-list-inline-padding: 0.5rem;
}

.footer-links .list-inline-item {
  padding-right: var(--bs-list-inline-padding);
}

.footer-links .list-inline-item:last-child {
  padding-right: 0;
}

footer .copyright {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-align: center;
  margin-bottom: 0;
}

footer .theme-by {
  text-align: center;
  margin: 10px 0 0;
}

footer div.disclaimer {
  padding: 15px 15px 15px 10px;
  margin: 20px 20px 20px 5px;
  border: 1px solid #eee;
  border-left-width: 10px;
  border-right-width: 10px;
  border-radius: 5px 3px 3px 5px;
  background-color: #fdf5d4;
  border-left-color: #f1c40f;
  border-right-color: #f1c40f;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-align: center;
}

@media only screen and (min-width: 768px) {
  footer {
    padding: 50px 0;
  }
  footer .footer-links {
    font-size: 18px;
  }
  footer .copyright {
    font-size: 16px;
  }
}

/* --- Tabs shortcode --- */

.tabs-shortcode {
  margin: .5rem 0 .5rem 0;
  background-color: #f8f8f8;
  border-radius: var(--bs-border-radius, 0.375rem);
  overflow: hidden;
}

.tabs-shortcode .nav-tabs {
  margin-bottom: 0;
  border-bottom: 1px solid #ddd;
}

.tabs-shortcode .nav-tabs .nav-link {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: var(--bs-body-color, #666);
  border: none;
  border-radius: 0;
  background: transparent;
}

.tabs-shortcode .nav-tabs .nav-link:hover,
.tabs-shortcode .nav-tabs .nav-link:focus {
  color: #0085a1;
}

.tabs-shortcode .nav-tabs .nav-link.active {
  color: #0085a1;
  background-color: #efefef;
}

.tabs-shortcode .tab-content {
  padding: .5rem;
  border: none;
  border-radius: 0;
}

/* --- Details shortcode --- */

.details-shortcode {
  margin: 1rem 0;
  border: 1px solid #ddd;
  border-radius: var(--bs-border-radius, 0.375rem);
  background-color: #f8f8f8;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.details-shortcode[open] {
  border-color: #0085a1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.details-shortcode > summary {
  padding: 0.6rem 1rem;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: background-color 0.2s ease;
}

.details-shortcode > summary::-webkit-details-marker {
  display: none;
}

.details-shortcode > summary::before {
  content: '';
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid #0085a1;
  border-bottom: 2px solid #0085a1;
  transform: rotate(-45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 0.15em;
}

.details-shortcode[open] > summary::before {
  transform: rotate(45deg);
}

.details-shortcode > summary:hover {
  background-color: #eee;
}

.details-shortcode > p {
  margin: 0;
  padding: 0 1rem 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .details-shortcode,
  .details-shortcode > summary,
  .details-shortcode > summary::before {
    transition: none;
  }
}

/* --- Blog post --- */

.blog-post :first-child {
  margin-top: 0;
}

.blog-post img {
  max-width: 100%;
}

.blog-post .caption {
  text-align: center;
  font-size: 0.875rem;
  padding: 0.625rem;
  font-style: italic;
  color: #777;
  margin: 0;
  display: block;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
}

.blog-post hr {
  max-width: 40%;
  margin-left: auto;
  margin-right: auto;
  border-width: 0.25rem;
  border-radius: 0.1875rem;
  border-color: #404040;
}

.blog-post blockquote {
  padding: 0.625rem 1.25rem;
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  border-left: 0.3125rem solid #eee;
}

.blog-post blockquote p:last-child {
  margin-bottom: 0;
}

/* --- Content Utilities --- */

/* Center block element */
.center {
  display: block;
  margin: 0 auto;
}

/* Image / figure caption */
figcaption, .caption {
  text-align: center;
  font-size: 14px;
  padding: 10px;
  font-style: italic;
  margin: 0;
  display: block;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  color: #777;
}

/* --- Tables --- */

table {
  padding: 0;
}

table tr {
  border-top: 1px solid #cccccc;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

table tr:nth-child(2n) {
  background-color: #f8f8f8;
}

table tr th {
  font-weight: bold;
  border: 1px solid #cccccc;
  text-align: left;
  margin: 0;
  padding: 6px 13px;
}

table tr td {
  border: 1px solid #cccccc;
  text-align: left;
  margin: 0;
  padding: 6px 13px;
}

table tr th :first-child,
table tr td :first-child {
  margin-top: 0;
}

table tr th :last-child,
table tr td :last-child {
  margin-bottom: 0;
}

/* --- Content section --- */

.content-section {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: #f0f0f0;
  border-radius: var(--bs-border-radius, 0.375rem);
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* --- Callout Boxes (Bootstrap alert-based) --- */

.alert.callout {
  border-left-width: 5px;
  border-radius: 5px 3px 3px 5px;
  margin: 20px 0;
}

.alert.callout .alert-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.alert-note {
  color: #383d41;
  background-color: #e2e3e5;
  border-color: #d6d8db;
}

.alert-note .alert-heading {
  color: #2b2f32;
}

@media (prefers-reduced-motion: reduce) {
  .alert.callout {
    /* No animation/transition */
  }
}

/* Backward-compatible box-* aliases */
.box-note,
.box-warning,
.box-error,
.box-success {
  padding: 1rem 1.25rem;
  margin: 20px 0;
  border: 1px solid transparent;
  border-left-width: 5px;
  border-radius: 5px 3px 3px 5px;
}

.box-note {
  color: #383d41;
  background-color: #e2e3e5;
  border-color: #d6d8db;
  border-left-color: #6c757d;
}

.box-warning {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffc107;
  border-left-color: #ffc107;
}

.box-error {
  color: #58151c;
  background-color: #f8d7da;
  border-color: #dc3545;
  border-left-color: #dc3545;
}

.box-success {
  color: #0a3622;
  background-color: #d1e7dd;
  border-color: #198754;
  border-left-color: #198754;
}
.box-success { composes: alert alert-success callout; }

/* --- Card / Accordion --- */

div.card-body a.list-group-item {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 800;
  border-radius: 0;
  border: none;
  font-size: 16px;
}

div.accordion .card {
    border-radius: 0;
}

div.accordion .card+.card {
    margin-top: 0;
}

div.card-body a.list-group-item.view-all {
  font-weight: 600;
}

h2.mb-0 button span.badge {
    float: right;
}

/* --- GitHub Buttons --- */

.gh-buttons {
  margin-bottom: 20px;
}

.gh-buttons .github-button {
  display: inline-block;
  margin-right: 8px;
  margin-bottom: 8px;
}

@media only screen and (max-width: 600px) {
  .gh-buttons .github-button {
    display: block;
    margin-right: 0;
  }
}

/* --- Social media sharing section --- */

#social-share-section {
  margin-bottom: 30px;
}

ul.share {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.share li {
  display: inline-flex;
  margin-right: 5px;
}

ul.share li:last-of-type {
  margin-right: 0;
}

ul.share li .fab {
  display: block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  font-size: 16px;
  text-align: center;
  transition: all 150ms ease-in-out;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
   ul.share li .fab {
    transition: none;
  }
}

ul.share li a {
  background-color: #b5c6ce;
  display: block;
  border-radius: 50%;
  margin: 0;
}

ul.share li:hover .fab {
  transform: scale(1.4)
}

/* --- Code blocks --- */

.highlight {
  box-sizing: border-box;
  position: relative;
}

.copyCodeButton {
  display: none;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
  .copyCodeButton {
    transition: none;
  }
}

.highlight:hover .copyCodeButton,
.highlight:focus-within .copyCodeButton {
  display: inline-flex;
}

/* --- Third-party overrides --- */

/* Make long KaTeX equations scrollable in the x-axis */
.katex-display>.katex {
  overflow-x: auto;
  overflow-y: hidden;
}

/* Google Custom Search Engine Popup */
#modalSearch table tr, #modalSearch table tr td, #modalSearch table tr th {
  border:none;
}

.reset-box-sizing, .reset-box-sizing *, .reset-box-sizing *:before, .reset-box-sizing *:after,  .gsc-inline-block {
  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}

input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus, .gsc-search-button {
  box-sizing: content-box;
  line-height: normal;
}

/* IPython split style */
div.splitbox {width:100%; overflow:auto;}

div.splitbox div.left {
  width:48%;
  float:left;
}

div.splitbox div.right {
  width:48%;
  float:right;
}

@media only screen and (max-width: 600px) {
  div.splitbox div.left {
    width:100%;
    float:left;
  }
  div.splitbox div.right {
    width:100%;
    float:left;
  }
}

/* --- Disqus / Comments --- */

.disqus-comments {
  margin-top: 30px;
}

@media only screen and (min-width: 768px) {
  .disqus-comments {
    margin-top: 40px;
  }
}

#cusdis_thread {
  margin-top: 30px;
}

/* Delayed Disqus */
.disqus-comments button {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 5px;
  background: #FFF;
  border-radius: 0;
  color: #404040;
}

@media only screen and (min-width: 768px) {
  .disqus-comments button {
    padding: 15px 25px;
  }
}

.disqus-comments button:hover,
.disqus-comments button:focus {
  color: #FFF;
  background: #0085a1;
  border: 1px solid #0085a1;
}

/* --- View source --- */

.view-source {
  margin-top: 20px;
}

.btn-view-source {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 5px;
  background: #FFF;
  border: 1px solid #ccc;
  border-radius: 0;
  color: #404040;
  display: inline-block;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

@media only screen and (min-width: 768px) {
  .btn-view-source {
    padding: 15px 25px;
  }
}

.btn-view-source:hover,
.btn-view-source:focus {
  color: #FFF;
  background: #0085a1;
  border-color: #0085a1;
  text-decoration: none;
}

/* --- Related posts --- */

h4.see-also {
  margin-top: 30px;
  margin-bottom: 15px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #404040;
}

.see-also-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.see-also-item {
  display: block;
  padding: 14px 18px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-left: 3px solid #0085a1;
  border-radius: 4px;
  text-decoration: none;
  color: #404040;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.see-also-item:hover,
.see-also-item:focus {
  background: #f0f8fa;
  border-color: #0085a1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: #0085a1;
}

.see-also-item-title {
  display: block;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.see-also-item-subtitle {
  display: block;
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 14px;
  color: #888;
  margin-top: 3px;
  line-height: 1.4;
}

.see-also-item:hover .see-also-item-subtitle,
.see-also-item:focus .see-also-item-subtitle {
  color: #006680;
}

/* --- Archive year selector --- */

.archive-year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2rem;
}

.archive-year-btn {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.archive-year-btn:hover {
  background: #f0f8fa;
  border-color: #0085a1;
  color: #0085a1;
}

.archive-year-btn.active {
  background: #0085a1;
  border-color: #0085a1;
  color: #fff;
}

.archive-year-btn:focus-visible {
  outline: 2px solid #0085a1;
  outline-offset: 2px;
}

.archive-year-heading {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #555;
  text-align: center;
  margin: 1.5rem 0 1rem;
  letter-spacing: 0.05em;
}

.archive-group:first-child .archive-year-heading {
  margin-top: 0;
}

/* --- Archive list --- */

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 2rem;
}

.archive-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  padding: 12px 18px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-left: 3px solid #0085a1;
  border-radius: 4px;
  text-decoration: none;
  color: #404040;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.archive-item:hover,
.archive-item:focus {
  background: #f0f8fa;
  border-color: #0085a1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: #0085a1;
}

.archive-item-title {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.archive-item-subtitle {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 14px;
  color: #888;
  line-height: 1.4;
}

.archive-item:hover .archive-item-subtitle,
.archive-item:focus .archive-item-subtitle {
  color: #006680;
}

.archive-item-date {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #999;
  margin-left: auto;
  white-space: nowrap;
}

.archive-item:hover .archive-item-date,
.archive-item:focus .archive-item-date {
  color: #006680;
}

/* --- Terms list (tags, categories, authors) --- */

.terms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2rem;
}

.terms-item {
  padding: 14px 18px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-left: 3px solid #0085a1;
  border-radius: 4px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.terms-item:hover {
  background: #f0f8fa;
  border-color: #0085a1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.terms-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.terms-item-header a {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #404040;
  text-decoration: none;
}

.terms-item-header a:hover,
.terms-item-header a:focus {
  color: #0085a1;
}

.terms-item-count {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #0085a1;
  border-radius: 12px;
  padding: 2px 10px;
  line-height: 1.4;
}

.terms-item-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.terms-item-page {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0066CC;
  background: #eee;
  border-radius: 3px;
  padding: 3px 10px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.terms-item-page:hover,
.terms-item-page:focus {
  background: #0085a1;
  color: #fff;
  text-decoration: none;
}

/* --- Recipe Card --- */

.recipe-card {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.recipe-meta-item {
  display: flex;
  flex-direction: column;
}

.recipe-meta-label {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
}

.recipe-meta-value {
  font-size: 1rem;
  font-weight: 600;
  color: #404040;
}

.recipe-section {
  margin-bottom: 1.5rem;
}

.recipe-section:last-child {
  margin-bottom: 0;
}

.recipe-section-title {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #404040;
}

.recipe-ingredients {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recipe-ingredients li {
  padding: 0.35rem 0;
  border-bottom: 1px dotted #ddd;
}

.recipe-ingredients li:last-child {
  border-bottom: none;
}

.recipe-instructions {
  padding-left: 1.5rem;
  margin: 0;
}

.recipe-instructions li {
  padding: 0.5rem 0;
  line-height: 1.6;
}

.recipe-instructions li strong {
  display: block;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

/* Dark mode */
[data-theme="dark"] .recipe-card {
  border-color: #444;
  background: #2a2a2a;
}

[data-theme="dark"] .recipe-meta {
  border-bottom-color: #444;
}

[data-theme="dark"] .recipe-meta-label {
  color: #888;
}

[data-theme="dark"] .recipe-meta-value,
[data-theme="dark"] .recipe-section-title {
  color: #e0e0e0;
}

[data-theme="dark"] .recipe-ingredients li {
  border-bottom-color: #444;
}

/* MathJax overflow handling for mobile */
.MathJax_Display,
mjx-container {
  overflow-x: auto !important;
  overflow-y: hidden;
  max-width: 100%;
}

.MathJax_Display > mjx-container {
  overflow-x: auto;
}

mjx-container mjx-wrap {
  overflow-x: auto;
}

.MathJax_Display mjx-math {
  display: block !important;
  max-width: max-content;
}
