/* ═══════════════════════════════════════════════════════════════
   CITY OF SOULS — THE MOTHER
   Built on Paper & Ink (纸墨).

   The telling is a ledger: a woman who stays, counting what the
   family owes and what it has stopped doing — soup, installments,
   refills, incense. So the page is the ledger — printed, ruled,
   totalled, carried forward.

   The ledger is not decoration. It IS the table of contents: the
   same seventeen days as the other three volumes — one story,
   four tellings.

   Element: Earth 土 — the volume's colour on the shelf.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --wm-measure: 62ch;
  --wm-ink: var(--pap-fg);
  --wm-soft: var(--pap-muted);
}

/* Alternating band */
.wm-bg { background: var(--pap-surface); }

/* ─── Nav ──────────────────────────────────────────────────── */

.pap-nav__brand-mark {
  width: 1.7rem; height: 1.7rem;
  display: grid; place-items: center;
  background: var(--pap-earth);
  color: #2C2416;
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.05rem;
  line-height: 1;
}
.pap-nav__brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.pap-nav__brand-name em {
  font-style: normal;
  font-size: .6rem;
  letter-spacing: .18em;
  color: var(--pap-muted);
}

/* ─── Hero ─────────────────────────────────────────────────── */

.wm-hero {
  padding: 7.5rem 0 4rem;
  border-bottom: 1px solid var(--pap-border);
}
.wm-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.wm-hero__text { min-width: 0; }
@media (max-width: 900px) {
  .wm-hero__grid { grid-template-columns: 1fr; }
  .wm-hero__plate { order: -1; max-width: 15rem; }
}

.wm-badge { margin-bottom: 1.6rem; }

.wm-hero__title {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--wm-ink);
  margin: 0 0 1rem;
  text-wrap: balance;
}

.wm-hero__zh {
  font-family: "Noto Serif SC", serif;
  font-size: 1.06rem;
  letter-spacing: .3em;
  color: var(--pap-earth-deep);
  margin: 0 0 1.6rem;
}

.wm-hero__lede {
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  line-height: 1.7;
  color: var(--wm-ink);
  max-width: 46ch;
  margin: 0 0 2rem;
}

.wm-facts {
  list-style: none;
  margin: 0 0 2.2rem;
  padding: 0;
  border-top: 1px solid var(--pap-border);
  max-width: 46ch;
}
.wm-facts li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--pap-border);
  font-size: .92rem;
}
.wm-facts .k {
  font-family: "Inter", sans-serif;
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wm-soft);
  padding-top: .22rem;
}
.wm-facts .v { color: var(--wm-ink); line-height: 1.55; }

/* format actions */
.wm-take { display: flex; flex-wrap: wrap; gap: .7rem; }
.wm-take .pap-btn { display: inline-flex; align-items: center; gap: .5rem; }
.wm-take .fmt {
  font-size: .6rem;
  letter-spacing: .14em;
  opacity: .62;
}
.wm-take .pap-btn--cta .fmt { opacity: .7; }

/* the cover, as a stamped plate */
.wm-plate {
  position: relative;
  border: 1px solid var(--pap-border);
  box-shadow: var(--pap-shadow-lg);
  background: var(--pap-surface);
  padding: .6rem;
}
.wm-plate img {
  display: block;
  width: 100%;
  /* the width/height ATTRIBUTES on <img> are definite, which makes
     the browser ignore aspect-ratio entirely and hand object-fit a
     tall box to crop into. height:auto gives the ratio back. */
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.wm-plate__seal {
  position: absolute;
  left: -.55rem; bottom: -.55rem;
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  background: var(--pap-earth);
  color: #2C2416;
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.4rem;
  line-height: 1;
  transform: rotate(-4deg);
  box-shadow: var(--pap-shadow);
}

/* ─── Section headings ─────────────────────────────────────── */

.wm-h2 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -.018em;
  color: var(--wm-ink);
  margin: 0 0 .7rem;
}
.wm-h2__sub {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--wm-soft);
  max-width: 46ch;
  margin: 0;
}

/* ─── Excerpt — Day One ────────────────────────────────────── */

.wm-excerpt {
  max-width: 40rem;
  margin: 0 auto;
  position: relative;
}
.wm-excerpt__mark {
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.3rem;
  color: var(--pap-earth-deep);
  margin-bottom: 1.2rem;
}
.wm-quote-display {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.28;
  letter-spacing: -.015em;
  color: var(--wm-ink);
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}
.wm-excerpt__body p {
  font-family: "Playfair Display", serif;
  font-size: 1.06rem;
  line-height: 1.82;
  color: var(--wm-ink);
  margin: 0 0 1.05rem;
}
.wm-excerpt__src {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--pap-border);
  font-family: "Inter", sans-serif;
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--wm-soft);
}

/* ─── The ledger ───────────────────────────────────────────── */

.wm-ledger-head { margin-bottom: 2.4rem; }
.wm-ledger-head .pap-section-marker { margin-bottom: 1rem; }

.wm-ledger { display: flex; justify-content: center; }

.wm-ledger__slip {
  position: relative;
  width: 100%;
  max-width: 46rem;
  background: var(--pap-surface);
  border: 1px solid var(--pap-border);
  box-shadow: var(--pap-shadow-lg);
  padding: clamp(1.6rem, 4vw, 2.8rem);
}

.wm-ledger__masthead { text-align: center; margin-bottom: 1.4rem; }
.wm-ledger__shop {
  font-family: "Inter", sans-serif;
  font-size: .62rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--wm-soft);
  margin: 0 0 .9rem;
}
.wm-ledger__title {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--wm-ink);
  margin: 0 0 .7rem;
}
.wm-ledger__meta {
  display: flex;
  gap: .55rem;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: .74rem;
  color: var(--wm-soft);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.wm-ledger__rule { height: 0; border-top: 1px solid var(--pap-border); }
.wm-ledger__rule--heavy {
  border-top: 3px double var(--pap-earth);
  margin: 1.4rem 0;
}

.wm-ledger__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry { border-bottom: 1px dotted var(--pap-border); }
.entry:last-child { border-bottom: 0; }

.entry__link {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  column-gap: 1rem;
  row-gap: .18rem;
  align-items: baseline;
  padding: .68rem .5rem;
  margin: 0 -.5rem;
  text-decoration: none;
  transition: background-color .2s ease;
}
.entry__link:hover { background: var(--pap-earth-bg); }

.entry__no {
  grid-area: 1 / 1;
  font-family: "Inter", sans-serif;
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
  color: var(--wm-soft);
  letter-spacing: .04em;
  transition: color .2s ease;
}
.entry__link:hover .entry__no { color: var(--pap-earth-deep); }

/* the day is the entry's name */
.entry__title {
  grid-area: 1 / 2;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.45;
  color: var(--wm-ink);
}

.entry__words {
  grid-area: 1 / 3;
  font-family: "Inter", sans-serif;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  color: var(--wm-soft);
  white-space: nowrap;
  justify-self: end;
}

.entry__open {
  grid-area: 2 / 2 / 3 / 4;
  font-family: "Playfair Display", serif;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--wm-soft);
}

@media (max-width: 560px) {
  .entry__link { grid-template-columns: 1.9rem minmax(0, 1fr) auto; }
}

.wm-ledger__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: .2rem;
}
.wm-ledger__total span:first-child {
  font-family: "Inter", sans-serif;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--wm-soft);
}
.wm-ledger__total-n {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wm-ink);
  font-variant-numeric: tabular-nums;
}

.wm-ledger__foot {
  margin: 1.6rem 0 0;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: .92rem;
  color: var(--wm-soft);
}

.wm-ledger__stamp {
  position: absolute;
  right: -.7rem; bottom: -.7rem;
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  background: var(--pap-earth);
  color: #2C2416;
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.6rem;
  line-height: 1;
  transform: rotate(-5deg);
  box-shadow: var(--pap-shadow);
}

/* ─── The soup ─────────────────────────────────────────────── */

.wm-soup {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) { .wm-soup { grid-template-columns: 1fr; } }

.wm-soup__left .pap-section-marker { margin-bottom: 1rem; }
.wm-soup__left .wm-h2 { margin-bottom: 1.6rem; }

.wm-colophon { padding: 1.8rem; }
.wm-colophon__zh {
  font-family: "Noto Serif SC", serif;
  font-size: 1.12rem;
  line-height: 1.85;
  letter-spacing: .08em;
  color: var(--wm-ink);
  margin: 0 0 1rem;
}
.wm-colophon__py {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--wm-soft);
  margin: 0 0 1.1rem;
}
.wm-colophon__en {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  line-height: 1.68;
  color: var(--wm-ink);
  margin: 0 0 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--pap-border);
}
.wm-colophon__attr {
  font-family: "Inter", sans-serif;
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wm-soft);
  margin: 0;
}

.wm-soup__right p {
  font-family: "Playfair Display", serif;
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--wm-ink);
  margin: 0 0 1.15rem;
  max-width: var(--wm-measure);
}
.wm-soup__right strong { font-weight: 600; }

.wm-note {
  margin-top: 2rem;
  padding: 1.5rem 1.7rem;
  background: var(--pap-earth-bg);
  border-left: 3px solid var(--pap-earth);
}
.wm-note p {
  font-family: "Inter", sans-serif;
  font-size: .9rem;
  line-height: 1.72;
  color: var(--wm-ink);
  margin: 0 0 .9rem;
  max-width: 58ch;
}
.wm-note p:last-child { margin-bottom: 0; }
.wm-note strong { font-weight: 600; }

/* ─── Footer ───────────────────────────────────────────────── */

.wm-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding-bottom: 2.4rem;
}
@media (max-width: 720px) { .wm-foot { grid-template-columns: 1fr; } }
.wm-foot__name { font-family: "Playfair Display", serif; font-size: 1.05rem; }
.wm-foot__col { min-width: 0; }
.wm-foot__links { list-style: none; margin: 0; padding: 0; }
.wm-foot__links li { margin-bottom: .5rem; }

@media (prefers-reduced-motion: reduce) {
  .entry__link { transition: none; }
}
