/* Topic page styles (evolution, cosmology, etc.) */

header {
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.75rem;
}

.intro {
  font-size: 1.05rem;
  color: var(--text);
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Topic-level numbering (1.1, 1.2, 1.3, etc.) */
main {
  counter-reset: item;
}

section ul li {
  counter-increment: item;
  display: flex;
  align-items: baseline;
}

section ul li::before {
  content: var(--topic-prefix) counter(item);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-micro);
  min-width: 2.5rem;
  flex-shrink: 0;
}

/* Section dividers */
section {
  margin-bottom: 2rem;
}

section:last-of-type {
  margin-bottom: 0;
}

/* Reading list / resources */
.resources {
  background: var(--border);
  padding: 1.5rem;
  margin-top: 3rem;
  border-radius: 1rem;
}

.resources h2 {
  margin-top: 0;
}

.resources li {
  margin-bottom: 0.75rem;
  counter-increment: none;
}

.resources li::before {
  display: none;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .back {
    margin-bottom: 2.5rem;
  }

  header {
    margin-bottom: 2.5rem;
  }

  header h1 {
    font-size: 1.75rem;
  }

  .intro {
    font-size: 0.95rem;
    padding-left: 1rem;
    margin-bottom: 2rem;
    border-left-width: 3px;
  }

  section {
    margin-bottom: 2rem;
  }

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

  section ul li::before {
    min-width: 2.25rem;
  }

  section ul li {
    margin-bottom: 0.25rem;
  }

  li a {
    padding: 0.625rem 0;
  }

  .resources {
    margin-top: 3rem;
    padding: 1.5rem;
    border-radius: 1rem;
  }
}
