/* ═══════════════════════════════════════════════════════════════
   THE WALL HEARD EVERYTHING
   Built on Fancy Wuxing — warm earth tones, inkstone dark, editorial.

   The novel is an archive: a grandmother's telling, four walls that
   heard it, and three documents recovered from a room in a community
   centre basement. So the page is a journal — a contents list you could
   be reading off a shelf, and one quotation set apart like a page in a
   commonplace book.

   Palette: Fancy's own earth/metal tones. The cover carries the only
   saturated colour — brick red, from the shrine in the art.
   ═══════════════════════════════════════════════════════════════ */

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

.wal-hero .fc-hero__bg {
  background: var(--fc-bg);
  opacity: 1;
}
.wal-hero .fc-hero__overlay { display: none; }

.wal-hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 72rem;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .wal-hero__content { grid-template-columns: 1fr; }
  .wal-plate { order: -1; max-width: 14rem; }
}

.wal-title {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem) !important;
  line-height: 1.06 !important;
  letter-spacing: -.015em;
  max-width: 18ch;
  text-wrap: balance;
}

.wal-meta {
  margin: 1.4rem 0 1.8rem;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fc-text-muted, #6f6a60);
  font-variant-numeric: tabular-nums;
}
.wal-sep { margin: 0 .6rem; opacity: .5; }

/* fancy ships no button, so this page brings one */
.wal-take { display: flex; flex-wrap: wrap; gap: .6rem; }
.tk {
  font: inherit;
  font-size: .86rem;
  letter-spacing: .02em;
  padding: .58rem 1.1rem;
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  border: 1px solid var(--fc-border, rgba(28, 28, 28, .2));
  border-radius: 2px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.tk:hover { border-color: var(--fc-accent); }
.tk--primary {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: var(--fc-bg);
}

.wal-plate { margin: 0; }
.wal-plate img {
  display: block;
  width: 100%;
  max-width: 16rem;
  height: auto;              /* so aspect-ratio is not overruled by the attribute */
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--fc-border, rgba(28, 28, 28, .18));
  padding: .5rem;
  background: var(--fc-surface);
}

/* ─── The walls — contents ─────────────────────────────────── */

.wal-walls {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--fc-border, rgba(28, 28, 28, .18));
}

.wal-walls .entry { border-bottom: 1px solid var(--fc-border, rgba(28, 28, 28, .14)); }

.wal-walls .entry__link {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  grid-template-areas:
    "no title words"
    ".  open  open";
  gap: .2rem 1.3rem;
  align-items: baseline;
  padding: 1.15rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: background-color .2s ease;
}
.wal-walls .entry__link:hover { background: var(--fc-surface); }

.wal-walls .entry__no {
  grid-area: no;
  font-family: "Inter", sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--fc-text-muted, #6f6a60);
  font-variant-numeric: tabular-nums;
  padding-top: .25rem;
}
.wal-walls .entry__title {
  grid-area: title;
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.005em;
}
.wal-walls .entry__open {
  grid-area: open;
  font-size: .92rem;
  line-height: 1.68;
  color: var(--fc-text-muted, #6f6a60);
  max-width: 68ch;
}
.wal-walls .entry__words {
  grid-area: words;
  font-family: "Inter", sans-serif;
  font-size: .72rem;
  color: var(--fc-text-muted, #6f6a60);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .wal-walls .entry__link {
    grid-template-columns: 2.6rem minmax(0, 1fr);
    grid-template-areas: "no title" ". open" ". words";
    padding: 1rem .8rem;
  }
  .wal-walls .entry__words { padding-top: .25rem; }
}

/* ─── The god ──────────────────────────────────────────────── */

.wal-alt { background: var(--fc-surface); }

.wal-god {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) { .wal-god { grid-template-columns: 1fr; } }

.wal-quote .fc-quote__text-cn {
  font-family: "Noto Serif SC", serif;
  font-size: 1.16rem;
  letter-spacing: .1em;
  margin: 0 0 .8rem;
}
.wal-quote__py {
  font-style: italic;
  font-size: .88rem;
  color: var(--fc-text-muted, #6f6a60);
  margin: 0 0 1rem;
}
.wal-quote .fc-quote__text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.wal-quote .fc-quote__attribution {
  font-family: "Inter", sans-serif;
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fc-text-muted, #6f6a60);
}

.wal-prose p {
  font-size: 1rem;
  line-height: 1.8;
  margin: 0 0 1.2rem;
  max-width: 58ch;
}
.wal-note {
  font-size: .92rem !important;
  color: var(--fc-text-muted, #6f6a60);
  padding-left: 1.1rem;
  border-left: 2px solid var(--fc-accent);
}

/* Fancy's own template emits a theme-toggle label but never styles it —
   so it is either defined here or it renders at body size. */
.fc-theme-toggle__label {
  font-family: "Inter", sans-serif;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fc-text-muted, #6f6a60);
}
.fc-theme-toggle__label [data-mode] { display: none; }
.fc-theme-toggle__label [data-mode="light"] { display: inline; }
[data-theme="dark"] .fc-theme-toggle__label [data-mode="light"] { display: none; }
[data-theme="dark"] .fc-theme-toggle__label [data-mode="dark"] { display: inline; }
