@font-face {
  font-family: "Yishu Song";
  src: url("fonts/yishu-song-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yishu Song";
  src: url("fonts/yishu-song-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --ink: #1e1a16;
  --muted: #5c5348;
  --line: #d9d0c2;
  --seal: #8e3a32;
  --focus: #1e1a16;
  --measure: 40rem;
  --spine: 4.75rem;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  text-wrap: pretty;
  background: var(--paper);
  color: var(--ink);
  font-family: "Yishu Song", "Songti SC", "STSong", "Source Han Serif SC", "Source Han Serif CN", "Noto Serif CJK SC", "Noto Serif SC", "SimSun", "PMingLiU", "Songti TC", serif;
  font-size: 1.0625rem;
  line-height: 1.9;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #e4d8c6;
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.8rem;
  z-index: 5;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.spine {
  display: none;
}

.site-header,
.page,
.site-footer {
  width: min(var(--measure), calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  padding: 1.75rem 0 0;
}

.mark {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
}

.mark:hover {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.page {
  padding-bottom: 1rem;
}

.hero {
  padding: 12vh 0 3.5rem;
}

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0 0 1.75rem;
  background: var(--seal);
  color: #f7f3ec;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 600;
}

h1,
h2,
strong {
  font-weight: 600;
  line-height: 1.35;
}

h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(1.85rem, 4.4vw, 2.75rem);
  letter-spacing: 0.01em;
  line-height: 1.38;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.28rem;
}

h3 {
  margin: 1.45rem 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.45;
}

.lede,
.section p,
.fees,
.quiet,
.aside,
.form-note,
.hint,
.site-footer p {
  margin: 0 0 1.05rem;
}

.lede {
  font-size: 1.12rem;
  max-width: 36rem;
}

.nowrap {
  white-space: nowrap;
}

.jump {
  margin: 2rem 0 0;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 1px;
}

.section {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  column-gap: 0.85rem;
  padding-top: 2.75rem;
  margin-top: 2.75rem;
  border-top: 1px solid var(--line);
}

.num {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.section ul,
.section ol {
  margin: 0.2rem 0 1.05rem;
  padding: 0 0 0 1.15rem;
}

.section li {
  margin: 0.35rem 0;
  padding-left: 0.15rem;
}

.steps {
  margin-bottom: 0.4rem;
}

.steps h3 {
  margin: 0 0 0.15rem;
}

.steps p {
  margin: 0;
}

.section li::marker {
  color: var(--muted);
}

.note {
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.fees {
  margin: 0.4rem 0 1.2rem;
  padding: 0;
}

.fees div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.fees div:last-child {
  border-bottom: 1px solid var(--line);
}

.fees dt {
  margin: 0;
  color: var(--muted);
}

.fees dd {
  margin: 0;
}

.letter {
  margin-top: 0.5rem;
}

.form-errors {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--seal);
  background: #f7f1ea;
}

.form-errors p {
  margin: 0 0 0.4rem;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.15rem;
}

.field {
  margin: 0 0 1.35rem;
}

.field label,
.contact legend {
  display: block;
  margin-bottom: 0.35rem;
}

.req {
  margin-left: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.hint,
.form-note,
.quiet,
.aside,
.site-footer,
.num,
.fees dt {
  color: var(--muted);
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

input,
textarea {
  width: 100%;
  margin: 0;
  padding: 0.55rem 0;
  border: none;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
}

textarea {
  min-height: 8.5rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.45);
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #6b6258;
}

.field.is-invalid input,
.field.is-invalid textarea,
.contact.is-invalid input {
  border-color: var(--seal);
}

.field-error {
  margin: 0.4rem 0 0;
  color: var(--seal);
  font-size: 0.95rem;
}

.contact {
  margin: 0 0 1.35rem;
  padding: 0;
  border: none;
}

.contact legend {
  padding: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.actions {
  margin-top: 0.4rem;
}

button {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.22em;
  padding: 0.75rem 1.5rem 0.75rem 1.7rem;
  cursor: pointer;
}

button:hover {
  background: #3a332c;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.aside {
  margin-top: 2.75rem;
  font-size: 0.98rem;
}

.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 3.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

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

@media (min-width: 880px) {
  .spine {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--spine);
    border-right: 1px solid var(--line);
    writing-mode: vertical-rl;
    letter-spacing: 0.45em;
    font-size: 0.92rem;
    color: var(--muted);
  }

  .site-header,
  .page,
  .site-footer {
    margin-left: calc(var(--spine) + max(2rem, (100% - var(--spine) - var(--measure)) / 2));
    margin-right: 2rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 3.25rem;
  }

  .section {
    grid-template-columns: 1fr;
    row-gap: 0.35rem;
  }

  .fees div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .site-header,
  .page,
  .site-footer {
    width: min(var(--measure), calc(100% - 2rem));
  }
}

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