/* ═══════════════════════════════════════════════════════════════
   THE WEIGHT OF SMOKE — the measure and the field book.
   烟 · ten cells, two cores off the record, one number with a
   source behind it.

   Mono (单色) is the right face for a surveyor: hairlines, square
   corners, figures in a monospace column, nothing decorative to
   argue with. The page is the field book — the plot drawn as a
   grid of rules, the chapters kept like samples, and the furnace
   at the end of it, sealed, with nothing coming out.

   House rule: this page carries the colour, the prose does not.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --sm-flag:   #c8901a;                       /* the one red flag on the fence */
  --sm-rule:   var(--mo-border);
  --sm-card:   var(--mo-surface-card);
}

/* ─── nav ─────────────────────────────────────────────────────
   Mono leaves .mo-nav__brand-mark an EMPTY ink square: it sets
   `background: var(--mo-ink)` and no colour at all. A glyph left to
   inherit --mo-fg sits on the same value and vanishes — dark-on-dark
   in light mode, white-on-white in dark. The mark is inverted ink, so
   the glyph inverts with it. Same fix as the Yellow Immortal's. */
.mo-nav__brand-mark {
  display: grid;
  place-items: center;
  font-family: "Noto Serif SC", "Noto Serif CJK SC", serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--mo-bg);
}

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

.sm-hero { padding: clamp(4.5rem, 11vw, 7.5rem) 0 clamp(2.5rem, 6vw, 4rem); }

.sm-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}

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

.sm-hero__title {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 6.4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: .7rem 0 .5rem;
}

.sm-hero__zh {
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  color: var(--mo-ash);
  margin: 0 0 1.2rem;
  letter-spacing: .06em;
}

.sm-hero__say {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--mo-ash);
  margin: 0 0 1.6rem;
  max-width: 46ch;
  padding-left: 1rem;
  border-left: 2px solid var(--sm-flag);
}

.sm-hero__lede {
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 52ch;
  margin: 0 0 1.8rem;
}

.sm-facts {
  list-style: none;
  margin: 0 0 1.8rem;
  padding: 0;
  border-top: 1px solid var(--sm-rule);
  max-width: 34rem;
}
.sm-facts li {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--sm-rule);
  font-size: .92rem;
}
.sm-facts__k {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mo-ash-soft);
  padding-top: .2em;
}
.sm-facts__v [lang="zh-Hans"] { font-family: "Noto Serif SC", serif; }

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

.sm-hero__plate { padding-top: .3rem; }

.sm-plate {
  position: relative;
  width: clamp(13rem, 24vw, 17rem);
}
.sm-plate img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--sm-rule);
}
.sm-plate__seal {
  position: absolute;
  bottom: .7rem;
  right: .7rem;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  background: var(--sm-flag);
  color: #16130c;
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.2rem;
}

/* ─── shared section furniture ──────────────────────────────── */

.sm-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

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

.sm-h2 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  letter-spacing: -.01em;
  margin: .5rem 0 .6rem;
}

.sm-head__note {
  color: var(--mo-ash);
  max-width: 62ch;
  margin: 0;
  line-height: 1.6;
  font-size: .98rem;
}

/* ─── the measure — the plot as figures ─────────────────────── */

.sm-figures {
  margin: 0;
  max-width: 54rem;
  border-top: 1px solid var(--sm-rule);
}

.sm-figures__row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--sm-rule);
}

.sm-figures dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.sm-figures__unit {
  font-size: .45em;
  letter-spacing: 0;
  color: var(--mo-ash-soft);
  margin-left: .15em;
}

.sm-figures dd {
  margin: 0;
  font-size: .98rem;
  line-height: 1.6;
  color: var(--mo-ash);
  max-width: 44ch;
}

.sm-figures__note {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .84rem;
  line-height: 1.7;
  color: var(--mo-ash-soft);
  margin: 1.2rem 0 0;
  max-width: 56ch;
}

/* ─── the field book — twenty chapters, kept like samples ───── */

.sm-book {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--sm-rule);
  max-width: 60rem;
}

/* build-emitted rows (staticize.py, entry_row) */
.sm-book .entry { border-bottom: 1px solid var(--sm-rule); }

.sm-book .entry__link {
  display: grid;
  grid-template-columns: 3rem minmax(0, 12rem) minmax(0, 1fr) auto;
  gap: clamp(.8rem, 2.5vw, 1.6rem);
  align-items: baseline;
  padding: .85rem .2rem;
  text-decoration: none;
  color: inherit;
}
.sm-book .entry__link:hover { background: color-mix(in srgb, var(--mo-ink) 5%, transparent); }

.sm-book .entry__no {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .74rem;
  color: var(--mo-ash-soft);
  font-variant-numeric: tabular-nums;
}

.sm-book .entry__title {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 600;
  font-size: .97rem;
  letter-spacing: -.005em;
}

.sm-book .entry__open {
  font-size: .9rem;
  color: var(--mo-ash);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sm-book .entry__words {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .74rem;
  color: var(--mo-ash-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── the furnace — provenance ──────────────────────────────── */

.sm-furnace {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 62rem;
}

.sm-furnace__left { min-width: 0; }

.sm-plank { padding: 1.6rem 1.5rem; }
.sm-plank p { margin: 0 0 .9rem; }
.sm-plank p:last-child { margin-bottom: 0; }
.sm-plank__zh {
  font-family: "Noto Serif SC", serif;
  font-size: 1.35rem;
  line-height: 1.6;
}
.sm-plank__py {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .8rem;
  line-height: 1.7;
  color: var(--mo-ash-soft);
}
.sm-plank__say { font-size: .98rem; line-height: 1.65; }
.sm-plank__attr {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .74rem;
  color: var(--mo-ash-soft) !important;
  border-top: 1px solid var(--sm-rule);
  padding-top: .8rem;
}

.sm-furnace__right p:first-child {
  font-size: 1.01rem;
  line-height: 1.7;
  margin: 0 0 1.4rem;
}

.sm-companion {
  border: 1px solid var(--sm-rule);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.4rem;
}
.sm-companion__title {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mo-ash-soft);
  margin: 0 0 .5rem !important;
}
.sm-companion p:last-child {
  font-size: .92rem;
  line-height: 1.65;
  color: var(--mo-ash);
  margin: 0;
}

.sm-note { border-left: 2px solid var(--mo-border-strong); padding-left: 1.1rem; }
.sm-note p {
  font-size: .88rem;
  line-height: 1.65;
  color: var(--mo-ash);
  margin: 0 0 .9rem;
}
.sm-note p:last-child { margin-bottom: 0; }

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

.sm-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem;
  padding-bottom: 1.6rem;
}

.sm-foot__name {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 600;
  font-size: .95rem;
  margin: 0 0 .7rem;
}

.sm-foot__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  margin: 0;
  padding: 0;
}

.sm-foot__take { justify-self: end; }

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

@media (max-width: 880px) {
  .sm-hero__grid { grid-template-columns: 1fr; }
  .sm-hero__plate { order: -1; }
  .sm-plate { width: 11rem; }
  .sm-furnace { grid-template-columns: 1fr; }
  .sm-book .entry__link { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
  .sm-book .entry__open { display: none; }
  .sm-figures__row { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .sm-foot { grid-template-columns: 1fr; }
  .sm-foot__take { justify-self: start; }
}
