*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Courier New", Courier, monospace;
  font-size: 17px;
  line-height: 1.7;
  background: #fafafa; /* soft page background */
  color: #111111;
}

/* MAIN CONTENT COLUMN WRAPPER */
.page-wrapper {
  max-width: 840px;
  margin: 2rem auto;
  padding: 2rem 3rem;
  border: 1px solid #e5eaf5; /* Freeze Purple border */
  background: #ffffff;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* HEADER */

.site-header {
  border-bottom: 1px solid #cccccc;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.site-header-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: bold;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav a {
  margin-left: 0.75rem;
  font-size: 0.85rem;
  text-decoration: underline;
  color: #0645ad;
}

.main-nav a:first-child {
  margin-left: 0;
}

/* THEME TOGGLE BUTTON */
.theme-toggle {
  margin-left: 0.75rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid #333333;
  background: #f4f4f4;
  color: #111111;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
}

.theme-toggle:hover {
  background: #e4e4e4;
}

/* TYPOGRAPHY */

h1,
h2,
h3 {
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

/* subtle purple accent for section titles */
h2,
h3 {
  font-size: 1.3rem;
  color: #8458B3; /* Purple Pain */
}

p {
  margin-bottom: 0.9rem;
}

/* LINKS / BUTTONS */

a {
  color: #0645ad;
}

a:hover {
  text-decoration: none;
}

.btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid #333333;
  border-radius: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  text-decoration: none;
  background: #f4f4f4;
  color: #111111;
}

.btn:hover {
  background: #e4e4e4;
}

.btn.small {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
}

.btn.disabled-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

/* HERO */

.hero {
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 1.9rem;
  margin-bottom: 0.3rem;
}

.tagline {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 0.4rem;
}

.hero-text {
  margin-bottom: 1rem;
}

.hero-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* SECTIONS */

section {
  margin-top: 2rem;
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5eaf5; /* Freeze Purple section divider */
}

/* CHAPTER LIST */

.chapter-list {
  list-style: none;
  padding-left: 0;
}

.chapter-item {
  margin-bottom: 1.1rem;
}

.chapter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #666666;
}

.chapter-title {
  font-weight: bold;
}

.chapter-blurb {
  margin: 0.3rem 0 0.4rem;
  color: #333333;
}

.chapter-item.disabled {
  opacity: 0.6;
}

/* FEEDBACK */

.email-callout a {
  text-decoration: underline;
}

/* FOOTER */

.site-footer {
  border-top: 1px solid #cccccc;
  padding: 0.75rem 1rem 1.5rem;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #555555;
  text-align: center;
}

/* FEEDBACK FORM */

.feedback-form {
  margin-top: 1rem;
  max-width: 640px;
}

.feedback-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

.feedback-form textarea,
.feedback-form input[type="email"] {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid #999999;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
}

.feedback-form textarea:focus,
.feedback-form input[type="email"]:focus {
  outline: none;
  border-color: #0645ad;
}

.feedback-form button {
  margin-top: 0.9rem;
}

/* MAILING LIST CARD */

.mailing-card {
  border: 1px solid #e5eaf5; /* Freeze Purple */
  padding: 1.25rem 1rem;
  margin-top: 1.5rem;
  max-width: 680px;
  background: #fafafa;
}

.mailing-card h3 {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.mailing-card p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: #333333;
}

.mailing-card iframe {
  width: 100%;
  border: 1px solid #eeeeee;
}

/* DOWNLOAD BOX */

.download-box {
  padding: 0.5rem 0.75rem;
  margin: 0 0 1.5rem;
  border: 1px solid #e5eaf5; /* Freeze Purple */
  background: #fafafa;
  font-size: 0.9rem;
}

.download-box a {
  text-decoration: underline;
  margin: 0 0.1rem;
}

/* RESPONSIVE */

@media (max-width: 600px) {
  .page-wrapper {
    padding: 1.25rem 1.25rem;
    margin: 1rem;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  main {
    padding: 1.5rem 0.25rem 2.5rem;
  }
}


/* ------------------------------- */
/* DARK THEME OVERRIDES */
/* ------------------------------- */

body.dark-theme {
  background: #060711;
  color: #f5f5f5;
}

body.dark-theme .page-wrapper {
  background: #0b0c18;
  border-color: #33354a;
}

body.dark-theme section {
  border-bottom-color: #33354a;
}

body.dark-theme .site-header,
body.dark-theme .site-footer {
  border-color: #33354a;
}

body.dark-theme h2,
body.dark-theme h3 {
  color: #d0bdf4; /* soft purple */
}

body.dark-theme .chapter-blurb {
  color: #d4d4e5;
}

body.dark-theme .btn {
  background: #111320;
  color: #f5f5f5;
  border-color: #f5f5f5;
}

body.dark-theme .btn:hover {
  background: #202338;
}

body.dark-theme .mailing-card {
  background: #111320;
  border-color: #33354a;
}

body.dark-theme .download-box {
  background: #111320;
  border-color: #33354a;
}

body.dark-theme a {
  color: #d0bdf4;
}

body.dark-theme .theme-toggle {
  background: #111320;
  color: #f5f5f5;
  border-color: #f5f5f5;
}
