:root {
  --text-color: #1a1a1a;
  --light-color: #888;
  --primary-color: #d62828;
  --secondary-color: #cc3030;
  --link-color: #3e5fff;
}

* {margin: 0; padding: 0; box-sizing: border-box;}
html {scroll-behavior: smooth;}
body {
  font-family: 'Open Sans', Arial, sans-serif, 'Helvetica Neue', 'Helvetica';
  font-size: 16px;
  color: var(--text-color);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background: #fdfdfd;
}
.btn {
  text-decoration: none;
  text-align: center;
  background: var(--primary-color);
  color: #fff;
  padding: .5rem;
  border-radius: 6px;
  font-size: 16px;
  border: 1px solid var(--primary-color);
  cursor: pointer;
  transition: all .3s ease;
  font-weight: 600;
  font-family: 'Open Sans', Arial, sans-serif, 'Helvetica Neue', 'Helvetica';
  white-space: nowrap;
}
.btn:hover {filter: brightness(72%);}
.btn.secondary {
  background: #fff;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  object-fit: cover;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}
figcaption {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin: .5rem 0 1rem 0;
}

/* MAIN */
main {
  max-width: 100% !important;
  width: 100%;
  margin: 0;
  position: relative;
}
section {
  max-width: 780px;
  margin: 0 auto;
  padding: 1rem;
}
h1 {font-size: 3rem; margin-bottom: 1rem; text-align: center;}
h2 {font-size: 1.8rem; margin-top: 2rem; margin-bottom: 1rem;}
h3 {font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; position: relative; display: inline-block;}
li h3 {color: var(--text-color);}
h4 {font-size: 1.25rem; margin-top: 2rem; margin-bottom: 1rem;}
p, li, em {font-size: 18px; line-height: 1.5; margin-bottom: 1rem; color: #333;}
em {display: inline-block;}
a {color: var(--link-color); font-weight: 600; transition: all .3s ease;}
a:hover {text-decoration: none;}
ol, ul {padding-left: 2rem;}
ul li::marker {color: var(--text-color); font-size: 20px;}
strong {display: inline-block; font-size: 18px; line-height: 1.5;}
h3:before {
  content: '';
  display: block;
  width: 100%;
  height: 5px;
  bottom: 0;
  left: 0;
  position: absolute;
  background: rgba(214, 40, 40, 0.5);
  z-index: -1;
}
iframe {width: 100%; border: none; max-width: 780px;}
.hero {
  padding: 4rem 0;
  max-width: 100%;
  width: 100%;
  text-align: center;
}
.pinterest {color: var(--primary-color); font-weight: 800; font-size: 6rem;}
.hero .btn {
  display: block;
  margin: 0 auto;
  font-size: 28px;
  padding: 1rem 2rem;
  max-width: 420px;
}
.login-btn {
  display: inline-block;
  margin-bottom: 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: underline;
  transition: all .3s ease;
}
.login-btn:hover {text-decoration: none;}
.author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #333;
  font-weight: normal;
  text-decoration: none;
  transition: all .3s ease;
  max-width: max-content;
  width: auto;
  margin: 0 auto;
}
.author:hover {text-decoration: underline;}
.author img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(214, 40, 40, 0.5);
  margin: 0;
}
.pin-images {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 6rem 0;
}
.pin-images img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  max-width: 280px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}
.pin-images img:nth-child(odd) {margin-top: -2rem;}
.pin-images img:nth-child(even) {margin-top: 2rem;}
.hero-content h3 {margin-bottom: 0.5rem !important; margin-top: 1rem !important;}
.hero-content h3:before {display: none !important;}
.chapter-title {
  text-align: center;
  padding: 5rem 0;
  background: var(--primary-color);
  color: #fff;
  max-width: 100%;
  width: 100%;
  margin: 2rem auto;
}
.chapter-title h2 {font-size: 4rem; font-weight: 800;}
.box {
  background: #f0f0f0;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.box p {margin-bottom: 0;}
.box li {margin-bottom: 0.5rem;}
.pros {
  border-left: 4px solid green;
  padding-left: 1rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}
.cons {
  border-left: 4px solid red;
  padding-left: 1rem;
  margin-bottom: 1rem;
}

/* COPY TEXT */
.copy-text {
  cursor: pointer;
  text-decoration: underline dashed;
  text-underline-offset: 4px;
  font-family: 'Courier New', Courier, monospace;
  transition: all .3s ease;
  line-height: 1.5;
  display: inline-block;
}
.copy-text:hover {text-decoration: none;}
#status {color: green;font-weight: 600;}

/* PREMIUM CONTENT */
.logged-out .locked {position: relative; padding: 0.5rem 1rem; filter: blur(5px); pointer-events: none; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;}
.logged-out .locked:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
}
.logged-out .locked>* {position: relative;z-index: 0;}

/* BOTTOMBAR */
.bottombar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--secondary-color);
  padding: 2.5rem 1rem;
  color: #fff;
  border-top: 4px solid #fff;
  display: none;
}
.bottombar.show {display: block;}
.bottombar p {
  text-align: center;
  font-size: 20px;
  color: #fff;
  margin-bottom: 0;
}
.bottombar strong {
  font-size: 20px;
}
.bottombar .btn {
  background: #fff;
  color: var(--primary-color);
  padding: 1rem 1.2rem;
  font-size: 20px;
}

/* TABLE OF CONTENTS */
.table-of-contents {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: white;
  border-right: 2px solid #e5e7eb;
  padding: 20px;
  transition: transform 0.3s ease;
  transform: translateX(0);
  z-index: 1000;
  overflow-y: auto;
}
.table-of-contents.hidden {transform: translateX(-250px);}
.toc-toggle {
  position: fixed;
  top: 100px;
  left: 250px;
  width: 28px;
  height: 28px;
  font-size: 18px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: left 0.3s ease, transform 0.3s ease;
}
.toc-toggle:hover {background: #e5e7eb;}
.toc-toggle.rotated {transform: rotate(180deg);}
.toc-toggle.shifted {left: 10px;}
.toc-toggle.show {display: flex;}
.table-of-contents .subset {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.table-of-contents .subset .subset {margin-bottom: 0; gap: .3rem;}
.table-of-contents .chapter-main {
  color: var(--primary-color);
  margin-bottom: .5rem;
  text-decoration: none;
  display: inline-block;
  font-size: 18px;
}
.table-of-contents .chapter-main:hover {text-decoration: underline;}
.table-of-contents .subset li {font-size: 16px; margin: 0;}
.table-of-contents .subset a {
  text-decoration: none;
  color: var(--text-color);
  line-height: 1.4;
}
.table-of-contents .subset a:hover {text-decoration: underline;}
.table-of-contents .subset .subset a {font-weight: normal;}

/* LOGIN POPUP */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.popup-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  width: 90%;
  max-width: 500px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}
.popup-content input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: 'Open Sans', Arial, sans-serif, 'Helvetica Neue', 'Helvetica';
}
.popup-content .btn {width: 100%;margin: 1rem 0;}
.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
}
.popup-close:hover {color: #374151;}
.popup-message {
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-weight: 500;
}
.popup-message.success {background-color: #dcfce7;color: #166534;border: 1px solid #bbf7d0;}
.popup-message.error {background-color: #fef2f2;color: #dc2626;border: 1px solid #fecaca;}

/* FEEDBACK BUTTON */
.feedback-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 2rem;
  border: 2px solid #fff;
  text-decoration: none;
  transition: all .3s ease;
}
.feedback-btn:hover {
  filter: brightness(72%);
}

/* FOOTER */
footer {
  padding: 1.5rem 1rem;
  margin-top: 4rem;
}
footer p {font-size: 14px;}
.copyright {
  text-align: center;
  padding-top: 1.5rem;
}

@media (max-width: 1015px) {.bottombar .btn {display: block;}}
@media (max-width: 960px) {
  .hero {padding-bottom: 2rem;}
  .pin-images {flex-wrap: wrap; margin: 4rem 0;}
  .pin-images img {max-width: 45%;}
  .mobile-hidden {display: none;}
  .pinterest {font-size: 4rem;}
  h1 {font-size: 2.5rem;}
  .chapter-title h2 {font-size: 3rem;}
  .hero .btn {max-width: 320px;}
}
@media (max-width: 768px) {
  .bottombar {padding: 1rem;}
  .bottombar p, .bottombar strong {font-size: 16px;}
  .bottombar .btn {font-size: 16px; display: block; margin: 0.5rem auto;}
  .bottombar s {display: none;}
}