/* Category presentation; pagination rules are shared with .lj-page (guestbook). Reuse the scoped --lj-* palette and shared home chrome. */
/* Header, rule and list share the post reading width (--lj-article-width). */
.lj-category :is(#category-header, #category-rule, #category-list-section) {
  max-width: var(--lj-article-width);
  margin-inline: auto;
}

.lj-category #category-header {
  padding-block: 56px 20px;
}

.lj-category #category-code {
  margin-bottom: 14px;
  font-size: 12.5px;
  letter-spacing: .14em;
}

.lj-category #category-name {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 34px) !important;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
}

.lj-category #category-description {
  max-width: 56ch;
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.lj-category #category-description:empty {
  display: none;
}

.lj-category #category-list-section {
  padding-block: 40px 64px;
}

.lj-category #category-count {
  margin-bottom: 8px !important; /* Compact the existing inline 12px count/list gap. */
  letter-spacing: .04em;
}

.lj-category #category-posts-list .post-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
  border-color: var(--lj-rule);
}

.lj-category #category-posts-list .post-row:first-child {
  border-top-color: var(--lj-ink);
}

.lj-category #category-posts-list .post-row > div {
  display: block;
  min-width: 0;
}

.lj-category #category-posts-list .post-tag {
  display: inline;
  margin-right: 10px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}

.lj-category #category-posts-list .post-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.lj-category #category-posts-list .post-date {
  flex: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.lj-category #category-posts-list .axis-body {
  margin: 0;
  padding-block: 40px;
  border-block: 1px solid var(--lj-rule);
}

:is(.lj-category, .lj-page) .pagination {
  justify-content: center;
  margin-top: 32px;
}

:is(.lj-category, .lj-page) .pagination[hidden] {
  display: none;
}

:is(.lj-category, .lj-page) :is(.page-link, .page-ellipsis) {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--lj-radius);
  font-family: var(--lj-sans);
  color: var(--lj-ink-2);
}

:is(.lj-category, .lj-page) .page-link {
  border-color: var(--lj-rule);
}

:is(.lj-category, .lj-page) .page-link:hover {
  border-color: var(--lj-accent);
  background: var(--lj-paper);
  color: var(--lj-accent);
}

:is(.lj-category, .lj-page) .page-link.is-current {
  border-color: var(--lj-ink);
  background: var(--lj-ink);
  color: var(--lj-ivory);
}

:is(.lj-category, .lj-page) .page-link.is-disabled {
  color: var(--lj-ink-3);
  opacity: .55;
}

.lj-category #category-others {
  padding-top: 24px;
  border-top: 1px solid var(--lj-rule);
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.lj-category #category-others a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--lj-accent);
}

@media (max-width: 720px) {
  .lj-category #category-header {
    padding-block: 32px 16px;
  }

  .lj-category #category-list-section {
    padding-block: 28px 56px;
  }

  .lj-category #category-posts-list .post-row {
    gap: 12px;
  }

  :is(.lj-category, .lj-page) .pagination {
    gap: 6px;
  }

  .lj-category #category-others {
    font-size: 12px;
  }
}
