/* Hallmark · checked: 2026-11-13 · genre: editorial (DESIGN.md) · nav: wordmark left, four text links (DESIGN.md Components) · footer: site note beside the page list
 * floor: sloplint --url run 2026-11-13, structural findings printed, not rebuilt: 58 (long-form guide copy is the owner's), 79 (hero fold), 83 (image slots)
 * built: the project · redesign: polish · v2.0.0 */
/* Hallmark · waive 49b · More: links and footer page titles wrap at 320px · DESIGN.md rule 4 makes each More link name its Tao Te Ching destination page in full */
/* Hallmark · waive 42 · nav: wordmark plus four links, footer: note plus page list · locked by DESIGN.md Components for this Tao Te Ching reading site */
/* Hallmark · dismissed 77 · long-document guide pages with six to nine sections each, not a landing strip */
/* Hallmark · dismissed 41 · paper-raised and ink-body swap together under prefers-color-scheme dark */
/* Hallmark · dismissed F6 · .status is a small status message, not a display figure */

@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("/assets/fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("/assets/fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f6f1e7; --paper-raised: #fbf8f1; --paper-sunk: #ece4d4;
  --ink: #1d1b18; --ink-body: #2f2b26; --ink-muted: #5f584e;
  --rule: #d6cbb7; --rule-strong: #b9ab92;
  --seal: #a3301c; --seal-hover: #82230f; --on-seal: #fffaf2; --seal-wash: rgba(163, 48, 28, .16);
  --jade: #2f6b57;
  --shadow-card: 0 1px 2px rgba(29,27,24,.06), 0 6px 18px -8px rgba(29,27,24,.18);
  --shadow-card-hover: 0 2px 4px rgba(29,27,24,.08), 0 12px 28px -10px rgba(29,27,24,.24);
  --font-text: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-cjk: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "SimSun", serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 140ms; --t-base: 220ms;
  --container: 1120px; --measure: 68ch; --gutter: clamp(16px, 4vw, 40px);
  --r-sm: 4px; --r-md: 8px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f; --paper-raised: #1f1c16; --paper-sunk: #2a261e;
    --ink: #efe8da; --ink-body: #ddd5c5; --ink-muted: #ada392;
    --rule: #3b352b; --rule-strong: #5a5143;
    --seal: #e8725a; --seal-hover: #f59580; --on-seal: #1a0e0a; --seal-wash: rgba(232, 114, 90, .22);
    --jade: #6fbf9f;
    --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px -10px rgba(0,0,0,.6);
    --shadow-card-hover: 0 2px 4px rgba(0,0,0,.45), 0 14px 30px -10px rgba(0,0,0,.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scrollbar-color: var(--rule-strong) var(--paper); }
body {
  margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink-body);
  font-family: var(--font-text); font-size: 1.125rem; line-height: 1.62;
  font-optical-sizing: auto; caret-color: var(--seal); accent-color: var(--seal);
  text-rendering: optimizeLegibility;
}
::selection { background: var(--seal-wash); color: var(--ink); }
img, svg { display: block; max-width: 100%; height: auto; }
[lang|="zh"] { font-family: var(--font-cjk); }

h1, h2, h3 { color: var(--ink); font-weight: 500; text-wrap: balance; overflow-wrap: break-word; min-width: 0; margin: 0; }
h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); line-height: 1.08; letter-spacing: -0.015em; font-variation-settings: "opsz" 72; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2.15rem); line-height: 1.15; font-variation-settings: "opsz" 48; margin-top: 3.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; font-variation-settings: "opsz" 24; margin-top: 2rem; margin-bottom: .5rem; }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.1rem; }
p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--ink); }
dt { font-weight: 600; color: var(--ink); margin-top: .75rem; }
dd { margin: .15rem 0 0; }
.prose ol, ol.prose { padding-left: 1.4rem; }
.prose li, ol.prose li { margin-bottom: .5rem; }

a { color: var(--seal); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; transition: color var(--t-fast) var(--ease-out), text-decoration-thickness var(--t-fast) var(--ease-out); }
a:hover { color: var(--seal-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 2px; transition: none; }

.wrap { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }
.skip { position: absolute; left: var(--gutter); top: -100px; background: var(--seal); color: var(--on-seal); padding: .6rem 1rem; border-radius: var(--r-sm); z-index: 10; }
.skip:focus-visible { top: .75rem; }
.skip:hover { color: var(--on-seal); }

/* header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; min-height: 64px; padding-block: .5rem; }
.wordmark { color: var(--ink); text-decoration: none; font-size: 1.3rem; font-weight: 600; font-variation-settings: "opsz" 36; display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; }
.wordmark:hover { color: var(--ink); }
.wordmark .zh { font-family: var(--font-cjk); color: var(--seal); font-size: 1.15rem; font-weight: 600; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-body); text-decoration: none; font-size: 1rem; }
.site-nav a:hover { color: var(--seal); }
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--seal); text-underline-offset: .35em; }

.crumbs { font-size: .95rem; color: var(--ink-muted); margin-top: 1.5rem; margin-bottom: 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--rule-strong); }
.crumbs a { color: var(--ink-muted); display: inline-flex; align-items: center; min-height: 44px; }

/* hero */
.hero { padding-block: clamp(2rem, 5vw, 3.5rem) 1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; align-items: start; }
@media (min-width: 960px) { .hero.has-slot { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.hero h1 { max-width: 20ch; }
.lede { font-size: clamp(1.15rem, 1.05rem + .35vw, 1.3rem); line-height: 1.5; color: var(--ink-body); max-width: 46ch; margin-top: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.15rem; border-radius: var(--r-sm); font: inherit; font-size: 1.02rem; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.btn-primary { background: var(--seal); color: var(--on-seal); }
a.btn-primary:hover, .btn-primary:hover { background: var(--seal-hover); color: var(--on-seal); text-decoration: none; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink-muted); }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

/* answer block */
.answer { border-top: 1px solid var(--rule); padding-top: 1.1rem; margin-top: 1.75rem; max-width: var(--measure); }
.answer p { margin-bottom: .8rem; }

/* image placeholders */
.pic { display: block; width: 100%; height: auto; margin: 1.5rem 0; background: var(--paper-sunk); }
.hero .pic { margin: 0; }
.wide { margin: 1.75rem 0 0; }
.wide .pic { margin: 0; }
.slot-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (min-width: 860px) { .slot-row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .slot-row .pic { margin-top: .4rem; } }

/* sections */
.section { padding-block: 1rem 1.5rem; }
.section > h2:first-child { margin-top: 2.5rem; }
.more { display: flex; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* cards (one level only) */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; margin: 1.5rem 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) and (max-width: 999px) { .cards.three > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.card { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 1.25rem 1.35rem 1.35rem; box-shadow: var(--shadow-card); transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out); position: relative; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card.linked:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.card .zh-term { font-family: var(--font-cjk); font-size: 1.6rem; color: var(--seal); line-height: 1.2; margin: 0 0 .25rem; }
.card .term-quote { font-size: 1rem; color: var(--ink-body); }
.card details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; border-top: 1px solid var(--rule-strong); padding-top: .25rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: .7rem .8rem .7rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--ink); }
thead th { border-bottom-color: var(--rule-strong); }
.matrix { min-width: 760px; }
.matrix td { min-width: 9rem; }
.matrix caption { caption-side: bottom; text-align: left; padding-top: .6rem; }
.table-wrap th:first-child, .table-wrap td:first-child { position: sticky; left: 0; background: var(--paper); z-index: 1; }
.zh-inline { font-family: var(--font-cjk); font-size: 1.2rem; }
.matrix th[scope="row"] { min-width: 10rem; }

/* chapter reader */
.reader { margin: 1.5rem 0; }
.reader-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; margin-bottom: 1rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .95rem; font-weight: 500; color: var(--ink); }
select, input[type="text"], textarea { font: inherit; font-size: 1.02rem; color: var(--ink); background: var(--paper-raised); border: 1px solid var(--ink-muted); border-radius: var(--r-sm); min-height: 44px; padding: .45rem .7rem; }
select:hover, input[type="text"]:hover, textarea:hover { border-color: var(--ink); }
.reader-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 900px) { .reader-cols { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, 1fr); } }
.col { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 1rem 1.1rem; }
.col h3 { margin: 0 0 .15rem; font-size: 1.05rem; }
.col .src { font-size: .9rem; color: var(--ink-muted); margin-bottom: .8rem; }
.col .zh-text { font-family: var(--font-cjk); font-size: 1.3rem; line-height: 1.95; color: var(--ink); }
.col .verse { margin: 0 0 1rem; padding-left: 1rem; border-left: 1px solid var(--rule-strong); }
.col .verse span { display: block; }
.gloss { list-style: none; margin: 0; padding: 0; }
.gloss li { padding: .45rem 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
.gloss li:last-child { border-bottom: 0; }
.gloss .g-zh { font-family: var(--font-cjk); font-size: 1.12rem; color: var(--ink); display: block; }
.gloss .g-en { color: var(--ink-body); }
.note { font-size: 1rem; color: var(--ink-muted); }
.style-notes { margin-top: 1rem; max-width: var(--measure); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: .9rem 2rem .9rem 0; font-weight: 600; color: var(--ink); list-style: none; position: relative; min-height: 44px; max-width: var(--measure); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; color: var(--seal); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq .faq-body { padding-bottom: 1rem; max-width: var(--measure); }

/* sources */
.sources { font-size: 1rem; color: var(--ink-body); max-width: var(--measure); }
.sources li { margin-bottom: .45rem; }
.sources .src-note { color: var(--ink-muted); }

/* footer */
.site-foot { margin-top: 4rem; border-top: 1px solid var(--rule); padding-block: 2rem 2.5rem; font-size: 1rem; color: var(--ink-muted); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 800px) { .site-foot .wrap { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-foot a { color: var(--ink-body); display: inline-flex; min-height: 44px; align-items: center; }
.site-foot p { margin: 0 0 .5rem; }

/* I Ching tool */
.tool { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--r-md); padding: clamp(1rem, 3vw, 1.75rem); margin: 1.5rem 0 2rem; box-shadow: var(--shadow-card); }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
@media (min-width: 900px) { .tool-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.tool .field input { width: 100%; }
.hint { font-size: .95rem; color: var(--ink-body); margin: .35rem 0 0; }
::placeholder { color: var(--ink-muted); opacity: 1; }
.tool > h2 { margin-top: 0; }
.canvas { margin-top: 1.25rem; display: flex; flex-direction: column-reverse; gap: .5rem; min-height: 21rem; justify-content: flex-start; }
.line-row { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) 5.5rem; align-items: center; gap: .75rem; font-variant-numeric: tabular-nums; }
.line-row .pos { font-size: .9rem; color: var(--ink-muted); }
.line-row .coins { display: flex; gap: .3rem; font-size: .85rem; color: var(--ink-muted); }
.coin { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--rule-strong); display: inline-grid; place-items: center; font-size: .78rem; color: var(--ink-body); background: var(--paper); }
.coin.h { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bar { height: 14px; display: flex; gap: 14%; }
.bar i { flex: 1; background: var(--ink); border-radius: 1px; }
.bar.changing i { background: var(--jade); }
.line-row .val { font-size: .9rem; text-align: right; color: var(--ink-body); }
.line-row.empty .bar i { background: transparent; border: 1px dashed var(--rule-strong); }
@media (prefers-reduced-motion: no-preference) {
  .line-row.drawn { animation: draw-in var(--t-base) var(--ease-out); }
  @keyframes draw-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
.reading h3 { margin-top: 0; }
.hex-head { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.hex-glyph { font-size: 3.4rem; line-height: 1; color: var(--ink); font-family: var(--font-cjk), "Segoe UI Symbol", "Noto Sans Symbols 2", serif; }
.hex-title { font-size: 1.35rem; line-height: 1.25; color: var(--ink); font-weight: 500; margin: 0; }
.hex-title .zh { font-family: var(--font-cjk); }
.hex-meta { font-size: .95rem; color: var(--ink-muted); margin: .15rem 0 0; }
.panel { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 1rem; }
.panel h4 { margin: 0 0 .4rem; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.zh-line { font-family: var(--font-cjk); color: var(--ink-muted); font-size: 1.02rem; display: block; margin-top: .2rem; }
.changing-list { list-style: none; padding: 0; margin: 0; }
.changing-list li { padding: .55rem 0; border-bottom: 1px solid var(--rule); }
.changing-list li:last-child { border-bottom: 0; }
.tag { display: inline-block; font-size: .9rem; color: var(--jade); font-weight: 600; margin-right: .4rem; }
.empty-state { color: var(--ink-muted); font-size: 1.02rem; padding: 1.25rem 0; }
.status { min-height: 1.5rem; font-size: .95rem; color: var(--ink-muted); }

.value-table td:first-child, .value-table th:first-child { width: 5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-head, .site-foot, .actions, .more, .tool button { display: none !important; }
}

/* Full reader (paid page) */
.chapter { border-top: 1px solid var(--rule); padding-top: 1.5rem; margin-top: 2.5rem; }
.chapter:first-of-type { border-top: 0; margin-top: 0; }
.chapter-head { display: flex; align-items: baseline; gap: .75rem; }
.chapter-head h2 { margin: 0; }
.chapter .reader-cols { margin-top: 1rem; }
.reader-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  padding: .75rem 0; margin-bottom: 1.5rem; background: var(--paper); border-bottom: 1px solid var(--rule); }
.reader-bar label { font-size: .95rem; color: var(--ink-muted); }
.reader-bar select { font: inherit; padding: .4rem .6rem; border-radius: var(--r-sm); border: 1px solid var(--rule-strong);
  background: var(--paper-raised); color: var(--ink); }
[data-full-reader] .note { margin-top: 2rem; }
@media print {
  .reader-bar, .crumbs, #paywall { display: none !important; }
  .chapter { break-inside: avoid; page-break-inside: avoid; }
  .reader-cols { display: block; }
  .reader-cols .col + .col { margin-top: 1rem; }
}
