/* ═══════════════════════════════════════════════════════════════
   WHERE THE WATER WANTED TO GO
   Built on Paper & Ink (纸墨).

   The memoir is a survey: a man who measured everything, writing
   dated entries one to a page from a rented room above a tea
   plot — the account kept the way he kept inspection records.
   So the page is a level book: printed, ruled, soundings taken
   one to a line, each with its place, its date, its first
   sentence, and its length.

   The register is not decoration. It IS the table of contents:
   sixty-seven lines, each one the place and date its entry
   opens on. The form comes from the book — the method is "the
   place, the month, the year, at the top of every page" — and
   it happens to be exactly what a reader needs to find an
   entry to start on.

   Element: Water 水 — the volume's colour on the shelf.
   ═══════════════════════════════════════════════════════════════ */

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

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

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

.pap-nav__brand-mark {
  width: 1.7rem; height: 1.7rem;
  display: grid; place-items: center;
  background: var(--pap-water);
  color: #10202b;
  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 instrument panel ──────────────────────────── */

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

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

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

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

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

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

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

/* the cover, as a stamped plate */
.wt-plate {
  position: relative;
  border: 1px solid var(--pap-border);
  box-shadow: var(--pap-shadow-lg);
  background: var(--pap-surface);
  padding: .6rem;
}
.wt-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;
}
.wt-plate__seal {
  position: absolute;
  left: -.55rem; bottom: -.55rem;
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  background: var(--pap-water);
  color: #10202b;
  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 ─────────────────────────────────────── */

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

/* ─── Excerpt — the first entry ────────────────────────────── */

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

/* ─── The register — a level book ──────────────────────────── */

.wt-reg-head { margin-bottom: 2.4rem; }
.wt-reg-head .pap-section-marker { margin-bottom: 1rem; }

.wt-reg { display: flex; justify-content: center; }

.wt-reg__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);
}

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

/* The heavy rules run in water — the datum line of the level book. */
.wt-reg__rule { height: 0; border-top: 1px solid var(--pap-border); }
.wt-reg__rule--heavy {
  border-top: 3px double var(--pap-water);
  margin: 1.4rem 0;
}

.wt-reg__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-water-bg); }

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

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

.entry__words {
  grid-area: 1 / 3;
  font-family: "Inter", sans-serif;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  color: var(--wt-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(--wt-soft);
}

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

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

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

.wt-reg__stamp {
  position: absolute;
  right: -.7rem; bottom: -.7rem;
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  background: var(--pap-water);
  color: #10202b;
  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 soil ─────────────────────────────────────────────── */

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

.wt-soil__left .pap-section-marker { margin-bottom: 1rem; }
.wt-soil__left .wt-h2 { margin-bottom: 1.6rem; }

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

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

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

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

.wt-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) { .wt-foot { grid-template-columns: 1fr; } }
.wt-foot__name { font-family: "Playfair Display", serif; font-size: 1.05rem; }
.wt-foot__col { min-width: 0; }
.wt-foot__links { list-style: none; margin: 0; padding: 0; }
.wt-foot__links li { margin-bottom: .5rem; }

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