/* User Provided Stylesheet */

@font-face {
  font-family: "LXGW WenKai";
  src: url("./LXGWWenKai-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --slp3-body-font: "LXGW WenKai", "Microsoft YaHei", "PingFang SC",
    "Noto Serif CJK SC", sans-serif;
}

html,
body {
  font-family: var(--slp3-body-font);
}

article {
  font-family: var(--slp3-body-font);
  line-height: 1.85;
}

article p {
  margin-block: 0.75rem;
}

article p:has(> a.slp3-edit-action:only-child) {
  display: flex;
  justify-content: flex-end;
  margin-block: -0.25rem 1.25rem;
}

article a.slp3-edit-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid currentColor;
  border-radius: 0.5rem;
  padding: 0.35rem 0.7rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

article a.slp3-edit-action:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}

article img {
  display: block;
  height: auto;
  margin-inline: auto;
  max-width: 100%;
}

article a[href$=".pdf"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-block: 0.25rem 1rem;
  font-weight: 600;
}

article a[href$=".pdf"]::before {
  content: "PDF";
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  padding: 0.05rem 0.3rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7em;
  letter-spacing: 0.03em;
}

article mjx-container[display="true"],
article pre,
article table {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

article figcaption {
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-size: 0.92em;
  line-height: 1.65;
}

article .myst-footnotes {
  margin-top: 3rem;
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  padding-top: 1.1rem;
}

article .myst-footnotes-header {
  font-family: var(--slp3-body-font);
  font-size: 0;
}

article .myst-footnotes-header::before {
  content: "脚注";
  font-size: 1rem;
}

article .myst-footnotes-header a {
  font-size: 1rem;
}

article .myst-footnotes-list {
  font-size: 0.9em;
  line-height: 1.7;
}

article sup.hover-link a {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
}

article .myst-footnote-backlinks a {
  font-family: ui-sans-serif, system-ui, sans-serif;
}

@media (max-width: 640px) {
  article {
    line-height: 1.75;
  }
}
