:root {
  --ink: #171710;
  --paper: #f1eee1;
  --acid: #dfff48;
  --orange: #ff6848;
  --muted: #6c6a60;
  --line: rgba(23, 23, 16, .2);
  --serif: "STSong", "Songti SC", "SimSun", Georgia, serif;
  --mono: "Cascadia Mono", "Microsoft YaHei UI", monospace;
}
.page-nav { display: flex; align-items: center; gap: 25px; font-size: 12px; }
.page-nav a { color: var(--ink); text-underline-offset: 5px; }
.page-nav a[aria-current] { text-decoration-color: var(--orange); }
.collection-page { padding-top: 55px; }
.collection-heading { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-bottom: 25px; }
.collection-heading h1 { font-size: clamp(40px, 5vw, 68px); }
.collection-heading .promise { margin: 24px 0 0; font-size: 15px; }
.collection-total { min-width: 210px; padding: 25px; border-left: 1px solid var(--ink); }
.collection-total strong { display: block; font: 85px/1 var(--serif); }
.collection-total span { display: block; margin-top: 8px; }
.collection-total small { display: block; margin-top: 16px; color: var(--muted); }
.collection-tools { display: flex; align-items: end; gap: 15px; padding: 23px; background: var(--ink); color: var(--paper); }
.collection-tools > div { flex: 1; }
.collection-tools label { display: block; margin-bottom: 10px; color: var(--acid); font-size: 12px; }
.collection-tools input { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--paper); border-radius: 0; background: transparent; color: white; font: 18px var(--mono); }
.collection-tools input::placeholder { color: #aaa89f; }
.collection-tools button, #retryLibrary { padding: 12px 16px; border: 1px solid var(--ink); background: var(--acid); color: var(--ink); }
.collection-help, #listStatus { font-size: 12px; line-height: 1.7; color: var(--muted); }
.collection-help a { color: inherit; }
.video-list { margin: 0; padding: 0; list-style: none; }
.video-list > li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 20px; align-items: center; border-top: 1px solid var(--line); padding: 25px 12px; }
.video-list > li:hover { background: #fffdf5; }
.video-number { color: var(--muted); font-size: 12px; }
.video-list h2 { margin: 0; font: 600 22px/1.45 var(--serif); overflow-wrap: anywhere; }
.video-list p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.video-open { color: var(--ink); font-size: 12px; text-underline-offset: 5px; white-space: nowrap; }
.collection-empty { padding: 50px 20px; border-top: 1px solid var(--line); line-height: 1.8; }
.collection-page :focus-visible, .page-nav a:focus-visible { outline: 2px solid var(--orange); outline-offset: 5px; }
@media (max-width: 600px) {
  .page-nav { gap: 12px; font-size: 11px; }
  .brand small { display: none; }
  .collection-heading { display: block; }
  .collection-total { margin-top: 25px; min-width: 0; padding: 12px 18px; }
  .collection-total strong { display: inline; font-size: 40px; margin-right: 12px; }
  .collection-total span { display: inline; }
  .collection-total small { margin-top: 7px; }
  .collection-tools { flex-wrap: wrap; }
  .collection-tools > div { flex-basis: 100%; }
  .video-list > li { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 20px 0; }
  .video-open { grid-column: 2; padding: 8px 0; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: var(--mono); }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.grain { position: fixed; inset: 0; z-index: 20; opacity: .04; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.masthead { height: 88px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 45px; height: 45px; display: grid; place-items: center; color: var(--acid); background: var(--ink); font: 25px var(--serif); transform: rotate(-3deg); }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 20px var(--serif); letter-spacing: .02em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .13em; }
.local-only { font-size: 10px; letter-spacing: .09em; }
.local-only i, .scope-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--acid); border: 1px solid var(--ink); box-shadow: 0 0 0 3px rgba(223,255,72,.25); }
main { width: min(1240px, 90vw); margin: 0 auto; }
.hero { min-height: 690px; padding: 92px 0 58px; position: relative; }
.hero::after { content: "?"; position: absolute; z-index: -1; right: -1vw; top: 0; color: transparent; -webkit-text-stroke: 1px rgba(23,23,16,.08); font: 520px/1 var(--serif); transform: rotate(6deg); }
.eyebrow { margin: 0 0 16px; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
h1 { margin: 0; max-width: 1000px; font: 700 clamp(50px, 7.1vw, 96px)/1.04 var(--serif); letter-spacing: -.06em; }
h1 em { font-style: normal; background: linear-gradient(transparent 70%, var(--acid) 0); }
.promise { margin: 30px 0 46px; color: var(--muted); font: 17px/1.7 var(--serif); }
.search-panel { max-width: 1020px; padding: 25px 28px 22px; color: var(--paper); background: var(--ink); box-shadow: 13px 13px 0 var(--orange); }
.search-panel > label { display: block; margin-bottom: 13px; color: var(--acid); font-size: 12px; }
.question-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; }
.question-row textarea { min-height: 80px; padding: 10px 0; resize: none; outline: 0; border: 0; border-bottom: 1px solid rgba(241,238,225,.3); color: white; background: transparent; font: 25px/1.5 var(--serif); }
.question-row textarea:focus { border-color: var(--acid); }
.question-row textarea::placeholder { color: rgba(241,238,225,.35); }
.question-row button, .watch-button { min-width: 190px; padding: 16px 19px; border: 0; display: flex; align-items: center; justify-content: space-between; gap: 22px; color: var(--ink); background: var(--acid); font-weight: 700; text-decoration: none; }
.question-row button b, .watch-button b { font-size: 25px; }
.question-row button:disabled { opacity: .55; cursor: wait; }
.scope-row { display: flex; align-items: center; gap: 7px; margin-top: 17px; color: rgba(241,238,225,.58); font-size: 10px; }
.scope-row strong { color: var(--paper); }
.scope-dot { border-color: var(--paper); box-shadow: none; }
#intentNote, #clarification { max-width: 1020px; margin-top: 28px; padding: 18px 22px; border-left: 4px solid var(--acid); background: #fffdf5; font-size: 14px; line-height: 1.8; }
#clarification button { padding: 8px 14px; border: 1px solid var(--ink); background: var(--acid); }
.presets { max-width: 1020px; display: grid; grid-template-columns: 110px 1fr; align-items: start; gap: 18px; margin-top: 40px; }
.presets > span { padding-top: 12px; color: var(--orange); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.presets > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.presets button { min-height: 82px; padding: 12px 14px; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.25); font: 12px/1.55 var(--serif); transition: 160ms ease; }
.presets button:hover, .presets button:focus { border-color: var(--ink); background: white; transform: translateY(-3px); }
.presets small { display: block; margin-bottom: 7px; color: var(--orange); font: 700 9px var(--mono); letter-spacing: .08em; }
.loading-card, .answer-card, .no-answer { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.loading-card { min-height: 340px; display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 40px; }
.loading-index { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ink); background: var(--acid); font: 700 28px var(--serif); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); box-shadow: 0 0 0 16px rgba(223,255,72,.16); } }
.loading-card h2 { margin: 0 0 30px; font: 700 40px var(--serif); }
.loading-card ol { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; color: #9c998c; font-size: 10px; }
.loading-card li::before { content: "○"; margin-right: 7px; }
.loading-card li.active { color: var(--ink); }
.loading-card li.active::before { content: "●"; color: var(--orange); }
.workspace { padding: 75px 0; animation: enter .4s ease-out both; }
.map-heading { border-top: 2px solid var(--ink); padding-top: 28px; }
.map-heading h2 { margin: 0; font: 700 clamp(30px, 4vw, 50px)/1.2 var(--serif); }
.map-heading > p:not(.eyebrow) { font-size: 13px; line-height: 1.8; color: var(--muted); }
#learningMap { background: #fffdf5; padding: 36px clamp(22px, 5vw, 64px); }
.map-heading #reportQuestion { margin: 24px 0 16px; color: var(--ink); font: 23px/1.6 var(--serif); overflow-wrap: anywhere; }
.map-heading #reportSummary { color: var(--ink); }
#reportOutline { display: flex; flex-wrap: wrap; gap: 12px 26px; padding: 22px 0; border-block: 1px solid var(--line); margin-top: 26px; }
#reportOutline a { font-size: 12px; color: var(--ink); text-underline-offset: 5px; line-height: 1.8; }
.report-section { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 24px; padding: 36px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.report-number { font: 14px/32px var(--mono); border-top: 4px solid var(--acid); }
.report-section h3 { margin: 0; font: 700 clamp(24px, 3vw, 32px)/1.4 var(--serif); }
.report-focus { color: var(--muted); font-size: 12px; line-height: 1.8; }
.report-explanation { max-width: 850px; font: 17px/1.95 var(--serif); }
.report-source { border-left: 3px solid var(--acid); padding: 4px 0 4px 16px; margin-top: 20px; font-size: 12px; line-height: 1.8; }
.report-source span { color: var(--muted); margin-right: 16px; }
.report-source a { color: var(--ink); text-underline-offset: 4px; }
.report-source small { display: block; margin-top: 5px; color: var(--muted); }
@media (max-width: 520px) { .report-section { grid-template-columns: 1fr; gap: 8px; } .report-number { width: 32px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .workspace, .loading-index { animation: none; } }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } }
.answer-card { display: grid; grid-template-columns: 250px 1fr; min-height: 470px; background: #fffdf5; }
.answer-stamp { padding: 42px 30px; display: flex; flex-direction: column; justify-content: space-between; color: var(--acid); background: var(--ink); }
.answer-stamp span { writing-mode: vertical-rl; font: 700 72px/1 var(--serif); letter-spacing: .08em; }
.answer-stamp small { font-size: 10px; letter-spacing: .1em; }
.answer-copy { padding: 52px clamp(32px, 7vw, 90px); }
.answer-copy h2, .no-answer h2 { margin: 0; font: 700 clamp(31px, 4.2vw, 56px)/1.2 var(--serif); letter-spacing: -.035em; }
.reason { max-width: 700px; margin: 25px 0 35px; color: var(--muted); font-size: 13px; line-height: 1.8; }
dl { display: flex; gap: 60px; margin: 0 0 34px; }
dl div { border-left: 4px solid var(--acid); padding-left: 14px; }
dt { margin-bottom: 7px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
dd { margin: 0; font: 700 27px var(--serif); }
.watch-button { width: fit-content; min-width: 275px; background: var(--ink); color: var(--paper); }
.watch-button:hover { color: var(--acid); }
.watch-note { max-width: 650px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.no-answer { min-height: 340px; padding: 55px; display: grid; grid-template-columns: 150px 1fr; gap: 40px; align-items: center; background: white; }
.no-answer > span { color: var(--orange); font: 110px/1 var(--serif); }
.no-answer h2 { max-width: 820px; }
.no-answer div > p:last-child { margin-top: 25px; color: var(--muted); }
.boundary { margin-top: 30px; padding: 35px 0 55px; display: flex; justify-content: space-between; gap: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.boundary span { color: var(--ink); font-weight: 700; }
.boundary p { margin: 0; text-align: right; }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 30; padding: 14px 18px; color: var(--acid); background: var(--ink); box-shadow: 7px 7px 0 var(--orange); font-size: 11px; }
@media (max-width: 820px) {
  .hero { padding-top: 65px; }
  .question-row, .answer-card, .no-answer { grid-template-columns: 1fr; }
  .question-row button { min-height: 60px; }
  .presets { grid-template-columns: 1fr; }
  .presets > div { grid-template-columns: 1fr; }
  .answer-stamp { min-height: 100px; flex-direction: row; align-items: center; }
  .answer-stamp span { writing-mode: initial; font-size: 46px; }
  .loading-card { grid-template-columns: 80px 1fr; gap: 20px; }
  .loading-index { width: 65px; height: 65px; }
  .loading-card ol { display: grid; gap: 10px; }
}
@media (max-width: 520px) {
  .masthead { height: 75px; }
  .local-only { display: none; }
  main { width: 88vw; }
  h1 { font-size: 44px; }
  .search-panel { padding: 20px; box-shadow: 8px 8px 0 var(--orange); }
  .question-row textarea { font-size: 20px; }
  .loading-card { grid-template-columns: 1fr; padding: 45px 0; }
  .answer-copy, .no-answer { padding: 35px 24px; }
  dl { gap: 25px; }
  dd { font-size: 21px; }
  .boundary { display: block; }
  .boundary p { margin-top: 12px; text-align: left; }
}
/* Content units retain the existing editorial layout; the precise anchor is secondary. */
.chapter-source { align-items: flex-start; }
.chapter-source a { display: block; white-space: normal; }
.chapter-details { margin-top: 1.25rem; overflow-wrap: anywhere; }
.chapter-details summary { cursor: pointer; text-decoration: underline; text-underline-offset: .25em; }
.chapter-details li { margin-block: .75rem; }
.chapter-details a { color: var(--ink); text-underline-offset: .2em; }
@media (max-width: 600px) {
  .masthead { height: auto; min-height: 88px; flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
}

@media (max-width: 520px) { .hero::after { right: 0; transform: none; font-size: 300px; } }
