/* ==========================================================================
   Single post
   ========================================================================== */
.fp-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--fp-brand);
  z-index: 100;
  transition: width 0.1s linear;
}
.fp-single-post__hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}
.fp-single-post__layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  padding-top: 56px;
  padding-bottom: 56px;
}
.fp-single-post__content {
  min-width: 0;
}
.fp-single-post__header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  overflow-wrap: break-word;
  word-break: normal;
}
.fp-single-post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--fp-text-muted);
  font-size: 0.9rem;
}
.fp-single-post__body {
  font-size: 1.05rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.fp-single-post__body > * {
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 24px;
}
.fp-single-post__body > :last-child {
  margin-bottom: 0;
}
.fp-single-post__body h2 {
  margin-top: 44px;
  margin-bottom: 16px;
  overflow-wrap: break-word;
  word-break: normal;
}
.fp-single-post__body h3 {
  margin-top: 34px;
  margin-bottom: 14px;
  overflow-wrap: break-word;
  word-break: normal;
}
.fp-single-post__body p,
.fp-single-post__body li {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-single-post__body ul,
.fp-single-post__body ol {
  padding-left: 1.35em;
}
.fp-single-post__body li + li {
  margin-top: 8px;
}
.fp-single-post__body a {
  color: var(--fp-brand-strong);
  text-underline-offset: 3px;
}
.fp-single-post__body img {
  height: auto;
  border-radius: var(--fp-radius);
}
.fp-single-post__body figure {
  margin-left: 0;
  margin-right: 0;
}
.fp-single-post__body figcaption {
  margin-top: 8px;
  color: var(--fp-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.fp-single-post__body blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 18px 22px;
  border-left: 4px solid var(--fp-brand);
  background: var(--fp-bg-soft);
  border-radius: 0 var(--fp-radius) var(--fp-radius) 0;
}
.fp-single-post__body .wp-block-table {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.fp-single-post__body table {
  width: auto;
  max-width: 760px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
  table-layout: auto;
}
.fp-single-post__body > table {
  display: table;
  max-width: 100%;
}
.fp-single-post__body th,
.fp-single-post__body td {
  padding: 12px 14px;
  border: 1px solid var(--fp-border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}
.fp-single-post__body thead th {
  background: var(--fp-bg);
  color: var(--fp-text);
}
.fp-toc {
  position: sticky;
  top: 96px;
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  padding: 20px;
  background: var(--fp-white);
}
.fp-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}
.fp-toc a {
  color: var(--fp-text-muted);
  text-decoration: none;
}
.fp-toc a:hover {
  color: var(--fp-brand);
}
.fp-related-posts {
  padding: 48px 0 80px;
  border-top: 1px solid var(--fp-border);
}
.fp-related-posts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.fp-related-posts__item {
  text-decoration: none;
  color: var(--fp-text);
}
.fp-related-posts__item img {
  border-radius: var(--fp-radius);
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .fp-single-post__layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 52px;
  }
  .fp-toc {
    position: static;
  }
}

@media (max-width: 600px) {
  .fp-single-post__hero img {
    max-height: 300px;
  }

  .fp-single-post__layout {
    padding-top: 32px;
    padding-bottom: 44px;
  }

  .fp-single-post__header h1 {
    font-size: 1.65rem;
    line-height: 1.18;
    margin-bottom: 18px;
  }

  .fp-single-post__meta {
    margin-bottom: 28px;
  }

  .fp-single-post__body {
    font-size: 1rem;
    line-height: 1.75;
  }

  .fp-single-post__body > * {
    margin-bottom: 22px;
  }

  .fp-single-post__body h2 {
    margin-top: 38px;
    font-size: 1.45rem;
  }

  .fp-single-post__body h3 {
    margin-top: 30px;
    font-size: 1.2rem;
  }

  .fp-single-post__body ul,
  .fp-single-post__body ol {
    padding-left: 1.15em;
  }

  .fp-single-post__body blockquote {
    padding: 16px 18px;
  }

  .fp-single-post__body th,
  .fp-single-post__body td {
    padding: 11px 12px;
  }

  .fp-single-post__body table {
    width: max-content;
    max-width: none;
    min-width: 640px;
    margin-left: 0;
    margin-right: 0;
  }

  .fp-single-post__body .wp-block-table {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .fp-single-post__body > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fp-toc {
    padding: 18px;
  }

  .fp-toc a {
    display: block;
    min-height: 40px;
    padding: 7px 0;
  }

  .fp-related-posts {
    padding: 36px 0 56px;
  }
}
