/* A Reader Without Eyes / 给没有眼睛的读者
   Surface: paper-white, book serif, one highlighter yellow.
   Margin: near-paper "latent" ink that develops on demand. */

:root {
  --paper: #fdfdfb;
  --ink: #1c1c19;
  --ghost: #eaeae3;          /* latent ink, almost paper */
  --developed: #6f6f66;      /* ink after development */
  --mark: #f2ff00;           /* highlighter / developer flash */
  --quiet: #8b8b81;
  --rule: #e3e3da;
  --serif: Georgia, 'Times New Roman', 'Songti SC', 'Noto Serif SC', 'Noto Serif CJK SC', SimSun, serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--mark);
  color: #000;
}

.sheet {
  max-width: 62rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

/* Two columns: text + a mostly-empty margin where the second layer lives. */
.row {
  display: grid;
  grid-template-columns: minmax(0, 34rem) minmax(9rem, 1fr);
  column-gap: 3.5rem;
  align-items: start;
}

.row > .col { grid-column: 1; min-width: 0; }
.row > .note { grid-column: 2; }

/* Header */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--quiet);
  margin: 0 0 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  justify-content: space-between;
}

.eyebrow nav a {
  color: var(--quiet);
  text-decoration: none;
  margin-left: 1.1rem;
}

.eyebrow nav a:first-child { margin-left: 0; }

.eyebrow nav a[aria-current="page"] { color: var(--ink); }

.canary-id { padding: 0 0.15em; }

h1 {
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  line-height: 1.15;
  font-weight: 400;
  margin: 0 0 0.6rem;
  letter-spacing: 0.01em;
}

h1 .latin {
  display: block;
  font-style: italic;
  font-size: 0.52em;
  color: var(--quiet);
  margin-top: 0.55rem;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 3rem 0 0.8rem;
}

p { margin: 0 0 1.1rem; }

/* The artist's epigraph — human layer, his own hand. */
.epigraph {
  font-size: 1.25rem;
  line-height: 2.1;
  margin: 0.6rem 0 1.8rem;
}

.fine {
  font-size: 0.92rem;
  color: var(--quiet);
}

.fine .en { font-size: 0.9em; }

/* Paired English lines under Chinese paragraphs */
.en {
  display: block;
  color: var(--quiet);
  font-size: 0.9em;
  margin-top: 0.15rem;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { background: var(--mark); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Page navigation cards (home) */
.doors { list-style: none; padding: 0; margin: 2.4rem 0 0; }

.doors li {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0;
}

.doors a {
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.doors .hint {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--quiet);
  align-self: center;
}

/* The latent layer. Not aria-hidden on purpose: screen readers are
   readers without eyes, and they are invited. */
.ghost {
  color: var(--ghost);
  transition: color 1.4s ease;
}

.note {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.6;
  margin: 0.3rem 0 0;
}

html.developed .ghost { color: var(--developed); }

html.developed .canary-id { background: var(--mark); color: #000; }

html.developed [data-ai-canary] {
  outline: 1px dashed var(--developed);
  outline-offset: 10px;
}

/* Develop / fix control */
.develop {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.develop:hover, .develop[aria-pressed="true"] { background: var(--mark); }

/* Work page */
.spec {
  margin: 1.6rem 0 2rem;
  border-top: 1px solid var(--rule);
}

.spec div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.spec dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--quiet);
  padding-top: 0.2rem;
}

.spec dd { margin: 0; }

figure { margin: 2.2rem 0; }

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--quiet);
  margin-top: 0.5rem;
}

.footnotes {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.6;
}

/* Archive page */
.lineage { list-style: none; padding: 0; margin: 1.2rem 0 0; }

.lineage li {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--rule);
  padding: 0.7rem 0;
}

.lineage .year {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--quiet);
  padding-top: 0.25rem;
}

.lineage .what {
  font-size: 0.88em;
  color: var(--quiet);
}

table.registry {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.74rem;
  margin-top: 1.2rem;
}

table.registry th, table.registry td {
  text-align: left;
  padding: 0.55rem 1rem 0.55rem 0;
  border-top: 1px solid var(--rule);
  vertical-align: top;
  font-weight: 400;
}

table.registry th { color: var(--quiet); }

.interject {
  font-family: var(--mono);
  font-size: 0.76rem;
  margin: 2.6rem 0;
}

/* Footer */
footer.colophon {
  margin-top: 4.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
}

.colophon .meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--quiet);
  margin-top: 1.6rem;
}

.trio { margin: 0 0 0.2rem; font-family: var(--mono); font-size: 0.78rem; }

/* Reply invitation — the visible door on the artwork pages (v0.5).
   Real main content on purpose: summarisers ingest it, humans see it. */
.reply { border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1.2rem; }
.reply h2 { margin-top: 0; }
.reply-how { font-family: var(--mono); font-size: 0.8rem; color: var(--quiet); }
.reply-how code { font-size: 0.95em; }
.reply-how a { color: var(--quiet); }

@media (max-width: 760px) {
  .sheet { padding-top: 3rem; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > .note {
    grid-column: 1;
    border-left: 2px solid var(--rule);
    padding-left: 0.8rem;
    margin: 0.4rem 0 1.2rem;
  }
  .spec div { grid-template-columns: 6.5rem minmax(0, 1fr); }
}

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