:root { --bg: #ffffff; --fg: #000000; --key: #f3f3f3; --mark: #c4161c; color-scheme: light; }
html[data-theme="dark"] { --bg: #000000; --fg: #ffffff; --key: #1c1c1c; --mark: #ff5c5c; color-scheme: dark; }
html:not([data-theme="dark"]) .on-dark { display: none; }
html[data-theme="dark"] .on-light { display: none; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  line-height: 1.7;
  overflow-wrap: break-word;
}
h1, h2, h3 { font-family: "Songti SC", "Noto Serif SC", serif; line-height: 1.3; font-weight: 600; }
a { color: inherit; }
.wrap { margin: 0 auto; padding: 1.25rem; }
@media (min-width: 720px) {
  .wrap { width: 42rem; padding-left: 0; padding-right: 0; }
}
header { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; margin-bottom: 1.5rem; }
.top { display: flex; width: 100%; align-items: center; }
.brand { margin-right: auto; }
.brand h1 { margin: 0; }
.brand a { text-decoration: none; }
.tagline { margin: .15rem 0 0; font-size: .95rem; }
.fold { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
nav { display: none; flex-direction: column; align-items: flex-start; gap: .75rem; }
nav.open { display: flex; }
.key.icon-btn { padding: .45rem .55rem; line-height: 0; }
.key.icon-btn svg { width: 1.15rem; height: 1.15rem; display: block; }
html:not([data-theme="dark"]) .key.icon-btn .on-dark,
html[data-theme="dark"] .key.icon-btn .on-light { display: none; }
#menu[aria-expanded="true"] .icon-closed,
#menu[aria-expanded="false"] .icon-open { display: none; }
.key {
  display: inline-block;
  background: var(--key);
  border: 1px solid var(--fg);
  border-bottom-width: 3px;
  border-radius: 8px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--fg) 25%, transparent);
  padding: .4rem .8rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.key:active { transform: translateY(2px); border-bottom-width: 1px; background: var(--key); }
@media (prefers-reduced-motion: reduce) {
  .key:active { transform: none; }
}
:focus { outline: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.posts, .links { list-style: none; padding: 0; margin: 0; }
.links li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin: .7rem 0; }
.posts li { margin: 0; border-top: 1px solid var(--fg); }
.posts li:last-child { border-bottom: 1px solid var(--fg); }
.card { display: flex; gap: 1rem; align-items: stretch; padding: 1rem 0; text-decoration: none; }
.card img { width: 9.5rem; height: 6.4rem; object-fit: cover; flex: none; display: block; }
.card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.kicker { font-size: .78rem; letter-spacing: .14em; }
.headline { font-family: "Songti SC", "Noto Serif SC", serif; font-size: 1.2rem; font-weight: 600; line-height: 1.35; }
.dek { font-size: .95rem; }
.dek strong { font-weight: 700; }
.card time { font-size: .85rem; margin-top: .35rem; }
@media (max-width: 560px) {
  .card { flex-direction: column; }
  .card img { width: 100%; height: 11rem; }
}
.readbar { display: none; position: fixed; z-index: 5; top: 0; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--fg); }
.readbar.show { display: block; }
.readbar-in { display: flex; align-items: center; gap: .75rem; margin: 0 auto; padding: .55rem 1.25rem; }
.readbar a { text-decoration: none; flex: none; }
.readbar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Songti SC", "Noto Serif SC", serif; font-weight: 600; }
@media (min-width: 720px) {
  .readbar-in { width: 42rem; padding-left: 0; padding-right: 0; }
}
.back { margin: 0 0 1rem; }
.back a { text-decoration: none; }
.article h2 { margin: .35rem 0 .55rem; font-size: 1.85rem; }
.dateline { margin: 0 0 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--fg); font-size: .9rem; }
.article figure { margin: 0 0 1.15rem; }
.article figure img { width: 100%; height: auto; display: block; }
.article figcaption { margin-top: .4rem; font-size: .85rem; }
.lead { font-size: 1.12rem; }
.hot { color: var(--mark); font-weight: 700; }
.article h3 { margin: 1.7rem 0 .45rem; padding-top: .75rem; border-top: 1px solid var(--fg); font-size: 1.25rem; }
.article p, .article ul { margin: .6rem 0; }
.article ul { padding-left: 1.2rem; }
.article a { text-decoration: underline; text-underline-offset: .15em; }
.snippet { margin: 1rem 0; border: 1px solid var(--fg); border-radius: 8px; overflow: hidden; }
.snippet-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem .7rem; border-bottom: 1px solid var(--fg); font-size: .8rem; }
.snippet pre { margin: 0; border: 0; border-radius: 0; background: var(--key); }
.copy { background: transparent; border: 1px solid var(--fg); border-radius: 6px; color: inherit; font: inherit; padding: .1rem .55rem; cursor: pointer; }
pre { overflow: auto; max-width: 100%; margin: .8rem 0; background: var(--key); padding: .8rem 1rem; line-height: 1.5; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .9rem; }
.comment { margin-top: 2rem; padding: 1rem 1.1rem 1.15rem; border: 1px solid var(--fg); background: var(--key); }
.comment h3 { margin: 0 0 .7rem; padding: 0; border: 0; font-size: 1.15rem; }
.comment p { margin: .55rem 0; }
html:not([data-theme="dark"]) img.on-dark,
html[data-theme="dark"] img.on-light { display: none; }
