:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --paper-deep: #ebe5d9;
  --surface: #fffdf8;
  --ink: #263d39;
  --ink-soft: #40534b;
  --muted: #59665c;
  --line: #d9d6ca;
  --accent: #b65b42;
  --accent-dark: #91472f;
  --serif: "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
button, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { color: #fff; background: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; z-index: 20; top: -60px; left: 16px; padding: 12px 18px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 14px; }
.page-shell { width: min(100% - 72px, 1440px); margin: auto; }

.site-header { min-height: 136px; display: flex; align-items: center; gap: clamp(24px, 3.5vw, 50px); border-bottom: 1px solid var(--line); padding: 16px 0; }
.brand-stack { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 64px; height: 64px; background: var(--ink); color: var(--paper); border-radius: 17px 17px 17px 4px; font: 700 34px/1 var(--serif); letter-spacing: -3px; }
.brand-mark span { color: #d08a70; margin: 0 2px 0 -3px; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 26px; line-height: 1.25; letter-spacing: .07em; }
.brand-copy small { font: 700 13px/1.4 var(--sans); letter-spacing: .15em; color: var(--muted); }
.brand-byline { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0 0 0 78px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.brand-byline a { color: var(--ink-soft); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.brand-byline a:hover { color: var(--accent-dark); }
.main-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 42px); margin-left: auto; }
.main-nav a { position: relative; font-size: 15px; text-decoration: none; color: var(--ink-soft); white-space: nowrap; transition: color .2s; }
.main-nav a::after { content: ""; position: absolute; bottom: -9px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width .2s; }
.main-nav a:hover { color: var(--accent-dark); }
.main-nav a:hover::after { width: 100%; }
.header-note { flex: 0 0 auto; font-size: 13px; color: var(--accent-dark); border-left: 1px solid var(--line); padding-left: 25px; white-space: nowrap; }
.header-note span { margin-left: 9px; }

.hero { min-height: 570px; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(390px, .82fr); align-items: stretch; gap: 6%; padding: 88px 0 76px; }
.hero-copy { align-self: center; }
.eyebrow, .section-number { color: var(--accent-dark); font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow-line { width: 25px; height: 1px; background: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 29px 0 25px; font: 500 clamp(45px, 4.65vw, 72px)/1.35 var(--serif); letter-spacing: -.055em; }
.hero h1 em, .section-heading-row h2 em { color: var(--accent); font-style: normal; }
.hero h1 em span { display: inline-block; }
.hero-library-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 680px; margin: 0 0 28px; padding: 20px 24px 21px; border: 1px solid #d9c9b7; border-left: 4px solid var(--accent); border-radius: 4px; background: #eee7da; color: var(--ink); text-decoration: none; transition: background .2s, border-color .2s, transform .2s; }
.hero-library-card:hover { background: #f8efe1; border-color: var(--accent); transform: translateY(-2px); }
.hero-library-kicker { color: var(--accent-dark); font-size: 15px; line-height: 1.45; font-weight: 700; letter-spacing: .05em; }
.hero-library-card strong { font: 500 clamp(25px, 2.25vw, 31px)/1.4 var(--serif); letter-spacing: -.035em; }
.hero-library-description { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.hero-library-action { margin-top: 4px; border-bottom: 2px solid var(--accent); padding-bottom: 2px; color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.hero-library-action span { margin-left: 12px; font-size: 20px; font-weight: 400; }
.hero-lede { max-width: 610px; color: var(--ink-soft); font-size: 19px; line-height: 1.82; letter-spacing: .01em; }
.hero-actions { display: flex; align-items: center; gap: 30px; margin-top: 34px; }
.primary-link { min-width: 160px; display: inline-flex; justify-content: space-between; align-items: center; gap: 20px; border-radius: 4px; padding: 16px 19px; background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; transition: transform .2s, background .2s; }
.primary-link:hover { transform: translateY(-3px); background: #365b53; }
.primary-link span { font-size: 20px; font-weight: 300; }
.text-link { text-decoration: none; font-size: 15px; border-bottom: 1px solid var(--ink); padding-bottom: 5px; }
.text-link span { margin-left: 7px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 13px 30px; margin-top: 43px; color: var(--muted); font-size: 13px; }
.hero-facts span { white-space: nowrap; }
.fact-symbol { color: var(--accent); font-size: 16px; margin-right: 5px; vertical-align: -1px; }
.hero-art { position: relative; align-self: stretch; min-height: 405px; background: var(--paper-deep); border: 1px solid #dfd9cb; border-radius: 180px 180px 7px 7px; overflow: hidden; }
.hero-art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#988e7b 0.5px, transparent 0.5px); background-size: 18px 18px; opacity: .15; }
.hero-art::after { content: ""; position: absolute; width: 210px; height: 210px; right: -95px; top: -100px; border-radius: 50%; background: #d7c8b7; opacity: .48; }
.orbit { position: absolute; border: 1px solid rgba(87, 103, 92, .45); border-radius: 50%; left: 50%; top: 46%; transform: translate(-50%,-50%); }
.orbit-one { width: 130px; height: 130px; }
.orbit-two { width: 257px; height: 257px; }
.orbit-three { width: 390px; height: 390px; }
.orbit-center { position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%); width: 82px; height: 82px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--surface); font: 500 28px/1 var(--serif); box-shadow: 0 12px 30px #263d3926; }
.orbit-word { position: absolute; z-index: 1; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; font-size: 14px; box-shadow: 0 5px 20px #263d390a; }
.orbit-word-one { left: 17%; top: 22%; }
.orbit-word-two { right: 13%; top: 33%; }
.orbit-word-three { left: 26%; top: 66%; }
.hero-art p { position: absolute; right: 22px; bottom: 18px; margin: 0; color: var(--ink-soft); font: 500 15px/1.7 var(--serif); text-align: right; }

.section-frame { border-top: 1px solid var(--line); scroll-margin-top: 28px; }
.dialogue-section { display: grid; grid-template-columns: minmax(275px, .8fr) minmax(0, 1.2fr); gap: clamp(50px, 8vw, 130px); padding: 95px 0 105px; }
.section-number { margin-bottom: 27px; }
.section-intro h2, .reading-heading h2 { font: 500 clamp(38px, 3.4vw, 53px)/1.35 var(--serif); letter-spacing: -.045em; margin-bottom: 24px; }
.dialogue-intro > p:not(.intro-footnote) { max-width: 430px; color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.prompt-list { margin-top: 40px; border-top: 1px solid var(--line); }
.prompt-button { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; text-align: left; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 16px 0; color: var(--ink); font-size: 15px; transition: color .2s, padding-left .2s; }
.prompt-button:hover { color: var(--accent-dark); padding-left: 6px; }
.prompt-button span:first-child { color: var(--accent); font: 700 10px/1 var(--sans); }
.prompt-button span:last-child { font-size: 17px; }
.intro-footnote { max-width: 430px; margin: 36px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; }

.chat-panel { min-width: 0; height: 660px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid #deddd3; border-radius: 14px; box-shadow: 0 24px 54px rgba(38, 61, 57, .09), 0 5px 16px rgba(38, 61, 57, .03); overflow: hidden; scroll-margin-top: 24px; }
.chat-topbar { flex: 0 0 74px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px; border-bottom: 1px solid #e9e7dc; }
.chat-identity { display: flex; align-items: center; gap: 11px; }
.chat-avatar { width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); color: var(--paper); border-radius: 11px 11px 11px 3px; font: 500 19px/1 var(--serif); }
.chat-identity div { display: flex; flex-direction: column; gap: 3px; }
.chat-identity strong { font-size: 15px; }
.chat-identity small { font-size: 12px; color: var(--muted); }
.service-state { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 30px; background: #f0ede5; color: #625e55; font-size: 13px; white-space: nowrap; }
.state-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.service-state.is-ready { color: #29735b; background: #eaf4ec; }
.service-state.is-setup { color: #926848; background: #f8eee1; }
.service-state.is-error { color: #a65143; background: #faeae4; }
.chat-notice { flex: 0 0 auto; display: none; padding: 10px 22px; background: #f3efe6; color: #5f594f; border-bottom: 1px solid #e9e2d6; font-size: 15px; line-height: 1.6; }
.chat-notice.is-visible { display: block; }
.chat-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px; scroll-behavior: smooth; }
.chat-welcome { width: min(100%, 310px); margin: 24px auto 0; text-align: center; }
.welcome-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 17px; border-radius: 50%; background: #eae8dc; color: var(--accent); font-size: 25px; }
.chat-welcome h3 { font: 500 21px/1.65 var(--serif); letter-spacing: -.03em; }
.chat-welcome p { color: var(--muted); font-size: 16px; line-height: 1.75; }
.chat-welcome a { display: inline-block; margin-top: 12px; color: var(--accent-dark); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.message { display: flex; gap: 10px; margin-bottom: 23px; max-width: 95%; }
.message.is-user { margin-left: auto; flex-direction: row-reverse; }
.message-avatar { flex: 0 0 27px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: #fff; font: 500 14px/1 var(--serif); }
.message.is-user .message-avatar { background: #e7ded0; color: var(--ink); font: 700 11px/1 var(--sans); }
.message-main { min-width: 0; max-width: calc(100% - 37px); }
.message-name { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.message.is-user .message-name { text-align: right; }
.message-content { padding: 13px 15px; border-radius: 3px 13px 13px 13px; background: #f3f2ec; font-size: 17px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.is-user .message-content { border-radius: 13px 3px 13px 13px; color: #fff; background: var(--ink); }
.inline-citation { color: var(--accent-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.inline-citation:hover { color: var(--ink); }
.message.is-loading .message-content { display: flex; align-items: center; gap: 5px; min-width: 58px; min-height: 47px; }
.loading-dot { width: 5px; height: 5px; border-radius: 50%; background: #8f978e; animation: pulse 1s ease-in-out infinite; }
.loading-dot:nth-child(2) { animation-delay: .14s; }
.loading-dot:nth-child(3) { animation-delay: .28s; }
@keyframes pulse { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-4px); } }
.grounding-note { display: inline-flex; margin: 11px 0 2px; padding: 5px 8px; border-radius: 4px; color: #684f3d; background: #f4eadb; font-size: 13px; }
.grounding-note.is-backed { color: #3d755c; background: #e9f1e8; }
.answer-sources { margin-top: 14px; border-top: 1px solid #dcded2; padding-top: 12px; }
.answer-sources > strong { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.answer-sources ul { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 0; padding: 0; }
.answer-sources a { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border: 1px solid #deded3; border-radius: 5px; padding: 7px 9px; color: var(--ink); background: #fffefa; font-size: 14px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.answer-sources a:hover { border-color: var(--accent); color: var(--accent-dark); }
.answer-sources small { color: var(--muted); }
.answer-sources p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.chat-composer-wrap { flex: 0 0 auto; border-top: 1px solid #e9e7dc; padding: 14px 20px 12px; }
.chat-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 14px; border: 1px solid #d7d7ca; border-radius: 9px; padding: 8px 8px 8px 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.chat-composer:focus-within { border-color: #779489; box-shadow: 0 0 0 3px rgba(108, 145, 130, .14); }
.chat-composer textarea { grid-column: 1 / -1; resize: vertical; min-height: 67px; max-height: 170px; width: 100%; padding: 7px 2px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.65; }
.chat-composer textarea::placeholder { color: #657268; }
.chat-composer textarea:disabled { cursor: not-allowed; }
.composer-footer { align-self: end; display: flex; gap: 10px; justify-content: space-between; color: var(--muted); font-size: 12px; padding: 0 0 8px 2px; }
.send-button { min-width: 110px; align-self: end; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 12px; border: 0; border-radius: 5px; background: var(--ink); color: #fff; font-size: 14px; }
.send-button:not(:disabled):hover { background: #365b53; }
.send-button:disabled { background: #b8bdb3; cursor: not-allowed; }
.send-button span:last-child { font-size: 17px; line-height: .7; }
.chat-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 11px; color: var(--muted); font-size: 12px; }
.chat-meta button { border: 0; background: none; padding: 2px; color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.chat-meta button:hover { color: var(--accent-dark); text-decoration: underline; }
.chat-error { margin-bottom: 9px; border-radius: 5px; padding: 10px 12px; color: #8c3d34; background: #fff0e9; font-size: 14px; line-height: 1.65; }
.chat-error[hidden] { display: none; }
.retry-button { display: inline-block; margin-left: 8px; border: 0; background: none; color: inherit; font-size: inherit; font-weight: 700; text-decoration: underline; }

.ideas-section, .reading-section, .sources-section { padding: 95px 0 105px; }
.section-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 40px; }
.section-heading-row h2 { margin: 0; font: 500 clamp(36px, 3.3vw, 52px)/1.35 var(--serif); letter-spacing: -.045em; }
.section-heading-row > p { width: min(100%, 390px); margin: 0 0 5px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.concept-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.concept-card { min-height: 280px; display: flex; flex-direction: column; align-items: flex-start; background: #f7f4ed; padding: 28px 29px 24px; transition: background .2s; }
.concept-card:hover { background: #fffdf8; }
.concept-index { color: var(--accent-dark); font: 700 12px/1.4 var(--sans); letter-spacing: .1em; }
.concept-card h3 { margin: 28px 0 12px; font: 500 26px/1.3 var(--serif); }
.concept-card p { margin: 0 0 26px; color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
.concept-card button { margin-top: auto; border: 0; border-bottom: 1px solid var(--ink); padding: 0 0 4px; background: none; color: var(--ink); font-size: 14px; }
.concept-card button:hover { color: var(--accent-dark); border-color: var(--accent-dark); }
.concept-card button span { margin-left: 10px; font-size: 14px; }
.section-source-note { margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.section-source-note a { color: var(--ink-soft); text-underline-offset: 3px; }
.section-source-note a:hover { color: var(--accent-dark); }

.reading-section { display: grid; grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr); gap: 9%; }
.reading-heading > p { max-width: 390px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.reading-progress { max-width: 355px; margin-top: 42px; border-left: 2px solid var(--accent); padding: 4px 0 4px 16px; }
.reading-progress strong { display: block; color: var(--accent-dark); font-size: 14px; letter-spacing: .04em; }
.reading-progress p { margin: 9px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
.reading-progress a { display: inline-block; margin-top: 14px; color: var(--accent-dark); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.reading-steps { border-top: 1px solid var(--line); }
.reading-step { display: grid; grid-template-columns: 75px 1fr; gap: 20px; border-bottom: 1px solid var(--line); padding: 25px 0 29px; }
.step-num { color: var(--accent); font: 500 35px/1 var(--serif); }
.step-tag { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.reading-step h3 { margin: 8px 0 9px; font: 500 22px/1.4 var(--serif); }
.reading-step h3 a { text-decoration: none; }
.reading-step h3 a:hover { color: var(--accent-dark); }
.reading-step h3 span { color: var(--accent); font: 400 17px/1 var(--sans); }
.reading-step p { max-width: 550px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; margin: 0; }

.sources-section { padding-bottom: 125px; }
.source-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.source-card { min-height: 215px; display: flex; flex-direction: column; position: relative; gap: 12px; padding: 24px 20px 50px; background: #fffdf8; border: 1px solid #dfdcd1; border-radius: 6px; text-decoration: none; transition: transform .2s, border-color .2s; }
.source-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.source-type { color: var(--accent-dark); font-size: 12px; }
.source-card strong { font: 500 18px/1.45 var(--serif); overflow-wrap: anywhere; }
.source-card > span:nth-of-type(2) { color: var(--muted); font-size: 14px; line-height: 1.65; }
.source-arrow { position: absolute; right: 19px; bottom: 17px; color: var(--accent); font-size: 20px; }

.site-footer { min-height: 190px; display: grid; grid-template-columns: 1fr 1.2fr auto; align-items: start; gap: 55px; border-top: 1px solid var(--line); padding: 38px 0 48px; }
.footer-brand { display: inline-block; margin-bottom: 12px; font: 500 23px/1.4 var(--serif); text-decoration: none; }
.footer-brand span { color: var(--accent); font: 400 18px var(--sans); }
.site-footer p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 6px; }
.site-footer .footer-contact { margin-top: 16px; color: var(--ink-soft); font-size: 14px; }
.footer-contact strong { color: var(--ink); font-weight: 600; }
.footer-contact a { color: var(--accent-dark); text-decoration-color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
.footer-contact a:hover { color: var(--ink); }
.site-footer > span { color: var(--muted); font-size: 12px; white-space: nowrap; letter-spacing: .06em; }

/* The chapter guide shares the home page's typography and palette. */
.reading-hero { border-bottom: 1px solid var(--line); padding: 82px 0 76px; }
.reading-hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); align-items: end; gap: 8%; }
.reading-hero h1 { margin: 28px 0 20px; font: 500 clamp(45px, 4.7vw, 70px)/1.32 var(--serif); letter-spacing: -.06em; }
.reading-hero h1 em { color: var(--accent); font-style: normal; }
.reading-hero-lede { max-width: 700px; margin: 0; color: var(--ink-soft); font-size: 18px; line-height: 1.8; }
.reading-status-card { border: 1px solid var(--line); border-radius: 5px; background: #f8f5ee; padding: 22px 24px 23px; }
.status-kicker { color: var(--accent-dark); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.reading-status-card > strong { display: block; margin: 16px 0 7px; font: 500 50px/1 var(--serif); color: var(--ink); }
.reading-status-card > strong small { font-size: 20px; color: var(--muted); }
.reading-status-card p { margin: 0 0 15px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.reading-status-card > span:last-child { display: block; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.reading-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: min(6vw, 80px); padding: 55px 0 110px; }
.chapter-sidebar-inner { position: sticky; top: 26px; }
.chapter-nav-title { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 16px; color: var(--accent-dark); font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.chapter-nav-title span { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .08em; }
.chapter-sidebar nav { display: flex; flex-direction: column; }
.chapter-sidebar nav a { display: grid; grid-template-columns: 32px minmax(0, 1fr) 18px; align-items: center; gap: 7px; min-height: 58px; border-bottom: 1px solid #e1ded3; padding: 11px 7px; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.45; text-decoration: none; transition: color .2s, background .2s; }
.chapter-sidebar nav a:hover { color: var(--accent-dark); background: #faf5ec; }
.chapter-sidebar nav a span { color: var(--accent-dark); font: 700 14px/1.5 var(--sans); }
.chapter-sidebar nav a b { color: var(--accent-dark); font-size: 17px; font-weight: 400; }
.chapter-back-link { display: inline-block; margin: 25px 18px 0 0; border-bottom: 1px solid var(--ink); padding-bottom: 4px; color: var(--ink); font-size: 14px; text-decoration: none; }
.chapter-back-link:hover { color: var(--accent-dark); border-color: var(--accent-dark); }
.chapter-back-link span { margin-left: 8px; }
.chapter-content { min-width: 0; }
.reading-method { display: flex; gap: 15px; align-items: flex-start; border: 1px solid #e2d8c8; border-radius: 5px; background: #f0e9dd; padding: 17px 20px; }
.reading-method > span { flex: 0 0 auto; color: var(--accent); font-size: 22px; line-height: 1.2; }
.reading-method p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }
.reading-method strong { color: var(--ink); }
.chapter { border-bottom: 1px solid var(--line); padding: 51px 0 52px; scroll-margin-top: 20px; }
.chapter header { display: flex; align-items: baseline; gap: 28px; margin-bottom: 21px; }
.chapter-num { flex: 0 0 100px; color: var(--accent-dark); font: 700 12px/1.5 var(--sans); letter-spacing: .1em; }
.chapter h2 { margin: 0; font: 500 clamp(28px, 2.8vw, 39px)/1.35 var(--serif); letter-spacing: -.04em; }
.chapter-summary { max-width: 800px; color: var(--ink-soft); font-size: 17px; line-height: 1.82; }
.chapter-question { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 28px; margin: 26px 0 21px; padding: 17px 19px; border-left: 2px solid var(--accent); background: #f8f4ec; }
.chapter-question span { color: var(--accent-dark); font-size: 13px; font-weight: 700; padding-top: 2px; }
.chapter-question p { margin: 0; font: 500 17px/1.7 var(--serif); }
.chapter-boundary { color: var(--muted); font-size: 15px; line-height: 1.75; margin: 0; }
.chapter-boundary strong { color: var(--ink-soft); }
.chapter-boundary a { color: var(--accent-dark); text-underline-offset: 3px; }
.chapter-open-link { display: inline-flex; align-items: center; gap: 17px; margin-top: 24px; border-bottom: 2px solid var(--accent); padding: 0 0 7px; color: var(--accent-dark); font-size: 17px; font-weight: 700; text-decoration: none; }
.chapter-open-link:hover { color: var(--ink); border-color: var(--ink); }
.chapter-open-link span { font-size: 20px; font-weight: 400; }
.reading-next { margin-top: 70px; padding: 35px 40px 40px; border-radius: 5px; color: #f9f4e9; background: var(--ink); }
.reading-next .section-number { color: #d5a18d; margin-bottom: 17px; }
.reading-next h2 { margin: 0 0 13px; font: 500 31px/1.4 var(--serif); }
.reading-next p { max-width: 620px; color: #e2e9df; font-size: 16px; line-height: 1.75; }
.reading-next .primary-link { width: fit-content; margin-top: 22px; border: 1px solid #aebdb3; }

/* The cross-book archive stays readable without reproducing the books. */
.works-section { padding: 70px 0 10px; scroll-margin-top: 28px; }
.works-section h2 { margin: 22px 0 19px; font: 500 clamp(34px, 3.4vw, 46px)/1.4 var(--serif); letter-spacing: -.04em; }
.works-intro { max-width: 800px; margin-bottom: 30px; color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.work-card { min-width: 0; min-height: 230px; display: flex; flex-direction: column; align-items: flex-start; padding: 26px 27px 25px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.work-card > span { color: var(--accent-dark); font-size: 13px; font-weight: 700; letter-spacing: .03em; }
.work-card h3 { margin: 15px 0 11px; font: 500 23px/1.45 var(--serif); overflow-wrap: anywhere; }
.work-card p { margin: 0 0 22px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.work-card a { margin-top: auto; border-bottom: 1px solid currentColor; padding-bottom: 3px; color: var(--accent-dark); font-size: 14px; text-decoration: none; }
.work-card a:hover { color: var(--ink); }
.work-card .work-open-link { margin-top: auto; border-bottom: 2px solid var(--accent); color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.work-card .work-source-link { margin-top: 15px; color: var(--muted); font-size: 13px; }
.works-note { margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }

/* Each chapter opens into a real, source-located reading guide. */
.detail-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 25px 0 0; color: var(--muted); font-size: 15px; }
.detail-breadcrumb a { color: var(--accent-dark); text-underline-offset: 4px; }
.detail-breadcrumb span[aria-hidden] { color: #a5a69b; }
.detail-state { display: flex; align-items: flex-start; gap: 24px; min-height: 45vh; padding: 105px 0; }
.detail-state[hidden], .chapter-detail[hidden] { display: none; }
.detail-state-mark { color: var(--accent); font-size: 38px; line-height: 1; }
.detail-state h1 { margin: 0 0 12px; font: 500 clamp(31px, 3.6vw, 46px)/1.35 var(--serif); }
.detail-state p { max-width: 620px; margin: 0 0 23px; color: var(--ink-soft); font-size: 18px; line-height: 1.75; }
.detail-state a { display: inline-block; border-bottom: 2px solid var(--accent); padding-bottom: 5px; color: var(--accent-dark); font-size: 17px; font-weight: 700; text-decoration: none; }
.detail-hero { border-bottom: 1px solid var(--line); padding: 54px 0 65px; }
.detail-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); align-items: end; gap: 7%; }
.detail-hero h1 { margin: 26px 0 14px; font: 500 clamp(43px, 4.5vw, 67px)/1.3 var(--serif); letter-spacing: -.05em; }
.detail-subtitle { margin: 0 0 25px; color: var(--accent-dark); font: 500 clamp(21px, 2.1vw, 27px)/1.5 var(--serif); }
.detail-lead { max-width: 810px; margin: 0; color: var(--ink-soft); font-size: 20px; line-height: 1.9; }
.detail-editor-note { border-top: 2px solid var(--accent); background: #eee7db; padding: 23px 26px 20px; }
.detail-editor-note span { display: block; margin-bottom: 11px; color: var(--accent-dark); font-size: 15px; font-weight: 700; }
.detail-editor-note p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.detail-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: min(7vw, 100px); padding: 68px 0 110px; }
.detail-toc-inner { position: sticky; top: 28px; border-top: 1px solid var(--line); }
.detail-toc p { display: flex; justify-content: space-between; margin: 0; border-bottom: 1px solid var(--line); padding: 14px 0; color: var(--accent-dark); font-size: 15px; font-weight: 700; }
.detail-toc ol { margin: 9px 0 13px; padding: 0; list-style: none; counter-reset: detail-line; }
.detail-toc li { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; }
.detail-toc li::before { counter-increment: detail-line; content: counter(detail-line, decimal-leading-zero); color: var(--accent-dark); font-size: 13px; font-weight: 700; }
.detail-toc a { display: block; padding: 5px 0; color: var(--ink-soft); font-size: 15px; line-height: 1.55; text-decoration: none; }
.detail-toc a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.detail-body { min-width: 0; max-width: 860px; }
.detail-theme { border-bottom: 1px solid var(--line); padding: 0 0 44px; margin: 0 0 48px; scroll-margin-top: 28px; }
.detail-kicker { display: block; margin-bottom: 15px; color: var(--accent-dark); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.detail-theme h2, .detail-scene h2, .detail-questions h2, .detail-limits h2 { margin: 0 0 22px; font: 500 clamp(30px, 3vw, 39px)/1.4 var(--serif); letter-spacing: -.035em; }
.detail-theme p, .detail-scene p, .detail-limits p { margin: 0 0 18px; color: var(--ink-soft); font-size: 19px; line-height: 1.92; }
.detail-theme p:last-child, .detail-scene p:last-child, .detail-limits p:last-child { margin-bottom: 0; }
.detail-scene { margin: 57px 0 48px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 4px; background: var(--surface); padding: 35px 40px 38px; scroll-margin-top: 28px; }
.detail-scene h2 { font-size: clamp(28px, 2.5vw, 34px); }
.detail-insight { margin: 0 0 65px; border-left: 4px solid var(--accent); background: #eee7db; padding: 27px 34px 29px; scroll-margin-top: 28px; }
.detail-insight > span { color: var(--accent-dark); font-size: 14px; font-weight: 700; }
.detail-insight p { margin: 14px 0 13px; font: 500 clamp(23px, 2.4vw, 30px)/1.6 var(--serif); }
.detail-insight footer { color: var(--muted); font-size: 14px; line-height: 1.65; }
.detail-questions { padding: 0 0 55px; scroll-margin-top: 28px; }
.detail-questions ol { margin: 0; padding: 0; list-style: none; counter-reset: reading-question; }
.detail-questions li { display: grid; grid-template-columns: 42px 1fr; gap: 13px; border-top: 1px solid var(--line); padding: 21px 0; color: var(--ink-soft); font-size: 19px; line-height: 1.75; }
.detail-questions li:last-child { border-bottom: 1px solid var(--line); }
.detail-questions li::before { counter-increment: reading-question; content: counter(reading-question, decimal-leading-zero); color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.detail-limits { border-top: 1px solid var(--line); padding: 39px 0 48px; scroll-margin-top: 28px; }
.detail-limits h2 { font-size: clamp(28px, 2.5vw, 34px); }
.detail-source { border-radius: 5px; background: #eae5db; padding: 28px 32px 27px; }
.detail-source h2 { margin: 0 0 14px; font: 500 28px/1.4 var(--serif); }
.detail-source p { margin: 0 0 9px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.detail-source .detail-source-note { margin-top: 16px; border-top: 1px solid #d0ccc1; padding-top: 14px; color: var(--muted); font-size: 14px; }
.detail-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 37px; }
.detail-pager a { display: flex; flex-direction: column; min-height: 108px; border: 1px solid var(--line); border-radius: 5px; padding: 19px 21px; background: var(--surface); text-decoration: none; }
.detail-pager a:hover { border-color: var(--accent); background: #fffaf1; }
.detail-pager a span { margin-bottom: 8px; color: var(--accent-dark); font-size: 13px; font-weight: 700; }
.detail-pager a strong { font: 500 21px/1.5 var(--serif); }
.detail-return { display: inline-block; margin-top: 28px; border-bottom: 1px solid var(--accent); padding-bottom: 4px; color: var(--accent-dark); font-size: 16px; text-decoration: none; }
.detail-return span { margin-left: 8px; }

@media (max-width: 1100px) {
  .page-shell { width: min(100% - 48px, 1440px); }
  .site-header { gap: 22px; }
  .header-note { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(330px, .75fr); gap: 4%; }
  .hero h1 { font-size: clamp(42px, 5vw, 59px); }
  .dialogue-section { gap: 45px; }
  .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-card { min-height: 180px; }
  .reading-layout { grid-template-columns: 225px minmax(0, 1fr); gap: 45px; }
}

@media (max-width: 800px) {
  .site-header { min-height: 0; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; padding: 18px 0; }
  .brand-stack { width: 100%; }
  .main-nav { margin: 4px 0 0; width: 100%; justify-content: space-between; order: 2; }
  .main-nav a { font-size: 14px; }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 38px; padding: 70px 0 68px; }
  .hero-art { min-height: 340px; width: min(100%, 560px); justify-self: center; border-radius: 160px 160px 6px 6px; }
  .hero h1 { font-size: clamp(39px, 6.5vw, 62px); }
  .dialogue-section, .reading-section { grid-template-columns: 1fr; gap: 40px; }
  .dialogue-section { padding: 76px 0 83px; }
  .section-intro h2 br { display: none; }
  .dialogue-intro > p:not(.intro-footnote) { max-width: 600px; }
  .prompt-list { margin-top: 26px; }
  .intro-footnote { max-width: 600px; margin-top: 20px; }
  .chat-panel { max-width: 720px; width: 100%; margin: 0 auto; }
  .ideas-section, .reading-section, .sources-section { padding: 78px 0 86px; }
  .concept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-heading > p { max-width: 600px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer > span { grid-column: 1 / -1; }
  .reading-hero { padding: 68px 0; }
  .reading-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .reading-status-card { max-width: 550px; }
  .reading-layout { grid-template-columns: 1fr; gap: 35px; padding-top: 35px; }
  .chapter-sidebar-inner { position: static; }
  .chapter-sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
  .chapter-back-link { margin-top: 22px; }
  .detail-hero { padding: 45px 0 54px; }
  .detail-hero-grid { grid-template-columns: 1fr; gap: 35px; }
  .detail-editor-note { max-width: 660px; }
  .detail-layout { grid-template-columns: 1fr; gap: 42px; padding: 46px 0 82px; }
  .detail-toc-inner { position: static; }
  .detail-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
  .detail-toc-inner > a { display: inline-block; margin: 3px 20px 2px 0; }
}

@media (max-width: 580px) {
  .page-shell { width: min(100% - 32px, 1440px); }
  .brand-mark { width: 55px; height: 55px; font-size: 29px; border-radius: 15px 15px 15px 4px; }
  .brand-copy strong { font-size: 22px; }
  .brand-copy small { font-size: 11px; }
  .brand-byline { margin-left: 69px; font-size: 12px; }
  .main-nav { gap: 8px; overflow-x: auto; }
  .main-nav a { font-size: 14px; }
  .hero { padding: 57px 0 58px; }
  .eyebrow { font-size: 10px; letter-spacing: .07em; }
  .hero h1 { font-size: clamp(35px, 9vw, 49px); margin: 23px 0 19px; line-height: 1.38; }
  .hero-library-card { gap: 9px; margin-bottom: 24px; padding: 18px 18px 19px; }
  .hero-library-card strong { font-size: clamp(25px, 7vw, 29px); }
  .hero-library-description { font-size: 16px; }
  .hero-lede { font-size: 18px; line-height: 1.78; }
  .hero-actions { gap: 18px; margin-top: 28px; }
  .primary-link { min-width: 145px; padding: 13px; font-size: 14px; }
  .text-link { font-size: 14px; }
  .hero-facts { margin-top: 27px; gap: 9px 18px; font-size: 12px; }
  .hero-art { min-height: 290px; }
  .orbit-one { width: 100px; height: 100px; }
  .orbit-two { width: 205px; height: 205px; }
  .orbit-three { width: 305px; height: 305px; }
  .orbit-center { width: 65px; height: 65px; font-size: 24px; }
  .orbit-word { padding: 6px 10px; font-size: 12px; }
  .hero-art p { font-size: 13px; }
  .dialogue-section { padding: 63px 0 70px; }
  .section-intro h2, .reading-heading h2, .section-heading-row h2 { font-size: 36px; }
  .chat-panel { height: min(760px, 90svh); min-height: 620px; }
  .chat-topbar { padding: 0 14px; }
  .chat-messages { padding: 17px 12px; }
  .chat-composer-wrap { padding: 11px 10px 9px; }
  .chat-notice { padding: 8px 13px; }
  .service-state { font-size: 12px; padding: 7px; }
  .chat-meta { flex-wrap: wrap; }
  .message { max-width: 100%; }
  .chat-welcome { margin-top: 18px; }
  .section-heading-row { display: block; }
  .section-heading-row > p { margin: 19px 0 0; }
  .concept-grid { grid-template-columns: 1fr; }
  .concept-card { min-height: 245px; padding: 22px 24px; }
  .concept-card h3 { margin-top: 17px; }
  .reading-step { grid-template-columns: 52px 1fr; gap: 13px; }
  .step-num { font-size: 29px; }
  .source-grid { grid-template-columns: 1fr; }
  .source-card { min-height: 155px; }
  .site-footer { grid-template-columns: 1fr; gap: 13px; padding-top: 32px; }
  .site-footer > span { grid-column: auto; margin-top: 8px; }
  .reading-hero { padding: 56px 0 53px; }
  .reading-hero h1 { font-size: 39px; }
  .reading-hero-lede { font-size: 17px; line-height: 1.78; }
  .reading-status-card { padding: 20px; }
  .reading-layout { padding: 28px 0 75px; }
  .chapter-sidebar nav { grid-template-columns: 1fr; gap: 0; }
  .chapter-sidebar nav a { min-height: 53px; grid-template-columns: 35px minmax(0, 1fr) 20px; gap: 7px; font-size: 16px; }
  .chapter { padding: 39px 0 43px; }
  .chapter header { display: block; margin-bottom: 15px; }
  .chapter h2 { margin-top: 8px; font-size: 30px; }
  .chapter-summary { font-size: 16px; line-height: 1.8; }
  .chapter-question { display: block; padding: 15px 17px; margin: 20px 0 17px; }
  .chapter-question p { margin-top: 7px; font-size: 17px; }
  .works-section { padding-top: 52px; }
  .works-section h2 { font-size: 34px; }
  .works-intro { font-size: 16px; line-height: 1.75; }
  .works-grid { grid-template-columns: 1fr; }
  .work-card { min-height: 210px; padding: 23px 22px; }
  .reading-next { margin-top: 50px; padding: 28px 23px 32px; }
  .reading-next h2 { font-size: 26px; }
  .detail-breadcrumb { padding-top: 20px; font-size: 14px; }
  .detail-state { gap: 16px; padding: 70px 0; }
  .detail-state-mark { font-size: 30px; }
  .detail-hero { padding: 39px 0 47px; }
  .detail-hero h1 { font-size: clamp(37px, 9vw, 51px); }
  .detail-subtitle { font-size: 22px; }
  .detail-lead { font-size: 18px; line-height: 1.82; }
  .detail-editor-note { padding: 20px 22px; }
  .detail-layout { gap: 38px; padding: 37px 0 72px; }
  .detail-toc ol { grid-template-columns: 1fr; }
  .detail-toc li { padding: 3px 0; }
  .detail-theme { padding-bottom: 36px; margin-bottom: 40px; }
  .detail-theme h2, .detail-scene h2, .detail-questions h2, .detail-limits h2 { font-size: 29px; }
  .detail-theme p, .detail-scene p, .detail-limits p { font-size: 18px; line-height: 1.86; }
  .detail-scene { margin: 46px 0 42px; padding: 27px 24px 30px; }
  .detail-insight { margin-bottom: 53px; padding: 24px 25px 26px; }
  .detail-insight p { font-size: 25px; }
  .detail-questions li { grid-template-columns: 32px 1fr; gap: 8px; font-size: 18px; padding: 18px 0; }
  .detail-source { padding: 24px 23px; }
  .detail-pager { grid-template-columns: 1fr; }
  .detail-pager a { min-height: 93px; }
}

@media (max-width: 340px) {
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 17px; }
  .hero-actions .primary-link { min-width: 185px; }
}

@media (prefers-reduced-motion: reduce) {
  html, .chat-messages { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The works library extends the chapter guide without reproducing source texts. */
.works-library-hero { padding: 62px 0 76px; border-bottom: 1px solid var(--line); }
.works-library-hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); align-items: end; gap: 7%; }
.works-library-hero h1 { margin: 25px 0 21px; font: 500 clamp(43px, 4.6vw, 68px)/1.36 var(--serif); letter-spacing: -.055em; }
.works-library-hero h1 em { color: var(--accent); font-style: normal; }
.works-library-hero-grid > div > p { max-width: 800px; margin: 0; color: var(--ink-soft); font-size: 19px; line-height: 1.85; }
.works-library-note { padding: 22px 25px 23px; border: 1px solid #ddcfbc; border-top: 3px solid var(--accent); border-radius: 4px; background: #f0e9dd; }
.works-library-note > span { display: block; margin-bottom: 10px; color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.works-library-note p { margin: 0 0 9px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.works-library-note p:last-of-type { margin-bottom: 0; }
.works-library-note small { display: block; margin-top: 16px; border-top: 1px solid #d7cbbb; padding-top: 11px; color: var(--accent-dark); font-size: 16px; font-weight: 700; line-height: 1.6; }
.works-library { padding: 75px 0 105px; }
.works-library-subgroup { margin-top: 90px; padding-top: 72px; border-top: 1px solid var(--line); }
.works-library-subgroup[hidden] { display: none; }
.works-edition-map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.works-edition-map-contents { display: contents; }
.works-edition-map-card { display: flex; flex-direction: column; min-width: 0; padding: 19px 22px 20px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.works-edition-map-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.works-edition-map-card strong { font: 500 22px/1.5 var(--serif); }
.works-edition-map-card span { margin-top: 7px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.works-edition-map-card em { margin-top: 12px; color: var(--accent-dark); font-size: 16px; font-style: normal; font-weight: 700; }
.works-library-heading { display: flex; justify-content: space-between; align-items: end; gap: 35px; margin-bottom: 35px; }
.works-library-heading h2 { margin: 13px 0 0; font: 500 clamp(35px, 3.3vw, 49px)/1.35 var(--serif); letter-spacing: -.045em; }
.works-library-heading > p { max-width: 455px; margin: 0 0 4px; color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.works-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.works-library-grid-contents { display: contents; }
.library-book { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; min-height: 290px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 26px 30px 28px; text-decoration: none; transition: border-color .2s, transform .2s, background .2s; }
.library-book:hover { transform: translateY(-3px); border-color: var(--accent); background: #fffaf1; }
.library-book-featured { grid-column: 1 / -1; min-height: 260px; background: #eae6d9; border-color: #d3c9ba; }
.library-book-head { width: 100%; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 15px; color: var(--accent-dark); font-size: 16px; font-weight: 700; line-height: 1.5; }
.library-book-head span:last-child { color: var(--muted); font-weight: 400; }
.library-book h3 { margin: 22px 0 4px; font: 500 clamp(25px, 2.3vw, 31px)/1.42 var(--serif); letter-spacing: -.025em; }
.library-book h3 span { color: var(--accent); font: 400 19px/1 var(--sans); }
.library-book-original { margin: 0 0 17px !important; color: var(--muted) !important; font-size: 16px !important; line-height: 1.6 !important; overflow-wrap: anywhere; }
.library-book > p:not(.library-book-original):not(.library-book-status) { max-width: 720px; margin: 12px 0 20px; color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
.library-book-status { margin: 0 0 17px; color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.library-book-open { display: inline-flex; align-items: center; gap: 16px; margin-top: auto; border-bottom: 2px solid var(--accent); padding: 0 0 5px; color: var(--accent-dark); font-size: 16px; font-weight: 700; text-decoration: none; }
.library-book-open:hover { color: var(--ink); border-color: var(--ink); }
.library-book-open span { font-size: 18px; font-weight: 400; }
.works-loading { grid-column: 1 / -1; padding: 38px 35px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
.works-loading strong { display: block; margin-bottom: 8px; color: var(--ink); font: 500 25px/1.45 var(--serif); }
.works-loading p { margin-bottom: 12px; }
.works-loading a { color: var(--accent-dark); text-underline-offset: 4px; }
.works-library-end { border-top: 1px solid var(--line); padding: 75px 0 90px; }
.works-library-end h2 { margin: 14px 0 19px; font: 500 clamp(34px, 3vw, 46px)/1.45 var(--serif); }
.works-library-end p { max-width: 730px; margin-bottom: 26px; color: var(--ink-soft); font-size: 18px; line-height: 1.8; }
.works-library-end .primary-link { width: fit-content; }

.work-detail[hidden] { display: none; }
.work-detail-hero { padding: 49px 0 65px; border-bottom: 1px solid var(--line); }
.work-detail-hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); align-items: end; gap: 7%; }
.work-detail-era { margin: 20px 0 0; color: var(--accent-dark); font-size: 15px; font-weight: 700; }
.work-detail-hero h1 { margin: 15px 0 9px; font: 500 clamp(43px, 4.7vw, 69px)/1.33 var(--serif); letter-spacing: -.05em; }
.work-detail-original { margin: 0 0 25px; color: var(--muted); font: 500 clamp(18px, 2vw, 23px)/1.55 var(--serif); overflow-wrap: anywhere; }
.work-detail-overview { max-width: 780px; margin: 0; color: var(--ink-soft); font-size: 20px; line-height: 1.9; }
.work-detail-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: min(7vw, 100px); padding: 59px 0 110px; }
.work-detail-toc-inner { position: sticky; top: 28px; border-top: 1px solid var(--line); }
.work-detail-toc p { display: flex; justify-content: space-between; margin: 0; border-bottom: 1px solid var(--line); padding: 14px 0; color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.work-detail-toc ol { margin: 9px 0 13px; padding: 0; list-style: none; counter-reset: work-line; }
.work-detail-toc li { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; }
.work-detail-toc li::before { counter-increment: work-line; content: counter(work-line, decimal-leading-zero); color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.work-detail-toc li.work-toc-appendix::before { counter-increment: none; content: "附"; }
.work-detail-toc a { display: block; padding: 5px 0; color: var(--ink-soft); font-size: 17px; line-height: 1.55; text-decoration: none; }
.work-detail-toc a[hidden] { display: none; }
.work-detail-toc a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.work-detail-body { min-width: 0; max-width: 870px; }
.work-detail-body > .reading-method { margin-bottom: 47px; }
.work-detail-section { border-bottom: 1px solid var(--line); padding: 0 0 45px; margin: 0 0 50px; scroll-margin-top: 28px; }
.work-detail-section:target { border-left: 3px solid var(--accent); padding-left: 20px; }
.work-detail-section:target > h2 { color: var(--accent-dark); }
.work-detail-section h2, .work-detail-boundary h2 { margin: 0 0 20px; font: 500 clamp(29px, 3vw, 39px)/1.4 var(--serif); letter-spacing: -.035em; }
.work-detail-section > p:not(.work-section-boundary):not(.work-section-locator), .work-detail-boundary > p { margin: 0 0 18px; color: var(--ink-soft); font-size: 19px; line-height: 1.92; }
.work-detail-thesis { margin: 0 0 29px; border-bottom: 1px solid var(--line); padding: 0 0 20px; }
.work-detail-thesis span { display: block; margin-bottom: 9px; color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.work-detail-thesis p { margin: 0 0 12px; color: var(--ink-soft); font-size: 19px; line-height: 1.88; }
.work-detail-thesis p:last-child { margin-bottom: 0; }
.work-detail-version-note { margin: 0 0 30px; border-left: 3px solid #9ba98e; background: #edf1e9; padding: 16px 21px 18px; }
.work-detail-version-note span { display: block; margin-bottom: 7px; color: var(--ink); font-size: 16px; font-weight: 700; }
.work-detail-version-note p { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.work-detail-close-reading { margin: 31px 0 32px; }
.work-detail-close-reading h3 { margin: 0 0 17px; color: var(--accent-dark); font-size: 17px; font-weight: 700; letter-spacing: .04em; }
.work-detail-subtopics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: close-reading; }
.work-detail-subtopics li { min-width: 0; border: 1px solid #dfd8cc; border-top: 3px solid #b5bbaa; border-radius: 3px; background: var(--surface); padding: 18px 21px 19px; counter-increment: close-reading; }
.work-detail-subtopics li::before { content: counter(close-reading, decimal-leading-zero) " / 细节"; display: block; margin-bottom: 8px; color: var(--accent-dark); font-size: 14px; font-weight: 700; }
.work-detail-subtopics h4 { margin: 0 0 10px; font: 500 23px/1.5 var(--serif); }
.work-detail-subtopics p { margin: 0 0 12px; color: var(--ink-soft); font-size: 17px; line-height: 1.82; }
.work-detail-subtopics p:last-of-type { margin-bottom: 0; }
.work-detail-subtopics small { display: block; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.work-detail-verified-quote { margin: 26px 0; border-left: 3px solid var(--accent); padding: 21px 25px; background: #f1e8da; }
.work-detail-verified-quote > span { color: var(--accent-dark); font-size: 15px; font-weight: 700; }
.work-detail-verified-quote blockquote { margin: 12px 0; font: 500 clamp(20px, 2vw, 25px)/1.7 var(--serif); }
.work-detail-quote-meaning { margin: 0 0 14px; color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
.work-detail-verified-quote figcaption { color: var(--muted); font-size: 15px; line-height: 1.6; }
.work-detail-verified-quote figcaption a { display: inline-block; margin-left: 12px; color: var(--accent-dark); font-weight: 700; text-underline-offset: 3px; }
.work-detail-highlights { margin: 28px 0 26px; border-left: 3px solid var(--accent); background: #eee7db; padding: 21px 26px 23px; }
.work-detail-highlights > strong { display: block; margin-bottom: 12px; color: var(--accent-dark); font-size: 16px; }
.work-detail-highlights ul { margin: 0; padding-left: 22px; color: var(--ink); }
.work-detail-highlights li { margin: 8px 0; font: 500 clamp(19px, 2vw, 23px)/1.7 var(--serif); }
.work-detail-takeaway { margin: 24px 0; border-left: 3px solid var(--ink); background: #e9ede5; padding: 20px 25px 21px; }
.work-detail-takeaway span { color: var(--ink); font-size: 16px; font-weight: 700; }
.work-detail-takeaway p { margin: 9px 0 0; color: var(--ink); font: 500 20px/1.78 var(--serif); }
.work-detail-reflection { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 18px; margin: 24px 0 20px; border: 1px solid #e3d7c8; background: #f8f4ec; padding: 18px 20px; }
.work-detail-reflection span { color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.work-detail-reflection p { margin: 0; color: var(--ink); font: 500 19px/1.75 var(--serif); }
.work-section-boundary, .work-section-locator { margin: 15px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.work-section-boundary strong, .work-section-locator strong { color: var(--ink-soft); }
.work-section-locator { border-top: 1px dashed var(--line); padding-top: 13px; }
.work-editions { margin: 6px 0 58px; padding: 37px 0 12px; border-top: 2px solid var(--accent); scroll-margin-top: 28px; }
.work-editions[hidden] { display: none; }
.work-editions h2 { margin: 12px 0 14px; font: 500 clamp(29px, 3vw, 39px)/1.4 var(--serif); letter-spacing: -.035em; }
.work-editions-intro { margin: 0 0 26px; color: var(--ink-soft); font-size: 18px; line-height: 1.82; }
.work-edition-card { margin: 0 0 24px; padding: 24px 27px 27px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.work-edition-card h3 { margin: 0 0 11px; font: 500 clamp(24px, 2.5vw, 31px)/1.45 var(--serif); }
.work-edition-card > p { margin: 11px 0; color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.work-edition-card > .work-edition-imprint { color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.work-edition-card > .work-edition-coverage { color: var(--muted); font-size: 16px; }
.work-edition-insights { display: grid; gap: 13px; margin-top: 19px; }
.work-edition-insight { padding: 16px 18px; border-left: 3px solid var(--accent); background: #f5efe4; }
.work-edition-insight span { display: block; color: var(--accent-dark); font-size: 16px; font-weight: 700; }
.work-edition-insight p { margin: 7px 0 0; color: var(--ink); font-size: 17px; line-height: 1.76; }
.work-edition-insight small { display: block; margin-top: 9px; color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.work-edition-read { display: inline-block; margin-top: 18px; border-bottom: 2px solid var(--accent); padding-bottom: 4px; color: var(--accent-dark); font-size: 16px; font-weight: 700; text-decoration: none; }
.work-edition-read:hover { color: var(--ink); border-color: var(--ink); }
.work-detail-boundary { padding: 12px 0 48px; scroll-margin-top: 28px; }
.work-detail-body > .detail-source { scroll-margin-top: 28px; }
.work-detail-body > .detail-source a { color: var(--accent-dark); text-underline-offset: 4px; }
.work-detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; margin-top: 26px; }
.work-detail-actions .detail-return { margin: 0; }
.work-detail-actions .primary-link { min-width: 190px; }
.work-empty-sections { padding: 25px 0 45px; color: var(--ink-soft); font-size: 18px; line-height: 1.75; }

@media (max-width: 900px) {
  .works-library-hero-grid, .work-detail-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .works-library-note { max-width: 720px; }
  .work-detail-layout { grid-template-columns: 1fr; gap: 35px; }
  .work-detail-toc-inner { position: static; }
  .work-detail-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .work-detail-toc-inner > a { display: inline-block; margin-right: 22px; }
}

@media (max-width: 620px) {
  .works-library-hero { padding: 49px 0 55px; }
  .works-library-hero h1, .work-detail-hero h1 { font-size: clamp(37px, 9vw, 50px); }
  .works-library-hero-grid > div > p, .work-detail-overview { font-size: 18px; line-height: 1.82; }
  .works-library-note { padding: 19px 20px; }
  .works-library { padding: 58px 0 75px; }
  .works-library-subgroup { margin-top: 65px; padding-top: 55px; }
  .works-library-heading { display: block; }
  .works-library-heading > p { margin: 18px 0 0; }
  .works-library-grid { grid-template-columns: 1fr; }
  .works-edition-map-grid { grid-template-columns: 1fr; }
  .library-book-featured { grid-column: auto; }
  .library-book { min-height: 0; padding: 24px 22px 26px; }
  .library-book h3 { font-size: 27px; }
  .library-book > p:not(.library-book-original):not(.library-book-status) { font-size: 17px; }
  .works-library-end { padding: 56px 0 70px; }
  .work-detail-hero { padding: 35px 0 48px; }
  .work-detail-original { font-size: 19px; }
  .work-detail-layout { padding: 34px 0 80px; }
  .work-detail-toc ol { grid-template-columns: 1fr; }
  .work-detail-body > .reading-method { margin-bottom: 39px; }
  .work-detail-section { padding-bottom: 36px; margin-bottom: 39px; }
  .work-detail-section h2, .work-detail-boundary h2 { font-size: 30px; }
  .work-detail-section > p:not(.work-section-boundary):not(.work-section-locator), .work-detail-boundary > p { font-size: 18px; line-height: 1.85; }
  .work-detail-thesis p { font-size: 18px; }
  .work-detail-subtopics { grid-template-columns: 1fr; }
  .work-detail-subtopics li { padding: 18px 19px; }
  .work-detail-subtopics h4 { font-size: 22px; }
  .work-detail-subtopics p { font-size: 17px; }
  .work-detail-takeaway p { font-size: 19px; }
  .work-detail-highlights { padding: 20px 22px; }
  .work-detail-highlights li { font-size: 20px; }
  .work-detail-reflection { display: block; padding: 16px 18px; }
  .work-detail-reflection p { margin-top: 6px; font-size: 18px; }
  .work-editions { margin-bottom: 45px; }
  .work-editions-intro { font-size: 17px; }
  .work-edition-card { padding: 20px; }
  .work-edition-card > p, .work-edition-insight p { font-size: 17px; }
  .work-detail-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
}

/* Conversations that stay beside a specific chapter or reviewed section. */
.chapter-chat-host, .work-section-chat-host { min-width: 0; scroll-margin-top: 24px; }
.chapter-chat-host { margin: 0 0 58px; }
.work-section-chat-button { display: inline-flex; align-items: center; margin: 25px 0 0; border: 1px solid var(--accent); border-radius: 5px; padding: 13px 19px; background: #f5eee3; color: var(--accent-dark); font-size: 17px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.work-section-chat-button:hover, .work-section-chat-button[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.work-section-chat-host:not(:empty) { margin-top: 22px; }
.section-chat { min-width: 0; border-top: 2px solid var(--accent); padding-top: 27px; }
.section-chat-head { margin-bottom: 20px; }
.section-chat-head h3 { margin: 9px 0 10px; color: var(--ink); font: 500 clamp(27px, 3vw, 34px)/1.35 var(--serif); }
.section-chat-head p { max-width: 720px; margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.78; }
.section-chat-panel { width: 100%; height: 620px; box-shadow: 0 10px 24px rgba(38, 61, 57, .06); }
.section-chat-panel .chat-identity small { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-chat-panel .chat-welcome { width: min(100%, 390px); }
.section-chat-panel .chat-welcome h4 { margin: 0 0 8px; font: 500 23px/1.5 var(--serif); }
.section-chat-prompts { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.section-chat-prompts button { border: 1px solid #d6d9cc; border-radius: 20px; padding: 7px 11px; background: #f8f7f2; color: var(--ink-soft); font-size: 14px; cursor: pointer; }
.section-chat-prompts button:hover { border-color: var(--accent); color: var(--accent-dark); }
.section-chat-panel .composer-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0 0; color: var(--muted); font-size: 13px; }
.section-chat-panel .message-content { font-size: 17px; }
.section-chat-privacy { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 620px) {
  .work-section-chat-button { width: 100%; justify-content: center; font-size: 16px; }
  .section-chat-panel { height: min(760px, 90svh); min-height: 620px; }
  .section-chat-panel .chat-topbar { gap: 5px; }
  .section-chat-panel .chat-identity small { max-width: 140px; }
  .section-chat-prompts button { font-size: 13px; }
  .section-chat-head p { font-size: 16px; }
}
