/* Homepage cards: retain the existing responsive grid. */
:root { --global-bg: #f5f7fa; }
.layout { max-width: 1280px; }
#recent-posts > .recent-post-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-content: start; }
#recent-posts > .recent-post-items > .recent-post-item { margin: 0; min-width: 0; border: 1px solid rgba(130,145,165,.15); box-shadow: 0 4px 16px rgba(28,45,70,.04); }
#recent-posts > #pagination { grid-column: 1 / -1; }
#recent-posts .recent-post-item .post_cover { height: 210px; }
#recent-posts .recent-post-item > .recent-post-info { padding: 24px; }
#recent-posts .recent-post-item:hover .post-bg { transform: none; }
#recent-posts .recent-post-item .post-bg { transition: none; }
@media (max-width: 768px) {
  #recent-posts > .recent-post-items { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

/* Minimal article typography. Values follow the requested specification. */
#article-container {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  color: #2c2c2c;
  letter-spacing: 0.05em;
  line-height: 1.9;
  overflow-wrap: break-word;
}
/* Desktop spacing: narrow the site frame, let the card control text insets. */
@media (min-width: 901px) {
  .layout {
    max-width: 1060px;
    margin-left: auto;
    margin-right: auto;
  }
  #post {
    padding: 50px 85px;
  }
  #article-container {
    width: 100%;
    max-width: none;
    margin: 0;
  }
}
#article-container p { margin: 0 0 1.6em; }
#article-container h2,
#article-container h3,
#article-container h4 {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-weight: 700;
  color: #111111;
  line-height: 1.5;
}
#article-container h2 {
  font-size: 28px;
  margin-top: 2.2em;
  margin-bottom: 1em;
  letter-spacing: 0.03em;
}
#article-container h3 {
  font-size: 23px;
  margin-top: 2em;
  margin-bottom: 0.9em;
  letter-spacing: 0.03em;
}
#article-container h4 {
  font-size: 19px;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
}
#article-container ol,
#article-container ul { padding-left: 1.6em; margin-bottom: 1.6em; }
#article-container ol > li,
#article-container ul > li {
  line-height: 1.9;
  margin: 0 0 0.8em;
  letter-spacing: 0.05em;
}
#article-container li > ol,
#article-container li > ul { margin-top: 0.8em; }
#article-container strong { font-weight: 700; color: #000000; }
#article-container a { color: #1a73e8; text-decoration: none; }
#article-container a:focus-visible { outline: 2px solid #1a73e8; outline-offset: 3px; }
/* Keep commands readable and horizontally scrollable instead of breaking them. */
#article-container pre,
#article-container code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: normal;
}
#article-container figure.highlight { max-width: 100%; overflow-x: auto; }
#article-container img { max-width: 100%; height: auto; }
/* The requested dark text applies to light mode; keep dark mode legible. */
[data-theme="dark"] #article-container { color: #dddddd; }
[data-theme="dark"] #article-container h2,
[data-theme="dark"] #article-container h3,
[data-theme="dark"] #article-container h4 { color: #eeeeee; background: none; }
[data-theme="dark"] #article-container strong { color: #ffffff; }
[data-theme="dark"] #article-container a { color: #8ab4f8; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Show long post titles in full instead of clamping or ellipsizing them. */
#post-info .post-title {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
  height: auto;
  max-height: none;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}
#recent-posts > .recent-post-item > .recent-post-info > .article-title {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
  height: auto;
  max-height: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
