:root {
  color-scheme: light;
  --ink: #193037;
  --muted: #506365;
  --paper: #f8faf8;
  --line: #cbd9d6;
  --accent: #075c59;
  --mark: #a14c2d;
  font-family: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
  line-height: 1.7;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--mark); }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }
[hidden] { display: none !important; }
.masthead { background: #e3eeeb; border-bottom: 1px solid var(--line); }
.masthead-inner, .site-layout, .site-footer { width: min(100% - 3rem, 80rem); margin-inline: auto; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; font-size: 1.1rem; font-weight: 750; }
.brand img { inline-size: 2rem; block-size: 2rem; }
.search { position: relative; width: min(19rem, 100%); }
.search input { width: 100%; min-width: 0; border: 1px solid var(--accent); border-radius: .2rem; background: var(--paper); padding: .38rem .65rem; color: var(--ink); }
.search-results { position: absolute; z-index: 2; top: 100%; inset-inline: 0; background: var(--paper); border: 1px solid var(--line); padding: .75rem; }
.search-results ul { margin: 0; padding-inline-start: 1.15rem; }
.site-layout { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 4.5rem); }
.site-nav { align-self: start; margin-top: 2rem; border-inline-start: .21rem solid var(--mark); }
.site-nav a { display: block; padding: .32rem .75rem; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { background: #e3eeeb; }
.content { min-width: 0; padding-block: 1.5rem 3.5rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: .75rem; font-size: .84rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.content main, .content section, .content article { min-width: 0; }
.content section, .content article { margin-block: 1.35rem; }
.content > section + section { border-top: 1px solid var(--line); padding-top: 1.15rem; }
h1, h2, h3, h4 { line-height: 1.32; }
h1 { margin-block: 1.45rem .8rem; font: 700 clamp(1.72rem, 3vw, 2.85rem)/1.25 'Songti SC', SimSun, serif; }
h2 { font-size: clamp(1.25rem, 2vw, 1.7rem); }
h3 { font-size: 1.12rem; }
p, blockquote, li { max-width: 87ch; }
blockquote { margin-inline: 0; padding: .2rem 1rem; border-inline-start: .2rem solid var(--accent); background: #e3eeeb; }
ul, ol { padding-inline-start: 1.5rem; }
figure { margin: 1rem 0; }
img { max-width: 100%; height: auto; vertical-align: middle; }
figure img { display: block; }
figcaption { font-size: .875rem; color: var(--muted); }
.topic-tag { display: inline-block; padding: .1rem .45rem; background: #e3eeeb; border-radius: .2rem; }
pre, code, kbd { font-family: Consolas, 'Microsoft YaHei', monospace; }
pre { padding: .85rem; color: #eaf7f4; background: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
code { overflow-wrap: anywhere; }
details { padding: .65rem .85rem; margin-block: .65rem; border: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-block: 1rem; font-size: .92rem; }
th, td { padding: .55rem .6rem; border: 1px solid var(--line); text-align: start; vertical-align: top; }
th { background: #e3eeeb; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.25rem 2rem; color: var(--muted); }
.site-footer a + a { margin-inline-start: 1rem; }
@media (max-width: 760px) {
  .masthead-inner, .site-layout, .site-footer { width: calc(100% - 1.75rem); }
  .masthead-inner { flex-wrap: wrap; gap: .6rem; }
  .site-layout { display: block; }
  .site-nav { display: flex; flex-wrap: wrap; margin-top: .8rem; }
  .site-nav a { padding: .22rem .52rem; font-size: .88rem; }
  .content { padding-top: 1rem; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { display: block; margin-block: .7rem; border: 1px solid var(--line); }
  :is(th, td) { display: grid; grid-template-columns: minmax(0, 35%) minmax(0, 1fr); gap: .55rem; border: 0; border-bottom: 1px solid var(--line); }
  :is(th, td):last-child { border-bottom: 0; }
  :is(th, td)::before { content: attr(data-label); color: var(--muted); font-size: .83rem; }
  td:not([data-label]), th:not([data-label]) { display: block; }
}

/* home page blocks */
.jh img { max-width: 100%; height: auto; }
.jh div:empty { display: none; }
.jh div:has(> a + a) { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: .8rem; }
.jh div:has(> a + a) > a:not(:has(h3)) { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: .4rem; background: #fff; text-decoration: none; font-weight: 600; }
.jh div:has(> a + a) > a > div, .jh div:has(> a + a) > a > span { display: inline; }
.jh div:has(> div img[width="64"] ~ h3), .jh div:has(> div > div > img[width="64"]) { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.jh div:has(> img[width="64"] ~ h3) { display: block; padding: .9rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; }
.jh div:has(> div > img[width="64"] ~ h3):not(:has(> div > img[width="64"] ~ h3 ~ div)) > div:only-child { height: 100%; }
.jh div:has(> a h3) { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.jh a:has(h3) { display: block; padding: .9rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; text-decoration: none; color: var(--ink); }
.jh a:has(h3) h3 { margin: 0; font-size: 1.05rem; }
.jh a:has(h3) p { margin-block: .4rem; }
.jh a:has(h3) > div:last-child span { color: var(--accent); font-weight: 600; }
.jh a:has(h3) > div:first-child > div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.jh div:has(> div > span + span) { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem; }
.jh div:has(> span + span):not(:has(> time)) { padding: .7rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; }
.jh div:has(> span + span):not(:has(> time)) > span { display: block; }
.jh div:has(> span + span):not(:has(> time)) > span:first-child { font-weight: 700; }
.jh div:has(> article) { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.jh article { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.jh article > div + div { padding: .2rem .9rem .9rem; }
.jh article img { display: block; width: 100%; }
.jh article h2 { font-size: 1.1rem; margin-block: .4rem; }
.jh article > div:first-child > a { display: none; }
.jh details { padding: .7rem .9rem; margin-block: .5rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; }
.jh summary { cursor: pointer; font-weight: 600; }
