body:has(#sidebar-wrapper) #entries {
  margin: 0 auto;
}
body:not(:has(#sidebar-wrapper)) {
  main {
    margin-top: 8rem;
  }
  footer {
    padding-top: 3rem;
  }
}
#entries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  max-width: 1200px;
  margin: 6rem auto;
  padding: 20px;
  background-color: var(--template-bg-color, #fff);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: auto;
}
.loading-entry {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  min-height: 357px;
  height: 100%;
}
.blogPost {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-direction: column;
  padding: 1rem;
  cursor: pointer;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.blogPost:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.blogPost img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 10px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
span[id^="EMBED:"] {
  display: none;
}
.blogPost p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blogPost-content {
  padding: 20px;
}
.blogPost h2 {
  margin-top: 0;
  font-size: 1.5em;
  color: var(--template-font-color, #333);
}
.blogPost p {
  color: var(--template-font-color-secondary, #666);
}
.post-meta {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  margin-top: auto;
  font-size: 0.9em;
  color: var(--template-font-color-secondary, #999);
}
.post-meta .date {
  margin-left: auto;
  align-self: flex-end;
  font-weight: bold;
  font-style: italic;
}
/* viewport: mobile */
@media (width < 769px) {
  #entries {
    grid-template-columns: repeat(1, 1fr);
  }
}
main:not(:has(#entries)) {
  margin: 0 auto;
  max-width: var(--section-article-width, 800px);
  line-height: 1.6;
  padding: 0 20px 0 20px;
  border-radius: 8px;
  font-family: var(--section-article-font, "Inter", sans-serif);
  * {
    text-align: left;
  }
  h1 {
    font-size: var(--section-article-heading1-size, var(--heading-1-font-size, 2.5rem));
    font-weight: var(--section-article-heading1-weight, var(--heading-1-font-weight, 700));
    color: var(--section-article-heading-color, var(--template-font-color, #333));
    margin-top: 40px;
    margin-bottom: 25px;
    line-height: 1.2;
  }
  h2 {
    font-size: var(--section-article-heading-size, var(--heading-2-font-size, 1.75rem));
    font-weight: var(--section-article-heading-weight, var(--heading-2-font-weight, 700));
    color: var(--section-article-heading-color, var(--template-font-color, #333));
    margin-top: var(--section-article-heading-gap, 40px);
    margin-bottom: var(--section-article-heading-bottom-gap, 25px);
    line-height: var(--section-article-heading-line-height, 1.3);
  }
  h3 {
    font-size: var(--section-article-subheading-size, var(--heading-3-font-size, 1.5rem));
    font-weight: var(--heading-3-font-weight, 600);
    color: var(--section-article-heading-color, var(--template-font-color, #333));
    margin-top: 35px;
    margin-bottom: 25px;
    line-height: 1.4;
  }
  h4 {
    font-size: var(--heading-4-font-size, 1.25rem);
    font-weight: var(--heading-4-font-weight, 600);
    color: var(--template-font-color, #333);
    margin-top: 30px;
    margin-bottom: 25px;
    line-height: 1.4;
  }
  h5 {
    font-size: var(--heading-5-font-size, 1.125rem);
    font-weight: var(--heading-5-font-weight, 700);
    color: var(--template-font-color, #333);
    margin-top: 25px;
    margin-bottom: 25px;
    line-height: 1.5;
  }
  h6 {
    font-size: var(--heading-6-font-size, 1.125rem);
    font-weight: var(--heading-6-font-weight, 700);
    color: var(--template-font-color, #333);
    margin-bottom: 25px;
    line-height: 1.5;
  }
  p:not([data-img="true"]) {
    font-size: var(--section-article-text-size, var(--paragraph-font-size, 18px));
    font-weight: var(--section-article-text-weight, inherit);
    color: var(--section-article-text-color, var(--template-font-color, inherit));
    margin-bottom: var(--section-article-paragraph-gap, 1em);
    line-height: var(--section-article-line-height, 1.8);
  }
  p[data-img="true"] {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin: 2em auto;
    overflow: hidden;
  }
  > p > img {
    display: block;
    max-width: min(100%, var(--section-article-image-width, 100%));
    height: auto;
    margin-inline: auto;
  }
  p[data-img="true"] img {
    height: auto;
    max-width: 100%;
    margin: 0 0 10px 0;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
  }
  p[data-img="true"]:has(> img ~ img) > img {
    max-width: calc(50% - 20px);
  }
  [data-type="image-grid"] {
    display: grid;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
  }
  [data-type="image-grid"] img {
    width: 100%;
    border-radius: 8px;
    height: auto;
    box-sizing: border-box;
    object-fit: cover;
    transform-origin: center;
    transition: transform 0.3s ease;
    aspect-ratio: 1 / 1;
  }
  ul {
    list-style-type: disc !important;
    margin-left: 20px;
    padding: 0 10px;
    border-radius: 5px;
    margin-bottom: var(--section-article-list-gap, 1.5em);
  }
  ol {
    list-style-type: decimal !important;
    margin-left: 20px;
    padding: 0 10px;
    border-radius: 5px;
    margin-bottom: var(--section-article-list-gap, 1.5em);
  }
  li {
    margin-bottom: var(--section-article-list-item-gap, 10px);
  }
  blockquote {
    font-size: 1.125rem;
    color: var(--template-font-color-secondary, #555);
    background-color: var(
      --template-bg-color-secondary,
      rgba(241, 241, 241, 0.5)
    );
    border-left: 4px solid var(--template-color-0);
    padding: 15px 20px;
    margin: 30px 0;
    font-style: italic;
    border-radius: 0 5px 5px 0;
    position: relative;
  }
  blockquote p:not([data-img="true"]) {
    margin-top: 0;
    margin-bottom: 0;
  }
  pre {
    background-color: var(--template-bg-color-secondary, #f4f4f4);
    padding: 15px;
    border-radius: 5px;
    font-size: 0.9em;
    overflow-x: auto;
    margin: 1.5em 0;
    border-left: 3px solid var(--template-color-0);
  }
  a,
  strong a {
    color: var(--template-color-0);
    cursor: pointer;
    transition: color 0.2s ease;
  }
  a:hover,
  strong a:hover {
    color: var(--template-color-1, #fb7185);
  }
  code {
    background-color: var(--template-bg-color-secondary, #f4f4f4);
    padding: 5px;
    border-radius: 5px;
    font-size: 0.9em;
    font-family: "Consolas", "Monaco", monospace;
  }
  button {
    background-color: var(--template-color-0);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
  }
  button:hover {
    background-color: var(--template-color-1);
  }
  table {
    border-collapse: collapse;
    margin: 0;
    overflow: hidden;
    table-layout: fixed;
    width: 100%;
    border: 0.5px solid var(--template-color-0, #0073e6);
  }
  table td,
  table th {
    border: 1px solid
      color-mix(in srgb, var(--template-color-0, #0073e6) 40%, transparent);
    box-sizing: border-box;
    min-width: 1em;
    padding: 0.5rem;
    position: relative;
    vertical-align: top;
  }
  table th {
    background-color: color-mix(
      in srgb,
      var(--template-color-0, #0073e6) 15%,
      transparent
    );
    font-weight: bold;
    text-align: left;
    color: color-mix(in srgb, var(--template-color-0, #0073e6) 90%, black);
  }
  table p {
    margin: 0;
  }
  .faq-block-container {
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 1rem;
  }
  .faq-block-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--template-font-color, #333);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--template-color-0);
  }
  .faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
  }
  .faq-question {
    background-color: var(--template-bg-color, #fff);
    padding: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    user-select: none;
  }
  .faq-question:hover {
    background-color: var(--template-bg-color-secondary, #f7f7f7);
    color: var(--template-color-0);
  }
  .faq-question[aria-expanded="true"]::after {
    transform: rotate(180deg);
  }
  .faq-answer {
    padding: 1.25rem;
    font-size: 17px;
    color: var(--template-font-color-secondary, #555);
    line-height: 1.6;
    transition: none;
  }
  .faq-question::after {
    content: "↓";
    color: var(--template-color-0);
    transition: transform 0.2s ease;
  }
  body:has(#sidebar-wrapper) {
    padding-left: 280px;
  }
  /* viewport: mobile */
@media (width < 769px) {
    body:has(#sidebar-wrapper) {
      padding-left: 0;
    }
    p[data-img="true"]:has(> img ~ img) > img {
      max-width: 100%;
    }
  }
}
.theme-haergi main:not(:has(#entries)) :is(h1, h2, h3) {
  font-family: var(--section-article-heading-font);
}
.theme-haergi main:not(:has(#entries)) :is(ul, ol, li) {
  font-family: var(--section-article-font);
  font-size: var(--section-article-text-size);
  color: var(--section-article-text-color);
  line-height: var(--section-article-line-height);
}
