:root {
  color-scheme: light;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  color: #24180f;
  background: #f3ead8;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-image:
    radial-gradient(ellipse at 50% 38%, #fffaf04d, transparent 70%),
    repeating-linear-gradient(0deg, #8a6c4805 0, #8a6c4805 1px, transparent 1px, transparent 4px);
}

.page {
  width: min(100% - 112px, 1040px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 48px 0 28px;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d5bd91;
  color: #7c674e;
  font-size: 13px;
  letter-spacing: 0.28em;
}

main {
  flex: 1;
  padding-bottom: 72px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 72px;
  width: min(100%, 790px);
  margin: 0 auto;
  padding: 64px 0 80px;
}

.title-block {
  display: grid;
  grid-template-columns: 24px auto;
  justify-content: center;
  align-items: start;
  column-gap: 26px;
  row-gap: 24px;
}

.title-note {
  grid-column: 1;
  grid-row: 1;
  margin: 9px 0 0;
  writing-mode: vertical-rl;
  font-size: 14px;
  letter-spacing: 0.25em;
  color: #8a6c48;
}

h1 {
  grid-column: 2;
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 76px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.15em;
  overflow-wrap: anywhere;
  max-height: 620px;
}

.seal {
  grid-column: 2;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid #a72b20;
  outline: 1px solid #a72b20;
  outline-offset: 3px;
  background: #a72b20;
  color: #f3ead8;
  font-size: 27px;
  line-height: 1;
}

.introduction {
  padding-top: 18px;
}

.section-label {
  margin: 0;
  color: #7c674e;
  font-size: 15px;
  letter-spacing: 0.3em;
}

.gold-rule {
  width: 42px;
  height: 1px;
  margin: 26px 0 30px;
  background: #c79b53;
}

.introduction > .description,
.introduction > .access-note {
  margin: 0;
  font-size: 19px;
  line-height: 2.15;
  letter-spacing: 0.04em;
}

.introduction > .access-note {
  margin-top: 20px;
  color: #7c674e;
  font-size: 16px;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 80px;
}

.feature h2 {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  color: #8a6c48;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.8;
}

.feature h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d5bd91;
}

.feature-description {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: 0.03em;
}

.example {
  margin: 24px 0 0;
}

.example-caption {
  margin-top: 16px;
  color: #7c674e;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.06em;
}

.lineage-chart {
  padding: 16px 16px 12px 0;
}

.lineage-level {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: end;
}

.lineage-level + .lineage-level {
  margin-top: 26px;
}

.generation {
  color: #7c674e;
  font-size: 12px;
  line-height: 36px;
  letter-spacing: 0.08em;
}

.lineage-ancestor,
.lineage-children li {
  position: relative;
  text-align: center;
  font-size: 20px;
  line-height: 36px;
}

.lineage-ancestor::after,
.lineage-children li::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  background: #c2a775;
}

.lineage-ancestor::after {
  bottom: -26px;
  height: 26px;
}

.lineage-children {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 24px 0 0;
  list-style: none;
}

.lineage-children::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(100% / 6);
  left: calc(100% / 6);
  height: 1px;
  background: #c2a775;
}

.lineage-children li::before {
  top: -24px;
  height: 24px;
}

.biography {
  padding: 22px 26px;
  border: 1px solid #d5bd91;
  background: #fffaf029;
}

.biography-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #d5bd91;
}

.biography-title h3 {
  margin: 0;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.biography-title p {
  margin: 0;
  color: #7c674e;
  font-size: 13px;
  line-height: 1.8;
}

.biography dl {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr);
  gap: 7px 18px;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.9;
}

.biography dt {
  color: #7c674e;
}

.biography dd {
  margin: 0;
}

.record-image {
  position: relative;
}

.record-image img {
  display: block;
  width: 100%;
  height: auto;
}

.record-highlight {
  position: absolute;
  top: 37%;
  left: 83%;
  width: 14%;
  height: 30%;
  border: 1px solid #8a6c48;
}

.record-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
}

.proofreading {
  margin-top: 42px;
}

.proofreading-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 24px 0;
  border-top: 1px solid #d5bd91;
  border-bottom: 1px solid #d5bd91;
  list-style: none;
}

.proofreading-steps li {
  position: relative;
  text-align: center;
  font-size: 15px;
  line-height: 2;
}

.proofreading-steps li + li::before {
  content: "→";
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  color: #8a6c48;
  font-size: 12px;
}

footer {
  border-top: 1px solid #d5bd91;
  padding-top: 22px;
  color: #7c674e;
  font-size: 13px;
  line-height: 1.8;
}

.records {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 0;
}

.records > a::before {
  content: "·";
  margin: 0 16px;
}

.records a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.records a[href]:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.records a[href]:focus-visible {
  outline: 2px solid #8a6c48;
  outline-offset: 5px;
}

.records img {
  vertical-align: -4px;
  margin-right: 5px;
  object-fit: contain;
}

@media (max-width: 760px) {
  .page {
    width: calc(100% - 48px);
    padding: 26px 0 22px;
  }

  .masthead {
    padding-bottom: 16px;
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  main {
    padding-bottom: 44px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 42px;
    padding: 38px 12px 52px;
  }

  .title-block {
    column-gap: 16px;
    row-gap: 18px;
  }

  .title-note {
    font-size: 11px;
  }

  h1 {
    font-size: 49px;
    max-height: 400px;
  }

  .seal {
    width: 30px;
    height: 30px;
    font-size: 22px;
  }

  .introduction {
    max-width: 360px;
    margin: 0 auto;
    padding: 0;
  }

  .section-label {
    font-size: 12px;
  }

  .gold-rule {
    width: 30px;
    margin: 16px 0 18px;
  }

  .introduction > .description,
  .introduction > .access-note {
    font-size: 16px;
    line-height: 2;
  }

  .introduction > .access-note {
    margin-top: 12px;
    font-size: 13px;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .feature h2 {
    font-size: 14px;
  }

  .feature-description {
    font-size: 15px;
  }

  .biography {
    padding: 20px;
  }

  .proofreading {
    margin-top: 24px;
  }

  .proofreading-steps li {
    font-size: 13px;
  }

  footer {
    padding-top: 16px;
    font-size: 12px;
  }

  .records {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .records > a::before {
    content: none;
  }
}
