
html {
  scroll-behavior: smooth;
}

body {
  font-family: "PT Serif", serif;
  background-color: #fcfbf0;
  font-size: 1.1em;
  font-weight: 300;
  line-height: 1.6;
}

ul, ol {
  padding: 0;
}

.content-body p {
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
}

.content-body a {
  box-shadow: 0 1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
  font-weight: 500;
}

.content-body h1 {
  font-size: 2em;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.4em;
}

.content-body h2 {
  font-size: 1.75em;
  line-height: 1.5;
  margin-top: 2em;
}

.content-body h3 {
  font-size: 1.5em;
}

.content-body h4 {
  font-size: 1.17em;
}

.content-body h5 {
  font-size: 1.1em;
}

.content-body ul,
.content-body ol {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.content-body ul {
  list-style-type: disc;
}

.content-body ol {
  list-style-type: decimal;
}

.content-body li {
  margin-bottom: 0.5rem;
}

.footnotes ol {
  list-style-type: decimal;
}

/* Code block styling */
pre {
  position: relative;
  padding: 1.25rem;
  margin: 1em auto;
  border-radius: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  background-color: #f7f6eb !important;
  line-height: 1.75em;
  -webkit-overflow-scrolling: touch;
}

pre code {
  font-size: 0.9em;
  font-family: "Fira Code", monospace;
  font-variant-ligatures: none;
  font-weight: 400;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  display: block;
}

/* Inline code styling */
:not(pre) > code {
  padding: 0.2rem 0.4rem;
  background-color: #f7f6eb;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: #689d6a; 
}

/* Ensure images don't overflow their containers */
img {
  max-width: 100%;
  height: auto;
}

blockquote {
  border-left: 4px solid #af3a03;
  padding-left: 1rem;
  font-style: italic;
  margin-left: 0;
  margin-right: 0;
  background-color: #f7f6eb;
  padding: 1rem;
}

hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table th,
table td {
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
}

table th {
  background-color: #f8f8f8;
}

/* Improve link accessibility */
a:focus {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

.tag {
  border: 1px solid black;
  color: black;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-decoration: none;
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.tag:hover {
  background-color: rgba(0, 0, 0, 0.05);
}


.toc {
  font-size: 1em;
  line-height: calc(0.9 * 1.5em);
  margin-top: 2rem;
  margin-bottom: 3rem;
  padding-left: 1.5rem; 
}

.toc > nav > ul > li > ul { 
  margin-left: 1.5rem;
  margin-top: 0.1rem;
  margin-bottom: 0.1rem;
  list-style-type: disc; 
}

.toc > nav > ul > li > ul > li > ul { 
  list-style-type: circle; 
  margin-left: 1.5rem; 
}

.toc > nav > ul > li > ul li {
  margin-top: 0.1rem;
  margin-bottom: 0.1rem;
}

.toc a {
  box-shadow: 0 1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
