/* JINGSXIANS unified design system · 2026-10-10 · quiet reading palette + integrated type scale
   One visual language. HTML carries content, CSS carries presentation, JS carries behavior only. */
@layer reset, tokens, shell, typography, components, pages, utilities, responsive, print;



  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 92px; }
  body { margin: 0; }
  img, svg { display: block; max-width: 100%; height: auto; }
  button, input, textarea, select { font: inherit; }
  button, summary, select { cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  [hidden] { display: none !important; }
  :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 3px; }
  h1, h2, h3, h4, p, blockquote, ul, ol { margin-top: 0; }





  :root {
    --canvas: #f7f7f5;
    --surface: #ffffff;
    --surface-soft: #f2f2f0;
    --ink: #2f2f2d;
    --text: #454543;
    --muted: #737370;
    --line: #e5e5e1;
    --line-strong: #d7d7d2;
    --accent: #647168;
    --accent-deep: #515e56;
    --accent-soft: #eef0ee;
    --heritage: #8a6259;
    --heritage-soft: #f3efed;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, .035);
    --radius: 14px;
    --radius-sm: 9px;
    --sans: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
    --serif: var(--sans);
    --shell: 1180px;
    --measure: 800px;

    /* Global type hierarchy: one scale for every page family. */
    --title-display: clamp(40px, 4.35vw, 52px);
    --title-page: clamp(34px, 3.45vw, 46px);
    --title-article: clamp(31px, 2.8vw, 40px);
    --title-section: 26px;
    --title-prose: 24px;
    --title-chapter: 27px;
    --title-card: 20px;
    --title-small: 17px;
  }
  body {
    min-height: 100vh;
    background: var(--canvas);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  body.classical {
    /* Classical pages remain the same site: only ornament and tiny accents change. */
    --page-accent: var(--heritage);
  }
  body:not(.classical) { --page-accent: var(--accent); }
  ::selection { background: var(--accent-soft); color: var(--accent-deep); }





  .skip-link {
    position: fixed; top: -80px; left: 18px; z-index: 999;
    padding: 10px 14px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft);
  }
  .skip-link:focus { top: 14px; }

  .site-header {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--canvas) 94%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    backdrop-filter: blur(16px) saturate(115%);
  }
  .header-inner {
    width: min(100%, var(--shell)); min-height: 76px; margin-inline: auto;
    padding-inline: 28px; display: flex; align-items: center; gap: 28px;
  }
  .brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
  .brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px;
    border-radius: 11px; background: var(--accent-deep); color: #fff;
    font: 600 21px/1 var(--serif); letter-spacing: 0;
  }
  .brand-text { font-size: 17px; font-weight: 600; letter-spacing: .07em; line-height: 1.25; white-space: nowrap; }
  .brand-text small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: .16em; }

  .desktop-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; white-space: nowrap; font-size: 13px; }
  .desktop-nav a { position: relative; padding: 28px 0 25px; color: #666664; }
  .desktop-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 2px; border-radius: 2px; background: transparent; }
  .desktop-nav a:hover, .desktop-nav [aria-current] { color: var(--ink); }
  .desktop-nav a:hover::after, .desktop-nav [aria-current]::after { background: var(--page-accent); }

  .mobile-nav { display: none; margin-left: auto; position: relative; }
  .mobile-nav summary { list-style: none; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav nav {
    position: absolute; right: 0; top: calc(100% + 10px); width: min(82vw, 320px);
    padding: 10px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-soft);
  }
  .mobile-nav nav a { padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }

  .container, .page-content { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 28px; }
  .page-content { padding-bottom: 82px; }
  .page-content > .container { padding-inline: 0; }
  .content-group { min-width: 0; }

  .page-hero {
    position: relative; overflow: hidden;
    padding-block: 58px 40px; margin-bottom: 42px;
    border-bottom: 1px solid var(--line);
  }
  .page-hero > * { position: relative; z-index: 1; }
  .page-hero .container { padding-inline: 0; }
  .page-hero p { max-width: 860px; color: var(--muted); }
  .page-hero .lead { max-width: 800px; }

  /* Ancient pages use an airy ink-landscape ornament, never a yellow full-page theme. */
  body.classical:not(.article-page) .page-hero::after,
  body.classical.lecture-page .page-hero::after {
    content: ""; position: absolute; z-index: 0; pointer-events: none;
    right: -18px; top: 2px; width: min(48%, 540px); height: 100%;
    background: url("ink-horizon.svg") right center / contain no-repeat; opacity: .22;
  }
  body.classical:not(.article-page) .page-hero::before,
  body.classical.lecture-page .page-hero::before {
    content: ""; position: absolute; right: 18px; bottom: 20px; width: 54px; height: 2px;
    background: var(--heritage); opacity: .22;
  }

  .section-block { margin-top: 58px; }
  .section-block > .container { padding-inline: 0; }
  .section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 34px; align-items: start; margin-bottom: 20px; }
  .section-head > div, .section-head > h2, .section-head > p, .section-head > .eyebrow, .section-head > small:not(:last-child), .section-head > span:not(:last-child) { grid-column: 1; min-width: 0; }
  .section-head > span:not(:last-child), .section-head > small:not(:last-child) { margin-bottom: 6px; color: var(--page-accent); font-size: 10px; font-weight: 600; letter-spacing: .13em; }
  .section-head h2 { margin-bottom: 8px; }
  .section-head p { max-width: 840px; margin-bottom: 0; color: var(--muted); }
  .section-head > a, .section-head > small:last-child, .section-head > span:last-child { grid-column: 2; grid-row: 1 / span 5; align-self: start; padding-bottom: 4px; color: var(--muted); font-size: 12px; }
  .section-head > a { color: var(--accent); font-size: 13px; }

  .site-footer {
    width: 100%; margin: 0; padding: 38px max(28px, calc((100vw - var(--shell)) / 2 + 28px)) 42px;
    border-top: 1px solid var(--line); background: rgba(255,255,255,.62); color: var(--muted); font-size: 13px;
  }
  .footer-inner { display: flex; justify-content: space-between; gap: 30px; }
  .footer-inner > div:first-child p:first-child { color: var(--ink); font-weight: 600; }
  .footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
  .footer-links a:hover { color: var(--accent); }
  .site-footer p { margin-bottom: 7px; }

  .breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 22px; color: var(--muted); font-size: 12px; }
  .breadcrumb a:hover { color: var(--accent); }

  .article-layout, .lecture-layout {
    display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 52px; align-items: start;
  }
  .reading-content, .lecture-body { min-width: 0; max-width: var(--measure); }
  .reading-content .container { padding-inline: 0; }
  .reading-content .page-hero { padding-top: 40px; padding-bottom: 28px; margin-bottom: 30px; }
  .reading-content .page-hero h1 { max-width: 780px; font-size: var(--title-article); line-height: 1.42; }

  .article-toc, .lecture-toc { position: sticky; top: 96px; padding-block: 34px; font-size: 13px; }
  .article-toc details, .lecture-toc details { border-top: 2px solid var(--page-accent); }
  .article-toc summary, .lecture-toc summary { list-style: none; padding: 15px 0 12px; color: var(--ink); font-size: 14px; font-weight: 600; }
  .article-toc summary::-webkit-details-marker, .lecture-toc summary::-webkit-details-marker { display: none; }
  .toc-links { max-height: calc(100dvh - 230px); overflow-y: auto; display: grid; padding-right: 8px; scrollbar-width: thin; }
  .toc-links a, .toc-links > span { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); line-height: 1.55; }
  .toc-links a:hover, .toc-links [aria-current] { color: var(--page-accent); }
  .toc-links a span { min-width: 22px; color: #969694; font-size: 10px; }

  .lecture-layout { margin-top: 4px; }
  .lecture-body { max-width: 830px; }
  .chapter { scroll-margin-top: 92px; padding: 28px 0 46px; border-bottom: 1px solid var(--line); }
  .chapter-heading { padding-bottom: 14px; }
  .chapter-heading h2 { margin: 7px 0 8px; font-size: var(--title-chapter); line-height: 1.45; font-family: var(--serif); font-weight: 600; }
  .chapter-heading small, .chapter-heading > span { color: var(--muted); font: 11px/1.6 var(--sans); }





  h1, h2, h3, h4 { color: var(--ink); overflow-wrap: anywhere; }
  strong, b, dt { font-weight: 600; }
  h1 { margin-bottom: 18px; font-size: var(--title-page); line-height: 1.3; font-weight: 600; letter-spacing: -.024em; }
  h2 { font-size: var(--title-section); line-height: 1.45; font-weight: 600; letter-spacing: -.012em; }
  h3 { font-size: var(--title-card); line-height: 1.5; font-weight: 600; }
  h4 { font-size: var(--title-small); line-height: 1.55; font-weight: 600; }
  body.classical .page-hero h1, body.classical .chapter-heading h2 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; }

  .eyebrow { display: block; margin-bottom: 12px; color: var(--page-accent); font: 600 10px/1.7 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
  .lead { max-width: 820px; color: var(--muted); font-size: 17px; line-height: 1.88; }
  .meta, .badge { color: var(--muted); font-size: 12px; }
  .badge { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; }
  .number { display: block; margin-bottom: 12px; color: var(--page-accent); font: 600 11px/1.5 var(--sans); letter-spacing: .06em; }
  .tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0; }
  .tags span { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }

  .prose { max-width: 100%; overflow-wrap: anywhere; font-size: 17px; line-height: 1.96; }
  .prose p { margin: 0 0 1.08em; }
  .prose h2 { margin-top: 2.1em; font-size: var(--title-prose); }
  .prose h3 { margin-top: 1.65em; }
  .prose h2 strong { font-weight: 600; }
  .prose a, .source-note a, .text-link { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
  .prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); color: var(--muted); }

  .source-text { overflow-wrap: anywhere; color: #464644; font: 17.5px/2 var(--serif); }
  .source-text p { margin-bottom: 1.05em; }
  .source-hidden .source-text, .dynamic-off .dynamic-decode { display: none; }
  .dynamic-off .dynamic-term { border-bottom-color: transparent; }
  .dynamic-off .dynamic-term:hover::after, .dynamic-off .dynamic-term:focus-visible::after { display: none; }
  .dynamic-term { position: relative; border-bottom: 1px dotted color-mix(in srgb, var(--heritage) 55%, transparent); }
  .dynamic-term:hover::after, .dynamic-term:focus-visible::after {
    content: attr(data-tip); position: absolute; z-index: 20; bottom: 1.7em; left: 0;
    min-width: 150px; max-width: 240px; padding: 7px 10px; border-radius: 8px;
    background: var(--ink); color: white; font: 12px/1.5 var(--sans); box-shadow: var(--shadow-soft);
  }





  .actions, .filters, .control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-block: 20px; }
  .actions > a, .actions > button, .button, button, select {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 38px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 9px;
    background: rgba(255,255,255,.84); color: var(--ink); font-size: 13px; line-height: 1.45;
    transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
  }
  .actions > a:hover, .actions > button:hover, .button:hover, button:hover { border-color: var(--page-accent); color: var(--page-accent); background: var(--surface); }
  .actions > a[data-action-role="primary"], .button-primary, button.active, button[aria-pressed="true"] {
    border-color: var(--accent-deep); background: var(--accent-deep); color: #fff;
  }
  button:disabled { opacity: .55; cursor: wait; }

  .entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 42px; align-items: stretch; }
  .entry-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
  .entry {
    position: relative; display: flex; min-width: 0; min-height: 142px; flex-direction: column;
    padding: 24px 0 26px; border-top: 1px solid var(--line); color: inherit;
  }
  .entry::after { content: ""; position: absolute; left: 0; top: -1px; width: 0; height: 1px; background: var(--page-accent); transition: width .22s ease; }
  a.entry:hover::after { width: 42px; }
  .entry > h3 { margin: 7px 0 10px; font-size: var(--title-card); line-height: 1.5; }
  .entry > p, .entry > span, .entry-summary { color: var(--muted); }
  .entry p { margin-bottom: 12px; font-size: 14.5px; line-height: 1.72; }
  .entry small { color: var(--muted); font-size: 11px; letter-spacing: .02em; }
  .entry > em, .entry > b:last-child { margin-top: auto; color: var(--page-accent); font-size: 12px; font-style: normal; font-weight: 600; }
  .entry > a { display: inline-block; color: var(--accent); }
  .entry .actions { margin-top: auto; margin-bottom: 0; }

  .note, .plain-language, .dynamic-decode, .source-answer {
    margin-block: 22px; padding: 20px 22px; border: 1px solid var(--line); border-left: 3px solid var(--page-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: color-mix(in srgb, var(--accent-soft) 60%, white);
  }
  .note { color: #666664; font-size: 13.5px; }
  .note p:last-child { margin-bottom: 0; }
  .plain-language { font-size: 15.5px; }
  .plain-language b { color: var(--page-accent); }
  body.classical .dynamic-decode { border-left-color: var(--heritage); background: color-mix(in srgb, var(--heritage-soft) 58%, white); }
  .dynamic-decode { margin: 8px 0 24px; font-family: var(--sans); font-size: 14px; }
  .dynamic-decode > b { display: block; margin-bottom: 8px; color: var(--ink); font-size: 17px; }
  .decode-label { margin-bottom: 8px; color: var(--heritage); font-size: 10px; font-weight: 600; letter-spacing: .12em; }

  .article-source { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; }
  .source-note p { margin-bottom: 8px; color: var(--muted); }

  .table-scroll { width: 100%; overflow-x: auto; margin-block: 24px; border-radius: var(--radius-sm); }
  table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.62); font-size: 14px; line-height: 1.65; text-align: left; }
  th, td { min-width: 110px; padding: 12px 14px; border: 1px solid var(--line); vertical-align: top; }
  th { background: var(--surface-soft); color: var(--ink); font-weight: 600; }
  pre, .formula { max-width: 100%; overflow-x: auto; margin-block: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); font: 14px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; }
  code { overflow-wrap: anywhere; font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; }

  .file-list { margin-block: 14px; }
  .file-list summary { color: var(--muted); font-size: 12px; }
  .file-list > div { display: grid; margin-top: 8px; }
  .file-list a, .file-link { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--accent); font-size: 12px; overflow-wrap: anywhere; }
  .file-link { display: flex; justify-content: space-between; gap: 10px; }
  .file-link small { color: var(--muted); }

  input[type="search"], input[type="text"], textarea {
    width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
    background: var(--surface); color: var(--ink); outline: none;
  }
  input[type="search"]:focus, input[type="text"]:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
  textarea { min-height: 172px; resize: vertical; }
  input[type="range"] { width: 100%; accent-color: var(--accent); }

  .search-toolbar { margin-bottom: 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .search-toolbar label { display: block; margin-bottom: 6px; font-size: 12px; }
  .search-toolbar input { max-width: 720px; }
  .search-count, .status-message { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; }

  .read-aloud { margin-bottom: 24px; padding: 12px 0; border-block: 1px solid var(--line); font-size: 11px; }
  .read-aloud-top, .read-aloud > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  .read-aloud-top span, .read-aloud > div:first-child span { color: var(--muted); }
  .read-aloud-controls, .read-aloud > div:nth-child(2) { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
  .read-aloud button, .read-aloud select { min-height: 32px; padding: 5px 9px; font-size: 11px; }
  .read-aloud progress { width: 100%; height: 3px; accent-color: var(--accent); }
  .read-aloud-status { margin-top: 5px; color: var(--muted); }

  .ask-panel { max-width: 880px; }
  .ask-panel > label { display: block; margin: 20px 0 8px; color: var(--ink); font-size: 13px; font-weight: 600; }
  .ask-result { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
  .empty-state { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
  .empty-state b { color: var(--ink); }
  .answer-layer { margin-bottom: 24px; }
  .answer-layer > b { display: block; margin-bottom: 9px; color: var(--ink); }
  .answer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; }
  .ask-boundary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 30px; margin-top: 48px; border-top: 1px solid var(--line); }
  .ask-boundary > div { padding-top: 20px; }
  .ask-boundary b { display: block; margin-bottom: 7px; color: var(--ink); }
  .ask-boundary span { color: var(--muted); font-size: 12.5px; }
  .switch-label { display: flex; align-items: center; gap: 8px; font-size: 12px; }

  .global-results { display: grid; }
  .search-result { padding: 20px 0; border-bottom: 1px solid var(--line); }
  .search-result h3 { margin: 5px 0 10px; }
  .search-result p { margin-bottom: 0; color: var(--muted); }

  .result-layout { display: grid; grid-template-columns: 64px 1fr; gap: 22px; padding: 22px; border: 1px solid var(--line); border-left: 3px solid var(--page-accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-soft); }
  .result-glyph { color: var(--page-accent); font: 46px/1.3 var(--serif); }
  .result-example { display: grid; margin-top: 16px; font-size: 13px; }

  .contact-layout { display: grid; grid-template-columns: 1.6fr .8fr; align-items: center; gap: 42px; padding-block: 12px; }
  .contact-layout > div:last-child { text-align: center; }
  .qr-image, .contact-layout img { width: 190px; margin-inline: auto; border: 8px solid white; border-radius: 12px; box-shadow: var(--shadow-soft); }

  .state-node { display: grid; gap: 5px; padding: 19px 20px; border-top: 2px solid var(--page-accent); background: rgba(255,255,255,.72); }
  .state-node strong { font: 36px var(--serif); }
  .state-node small, .state-node em { color: var(--muted); font-size: 12px; font-style: normal; }
  .phase-dots { display: flex; gap: 8px; margin: 20px 0; }
  .phase-dots span { flex: 1; height: 4px; background: var(--line); }
  .phase-dots .active { background: var(--accent); }
  .copy-status { color: var(--muted); font-size: 11px; }

  .back-toc { display: inline-block; margin-top: 18px; color: var(--heritage); font: 11px var(--sans); }
  .lecture-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 11px; }
  .lecture-notice { margin-top: 18px; color: var(--muted); font-size: 11px; }

  /* Normalized special-page components */
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principle-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 28px; border-top: 1px solid var(--line); }
  .principle-grid > div { padding: 22px 0; border-bottom: 1px solid var(--line); }
  .principle-grid b { display: block; margin-bottom: 8px; color: var(--ink); }
  .principle-grid p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
  .link-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 38px; }
  .link-list > a { display: grid; gap: 5px; padding: 18px 0; border-top: 1px solid var(--line); }
  .link-list > a b { color: var(--ink); }
  .link-list > a span { color: var(--muted); font-size: 13px; }
  .link-list > a:hover b { color: var(--page-accent); }





  /* Home */
  .home .page-content { max-width: none; padding-inline: 0; }
  .home-hero { padding: 88px 0 74px; border-bottom: 1px solid var(--line); }
  .home-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 430px; align-items: center; gap: 72px; }
  .home-hero h1 { max-width: 720px; font-size: var(--title-display); line-height: 1.34; font-weight: 600; }
  .home-hero h1 > span { display: block; }
  .home-hero .lead { font-size: 17px; }
  .home-hero blockquote { max-width: 680px; margin: 30px 0 0; padding: 0; border: 0; color: var(--muted); font-size: 12px; }

  .mother-structure { position: relative; padding: 14px 0 0; }
  .mother-structure-kicker { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .18em; text-align: center; }
  .mother-wheel { width: 100%; max-width: 420px; margin-inline: auto; overflow: visible; }
  .mother-wheel-ring { fill: none; stroke: #c7c7c3; }
  .mother-wheel-ring.outer { stroke-width: 1; stroke-dasharray: 2 7; }
  .mother-wheel-ring.inner { stroke-width: .8; stroke-dasharray: 1 9; opacity: .7; }
  .mother-wheel-dot { fill: var(--accent); opacity: .7; }
  .mother-wheel-flow { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: .58; }
  .mother-wheel-flow + .mother-wheel-flow { opacity: .52; }
  .mother-wheel-flow marker path, #motherArrow path { fill: var(--accent); }
  .mother-wheel-node circle { fill: rgba(255,255,255,.96); stroke: var(--line-strong); stroke-width: 1.2; }
  .mother-wheel-node text { fill: var(--ink); font: 600 22px var(--serif); text-anchor: middle; }
  .mother-wheel-node text.en { fill: var(--muted); font: 600 7px var(--sans); letter-spacing: .14em; }
  .mother-wheel-core circle { fill: var(--accent-deep); }
  .mother-wheel-core text { fill: white; font: 600 24px var(--serif); text-anchor: middle; }
  .mother-wheel-core text.en { fill: rgba(255,255,255,.76); font: 600 7px var(--sans); letter-spacing: .14em; }
  .mother-structure > p { margin: -4px 0 0; color: var(--muted); font-size: 11px; text-align: center; letter-spacing: .03em; }
  .mother-wheel-motion { transform-origin: 210px 210px; animation: mother-turn 34s linear infinite; }
  @keyframes mother-turn { to { transform: rotate(360deg); } }

  .home-paths, .home-updates { padding: 58px 0 14px; }
  .home-paths .entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 34px; }
  .home-paths .entry { min-height: 230px; }
  .home-paths .entry h3 { font-size: var(--title-card); }
  .home-updates-inner { display: grid; grid-template-columns: .8fr 1.7fr; gap: 70px; padding-block: 26px; }
  .home-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
  .home-links a { padding: 20px 0; border-top: 1px solid var(--line); }
  .home-links b { display: block; margin-bottom: 7px; color: var(--ink); font-size: 18px; }
  .home-links span { color: var(--muted); font-size: 12px; }
  .home-latest { margin-top: 38px; }

  /* Long research/news lists should read as ordered editorial lists, not uneven cards. */
  body[data-page="research.html"] .entry-grid,
  body[data-page="research-results.html"] .entry-grid,
  body[data-page="posts.html"] .entry-grid { grid-template-columns: 1fr; }
  body[data-page="research.html"] .entry,
  body[data-page="research-results.html"] .entry,
  body[data-page="posts.html"] .entry { min-height: 0; max-width: 980px; }
  body[data-page="research.html"] .entry-summary,
  body[data-page="research-results.html"] .entry-summary { max-width: 900px; }

  body[data-page="map.html"] .entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
  body[data-page="map.html"] .entry { min-height: 104px; }

  /* Classical directory pages keep the same canvas and rhythm, with only subtle heritage cues. */
  body.classical:not(.article-page):not(.lecture-page) .section-head small,
  body.classical:not(.article-page):not(.lecture-page) .section-head > span:last-child { color: var(--heritage); }
  body.classical:not(.article-page):not(.lecture-page) .entry::after { background: var(--heritage); }
  body.classical:not(.article-page):not(.lecture-page) a.entry:hover h3 { color: var(--heritage); }

  .quote-tile { padding: 23px 0; border-top: 1px solid var(--line); }
  .quote-tile blockquote, .quote-tile q { display: block; margin: 0 0 10px; color: var(--ink); font: 20px/1.85 var(--serif); }
  .quote-tile cite { color: var(--muted); font-size: 11px; font-style: normal; }
  .quote-theme { color: var(--accent); font-size: 11px; }





  .section-list { display: grid; gap: 28px; }





  @media (max-width: 1120px) {
    .desktop-nav { gap: 12px; font-size: 12px; }
    .header-inner { gap: 22px; }
    .home-hero-inner { grid-template-columns: minmax(0,1fr) 350px; gap: 38px; }
    .article-layout, .lecture-layout { grid-template-columns: 200px minmax(0,1fr); gap: 36px; }
  }

  @media (max-width: 980px) {
    .desktop-nav { display: none; }
    .mobile-nav { display: block; }
    .header-inner { min-height: 70px; }
    .home-hero { padding: 62px 0 48px; }
    .home-hero-inner { grid-template-columns: 1fr; }
    .mother-structure { max-width: 470px; }
    .home-paths .entry-grid { grid-template-columns: 1fr 1fr; }
    .home-paths .entry:last-child { grid-column: 1 / -1; }
    body.classical:not(.article-page) .page-hero::after,
    body.classical.lecture-page .page-hero::after { width: 58%; opacity: .22; }
  }

  @media (max-width: 760px) {
    :root {
      --title-display: clamp(34px, 9vw, 44px);
      --title-page: clamp(30px, 7.8vw, 38px);
      --title-article: clamp(29px, 7.4vw, 36px);
      --title-section: 24px;
      --title-prose: 23px;
      --title-chapter: 24px;
      --title-card: 19px;
      --title-small: 16px;
    }
    html { scroll-padding-top: 78px; }
    .header-inner, .container, .page-content { padding-inline: 20px; }
    .brand-text { font-size: 16px; }
    .brand-mark { width: 33px; height: 33px; flex-basis: 33px; font-size: 19px; }
    .page-hero { padding: 38px 0 28px; margin-bottom: 28px; }
    body.classical:not(.article-page) .page-hero::after,
    body.classical.lecture-page .page-hero::after { right: -56px; width: 72%; opacity: .28; }
    .section-block { margin-top: 40px; }
    .section-head { grid-template-columns: 1fr; }
    .section-head > div, .section-head > h2, .section-head > p, .section-head > .eyebrow, .section-head > small, .section-head > span, .section-head > a { grid-column: 1; grid-row: auto; }
    .section-head > a { display: inline-block; margin-top: 6px; }

    .entry-grid, .entry-grid.three-columns, .topic-grid, .home-paths .entry-grid, body[data-page="map.html"] .entry-grid { grid-template-columns: 1fr; gap: 0; }
    .home-paths .entry:last-child { grid-column: auto; }
    .entry { min-height: 0; padding: 20px 0 22px; }
    .principle-grid, .link-list { grid-template-columns: 1fr; gap: 0; }

    .home-hero blockquote { font-size: 11px; }
    .mother-structure { max-width: 390px; margin-inline: auto; }
    .mother-wheel-motion { animation-duration: 42s; }
    .home-updates-inner { grid-template-columns: 1fr; gap: 16px; }
    .home-links { grid-template-columns: 1fr; gap: 0; }
    .home-links a { padding: 15px 0; }

    .article-layout, .lecture-layout { display: block; }
    .article-toc, .lecture-toc { position: static; padding: 0; margin: 18px 0 24px; }
    .article-toc details, .lecture-toc details { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px 12px; background: rgba(255,255,255,.76); }
    .toc-links { max-height: 300px; }
    .reading-content, .lecture-body { max-width: none; }
    .reading-content .page-hero { padding-top: 18px; }
    .prose { font-size: 16.5px; }
    .source-text { font-size: 17px; }
    .dynamic-decode, .plain-language, .note { padding: 16px 17px; }
    .article-source { grid-template-columns: 1fr; }
    .ask-boundary { grid-template-columns: 1fr; border-top: 0; gap: 0; }
    .ask-boundary > div { border-top: 1px solid var(--line); }
    .contact-layout { grid-template-columns: 1fr; gap: 24px; }
    .result-layout { grid-template-columns: 48px 1fr; gap: 16px; padding: 17px; }
    .result-glyph { font-size: 36px; }
    .footer-inner { display: block; }
    .footer-links { justify-content: flex-start; margin-block: 20px 10px; }
    .site-footer { padding-inline: 20px; }
    .page-content { padding-bottom: 52px; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .mother-wheel-motion { animation: none; }
  }





  @media print {
    .site-header, .site-footer, .article-toc, .lecture-toc, .read-aloud, .actions, .filters, .skip-link, .mother-structure { display: none !important; }
    body { background: white; color: black; }
    .article-layout, .lecture-layout { display: block; }
    .container, .page-content, .reading-content, .lecture-body { max-width: none; padding: 0; }
    .source-hidden .source-text, .dynamic-off .dynamic-decode { display: block; }
    .chapter { break-before: auto; }
    h2, h3 { break-after: avoid; }
    .note, .plain-language, .dynamic-decode { background: none; }
  }




/* ==========================================================
   精神现实主义 · 最终有效色彩令牌（FULL3）
   此区块故意不使用 @layer，确保不会被旧版未分层 CSS 压制。
   ========================================================== */
:root {
  --canvas: #F7F4EE;
  --surface: #EFEAE0;
  --surface-soft: #F3EFE7;
  --ink: #1F1D1A;
  --text: #1F1D1A;
  --muted: #5E584E;
  --line: #D9D2C3;
  --line-strong: #C8BEAA;
  --accent: #B3412F;
  --accent-deep: #8F3022;
  --accent-soft: #F2E4DF;
  --heritage: #7A5F22;
  --heritage-soft: #F3EAD3;

  --bg: #F7F4EE;
  --bg-card: #EFEAE0;
  --text-2: #5E584E;
  --text-3: #766F62;
  --accent-hover: #8F3022;
  --accent-2: #2F5D62;

  --ev-math: #34508C;
  --ev-experiment: #2F6B57;
  --ev-clinical: #3F6F7C;
  --ev-empirical: #7A5F22;
  --ev-hypothesis: #6E5A7E;
  --ev-pending: #6B665C;
  --ev-revised: #9A3B2B;

  --notice-bg: #F3EAD3;
  --notice-line: #7A5F22;

  --structure-event: #B3412F;
  --structure-projection: #2F5D62;
  --structure-definition: #7A5F22;
}

/* Explicit light-mode surface mapping */
html:not([data-theme="dark"]),
:root[data-theme="light"] {
  background: #F7F4EE;
  color: #1F1D1A;
}
body {
  background: var(--canvas);
  color: var(--ink);
}

/* Ensure the signature details are visibly effective */
.evidence-tag,
[data-evidence] {
  border-color: color-mix(in srgb, var(--ev, var(--ev-pending)) 30%, transparent);
  background: color-mix(in srgb, var(--ev, var(--ev-pending)) 11%, transparent);
  color: var(--ev, var(--ev-pending));
}
.button-primary,
.actions > a.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #F7F4EE;
}
.button-primary:hover,
.actions > a.button-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.prose blockquote,
.quote-block {
  background: var(--bg-card);
  border-left-color: var(--accent);
}
.risk-notice,
.medical-notice,
.tradition-notice,
.physics-notice {
  background: var(--notice-bg);
  border-left-color: var(--notice-line);
}
.node-event circle { stroke: var(--structure-event); }
.node-projection circle { stroke: var(--structure-projection); }
.node-definition circle { stroke: var(--structure-definition); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #1A1814;
    --surface: #23201B;
    --surface-soft: #2A261F;
    --ink: #E8E3D8;
    --text: #E8E3D8;
    --muted: #B0A999;
    --line: #3A362E;
    --line-strong: #4C463B;
    --accent: #E07A63;
    --accent-deep: #EE947F;
    --accent-hover: #EE947F;
    --accent-2: #6FA3A8;
    --bg: #1A1814;
    --bg-card: #23201B;
    --text-2: #B0A999;
    --text-3: #9A9384;
    --notice-bg: #30291E;
    --notice-line: #B89A52;
    --ev-math: #657FC1;
    --ev-experiment: #62A287;
    --ev-clinical: #6F9DA8;
    --ev-empirical: #B79A4E;
    --ev-hypothesis: #9A84AD;
    --ev-pending: #9B968C;
    --ev-revised: #D06B58;
  }
}
:root[data-theme="dark"] {
  --canvas: #1A1814;
  --surface: #23201B;
  --surface-soft: #2A261F;
  --ink: #E8E3D8;
  --text: #E8E3D8;
  --muted: #B0A999;
  --line: #3A362E;
  --line-strong: #4C463B;
  --accent: #E07A63;
  --accent-deep: #EE947F;
  --accent-hover: #EE947F;
  --accent-2: #6FA3A8;
  --bg: #1A1814;
  --bg-card: #23201B;
  --text-2: #B0A999;
  --text-3: #9A9384;
  --notice-bg: #30291E;
  --notice-line: #B89A52;
  --ev-math: #657FC1;
  --ev-experiment: #62A287;
  --ev-clinical: #6F9DA8;
  --ev-empirical: #B79A4E;
  --ev-hypothesis: #9A84AD;
  --ev-pending: #9B968C;
  --ev-revised: #D06B58;
}
