:root {
  --paper: #f5efe7;
  --berry: #7a274b;
  --ink: #221d1f;
  --blush: #e7c2ce;
  --sage: #627261;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  line-height: 1.75;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent 0 7%, rgb(122 39 75 / 5%) 7% 7.08%, transparent 7.08%),
    var(--paper);
}

a {
  color: var(--berry);
  overflow-wrap: anywhere;
  text-underline-offset: 0.2em;
}

p,
h1,
h2,
li,
span,
small,
strong {
  overflow-wrap: anywhere;
}

.touch-target {
  min-height: 44px;
  min-width: 44px;
}

:focus-visible {
  outline: 3px solid var(--berry);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  transform: translateY(-180%);
  background: var(--paper);
  font-weight: 700;
}

.skip-link:not(:focus) {
  width: 1px;
  min-width: 0;
  height: 1px;
  min-height: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  width: auto;
  height: auto;
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid rgb(122 39 75 / 28%);
}

.masthead {
  position: relative;
  isolation: isolate;
  max-width: 78rem;
  min-height: 13rem;
  margin: 0 auto;
  padding: 2.4rem clamp(1.25rem, 4vw, 4rem) 1.4rem;
  overflow: hidden;
}

.masthead::before,
.masthead::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.masthead::before {
  top: -5.2rem;
  right: 5%;
  width: 15rem;
  height: 11rem;
  border: 2.5rem solid var(--blush);
  border-radius: 68% 32% 62% 38%;
  rotate: -18deg;
  opacity: 0.7;
}

.masthead::after {
  right: -2rem;
  bottom: -5.5rem;
  width: 12rem;
  height: 9rem;
  border-radius: 72% 28% 65% 35%;
  rotate: 28deg;
  background: var(--sage);
  opacity: 0.16;
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  color: var(--berry);
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(1.65rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-decoration: none;
}

.adult-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border: 1px solid var(--berry);
  border-radius: 50%;
  color: var(--berry);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  margin-top: 2rem;
}

.masthead nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0;
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
}

.masthead nav a[aria-current="page"] {
  color: var(--berry);
  box-shadow: inset 0 -2px var(--berry);
}

main,
.footer-inner {
  width: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
}

main {
  padding: clamp(2.7rem, 7vw, 6rem) 0 5rem;
}

article,
.reading-layout,
.article-flow {
  min-width: 0;
}

.article-header {
  max-width: 60rem;
  margin-bottom: clamp(2.4rem, 6vw, 5rem);
}

.audience,
.content-label {
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.audience {
  margin: 0 0 1rem;
}

h1,
h2 {
  margin-top: 0;
  font-family: "Songti SC", "STSong", serif;
  line-height: 1.25;
}

h1 {
  max-width: 16em;
  margin-bottom: 1.25rem;
  color: var(--berry);
  font-size: clamp(2.25rem, 7vw, 5.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 600;
}

.intro {
  max-width: 45rem;
  margin: 0;
  border-left: 0.35rem solid var(--blush);
  padding-left: 1.25rem;
  font-size: clamp(1.06rem, 2vw, 1.32rem);
}

.audience-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.9rem, 2.4vw, 2rem);
  margin: -1.4rem 0 clamp(4.5rem, 8vw, 7rem);
}

.audience-path {
  display: flex;
  min-width: 0;
  min-height: 13.5rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--berry);
  border-radius: 0 0 2.5rem 0;
  padding: 1.2rem 1.25rem 1.5rem;
  color: var(--ink);
  background: rgb(231 194 206 / 28%);
  text-decoration: none;
}

.audience-path:nth-child(2) {
  margin-top: 1.8rem;
}

.audience-path:nth-child(3) {
  margin-top: 3.6rem;
}

.audience-path > span {
  color: var(--berry);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.audience-path strong {
  color: var(--berry);
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.audience-path small {
  font-size: 0.9rem;
  line-height: 1.65;
}

.audience-path:hover {
  background: rgb(231 194 206 / 52%);
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.34fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.article-flow > section {
  position: relative;
  margin: 0 0 clamp(3.5rem, 7vw, 6rem);
  padding-left: clamp(1.1rem, 3vw, 2.4rem);
}

.article-flow > section::before {
  position: absolute;
  top: 0.35rem;
  bottom: 0.25rem;
  left: 0;
  width: 0.2rem;
  border-radius: 50%;
  background: var(--blush);
  content: "";
  pointer-events: none;
}

.article-flow > section:nth-of-type(even)::before {
  background: var(--sage);
  opacity: 0.55;
}

.content-label {
  display: inline-block;
  margin-bottom: 0.65rem;
}

.article-flow p {
  max-width: 44rem;
  margin: 0.7rem 0 0;
}

.section-citations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  color: var(--sage);
  font-size: 0.82rem;
}

.section-citation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.source-notes {
  border-top: 0.35rem solid var(--sage);
  padding-top: 1rem;
  font-size: 0.8rem;
}

.source-notes h2 {
  font-size: 1.15rem;
}

.source-notes ol {
  margin: 0;
  padding-left: 1.15rem;
}

.source-notes li + li {
  margin-top: 1.2rem;
}

.source-notes a {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
}

.source-notes span {
  display: block;
  margin-top: 0.3rem;
  color: var(--sage);
  line-height: 1.55;
}

.boundary-callout {
  position: relative;
  margin: 1rem 0 3.5rem;
  overflow: hidden;
  border-radius: 0 3rem 0 0;
  padding: 1.5rem clamp(1.2rem, 3vw, 2rem);
  background: var(--berry);
  color: var(--paper);
}

.boundary-callout::after {
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  width: 7rem;
  height: 7rem;
  border-radius: 68% 32% 56% 44%;
  background: var(--blush);
  content: "";
  opacity: 0.25;
  pointer-events: none;
}

.boundary-callout p {
  margin-bottom: 0;
}

.related-reading {
  border-top: 1px solid rgb(122 39 75 / 32%);
  padding-top: 1.5rem;
}

.related-reading h2 {
  font-size: 1.3rem;
}

.related-reading ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-reading a,
.footer-inner a {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

footer {
  border-top: 1px solid rgb(122 39 75 / 28%);
  color: var(--ink);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.footer-notes {
  display: grid;
  gap: 0.5rem;
}

.footer-inner p {
  max-width: 48rem;
  margin: 0;
  font-size: 0.82rem;
}

@media (max-width: 760px) {
  .masthead {
    min-height: 0;
    padding-top: 1.4rem;
  }

  .masthead::before {
    right: -7rem;
  }

  .masthead nav {
    margin-top: 1rem;
    gap: 0 0.75rem;
  }

  main,
  .footer-inner {
    width: min(100% - 2rem, 42rem);
  }

  main {
    padding-top: 3rem;
  }

  .article-header {
    margin-bottom: 3rem;
  }

  .audience-paths,
  .reading-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .audience-paths {
    gap: 0.8rem;
    margin: 0 0 4rem;
  }

  .audience-path,
  .audience-path:nth-child(2),
  .audience-path:nth-child(3) {
    min-height: 0;
    margin-top: 0;
  }

  .reading-layout {
    gap: 4rem;
  }

  .source-notes {
    max-width: none;
  }

  .footer-inner { gap: 0.75rem; }
}

@media (max-width: 420px) {
  .site-brand {
    max-width: 9em;
    font-size: 1.45rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .article-flow > section {
    padding-left: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
