:root {
  color-scheme: light;
  --paper: #faf8f3;
  --ink: #202724;
  --muted: #53615a;
  --line: #d5dcd3;
  --accent: #215650;
  --tint: #eff3eb;
  --white: #fffef9;
  font-family: "Instrument Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.76;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.19em; }
a:hover { color: #133731; }
a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; top: .5rem; left: .5rem; background: var(--white); padding: .4rem .7rem; transform: translateY(-160%); }
.skip:focus { transform: none; }
.site-width { width: min(100% - 3.5rem, 62rem); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-line { display: flex; flex-direction: column; padding-block: 1.15rem .7rem; gap: .45rem; }
.brand { color: var(--ink); font-size: 1.04rem; font-weight: 720; letter-spacing: .06em; text-decoration: none; }
nav { display: flex; gap: .15rem 1.4rem; flex-wrap: wrap; font-size: .9rem; }
nav a { color: var(--muted); text-decoration: none; padding-block: .2rem; }
nav a[aria-current] { color: var(--accent); text-decoration: underline; font-weight: 690; }
.article-header { padding-block: clamp(2.2rem, 5.5vw, 4.4rem) 1.5rem; border-bottom: 2px solid var(--accent); }
h1 { font-size: clamp(2rem, 4.1vw, 3.5rem); line-height: 1.17; letter-spacing: -.036em; margin: 0; text-wrap: balance; }
.updated { margin: .8rem 0 0; color: var(--muted); font-size: .89rem; font-variant-numeric: tabular-nums; }
.prose { padding-bottom: 2rem; font-size: 1rem; overflow-wrap: anywhere; }
.prose > p, .prose > ul { max-width: 52rem; }
.prose > p:first-child { font-size: clamp(1rem, 2vw, 1.2rem); margin-block: 1.35rem 1.65rem; }
h2 { margin: 2.55rem 0 .6rem; font-size: clamp(1.4rem, 2.4vw, 1.82rem); line-height: 1.3; }
h3 { margin: 1.5rem 0 .25rem; font-size: 1.13rem; line-height: 1.45; }
h2 + p, h3 + p { margin-top: .4rem; }
p { margin-block: .9rem; }
li + li { margin-top: .6rem; }
ul { padding-inline-start: 1.5rem; }
[id] { scroll-margin-top: 1rem; }
:target:is(h2, h3, span) { background: #e5eee3; }
.directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1.05rem; }
.directory a { display: block; background: var(--white); padding: .9rem 1.1rem; text-decoration: none; border: 1px solid var(--line); border-radius: .25rem; }
.directory a:hover { background: var(--tint); border-color: var(--accent); }
.directory strong { display: block; text-decoration: underline; text-underline-offset: .17em; }
.directory span { display: block; margin-top: .15rem; color: var(--muted); font-size: .9rem; }
.table-scroll { overflow-x: auto; margin-block: 1.05rem 1.55rem; border: 1px solid var(--line); background: var(--white); border-radius: .25rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .92rem; line-height: 1.68; overflow-wrap: normal; }
th, td { vertical-align: top; padding: .62rem .75rem; }
td { border-top: 1px solid var(--line); }
th { background: var(--tint); font-weight: 680; color: #183b34; }
td:first-child { min-width: 6.5rem; }
td:nth-child(n+2) { min-width: 5rem; }
td:nth-child(4) { min-width: 7.8rem; }
td:nth-child(5) { min-width: 6.5rem; }
.site-footer { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding-block: 1.25rem 2.5rem; }

@media (max-width: 39rem) {
  .site-width { width: calc(100% - 2rem); }
  nav { gap: .13rem .8rem; }
  nav a { padding-block: .28rem; }
  .directory { grid-template-columns: 1fr; }
  td:nth-last-child(2) { min-width: 10rem; }
  th, td { padding: .55rem .62rem; }
  .page-chats td:first-child { min-width: 0; white-space: nowrap; font-size: .83rem; }
  .page-chats td:last-child { min-width: 0; }
}

@media print {
  :root { background: white; }
  .site-header, .site-footer, .skip { display: none; }
  .site-width { width: 100%; }
  .article-header { padding-block: .3rem .8rem; }
  .table-scroll { overflow: visible; }
  tr { break-inside: avoid; }
}
