@import url("./wenkai-specimen.css");

@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("/fonts/HarmonyOS_Sans_SC_Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("/fonts/HarmonyOS_Sans_SC_Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --app-font: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --editorial-page-gutter: max(
    clamp(22px, 6.8vw, 56px),
    calc(20px + env(safe-area-inset-left, 0px)),
    calc(20px + env(safe-area-inset-right, 0px))
  );
}

@font-face {
  font-family: Inter;
  src: url("/fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* Noto Serif SC 2.003 Regular supplemental glyphs for archives 021–024 (SIL OFL 1.1). */
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+4E16, U+4F18, U+503C, U+56FA, U+58A8, U+5B9D, U+5C06, U+62DF, U+63A2, U+6545, U+6A21, U+6D25, U+6EE4, U+725B, U+7D22, U+7EAA, U+81F4, U+8D44, U+955C;
  src: url("/fonts/NotoSerifSC-Reader-Supplement.woff2") format("woff2");
}

.font-specimen {
  container-type: inline-size;
  max-width: var(--measure);
  margin: 0 auto clamp(1.4rem, 3vw, 2rem);
  padding: clamp(12px, 2.4vw, 22px);
  border: 1px solid var(--border-hairline);
  border-radius: 2px;
  background: var(--bg-surface);
  color: var(--ink);
  --specimen-stage: clamp(7.75rem, 25vw, 11.25rem);
}

.specimen-control {
  color: var(--quiet);
  font: 400 .8125rem/1.5 "IBM Plex Mono", "PingFang SC", monospace;
}
.specimen-wenkai.is-inspecting .wenkai-baseline { stroke: var(--klein-blue, #17399A) }

.specimen-word,
.specimen-ampersand {
  display: grid;
  place-items: center;
  min-height: var(--specimen-stage);
  color: var(--ink);
  font-synthesis: none;
}

.specimen-word {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 620;
  font-size: clamp(2rem, 18vw, 6.5rem);
  font-size: clamp(2rem, 19cqi, 6.5rem);
  font-optical-sizing: none;
  font-variation-settings: "wdth" var(--specimen-width), "opsz" 72;
  letter-spacing: -.045em;
  line-height: 1.1;
}

.specimen-width-control {
  display: grid;
  grid-template-columns: max-content minmax(3rem, 1fr) max-content;
  align-items: center;
  gap: clamp(.55rem, 2vw, 1.1rem);
  padding: 0 clamp(.125rem, .8vw, .375rem) .35rem;
}

.specimen-width-control input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.specimen-width-control input::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--quiet);
}

.specimen-width-control input::-moz-range-track {
  height: 1px;
  background: var(--quiet);
}

.specimen-width-control input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -5.5px;
  border: 1px solid var(--klein-blue, #17399A);
  border-radius: 50%;
  background: var(--klein-blue, #17399A);
}

.specimen-width-control input::-moz-range-thumb {
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  border: 1px solid var(--klein-blue, #17399A);
  border-radius: 50%;
  background: var(--klein-blue, #17399A);
}

.specimen-expression {
  appearance: none;
  display: grid;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.specimen-ampersand {
  font: 560 clamp(4.75rem, 24vw, 8rem)/1 Recursive, monospace;
  font-size: clamp(4.75rem, 25cqi, 8rem);
  font-variation-settings: "CASL" 1, "MONO" 1;
}

.specimen-expression[aria-pressed="true"] .specimen-ampersand {
  font-variation-settings: "CASL" 0, "MONO" 1;
}

.specimen-expression-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  min-height: 44px;
  padding-bottom: .35rem;
}

.specimen-expression[aria-pressed="false"] .specimen-casual-label,
.specimen-expression[aria-pressed="true"] .specimen-linear-label {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .3em;
}

.specimen-expression:focus-visible,
.specimen-width-control input:focus-visible {
  outline: 2px solid var(--link, var(--klein-blue));
  outline-offset: -2px;
}

@media (prefers-reduced-motion: no-preference) {
  .specimen-ampersand {
    transition: font-variation-settings 340ms ease-in-out;
  }
}

@media (forced-colors: active) {
  .specimen-width-control input { appearance: auto }
}

.specimen-gabarito {
  --gabarito-paper: var(--bg-surface);
  --gabarito-ink: var(--ink-primary);
  --gabarito-rule: var(--border-hairline);
  --gabarito-weight: 800;
  width: 100%; max-width: none; min-width: 0;
  padding: 18px 26px;
  border: 1px solid var(--gabarito-rule); border-radius: 2px;
  color: var(--gabarito-ink);
  background-color: var(--gabarito-paper);
  font: 400 11px/1.5 "IBM Plex Mono", "PingFang SC", ui-monospace, monospace;
}
.gabarito-tools, .gabarito-edit-tools, .gabarito-footer, .gabarito-charset {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px;
}
.gabarito-tools { padding-bottom: 16px; border-bottom: 1px solid var(--gabarito-rule) }
.gabarito-tools > span { color: var(--ink-secondary); letter-spacing: .16em }
.specimen-gabarito button {
  appearance: none; color: inherit; border: 0; border-radius: 3px;
  background: transparent; font: inherit; cursor: pointer;
}
.specimen-gabarito button:focus-visible, .gabarito-word:focus-visible {
  outline: 2px solid currentColor; outline-offset: 2px;
}
.specimen-gabarito .gabarito-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
  border: 1px solid var(--border-hairline); background: var(--bg-surface);
  font-size: 10px; letter-spacing: .06em;
}
.gabarito-toggle::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--klein-blue, #17399A) }
.specimen-gabarito .gabarito-toggle[aria-pressed="false"] { background: var(--bg-subtle) }
.gabarito-toggle[aria-pressed="false"]::before { background: var(--ink-tertiary) }
.gabarito-stage { margin-block: 4px; padding-block: 40px }
.gabarito-typearea, .gabarito-charset {
  font-family: Gabarito, "PingFang SC", sans-serif;
  font-weight: var(--gabarito-weight); font-synthesis: none;
}
.gabarito-typearea { position: relative; font-size: 76px; line-height: 1.05 }
.gabarito-word {
  position: relative; width: fit-content; max-width: calc(100% - 48px); min-width: min(120px, 100%);
  min-height: 1.05em; letter-spacing: -.02em; border-radius: 3px;
  white-space: pre-wrap; overflow-wrap: anywhere; cursor: text;
}
.gabarito-word:focus { background: var(--bg-subtle) }
.gabarito-guides { position: absolute; inset: 0; pointer-events: none; user-select: none }
.gabarito-baseline-anchor {
  position: relative; display: inline-block; vertical-align: baseline;
  width: 100%; height: 0; line-height: 0;
}
/* The zero-height inline box sits on the first line's actual baseline.
   Gabarito's cap and x heights are 681 and 488 units on a 1,000-unit em. */
.gabarito-guide { position: absolute; inset-inline: 0; border-top: 1px solid var(--border-hairline) }
.gabarito-cap { top: -.681em; border-top-style: dashed }
.gabarito-xheight { top: -.488em; border-top-style: dotted }
.gabarito-baseline { top: 0; border-top-color: var(--klein-blue, #17399A) }
.gabarito-guide > span {
  position: absolute; bottom: 1px; right: 0; padding-inline: 3px;
  color: var(--ink-secondary); background: var(--gabarito-paper); letter-spacing: .08em;
  font: 400 9px/1.1 "IBM Plex Mono", monospace;
}
.gabarito-baseline > span { top: 2px; bottom: auto; color: var(--klein-blue, #17399A) }
.gabarito-edit-tools { margin-top: 8px; min-height: 18px; font-size: 10px; color: var(--ink-secondary) }
.specimen-gabarito .gabarito-reset { padding: 0; text-decoration: underline; text-underline-offset: .18em }
.gabarito-charset {
  padding-block: 14px; border-top: 1px solid var(--gabarito-rule);
  font-size: 18px; line-height: 1.35; letter-spacing: .025em;
}
.gabarito-charset > span:last-child { color: var(--ink-secondary); letter-spacing: .08em }
.gabarito-footer { padding-top: 14px; border-top: 1px solid var(--gabarito-rule) }
.gabarito-weights { display: flex; flex-wrap: wrap; gap: 6px }
.gabarito-weights button { min-height: 26px; padding: 3px 8px; background: var(--bg-subtle) }
.gabarito-weights button[aria-pressed="true"] { color: var(--gabarito-paper); background: var(--gabarito-ink) }
@media (hover: hover) {
  .gabarito-weights button[aria-pressed="false"]:hover { box-shadow: inset 0 0 0 1px var(--border-hairline) }
  .specimen-gabarito .gabarito-toggle:hover { background: var(--bg-subtle) }
}
@media (max-width: 32rem) {
  .specimen-gabarito { padding: 14px 16px }
}
@container (max-width: 28rem) {
  .gabarito-tools > span { font-size: 10px }
  .gabarito-stage { padding-block: 32px }
  .gabarito-typearea { font-size: clamp(36px, 17cqi, 52px) }
  .gabarito-charset { font-size: 16px }
  .gabarito-footer { align-items: start; flex-direction: column; gap: 10px }
}
@media (forced-colors: active) {
  .gabarito-weights button[aria-pressed="true"] { outline: 2px solid ButtonText }
}

/* ==========================================================================
   Unified Section 02 Interactive Specimen Lab (Seamless inside Swiss Dossier)
   ========================================================================== */

.font-specimen.dossier-specimen-embed {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.specimen-gabarito.dossier-specimen-embed {
  padding: 0;
  border: 0;
  background: transparent;
}

.specimen-lab {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dossier-specimen-embed[hidden] { display: none }

.lab-stage {
  position: relative;
  padding: 20px 40px 22px 0;
  isolation: isolate;
}

.lab-guides {
  position: absolute;
  inset: 16px 0 16px 0;
  z-index: 0;
  pointer-events: none;
}

.lab-guide {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid rgba(29, 29, 31, .09);
}

.lab-guide em {
  position: absolute;
  right: 0;
  top: -7px;
  font-style: normal;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 8.5px;
  letter-spacing: .06em;
  color: var(--ink-tertiary, #86868B);
  background: var(--bg-paper, #FFFFFF);
  padding-left: 4px;
}

.lab-guide-cap { top: 20%; }
.lab-guide-xh { top: 48%; border-top-style: dashed; }
.lab-guide-base {
  top: 76%;
  border-top: 1px solid rgba(23, 57, 154, .42);
}
.lab-guide-base em { color: var(--klein-blue, #17399A); }

.lab-editor {
  position: relative;
  z-index: 1;
  min-height: 1.3em;
  font-family: var(--lab-face);
  font-weight: var(--lab-weight, 400);
  font-size: var(--lab-size, clamp(24px, 5vw, var(--lab-preferred-size, 42px)));
  font-synthesis: none;
  line-height: 1.24;
  letter-spacing: -.015em;
  color: #111111;
  outline: none;
  border-radius: 2px;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  transition: background-color 140ms ease;
}

.lab-editor[contenteditable] { cursor: text }

.lab-editor:focus {
  background: rgba(23, 57, 154, 0.035);
}

.specimen-notice {
  margin: 0;
  padding: 10px 0 18px;
  font: 400 13px/1.6 var(--serif);
  color: var(--ink-secondary);
}

.lab-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--catalog-rule, #E2E4E8);
}

.lab-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.lab-chip {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 11.5px;
  line-height: 1.2;
  color: var(--ink-secondary, #6E6E73);
  cursor: pointer;
  transition: color 150ms ease;
}

.lab-chip:hover {
  color: var(--klein-blue, #17399A);
}

.lab-chip[aria-pressed="true"] {
  color: var(--klein-blue, #17399A);
  font-weight: 600;
}

.lab-sliders {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.lab-slider-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-tertiary, #86868B);
}

.lab-slider-val {
  min-width: 32px;
  text-align: right;
  color: var(--ink-secondary, #6E6E73);
  font-variant-numeric: tabular-nums;
}

.lab-range {
  -webkit-appearance: none;
  appearance: none;
  width: 84px;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.lab-range::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--catalog-rule, #D8DCE3);
}

.lab-range::-moz-range-track {
  height: 1px;
  background: var(--catalog-rule, #D8DCE3);
}

.lab-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--klein-blue, #17399A);
  border: 0;
}

.lab-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--klein-blue, #17399A);
  border: 0;
}

.lab-guides-toggle {
  border: 0;
  background: transparent;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-secondary, #6E6E73);
  cursor: pointer;
  transition: color 150ms ease;
}

.lab-guides-toggle::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--ink-tertiary, #A1A1A6);
  transition: background-color 150ms ease;
}

.lab-guides-toggle[aria-pressed="true"] {
  color: var(--ink-primary, #1D1D1F);
}

.lab-guides-toggle[aria-pressed="true"]::before {
  background: var(--klein-blue, #17399A);
}

.lab-guides-toggle:hover {
  color: var(--klein-blue, #17399A);
}

/* 图标悬停和按压 */
.icon-button-motion {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 160ms ease;
}

/* 今日、探索和收藏共用的阅读版式 */
.fold-book {
  --fold-inline-padding: var(--editorial-page-gutter);
  --fold-measure: calc(656px + 2 * var(--fold-inline-padding));
  --fold-tool-size: 38px;
  --fold-tools-top: max(12px, env(safe-area-inset-top, 0px));
  --fold-tools-bottom: 14px;
  --fold-heading-gap: 36px;
  --bg-paper: var(--bg-surface);
  --ink-hero: #111113;
  --ink-body: #3A3A3C;
  --ink: var(--ink-primary);
  --quiet: var(--ink-secondary);
  --border-hairline: var(--catalog-rule);
  --accent-signal: var(--klein-blue);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --fangsong: "Reader Title Fangsong", "Paper Fangsong", var(--serif);
  --brand-en: "IM Fell English", Georgia, serif;

  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--ink-primary);
  position: relative; z-index: 1;
  width: 100%;
  min-height: 100%;
  min-width: 0;
}

:where(.fold-book) :is(button, input) { font: revert; color: revert }

/* 顶部悬浮工具条与阅读版心对齐 */
.fold-book-tools {
  position: fixed; top: 0; inset-inline: 0; z-index: 12;
  padding-block: var(--fold-tools-top) calc(var(--fold-tools-bottom) + 8px);
  background: linear-gradient(to bottom, var(--bg-paper) 58%, rgb(255 255 255 / .82) 78%, rgb(255 255 255 / 0));
  pointer-events: none;
}

#foldout .fold-book-tools,
.reader-viewport .fold-book-tools {
  position: sticky;
  margin-block-end: calc(0px - var(--fold-tool-size) - var(--fold-tools-top) - var(--fold-tools-bottom) - 8px);
}
.fold-tools-inner,
.fold-article-inner {
  width: min(100%, var(--fold-measure));
  margin-inline: auto;
  padding-inline: var(--fold-inline-padding);
}

.fold-tools-inner {
  display: flex; justify-content: space-between; align-items: center;
}
.fold-tools-inner > * { pointer-events: auto }

.fold-close, .fold-save {
  display: inline-grid; place-items: center; width: var(--fold-tool-size); height: var(--fold-tool-size); padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-primary); cursor: pointer;
}
.fold-close { margin-inline-start: -15.8px; color: var(--ink-secondary) }
.fold-save { margin-inline-end: -13.6px }
.fold-close, .fold-save { position: relative; }
:is(.fold-close, .fold-save)::after {
  content: "";
  position: absolute;
  inset: min(0px, calc((var(--fold-tool-size) - 44px) / 2));
}
.fold-close svg, .fold-save svg { display: block; width: 19px; height: 19px }
.fold-book :is(button, a):focus-visible { outline: 2px solid var(--accent-signal); outline-offset: 3px }
.fold-save[aria-pressed="true"] { color: var(--accent-signal) }

:is(.fold-save, .dossier-save-btn) path {
  fill: currentColor;
  fill-opacity: 0;
  transition: fill-opacity 150ms ease;
}
:is(.fold-save, .dossier-save-btn)[aria-pressed="true"] path { fill-opacity: 1 }

.icon-button-motion:is(:focus-visible, :active, .is-pressing) { color: #000 }
@media (hover: hover) {
  .icon-button-motion:hover { color: #000 }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .dossier-close-btn > svg {
    transform-origin: center;
    transition: transform 190ms cubic-bezier(.22, 1, .36, 1);
  }
  .dossier-close-btn:is(:hover, :focus-visible) > svg { transform: rotate(90deg) }
  .dossier-close-btn:is(:hover, :focus-visible) { transition-delay: 70ms }
}

@media (prefers-reduced-motion: reduce) {
  .icon-button-motion,
  :is(.fold-save, .dossier-save-btn) path { transition: none }
}

/* 全屏纸面上的居中版心 */
.fold-frame { position: relative; z-index: 2; width: 100%; min-height: 100%; min-width: 0; perspective: 1800px; perspective-origin: 50% 42% }

.fold-article {
  /* Scope the reading face to the article so the folded card keeps its own fonts. */
  --mono: var(--app-font);
  --serif: var(--app-font);
  --brand-en: var(--app-font);
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  min-width: 0;
  background: var(--bg-paper);
  font-family: var(--app-font);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.fold-article-inner {
  padding-block: calc(var(--fold-tools-top) + var(--fold-tool-size) + var(--fold-heading-gap)) max(88px, 10dvh);
  display: flex; flex-direction: column; gap: 0;
}

.fold-folio {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .07em;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
}
.fold-folio--strong { color: var(--ink-primary); font-weight: 500 }
.fold-license-btn {
  color: var(--accent-signal);
  text-decoration: none;
}
.fold-license-btn {
  border: 0;
  background: transparent;
  padding: 2px 0;
  margin: -2px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .07em;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: border-color 160ms ease;
}
.fold-license-btn:hover,
.fold-license-btn:focus-visible { border-bottom-color: var(--accent-signal); outline: none }

/* 各大功能区统一样式 */
.fold-zone {
  position: relative;
  display: flex; flex-direction: column;
}

.fold-section-rule {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px 0 18px;
  border-top: 1px solid var(--border-hairline);
}

/* ---------- 第一折：档案表头区（Dossier Header） ---------- */
.fold-zone-header {
  padding-bottom: 28px;
}

.fold-sheet-masthead {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.fold-ledger {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
}

.fold-ledger-main {
  padding: 22px 28px 6px 0;
  border-right: 1px solid var(--border-hairline);
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
}

.fold-ledger-main .fold-name {
  margin: 0;
  font-family: var(--typeface, var(--serif)), var(--serif);
  font-weight: var(--hero-weight, 400);
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink-hero);
  overflow-wrap: anywhere;
}

.fold-origin-lead {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--ink-secondary);
}

.fold-ledger-meta {
  margin: 0;
  padding: 10px 0 0 26px;
  display: flex; flex-direction: column;
  min-width: 0;
}

.fold-ledger-row {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-hairline);
}
.fold-ledger-row:last-child { border-bottom: 0; padding-bottom: 4px }
.fold-ledger-row--split {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: 14px;
}
.fold-ledger-row dt {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .09em;
  color: var(--ink-tertiary);
}
.fold-ledger-row dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-primary);
  overflow-wrap: anywhere;
}
.fold-mono-val {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 第二折：活字标本检视单（Specimen Proof Sheet） ---------- */
.fold-zone-proof {
  padding-bottom: 30px;
}

/* ---------- 第三折及延展：故事正文区（Story Sheet，撤掉外围网格线） ---------- */
.fold-zone-story {
  padding-bottom: 36px;
}

.fold-story-sheet {
  width: min(100%, 580px);
  margin: 12px 0 0;
  display: flex; flex-direction: column; gap: 22px;
}

.fold-story-headline {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 35px);
  font-weight: 700;
  line-height: 1.32;
  color: var(--ink-primary);
  text-wrap: pretty;
}

.fold-prose {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--ink-body);
}
.fold-prose p { margin: 0 0 20px; overflow-wrap: anywhere; line-break: strict }
.fold-prose p:last-child { margin-bottom: 0 }
.fold-prose strong { font-weight: 600; color: var(--ink-primary) }
.fold-prose a,
.fold-sources a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink-tertiary);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
.fold-prose a:hover,
.fold-sources a:hover {
  text-decoration-color: currentColor;
}

/* ---------- 文末尾注：排印披露、原始出处与归档收束线 ---------- */
.fold-zone-colophon {
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
}

.fold-colophon-note {
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-hairline);
}

.fold-colophon-note p {
  margin: 0;
  max-width: 580px;
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--ink-secondary);
}

.fold-sources {
  font-size: 13px;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border-hairline);
  padding: 6px 0;
}
.fold-sources-toggle {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; min-height: 36px; padding: 0; border: 0; background: transparent;
  font: inherit; color: var(--ink-primary); text-align: start; cursor: pointer;
}
.fold-book :is(.fold-sources-toggle, .fold-sources a, .fold-prose a):focus-visible {
  outline-color: var(--ink-primary);
}
.fold-sources-mark { font-family: var(--mono); color: var(--ink-secondary) }
.fold-sources-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: none;
}
.fold-sources-toggle[aria-expanded="true"] + .fold-sources-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}
.fold-sources-body {
  display: flow-root;
  min-height: 0;
  overflow: hidden;
  overflow: visible clip;
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: no-preference) {
  .fold-sources-panel {
    transition: grid-template-rows 280ms ease, opacity 200ms ease-out;
  }
}
.fold-source-list { margin: 8px 0 12px; padding-left: 18px; line-height: 1.75 }
.fold-source-meta, .fold-source-link { margin: 8px 0; font-size: 12.5px }

.fold-eof {
  margin-top: 26px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.fold-eof-brand {
  font-family: var(--brand-en);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-tertiary);
}

/* 底部用力下滑进入下一篇故事（与收藏/探索详情页完全一致） */
.fold-next-pull {
  margin-top: 40px;
  padding: 18px 0 8px;
  border: 0;
  background: transparent;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease;
}
.fold-next-track {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  background: var(--border-hairline);
  overflow: hidden;
}
.fold-next-fill {
  position: absolute;
  inset: 0;
  background: var(--accent-signal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 120ms ease-out;
}
.fold-next-cue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.fold-next-hint {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--ink-tertiary);
  transition: color 160ms ease;
}
.fold-next-target {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-secondary);
  transition: color 160ms ease;
}
.fold-next-arc {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .07em;
  color: var(--ink-tertiary);
}
.fold-next-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-primary);
}
.fold-next-chevron {
  display: inline-flex;
  align-items: center;
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), color 160ms ease;
}
.fold-next-chevron svg { display: block; width: 15px; height: 15px }
.fold-next-pull:hover .fold-next-hint,
.fold-next-pull:hover .fold-next-target,
.fold-next-pull.is-pulling .fold-next-hint,
.fold-next-pull.is-pulling .fold-next-target { color: var(--accent-signal) }
.fold-next-pull:hover .fold-next-chevron,
.fold-next-pull.is-pulling .fold-next-chevron { transform: translateX(3px); color: var(--accent-signal) }

@media (max-width: 640px) {
  .fold-book {
    --fold-tool-size: 44px;
    --fold-tools-top: max(10px, env(safe-area-inset-top, 0px));
    --fold-tools-bottom: 12px;
    --fold-heading-gap: 26px;
  }
  .fold-close { margin-inline-start: -12px }
  .fold-save { margin-inline-end: -12px }
  .fold-article-inner { padding-block-end: max(72px, 8dvh) }
  .fold-ledger { grid-template-columns: 1fr }
  .fold-ledger-main {
    padding: 18px 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--border-hairline);
  }
  .fold-ledger-meta { padding: 4px 0 0 }
  .fold-story-headline { font-size: 28px }
  .fold-prose { font-size: 16px; line-height: 1.88 }
}
