/* ═══════════════════════════════════════════════════════════════
   STRANGE TALES FROM A RENTAL ROOM — the evidence drawer.

   The book is a Liaozhai for the archive age: nine strange tales,
   each closed by a reviewer's note the way Pu Songling closed his
   with 异史氏曰, set in the ceramics country he collected from.
   What haunts the room is the blank: the true statement that files
   itself as evidence of an adhesive. So the page is the drawer —
   warm paper in the day, the room at night, and three blank papers
   on show with their labels beneath, filed, all three, as evidence.
   The seal is 异 on porcelain white: the Historian of the Strange's
   chair, kept warm.

   House pattern: this page carries the colour; the prose does not.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --st-bg: #f5f1e6;
  --st-panel: #ece6d5;
  --st-ink: #26221c;
  --st-soft: #69604e;
  --st-faint: #968c76;
  --st-rule: #d8cfb8;
  --st-bai: #faf7ef;        /* porcelain — the blank page */
  --st-night: #1a1712;      /* the room, at the hour the lights cut */
  --st-night-ink: #efe9da;
  --st-ember: #b03a2b;      /* the kettle is red */
  --st-press: rgba(38, 34, 28, .13);
}

html[data-theme="dark"] {
  --st-bg: #14110d;
  --st-panel: #1d1913;
  --st-ink: #e9e0cc;
  --st-soft: #b0a48a;
  --st-faint: #837861;
  --st-rule: #3a3327;
  --st-bai: #f2ecdd;
  --st-night: #efe9da;      /* the strip inverts, like a light coming on */
  --st-night-ink: #14110d;
  --st-ember: #c8503d;
  --st-press: rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--st-bg);
  color: var(--st-ink);
  font-family: "EB Garamond", Georgia, "Noto Serif SC", serif;
  line-height: 1.7;
}

.st-wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 5vw, 2rem);
}

/* ── the seal 异 — porcelain, inked ─────────────────────────────── */

.st-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  background: var(--st-bai);
  border: 1px solid var(--st-rule);
  color: var(--st-ink);
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--st-press);
}

/* ── nav ─────────────────────────────────────────────────────────── */

.st-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--st-rule);
}

.st-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--st-ink);
  text-decoration: none;
  font-weight: 600;
}

.st-nav__name { font-size: .92rem; letter-spacing: .01em; }

.st-nav__links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.st-nav__links a {
  color: var(--st-soft);
  text-decoration: none;
  font-size: .88rem;
}

.st-nav__links a:hover { color: var(--st-ember); }

/* ── hero ────────────────────────────────────────────────────────── */

.st-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.1rem, 5vw, 2rem) 3.2rem;
}

.st-hero__text { min-width: 0; }

.st-eyebrow {
  margin: 0 0 .8rem;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--st-soft);
}

.st-title {
  margin: 0 0 .5rem;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.012em;
  text-wrap: balance;
}

.st-subtitle {
  margin: 0 0 1.1rem;
  font-size: .95rem;
  font-style: italic;
  color: var(--st-soft);
}

.st-lede {
  margin: 0 0 1rem;
  max-width: 46ch;
  font-size: 1.06rem;
  color: var(--st-soft);
}

.st-meta {
  margin: 0 0 1.8rem;
  font-size: .86rem;
  color: var(--st-faint);
}

.st-meta__sep { margin: 0 .5rem; }

.st-take {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.st-btn {
  display: inline-flex;
  align-items: baseline;
  gap: .1rem;
  padding: .6rem 1.05rem;
  border: 1px solid var(--st-rule);
  background: var(--st-panel);
  color: var(--st-ink);
  text-decoration: none;
  font-size: .9rem;
  box-shadow: 3px 3px 0 var(--st-press);
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

.st-btn:hover {
  border-color: var(--st-ember);
  color: var(--st-ember);
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--st-press);
}

.st-btn--primary {
  border-color: var(--st-ink);
  color: var(--st-ink);
}

.st-plate { margin: 0; }

.st-plate img {
  display: block;
  width: 15.5rem;
  max-width: 38vw;
  height: auto;
  border: 1px solid var(--st-rule);
  box-shadow: 5px 5px 0 var(--st-press);
}

/* ── sections ────────────────────────────────────────────────────── */

.st-section {
  padding: clamp(2.6rem, 7vw, 4.2rem) 0;
  border-top: 1px solid var(--st-rule);
}

.st-section--alt { background: var(--st-panel); }

.st-head { margin-bottom: 2.2rem; }

.st-head__run {
  margin: 0 0 .5rem;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--st-faint);
}

.st-head__title {
  margin: 0;
  font-size: clamp(1.35rem, 3.6vw, 1.8rem);
  font-weight: 600;
  line-height: 1.2;
}

/* ── the drawer: three blanks, filed ─────────────────────────────── */

.st-section--night {
  background: var(--st-night);
  color: var(--st-night-ink);
}

.st-section--night .st-head__run { color: var(--st-night-ink); opacity: .55; }
.st-section--night .st-head__title { color: var(--st-night-ink); }
.st-section--night .st-note { color: var(--st-night-ink); opacity: .6; }

.st-blanks {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(1.6rem, 6vw, 3.4rem);
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}

.st-blank {
  margin: 0;
  display: grid;
  gap: .6rem;
  justify-items: center;
}

.st-blank__paper {
  display: block;
  background: var(--st-bai);
  border: 1px solid color-mix(in srgb, var(--st-night-ink) 24%, transparent);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .28);
}

.st-blank__paper--note {
  width: 5.2rem;
  height: 5.2rem;
  border-bottom: 2px solid var(--st-ember);
}

.st-blank__paper--receipt {
  width: 4.6rem;
  height: 6.6rem;
}

.st-blank__paper--receipt::after {
  content: "";
  display: block;
  width: 70%;
  height: 2px;
  margin: 4.6rem auto 0;
  background: color-mix(in srgb, var(--st-night-ink) 18%, transparent);
}

.st-blank__paper--file {
  width: 5.6rem;
  height: 4.4rem;
  border-style: dashed;
  background: transparent;
}

.st-blank figcaption {
  font-size: .82rem;
  text-align: center;
  line-height: 1.5;
}

.st-blank figcaption span {
  display: block;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .55;
}

.st-note {
  margin: 1.6rem auto 0;
  max-width: 52ch;
  text-align: center;
  font-size: .92rem;
  font-style: italic;
  color: var(--st-soft);
}

/* ── contents ────────────────────────────────────────────────────── */

.st-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--st-rule);
}

.entry { border-bottom: 1px solid color-mix(in srgb, var(--st-rule) 62%, transparent); }

.entry__link {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: .72rem .3rem;
  text-decoration: none;
  color: var(--st-ink);
}

.entry__link:hover { background: var(--st-press); }

.entry__no {
  font-size: .78rem;
  color: var(--st-ember);
  font-variant-numeric: tabular-nums;
}

.entry__title { font-size: 1rem; font-weight: 500; }

.entry__open {
  grid-column: 2 / 3;
  font-size: .88rem;
  color: var(--st-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry__words {
  grid-column: 3 / 4;
  grid-row: 1 / 3;
  align-self: center;
  font-size: .74rem;
  color: var(--st-faint);
  font-variant-numeric: tabular-nums;
}

/* ── provenance ──────────────────────────────────────────────────── */

.st-quote {
  max-width: 34rem;
  margin: 0 auto 2.2rem;
  padding: 1.6rem clamp(1.2rem, 4vw, 2rem);
  border: 1px solid var(--st-rule);
  border-left: 4px solid var(--st-ember);
  background: var(--st-bai);
  box-shadow: 4px 4px 0 var(--st-press);
  text-align: center;
}

.st-quote__zh {
  margin: 0 0 .5rem;
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.45rem;
  letter-spacing: .08em;
}

.st-quote__py {
  margin: 0 0 .6rem;
  font-size: .8rem;
  color: var(--st-faint);
}

.st-quote__en {
  margin: 0 0 .8rem;
  font-size: 1.05rem;
  font-style: italic;
}

.st-quote__attr {
  margin: 0;
  font-size: .78rem;
  color: var(--st-soft);
}

.st-prose { max-width: 44rem; margin: 0 auto; }

.st-prose > p { margin: 0 0 1.2rem; font-size: 1.04rem; }

/* ── footer ──────────────────────────────────────────────────────── */

.st-foot {
  margin-top: 2.4rem;
  border-top: 1px solid var(--st-rule);
}

.st-foot__inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  padding-top: 2.4rem;
  padding-bottom: 2rem;
}

.st-foot__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
}

.st-foot__tag {
  margin: .7rem 0 0;
  font-size: .82rem;
  color: var(--st-faint);
}

.st-foot__col h4 {
  margin: 0 0 .6rem;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--st-faint);
  font-weight: 500;
}

.st-foot__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}

.st-foot__col a {
  color: var(--st-soft);
  text-decoration: none;
  font-size: .88rem;
}

.st-foot__col a:hover { color: var(--st-ember); }

.st-foot__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 5vw, 2rem) 2rem;
  font-size: .78rem;
  color: var(--st-faint);
}

/* ── small screens ───────────────────────────────────────────────── */

@media (max-width: 700px) {
  .st-hero { grid-template-columns: 1fr; }
  .st-plate { order: -1; }
  .st-plate img { width: 11rem; max-width: 45vw; }
  .st-foot__inner { grid-template-columns: 1fr; gap: 1.6rem; }
}
