article {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  margin: 0;
  /* color: var(--md-sys-color-on-surface);
  background-color: var(--md-sys-color-surface); */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.5;
  word-wrap: break-word;
}

/* 标题样式 */
article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--md-sys-color-on-surface);
}

article h1 {
  padding-bottom: 0.3em;
  font-size: 2em;
  border-bottom: 1px solid var(--md-sys-color-surface-variant);
}

article h2 {
  padding-bottom: 0.3em;
  font-size: 1.5em;
  border-bottom: 1px solid var(--md-sys-color-surface-variant);
}

article h3 {
  font-size: 1.25em;
}

article h4 {
  font-size: 1em;
}

article h5 {
  font-size: 0.875em;
}

article h6 {
  font-size: 0.85em;
  color: var(--md-sys-color-on-surface);
  opacity: 0.7;
}

/* 段落样式 */
article p {
  margin-top: 0;
  margin-bottom: 16px;
}

/* 链接样式 */
article a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

article a:hover {
  text-decoration: underline;
}

/* 列表样式 */
article ul,
article ol {
  margin-top: 0;
  margin-bottom: 16px;
  padding-left: 2em;
}

article li + li {
  margin-top: 0.25em;
}

article ul ul,
article ul ol,
article ol ol,
article ol ul {
  margin-top: 0;
  margin-bottom: 0;
}

/* 任务列表 */
article .task-list-item {
  list-style-type: none;
}

article .task-list-item input[type="checkbox"] {
  margin: 0 0.2em 0.25em -1.6em;
  vertical-align: middle;
}

/* 代码样式 */
article code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  background-color: var(--md-ref-palette-translucent-normal50);
  color: var(--md-sys-color-on-surface);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
    "Liberation Mono", Menlo, monospace;
}

article pre {
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  background-color: var(--md-sys-color-surface-variant);
  border-radius: 6px;
  margin-bottom: 16px;
}

article pre code {
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
}

/* 引用样式 */
article blockquote {
  padding: 0 1em;
  color: var(--md-sys-color-on-surface);
  opacity: 0.7;
  border-left: 0.25em solid var(--md-sys-color-surface-variant);
  margin: 0 0 16px 0;
}

article blockquote > :first-child {
  margin-top: 0;
}

article blockquote > :last-child {
  margin-bottom: 0;
}

/* 表格样式 */
article table {
  border-spacing: 0;
  border-collapse: collapse;
  margin-bottom: 16px;
  width: 100%;
  overflow: auto;
}

article table th,
article table td {
  padding: 6px 13px;
  border: 1px solid var(--md-sys-color-surface-variant);
}

article table th {
  font-weight: 600;
  background-color: var(--md-sys-color-surface-variant);
}

article table tr:nth-child(2n) {
  background-color: var(--md-sys-color-surface-variant);
}

/* 图片样式 */
article img {
  max-width: 100%;
  box-sizing: content-box;
  background-color: #ffffff;
}

article img[align="right"] {
  padding-left: 20px;
}

article img[align="left"] {
  padding-right: 20px;
}

/* 水平线 */
article hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: var(--md-sys-color-surface-variant);
  border: 0;
}

/* 粗体和斜体 */
article strong {
  font-weight: 600;
}

article em {
  font-style: italic;
}

/* 删除线和下划线 */
article del {
  text-decoration: line-through;
}

/* 响应式设计 */
@media (max-width: 767px) {
  article h1 {
    font-size: 1.75em;
  }

  article h2 {
    font-size: 1.5em;
  }

  article h3 {
    font-size: 1.25em;
  }
}

/* 暗色主题支持 - 现在使用 CSS 变量，不需要额外的媒体查询 */
