/* ═══════════════════════════════════════════════════════════════
   WINE PASSES THROUGH, BUDDHA STAYS PUT
   Built on Paper & Ink (纸墨).

   The novel is oral: a man singing a repertoire at a teahouse
   table, forty nights running. So the page is a teahouse bill —
   printed, ruled, totalled.

   The bill is not decoration. It IS the table of contents: forty
   lines, each one the opening sentence of its night. The form
   comes from the book, and it happens to be exactly what a reader
   needs to choose a night to start on.

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

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

/* Alternating band */
.wn-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 — the board over the door ───────────────────────── */

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

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

.wn-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(--wn-ink);
  margin: 0 0 1rem;
  text-wrap: balance;
}

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

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

.wn-facts {
  list-style: none;
  margin: 0 0 2.2rem;
  padding: 0;
  border-top: 1px solid var(--pap-border);
  max-width: 46ch;
}
.wn-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;
}
.wn-facts .k {
  font-family: "Inter", sans-serif;
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wn-soft);
  padding-top: .22rem;
}
.wn-facts .v { color: var(--wn-ink); line-height: 1.55; }

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

/* the cover, as a stamped plate */
.wn-plate {
  position: relative;
  border: 1px solid var(--pap-border);
  box-shadow: var(--pap-shadow-lg);
  background: var(--pap-surface);
  padding: .6rem;
}
.wn-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;
}
.wn-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 ─────────────────────────────────────── */

.wn-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(--wn-ink);
  margin: 0 0 .7rem;
}
.wn-h2__sub {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--wn-soft);
  max-width: 46ch;
  margin: 0;
}

/* ─── Excerpt ──────────────────────────────────────────────── */

.wn-excerpt {
  max-width: 40rem;
  margin: 0 auto;
  position: relative;
}
.wn-excerpt__mark {
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.3rem;
  color: var(--pap-earth-deep);
  margin-bottom: 1.2rem;
}
.wn-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(--wn-ink);
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}
.wn-excerpt__body p {
  font-family: "Playfair Display", serif;
  font-size: 1.06rem;
  line-height: 1.82;
  color: var(--wn-ink);
  margin: 0 0 1.05rem;
}
.wn-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(--wn-soft);
}

/* ─── The bill ─────────────────────────────────────────────── */

.wn-bill-head { margin-bottom: 2.4rem; }
.wn-bill-head .pap-section-marker { margin-bottom: 1rem; }

.wn-bill { display: flex; justify-content: center; }

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

.wn-bill__masthead { text-align: center; margin-bottom: 1.4rem; }
.wn-bill__shop {
  font-family: "Inter", sans-serif;
  font-size: .62rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--wn-soft);
  margin: 0 0 .9rem;
}
.wn-bill__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(--wn-ink);
  margin: 0 0 .7rem;
}
.wn-bill__meta {
  display: flex;
  gap: .55rem;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: .74rem;
  color: var(--wn-soft);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

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

.wn-bill__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: night;
}
.wn-bill__loading {
  color: var(--wn-soft);
  font-size: .92rem;
  padding: 1rem 0;
  text-align: center;
}

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

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

.night__no {
  font-family: "Inter", sans-serif;
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
  color: var(--wn-soft);
  letter-spacing: .04em;
  transition: color .2s ease;
}
.night__link:hover .night__no { color: var(--pap-earth-deep); }

.night__text {
  font-family: "Playfair Display", serif;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--wn-ink);
}
.night__words {
  font-family: "Inter", sans-serif;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  color: var(--wn-soft);
  white-space: nowrap;
}

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

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

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

.wn-bill__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 monk ─────────────────────────────────────────────── */

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

.wn-monk__left .pap-section-marker { margin-bottom: 1rem; }
.wn-monk__left .wn-h2 { margin-bottom: 1.6rem; }

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

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

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

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

.wn-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) { .wn-foot { grid-template-columns: 1fr; } }
.wn-foot__name { font-family: "Playfair Display", serif; font-size: 1.05rem; }
.wn-foot__col { min-width: 0; }
.wn-foot__col-title {
  font-family: "Inter", sans-serif;
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--wn-soft);
  margin: 0 0 .9rem;
}
.wn-foot__links { list-style: none; margin: 0; padding: 0; }
.wn-foot__links li { margin-bottom: .5rem; }

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