/* Single Article Module */
.thm-single-article {
  max-width: 1120px;
  margin-inline: auto;
}

.thm-single-article__header {
  margin-bottom: var(--thm-space-lg);
}

.thm-single-article__header h1 {
  font-family: var(--thm-font-heading);
  font-size: clamp(26px, 3.5vw, 44px);
  line-height: 1.3;
  font-weight: 700;
  margin: 10px 0 12px;
}

.thm-single-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--thm-muted);
  font-size: 14px;
  margin: 0;
}

.thm-single-article__meta span + span::before {
  content: "·";
  margin-inline-end: 10px;
}

.thm-single-article__media {
  margin: 0 0 var(--thm-space-lg);
  border-radius: var(--thm-card-radius);
  overflow: hidden;
}

.thm-single-article__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--thm-card-radius);
}

.thm-single-article__layout {
  display: flex;
  gap: var(--thm-space-lg);
  align-items: flex-start;
}

.thm-single-article__content {
  flex: 1;
  min-width: 0;
}

.thm-single-article__body {
  font-size: 17px;
  line-height: 1.85;
  max-width: 760px;
}

.thm-single-article__body > * + * {
  margin-top: 1em;
}

.thm-single-article__body h2,
.thm-single-article__body h3,
.thm-single-article__body h4 {
  margin-top: var(--thm-space-lg);
  font-family: var(--thm-font-heading);
}

.thm-single-article__body p {
  margin-bottom: 1.4em;
}

.thm-single-article__body p:empty,
.thm-single-article__body li:empty {
  display: none;
}

.thm-single-article__body ul,
.thm-single-article__body ol {
  padding-inline-start: 1.35em;
}

.thm-single-article__body li + li {
  margin-top: 0.45em;
}

.thm-single-article__body a {
  color: #1d4ed8;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.thm-single-article__body img {
  border-radius: 12px;
}

.thm-single-article__body img,
.thm-single-article__body figure,
.thm-single-article__body iframe,
.thm-single-article__body table,
.thm-single-article__body pre {
  max-width: 100%;
}

.thm-single-article__body blockquote {
  border-inline-start: 3px solid var(--thm-accent);
  padding-inline-start: var(--thm-space);
  margin-inline-start: 0;
  color: var(--thm-muted);
  font-style: italic;
}

.thm-single-share {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 100px;
  flex-shrink: 0;
  width: 44px;
}

.thm-single-share a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--thm-surface);
  color: var(--thm-text);
  font-size: 0;
  text-decoration: none;
  transition: background 0.2s ease;
}

.thm-single-share a::before {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.thm-single-share a:nth-child(1)::before {
  content: "FB";
  font-size: 11px;
}

.thm-single-share a:nth-child(2)::before {
  content: "X";
  font-size: 12px;
}

.thm-single-share a:nth-child(3)::before {
  content: "WA";
  font-size: 10px;
}

.thm-single-share a:nth-child(4)::before {
  content: "✉";
  font-size: 14px;
}

.thm-single-share a:hover {
  background: var(--thm-text);
  color: var(--thm-bg);
}

.thm-author-box {
  display: flex;
  gap: var(--thm-space);
  align-items: flex-start;
  padding: var(--thm-space-lg);
  background: var(--thm-surface);
  border-radius: var(--thm-card-radius);
  margin-top: var(--thm-space-xl);
}

.thm-author-box__avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.thm-author-box__content h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.thm-author-box__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: 6px;
  font-size: 12px;
  color: var(--thm-accent);
  font-weight: 600;
}

.thm-author-box__content p {
  margin: 0;
  color: var(--thm-muted);
  font-size: 14px;
  line-height: 1.6;
}

.thm-author-box--compact .thm-author-box__content p {
  display: none;
}

.thm-inline-related {
  margin-block: var(--thm-space-lg);
  border-top: 1px solid var(--thm-border);
  border-bottom: 1px solid var(--thm-border);
  padding-block: var(--thm-space);
}

.thm-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
  z-index: 10000;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.thm-reading-progress span {
  display: block;
  height: 100%;
  background-color: var(--thm-accent);
  width: 0%;
  transition: width 0.1s ease-out;
}

@media (max-width: 980px) {
  .thm-single-article__layout {
    flex-direction: column;
  }

  .thm-single-share {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin-bottom: 14px;
  }
}

@media (max-width: 680px) {
  .thm-single-share {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
