/* ═══════════════════════════════════════════════════════════════
   THE FAKE IMMORTAL — the offering table.

   The book is a register: the incantation register a puppeteer
   performs, the clinical register a doctor writes, and the offering
   register — eleven seconds — that comes up from below speech at a
   sideboard in Gaozhou. So the page is a sideboard: warm paper, wood,
   square edges, a press of shadow, and three cups of carried water in
   a row — the middle one a finger's width to the left, because that
   is where the guest sits. The only loud thing in the room is the
   cinnabar, and the book is an argument about what cinnabar costs.

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

:root {
  --fk-bg: #f2ecdd;
  --fk-panel: #ebe3cf;
  --fk-ink: #262019;
  --fk-soft: #6e6350;
  --fk-faint: #998d76;
  --fk-rule: #d8ccb0;
  --fk-chi: #b03a2b;        /* cinnabar — 丹砂 */
  --fk-chi-ink: #932f21;    /* cinnabar as text, darkened to hold contrast */
  --fk-wood: #8a5a33;
  --fk-water: #c6d2cc;
  --fk-press: rgba(38, 32, 25, .13);
}

html[data-theme="dark"] {
  --fk-bg: #16110d;
  --fk-panel: #1f1813;
  --fk-ink: #e9dec6;
  --fk-soft: #b5a78c;
  --fk-faint: #857762;
  --fk-rule: #3b3126;
  --fk-chi: #c8503d;
  --fk-chi-ink: #d66a55;
  --fk-wood: #7a5231;
  --fk-water: #3d4a46;
  --fk-press: rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

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

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

/* ── the seal 假 ──────────────────────────────────────────────────── */

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

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

.fk-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(--fk-rule);
}

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

.fk-nav__name {
  font-size: .95rem;
  letter-spacing: .01em;
}

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

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

.fk-nav__links a:hover { color: var(--fk-chi-ink); }

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

.fk-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;
}

.fk-hero__text {
  min-width: 0; /* grid text column: lets long words wrap instead of overflow */
}

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

.fk-title {
  margin: 0 0 1.1rem;
  font-family: "Playfair Display", "EB Garamond", Georgia, serif;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.015em;
  text-wrap: balance;
}

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

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

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

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

/* three cups on the take row too: read online, PDF, EPUB — and the
   middle one sits a finger's width to the left, where the guest sits */
.fk-btn {
  display: inline-flex;
  align-items: baseline;
  gap: .1rem;
  padding: .6rem 1.05rem;
  border: 1px solid var(--fk-rule);
  background: var(--fk-panel);
  color: var(--fk-ink);
  text-decoration: none;
  font-size: .9rem;
  box-shadow: 3px 3px 0 var(--fk-press);
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

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

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

.fk-plate {
  margin: 0;
}

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

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

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

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

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

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

.fk-head__title {
  margin: 0;
  font-family: "Playfair Display", "EB Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 3.6vw, 1.8rem);
  font-weight: 600;
  line-height: 1.2;
}

/* ── the three pours ─────────────────────────────────────────────── */

.fk-shelf {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(2.2rem, 7vw, 4.5rem);
  padding: 1.4rem 0 1.6rem;
  border-bottom: 3px solid var(--fk-wood);
  box-shadow: 0 5px 0 -2px var(--fk-press);
}

.fk-cup {
  margin: 0;
  text-align: center;
}

/* the vessel: a straight-sided cup, square at the rim, carried water
   standing in it up to a little below the lip */
.fk-cup__vessel {
  display: block;
  width: 54px;
  height: 76px;
  margin: 0 auto .9rem;
  border: 2px solid var(--fk-ink);
  border-radius: 0 0 22px 22px / 0 0 26px 26px;
  background: linear-gradient(
    to bottom,
    var(--fk-water) 0 68%,
    transparent 68%
  );
  background-origin: border-box;
}

/* the guest — the middle cup, a finger's width to the left */
.fk-cup--guest { transform: translate(-1rem, -.4rem); }

.fk-cup__cap {
  display: grid;
  gap: .15rem;
  justify-items: center;
}

.fk-cup__no {
  font-family: "Noto Serif SC", serif;
  font-size: 1.05rem;
  color: var(--fk-chi-ink);
}

.fk-cup__name {
  font-size: .98rem;
  font-weight: 600;
}

.fk-cup__range {
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--fk-faint);
  font-variant-numeric: tabular-nums;
}

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

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

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

.entry { border-bottom: 1px solid color-mix(in srgb, var(--fk-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(--fk-ink);
}

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

.entry__no {
  font-size: .74rem;
  color: var(--fk-chi-ink);
  font-variant-numeric: tabular-nums;
}

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

.entry__open {
  grid-column: 2 / 3;
  font-size: .88rem;
  color: var(--fk-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(--fk-faint);
  font-variant-numeric: tabular-nums;
}

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

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

.fk-quote__zh {
  margin: 0 0 .5rem;
  font-family: "Noto Serif SC", serif;
  font-size: 1.5rem;
  letter-spacing: .08em;
}

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

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

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

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

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

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

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

.fk-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;
}

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

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

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

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

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

.fk-foot__col a:hover { color: var(--fk-chi-ink); }

.fk-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(--fk-faint);
}

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

@media (max-width: 700px) {
  .fk-hero { grid-template-columns: 1fr; }
  .fk-plate { order: -1; }
  .fk-plate img { width: 11rem; max-width: 45vw; }
  .fk-cup--guest { transform: translate(-.55rem, -.25rem); }
  .fk-foot__inner { grid-template-columns: 1fr; gap: 1.6rem; }
}
