:root {
  color-scheme: light;
  --bg: #fbf9f6;
  --paper: #fffdfa;
  --ink: #302c26;
  --muted: #70695f;
  --line: #e5dfd6;
  --accent: #a4472e;
  --hero: #f8e8d5;
  --soft: #f4e6d9;
  --shadow: 0 6px 22px #5b41200b;
  --btn: #a3472f;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #211e1b;
  --paper: #2b2723;
  --ink: #f6eadb;
  --muted: #c6b8a7;
  --line: #484039;
  --accent: #f6ad89;
  --hero: #3c3026;
  --soft: #48362b;
  --shadow: none;
  --btn: #9f482e;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding: 22px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    'DM Sans',
    'PingFang SC',
    'Microsoft Yahei',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
svg {
  vertical-align: middle;
  flex-shrink: 0;
}
.shell {
  width: min(1216px, calc(100% - 88px));
  margin-inline: auto;
}
.mast {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.mast-inner {
  display: flex;
  height: 78px;
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  font-weight: 850;
  white-space: nowrap;
  letter-spacing: 0.035em;
}
.brandmark {
  width: 39px;
  height: 39px;
  background: var(--btn);
  color: #fff5e3;
  border-radius: 13px;
  display: grid;
  place-items: center;
  transform: rotate(-6deg);
}
.brandmark svg {
  transform: rotate(6deg);
}
.mainnav,
.tools,
.search,
.chips,
.kicker,
.meta,
.byline,
.cta,
.flag,
.panelhead,
.section-head {
  display: flex;
  align-items: center;
}
.mainnav {
  gap: 29px;
  height: 100%;
  font-size: 15px;
}
.mainnav a {
  display: grid;
  align-items: center;
  height: 100%;
  position: relative;
  color: var(--muted);
}
.mainnav a[aria-current] {
  color: var(--accent);
  font-weight: 700;
}
.mainnav a[aria-current]:after {
  content: '';
  position: absolute;
  bottom: 16px;
  left: 30%;
  width: 40%;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.tools {
  margin-left: auto;
  gap: 15px;
}
.search {
  width: 190px;
  gap: 9px;
  padding: 7px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 30px;
  color: var(--muted);
}
.search input {
  min-width: 0;
  width: 100%;
  background: none;
  border: 0;
  outline: 0;
  font-size: 14px;
}
.search:focus-within {
  border-color: var(--accent);
}
.theme,
.slides-nav button,
.panelhead > a {
  background: transparent;
  border: 0;
  display: grid;
  place-items: center;
}
.theme {
  border: 1px solid var(--line);
  width: 37px;
  height: 37px;
  border-radius: 50%;
}
.sun,
[data-theme='dark'] .moon {
  display: none;
}
[data-theme='dark'] .sun {
  display: inline;
}
.sr {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.feature {
  margin: 32px 0 36px;
  background: var(--hero);
  border-radius: 23px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
}
.slide {
  display: grid;
  grid-template-columns: 47% 53%;
  min-height: 342px;
}
.slide[hidden] {
  display: none;
}
.featuretext {
  padding: clamp(29px, 3.4vw, 53px);
  align-self: center;
}
.flag {
  width: fit-content;
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
  gap: 6px;
}
.feature h1 {
  font-family: 'Songti SC', 'STSong', 'Noto Serif CJK SC', serif;
  font-size: clamp(30px, 3.45vw, 53px);
  line-height: 1.22;
  letter-spacing: -0.045em;
  margin: 16px 0 14px;
  text-wrap: balance;
}
.featuretext p {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 23px;
  line-height: 1.8;
  max-width: 34em;
}
.cta {
  display: inline-flex;
  gap: 8px;
  background: var(--btn);
  color: #fff9f3 !important;
  padding: 10px 19px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
}
.featurepic {
  display: block;
  position: relative;
  min-height: 100%;
  overflow: hidden;
}
.featurepic img,
.cardpic img,
.storyphoto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featurepic img {
  position: absolute;
  inset: 0;
  object-position: center 51%;
}
.slides-nav {
  position: absolute;
  bottom: 15px;
  right: 18px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  background: #29271edb;
  color: white;
  gap: 6px;
  padding: 3px 4px;
  backdrop-filter: blur(8px);
}
.slides-nav button {
  color: white;
  width: 28px;
  height: 27px;
  border-radius: 50%;
}
.slides-nav button:hover {
  background: #ffffff30;
}
.slides-nav span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.35fr);
  gap: 28px;
  margin-block: 34px 58px;
}
.section-head,
.panelhead {
  justify-content: space-between;
  gap: 10px;
}
h2,
h3,
h1,
p {
  overflow-wrap: anywhere;
}
.section-head h2,
.panel h2,
.related h2 {
  margin: 0;
  letter-spacing: -0.035em;
}
.section-head h2,
.related h2 {
  font-size: 28px;
}
.filters {
  position: relative;
}
.filters summary {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  list-style: none;
  padding: 5px;
}
.filters summary::-webkit-details-marker {
  display: none;
}
.filters form {
  position: absolute;
  z-index: 4;
  right: 0;
  top: 100%;
  width: 230px;
  background: var(--paper);
  padding: 16px;
  box-shadow: 0 8px 32px #0002;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.filters label {
  display: grid;
  font-size: 14px;
  gap: 3px;
  margin-bottom: 9px;
}
select {
  appearance: none;
  background: var(--bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23877869' stroke-width='1.6'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 30px 6px 9px;
}
.chips {
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 19px;
}
.chips a {
  font-size: 14px;
  padding: 5px 13px;
  border-radius: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
}
.chips a.active,
.chips a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--soft);
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.card,
.panel,
.termcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 24px #49301614;
}
.cardpic {
  display: block;
  aspect-ratio: 1.97;
  overflow: hidden;
  background: var(--soft);
}
.cardpic img {
  transition: transform 0.35s;
}
.card:hover img {
  transform: scale(1.035);
}
.cardbody {
  padding: 18px 20px 17px;
}
.kicker {
  font-size: 13px;
  color: var(--muted);
  gap: 9px;
}
.kicker b,
.story > .kicker {
  color: var(--accent);
  font-weight: 700;
}
.kicker i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}
.card h3 {
  font-size: 21px;
  line-height: 1.45;
  margin: 9px 0 6px;
  letter-spacing: -0.025em;
}
.card p {
  font-size: 15px;
  margin: 0 0 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
}
.byline,
small,
.meta {
  color: var(--muted);
  font-size: 13px;
}
.byline,
.meta span,
small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel {
  padding: 20px;
}
.panel h2 {
  font-size: 19px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.panel h2 svg,
.rankno {
  color: var(--accent);
}
.panelhead > a {
  color: var(--muted);
  width: 28px;
  height: 28px;
}
.rank,
.longrank {
  padding: 0;
  margin: 6px 0 0;
  list-style: none;
}
.rank li,
.longrank li {
  display: flex;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.rank li:last-child {
  border: 0;
  padding-bottom: 2px;
}
.rankno {
  font:
    italic 25px/1.2 Georgia,
    serif;
}
.rank li:nth-child(n + 4) .rankno {
  color: var(--muted);
}
.rank a,
.mini strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
}
.rank small,
.mini small {
  display: flex;
  margin-top: 4px;
}
.mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}
.mini img,
.mini .no-photo {
  width: 58px;
  height: 49px;
  border-radius: 9px;
  object-fit: cover;
}
.no-photo {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--soft);
  color: var(--accent);
}
.pager,
.neighbors {
  display: flex;
  gap: 15px;
  align-items: center;
}
.pager {
  justify-content: center;
  margin: 25px 0;
  color: var(--muted);
  font-size: 14px;
}
.pager a {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 9px;
  background: var(--paper);
}
.empty {
  text-align: center;
  padding: 70px 20px;
}
.empty svg,
.empty a,
.crumb a {
  color: var(--accent);
}
footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.foot {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.foot .brand {
  font-size: 18px;
}
.foot .brandmark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.foot .brandmark svg {
  width: 20px;
}
.foot p,
.foot nav {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 0;
}
.foot nav {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
}
.index {
  min-height: 65vh;
  padding: 0 0 42px;
}
.index h1,
.story h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.3;
  margin: 20px 0;
}
.crumb {
  color: var(--muted);
  font-size: 14px;
  margin: 28px 0;
}
.termgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.termcard {
  display: block;
  padding: 22px;
}
.termcard > img {
  width: calc(100% + 44px);
  height: 155px;
  object-fit: cover;
  margin: -22px -22px 6px;
}
.termcard h2 {
  font-size: 21px;
  margin: 8px 0;
}
.termcard p {
  color: var(--muted);
  font-size: 15px;
}
.longrank {
  max-width: 820px;
}
.longrank small {
  margin-left: auto;
}
.reader {
  display: grid;
  grid-template-columns: minmax(160px, 210px) minmax(0, 790px);
  gap: clamp(24px, 4vw, 60px);
  justify-content: center;
}
.toc {
  align-self: start;
  position: sticky;
  top: 24px;
  border-left: 2px solid var(--line);
  padding-left: 15px;
}
.toc nav {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}
.toc .depth-3,
.toc .depth-4 {
  padding-left: 12px;
}
.story h1 {
  font-family: 'Songti SC', 'STSong', serif;
}
.meta {
  gap: 14px;
  flex-wrap: wrap;
}
.storyphoto {
  margin: 22px 0;
  overflow: hidden;
  border-radius: 17px;
  aspect-ratio: 2.55;
}
.prose {
  line-height: 1.95;
  overflow-wrap: anywhere;
}
.prose h2,
.prose h3 {
  line-height: 1.45;
  margin: 1.55em 0 0.5em;
}
.prose p {
  margin: 1em 0;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
}
.prose img {
  max-width: 100%;
}
.prose table {
  display: block;
  overflow: auto;
  border-collapse: collapse;
}
.prose td,
.prose th {
  padding: 7px;
  border: 1px solid var(--line);
}
.prose blockquote {
  margin: 1em 0;
  padding: 4px 18px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
}
.prose pre {
  position: relative;
  margin: 0 0 1em;
  background: #272824;
  color: #f6eedf;
  border-radius: 0 12px 12px 12px;
  padding: 19px;
  overflow: auto;
  font-size: 14px;
}
.copy-code {
  display: block;
  border: 0;
  border-radius: 7px 7px 0 0;
  font-size: 13px;
  padding: 4px 10px;
  background: #403f37;
  color: white;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
  color: #f9a88b;
}
.hljs-string,
.hljs-attr {
  color: #c5dc95;
}
.hljs-title,
.hljs-number,
.hljs-built_in {
  color: #ffe29f;
}
.hljs-comment {
  color: #abb3a6;
}
.neighbors {
  border-top: 1px solid var(--line);
  align-items: stretch;
  justify-content: space-between;
  padding: 18px 0;
}
.neighbors a {
  flex: 1;
}
.neighbors small {
  display: block;
}
.related {
  margin: 40px 0;
}
.related .cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}
@media (max-width: 950px) {
  .shell {
    width: calc(100% - 44px);
  }
  .mast-inner {
    gap: 25px;
  }
  .mainnav {
    gap: 18px;
  }
  .layout {
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .panel {
    padding: 16px;
  }
  .cardbody {
    padding: 14px;
  }
  .featuretext {
    padding: 30px;
  }
  .slide {
    min-height: 310px;
  }
  .cards {
    gap: 14px;
  }
  .search {
    width: 150px;
  }
}
@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .mast-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    gap: 0;
    padding-top: 12px;
  }
  .brand {
    font-size: 20px;
  }
  .mainnav {
    order: 3;
    width: 100%;
    height: 43px;
    gap: 25px;
  }
  .mainnav a[aria-current]:after {
    bottom: 3px;
  }
  .tools {
    gap: 8px;
  }
  .search {
    width: 145px;
  }
  .slide {
    grid-template-columns: 1fr 1fr;
    min-height: 268px;
  }
  .feature {
    margin: 20px 0;
  }
  .featuretext {
    padding: 22px;
  }
  .featuretext p {
    font-size: 14px;
  }
  .feature h1 {
    font-size: 30px;
  }
  .reader {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .toc {
    position: static;
  }
  .toc nav {
    display: flex;
    flex-wrap: wrap;
  }
  .termgrid,
  .related .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .shell {
    width: calc(100% - 32px);
  }
  .brand {
    gap: 7px;
    font-size: 19px;
  }
  .brandmark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .brandmark svg {
    width: 21px;
  }
  .search {
    width: 112px;
    padding: 6px 10px;
  }
  .theme {
    width: 33px;
    height: 33px;
  }
  .feature {
    border-radius: 17px;
  }
  .slide {
    display: flex;
    flex-direction: column-reverse;
  }
  .featurepic {
    height: 189px;
    min-height: 0;
  }
  .featuretext {
    padding: 19px 22px 22px;
    align-self: stretch;
  }
  .feature h1 {
    font-size: 31px;
    margin: 9px 0;
  }
  .featuretext p {
    margin-bottom: 14px;
  }
  .slides-nav {
    top: 146px;
    right: 12px;
    bottom: auto;
  }
  .section-head h2 {
    font-size: 25px;
  }
  .layout {
    margin-top: 25px;
  }
  .cards,
  .rail,
  .termgrid,
  .related .cards {
    grid-template-columns: 1fr;
  }
  .cardpic {
    aspect-ratio: 2.05;
  }
  .cardbody {
    padding: 17px;
  }
  .chips {
    gap: 6px;
  }
  .chips a {
    padding: 4px 10px;
  }
  .foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .foot nav {
    justify-content: flex-start;
  }
  .related {
    margin-bottom: 26px;
  }
  .storyphoto {
    aspect-ratio: 1.8;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
