body {
  margin: 0;
  background: #faf9f5;
  color: #202532;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

header,
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 30px 20px;
}

header {
  padding-top: 52px;
  border-bottom: 1px solid #d8dde7;
}

main {
  display: block;
}

article,
section {
  margin-top: 24px;
  padding: 22px;
  background: #fff;
  border: 1px solid #d8dde7;
  border-radius: 8px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

nav a {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #d8dde7;
  border-radius: 999px;
  background: #fff;
  color: #235f7b;
  text-decoration: none;
  font-size: 14px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  margin-top: 0;
}

h2 {
  margin-bottom: 12px;
}

h3,
h4 {
  color: #235f7b;
}

p {
  margin: 10px 0;
}

a {
  color: #235f7b;
  text-underline-offset: 2px;
}

ul,
ol {
  margin: 8px 0 0 22px;
  padding: 0;
}

li {
  margin: 8px 0;
}

table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  background: #fff;
  overflow-wrap: anywhere;
}

th,
td {
  padding: 12px;
  border: 1px solid #d8dde7;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef6fb;
  color: #1b465c;
}

blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid #8b563f;
  background: #fff7ed;
  color: #4b342e;
}

code {
  padding: 2px 5px;
  background: #eef6fb;
  border-radius: 4px;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.section-illustration-set {
  display: none;
  max-width: 920px;
  margin: 18px auto 20px;
}

.section-illustration-set:has(.section-illustration) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.section-illustration {
  margin: 14px auto 16px;
  max-width: 720px;
}

.section-illustration-set .section-illustration {
  width: 100%;
  max-width: none;
  margin: 0;
}

.section-illustration img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 6px;
}

.section-illustration-set .section-illustration img {
  height: 100%;
  border: 1px solid #d8dde7;
  box-shadow: 0 10px 26px rgba(32, 37, 50, 0.08);
}

.section-illustration figcaption {
  margin-top: 6px;
  color: #5a6472;
  font-size: 13px;
  line-height: 1.5;
}

.reader-entry {
  background: #f4f1e8;
  color: #182130;
}

.reader-entry .hero-shell {
  position: relative;
  max-width: none;
  min-height: 82vh;
  padding: 22px clamp(18px, 5vw, 72px) 64px;
  overflow: hidden;
  border-bottom: 0;
  color: #fff;
}

.reader-entry .hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(9, 13, 22, 0.9), rgba(9, 13, 22, 0.62) 42%, rgba(9, 13, 22, 0.16)),
    linear-gradient(0deg, rgba(9, 13, 22, 0.76), rgba(9, 13, 22, 0.08) 45%),
    url("../images/hero-ink-time-river.png") center / cover no-repeat;
}

.reader-entry .top-nav {
  align-items: center;
  margin: 0 0 clamp(56px, 12vh, 128px);
}

.reader-entry .top-nav a {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(14px);
}

.reader-entry .hero-copy {
  max-width: 760px;
  min-width: 0;
}

.reader-entry .eyebrow {
  margin: 0 0 12px;
  color: #c7dfdf;
  font-size: 14px;
  font-weight: 700;
}

.reader-entry h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 86px);
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.reader-entry h1 span {
  display: block;
}

.reader-entry .hook {
  max-width: 680px;
  color: #f4efe5;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.reader-entry .hero-actions,
.reader-entry .start-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.reader-entry .button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.reader-entry .button.primary {
  background: #f1c45b;
  color: #1b1f2a;
}

.reader-entry .button.secondary {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.reader-entry main {
  max-width: 1120px;
}

.reader-entry article,
.reader-entry section {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.reader-entry .reader-map {
  padding: 0;
}

.reader-entry .reader-map > section {
  margin-top: 32px;
  padding: 0;
}

.reader-entry .tension-grid,
.reader-entry .chapter-columns,
.reader-entry .archive-grid {
  display: grid;
  gap: 16px;
}

.reader-entry .tension-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reader-entry .chapter-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reader-entry .tension-grid section,
.reader-entry .chapter-columns section,
.reader-entry .start-panel,
.reader-entry .quote-panel {
  padding: 22px;
  background: #fffdf8;
  border: 1px solid #ddd5c4;
  border-radius: 8px;
}

.reader-entry .start-panel {
  justify-content: space-between;
}

.reader-entry .start-panel .button.primary {
  flex: 0 0 auto;
}

.reader-entry .chapter-list {
  margin-left: 20px;
}

.reader-entry .archive-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.reader-entry .archive-grid a {
  padding: 12px 14px;
  background: #fffdf8;
  border: 1px solid #ddd5c4;
  border-radius: 8px;
  text-decoration: none;
}

.page-footer {
  max-width: 920px;
  margin: 34px auto 0;
  padding: 22px 24px 36px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding-top: 18px;
  border-top: 1px solid #d8cfbd;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  background: #fffdf8;
  border: 1px solid #d8cfbd;
  border-radius: 8px;
  color: #263034;
  font-weight: 700;
  text-decoration: none;
}

.footer-nav a:hover,
.reader-entry .archive-grid a:hover {
  background: #f7efd9;
}

@media (max-width: 760px) {
  .reader-entry .hero-shell {
    min-height: 76vh;
  }

  .reader-entry .tension-grid,
  .reader-entry .chapter-columns {
    grid-template-columns: 1fr;
  }

  .reader-entry .button {
    width: 100%;
  }

  .reader-entry .hero-copy,
  .reader-entry .hero-actions {
    width: 100%;
    max-width: 342px;
  }

  .reader-entry h1 {
    max-width: 9em;
    font-size: 36px;
  }

  .reader-entry .hook {
    max-width: 18em;
    font-size: 17px;
  }

  .page-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .footer-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-nav a {
    width: 100%;
  }
}

@media (min-width: 761px) {
  .section-illustration-set:has([data-illustration-slot="2"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-illustration-set:has([data-illustration-slot="3"]) {
    gap: 14px;
  }

  .section-illustration-set .section-illustration[data-illustration-slot="1"]:only-child {
    max-width: 760px;
    justify-self: center;
  }
}
