/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.theme-toggle:active {
  transform: scale(0.95);
}

/* Smooth anchor scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

/* Make anchor targets visible */
[id] {
  scroll-margin-top: 2rem;
}

/* Highlight targeted checklist items */
:target {
  background: rgba(255, 220, 100, 0.3);
  border-radius: 4px;
  padding: 0.25rem;
  margin: -0.25rem;
}

/* Better blockquote styling */
blockquote {
  border-left: 4px solid var(--links);
  padding-left: 1rem;
  margin-left: 0;
  font-style: italic;
  opacity: 0.9;
}

/* Details/summary styling */
details {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: var(--background-alt);
  border-radius: 6px;
}
details summary {
  cursor: pointer;
  user-select: none;
}
details[open] summary {
  margin-bottom: 0.5rem;
}


/* Side-by-side comparison */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 768px) {
  .comparison {
    grid-template-columns: 1fr;
  }
}
.comparison-bad,
.comparison-good {
  padding: 1rem;
  border-radius: 8px;
}
.comparison-bad {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
}
.comparison-good {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
}
.comparison-bad h4,
.comparison-good h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.comparison-bad blockquote,
.comparison-good blockquote {
  font-style: normal;
  border-left: none;
  padding-left: 0;
  margin: 0.5rem 0;
}
.comparison ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}
.comparison li {
  margin: 0.25rem 0;
}

/* Footer styling */
footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  opacity: 0.8;
}

/* Checklist styling */
h3:has(+ p[id]) {
  margin-bottom: 0.5rem;
}
p[id] {
  margin: 0;
  padding: 0;
}
p[id] + ul {
  margin-top: 0.5rem;
}

/* Make sure content doesn't hide behind toggle */
body {
  padding-top: 1rem;
}

@media (max-width: 600px) {
  .theme-toggle {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
  }
}
