/* Reset */
    html, body {
      margin: 0;
      padding: 0;
      height: 100%;
      overflow-x: hidden;
      background-color: black;
      font-family: 'Book Antiqua', 'Palatino Linotype', Palatino, serif; /* D&D-like font */
      line-height: 1.7;
      color: #3c2f2a;
      font-size: 1.18em; /* Slightly larger base text */
    }

    /* Two layered background divs for crossfade without distortion */
    .bg-layer {
      position: fixed;
      top: 0;
      left: 50%;
      width: 100vw;
      height: 100vh;
      max-width: 1920px;
      transform: translateX(-50%);
      background-size: cover;
      background-position: center;
      background-attachment: fixed;
      transition: opacity 0.6s ease-in-out;
      z-index: 1;
      opacity: 0;
    }
    .bg-layer.active {
      opacity: 1;
      z-index: 2;
    }

    /* Heading styles scoped to content */
    .content h1, .content h2 {
      color: #7b1f1f;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
      text-transform: uppercase;
      font-family: 'Book Antiqua', 'Palatino Linotype', Palatino, serif;
      font-weight: bold;
      letter-spacing: 0.04em;
    }
    .content h1 {
      font-size: 1.8em;
      border-bottom: 3px solid rgba(123,31,31,0.6);
      padding-bottom: 0.3em;
      margin-top: 0;
      background: rgba(255,248,230,0.0);
      display: inline-block;
      padding: 0.2em 0.5em;
      margin-bottom: 1em;
    }
    .content h2 {
      font-size: 1.2em;
      letter-spacing: 1.5px;
      background: rgba(255,248,230,0.0);
      display: inline-block;
      padding: 0.1em 0.4em;
      margin-top: 2em;
      margin-bottom: 0.5em;
    }

    .content h2.title {
      display: block;
      clear: both;
      width: 100%;
      text-align: center;
      font-size: 2.0em;
      letter-spacing: 0.02em;
      line-height: 1.1;
      margin: 0;
    }

    .content h1.title {
      display: block;
      clear: both;
      width: 100%;
      text-align: center;
      font-size: 4.0em;
      letter-spacing: 0.04em;
      line-height: 1.0;
      margin: 0;
      border-bottom: 0px solid rgba(123,31,31,0.6);
      padding: 0;
    }
    .content p, .content li {
      margin: 0.8em 0;
    }

    .content blockquote {
      margin: 1em 2em;
      padding: 0.8em 1em;
      border-left: 6px solid rgba(123,31,31,0.8);
      background: rgba(255,248,230,0.5);
      font-style: italic;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
      color: #4b3222;
    }

    /* Table & Progress inside content */
    .content table {
      width: 100%;
      border-collapse: collapse;
      margin: 1em 0;
      background: transparent;
    }
    .content table th, .content table td {
      border: 1px solid rgba(60,47,42,0.4);
      padding: 10px 14px;
      text-align: left;
      background: rgba(255,248,230,0.5);
    }
    .content table th {
      background: rgba(123,31,31,0.8);
      color: #ffffff;
    }
    .progress-container {
      width: 90%;
      background: rgba(60,47,42,0.3);
      border-radius: 12px;
      overflow: hidden;
      height: 24px;
    }
    .progress-bar {
      height: 24px;
      background: #7b1f1f;
      color: #fff;
      text-align: right;
      padding-right: 8px;
      line-height: 24px;
      white-space: nowrap;
    }

    /* Parchment container */
    .container2 {
      position: relative;
      width: 100%;
      max-width: 900px;
      margin: 0 auto;
      z-index: 4;
    }
    .container2::before {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
	  background-image: url('../background_tile.png');
      background-repeat: repeat;
      opacity: 0.8;
      pointer-events: none;
      z-index: -1;
    }

    /* Transparent content card */
    .content {
      margin: 0 auto;
      padding: 2.5rem;
      background: transparent;
      z-index: 5;
      font-size: 1.0em; /* Larger text in content area */
      font-weight: 500;   /* Slightly bolder text */
      letter-spacing: 0.01em;
    }

    .section {
      padding: 4rem 1rem;
      color: #000000;
      overflow: auto; /* Ensures floated images don't overflow the section */
    }

    footer {
      text-align: center;
      margin: 2em 0;
      color: #555;
      font-size: 0.9em;
    }
	
	.img_small {
		width: 25%;
		float: left; /* Or 'right' depending on the desired alignment */
		margin: 10px; /* Adds some spacing around the image */
	}

  .img_small_r {
		width: 25%;
		float: right; /* Or 'right' depending on the desired alignment */
		margin: 10px; /* Adds some spacing around the image */
	}

  .img_wide 
{
    width: 100%;
    display: block;
    margin: 10px auto;
    max-width: 900px; /* Ensures it doesn't exceed the content width */
  }

  /* AI-Generated image badge overlay */
  .ai-generated {
    position: relative;
    display: inline-block;
  }
  .ai-generated.float-left {
    float: left;
    width: 25%;
    margin: 10px;
  }
  .ai-generated.float-right {
    float: right;
    width: 25%;
    margin: 10px;
  }
  .ai-generated.wide {
    width: 100%;
    display: block;
    margin: 10px auto;
    max-width: 900px;
  }
  .ai-generated img {
    width: 100%;
    display: block;
  }
  .ai-generated::after {
    content: "";
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 80px;
    height: 80px;
    background: url('../images/AIGenerated.png') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    opacity: 0.8;
  }


	.section-divider {
  clear: both;
  width: 100%;
  height: 32px;
  margin: 2em 0;
  background: url('../images/rule.svg') center center no-repeat;
  background-size: contain;
  opacity: 0.85;
  border: none;
}

/* Responsive adjustments for mobile */
@media (max-width: 700px) {
  html, body {
    font-size: 0.98em;
    line-height: 1.4;
  }

  .content {
    padding: 2.2rem;
    font-size: 0.98em;
  }

  .content h1.title {
    font-size: 1.2em;
    margin-top: -0.5em;
    margin-bottom: -0.5em;
  }
  .content h2.title {
    font-size: 1.2em;
  }
  .content h1 {
    font-size: 1.2em;
  }
  .content h2 {
    font-size: 1em;
  }

  .progress-container {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 0.95em;
  }
  .progress-bar {
    font-size: 0.95em;
    padding-right: 4px;
  }

  .content table,
  .content table th,
  .content table td {
    font-size: 0.95em;
    padding: 6px 4px;
    word-break: break-word;
  }
  .content table {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    overflow-x: visible;
    display: table;
    box-sizing: border-box;
  }

  .img_small,
  .img_small_r {
    width: 50%;
    float: none;
    display: block;
    margin: 10px auto;
  }
}

/* Site banner styles */
.site-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #7b1f1f;
  color: #fff;
  padding: 0.7em 1.2em;
  position: sticky;
  top: 0;
  z-index: 100;
}
.banner-title {
  font-family: 'Book Antiqua', 'Palatino Linotype', Palatino, serif;
  font-size: 1.3em;
  letter-spacing: 0.05em;
}
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.5em;
}
.hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #7b1f1f;
  min-width: 180px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5em 0;
}
.mobile-nav li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav li:last-child {
  border-bottom: none;
}
.mobile-nav a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 0.7em 1.2em;
  font-size: 1em;
}
.mobile-nav a:hover {
  background: #a33c3c;
}
.mobile-nav.open {
  display: block;
}

/* Hide nav on desktop, show on mobile */
@media (min-width: 800px) {
  .hamburger { display: none; }
  .mobile-nav {
    display: block !important;
    position: static;
    background: none;
    box-shadow: none;
  }
  .mobile-nav ul {
    display: flex;
    gap: 1.5em;
  }
  .mobile-nav li {
    border: none;
  }
  .mobile-nav a {
    padding: 0.3em 0.7em;
    font-size: 1em;
  }
}