:root {
  color-scheme: light;
  --brand-orange: #f15a14;
  --brand-cream-field: #fff8e9;
  --text-primary: #171717;
  --text-muted: #626262;
  --surface-default: #fff;
  --surface-subtle: #f6f6f4;
  --border-default: #deded9;
  --focus-ring: #a93600;
  --action-text: #a93600;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --radius: 12px;
  --border: 1px solid var(--border-default);
  --shadow: 0 6px 20px rgb(23 23 23 / 8%);
  --layer-sticky: 2;
  --motion: 180ms cubic-bezier(.16, 1, .3, 1);
  --font-interface: "XQ Library Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-reading: "XQ Library WenKai", "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-family: var(--font-interface);
  color: var(--text-primary);
  background: var(--surface-default);
  font-synthesis: none;
  caret-color: var(--action-text);
  scrollbar-color: #a8a8a1 var(--surface-subtle);
  text-underline-offset: .22em;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 28px; }
body { margin: 0; font-size: 16px; line-height: 1.7; }
::selection { background: #ffe0c9; color: var(--text-primary); }
a { color: inherit; text-decoration-thickness: 1px; }
a:hover { color: var(--action-text); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 5px; }
button, summary { -webkit-tap-highlight-color: #ffe0c9; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
button:active, .primary-link:active { transform: translateY(1px); }
svg { flex: 0 0 auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-interface); font-weight: 600; }
.shell { width: min(1520px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 10px 20px; background: white; z-index: 10; }
.skip-link:focus { top: 10px; }
.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); border-bottom: var(--border); }
.wordmark { display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 18px; text-decoration: none; }
.brand-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-orange); }
.site-header nav { display: flex; gap: var(--space-4); font-size: 14px; }
.site-header nav a { padding-block: 12px; text-decoration: none; }
.opening { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 76px; padding-block: 64px 72px; }
.opening h1 { font-size: 58px; line-height: 1.22; letter-spacing: -.025em; font-weight: 750; }
.opening-description { margin-top: 22px; font-size: 20px; line-height: 1.75; color: var(--text-muted); }
.mascot { width: 100%; max-width: 420px; align-self: center; }
.mascot img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.first-read { margin-top: 36px; padding-top: 24px; border-top: var(--border); }
.first-read h2 { font-size: 24px; line-height: 1.55; }
.first-read h2 a { text-decoration: none; }
.first-read > p { margin-top: 12px; font-size: 15px; line-height: 1.8; color: var(--text-muted); }
.primary-link { display: inline-flex; align-items: center; gap: 20px; padding: 12px 20px; margin-top: 22px; background: var(--brand-orange); color: #171717; font-size: 15px; font-weight: 650; border-radius: 6px; text-decoration: none; transition: background var(--motion); }
.primary-link:hover { background: #ff7437; color: #171717; }
.directory { border-top: 2px solid var(--text-primary); padding-top: 28px; }
.directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.directory-heading h2 { font-size: 30px; line-height: 1.4; }
.directory-heading p { color: var(--text-muted); font-size: 14px; }
.theme-navigation { display: flex; flex-wrap: wrap; column-gap: 28px; row-gap: 10px; margin-top: 26px; padding-bottom: 32px; border-bottom: var(--border); }
.theme-navigation a { color: var(--text-muted); font-size: 14px; padding-block: 10px; text-decoration: underline; text-decoration-color: #b6b6ae; }
.theme-navigation a:hover { color: var(--action-text); }
.chapter { padding-block: 40px 36px; border-bottom: var(--border); }
.chapter-intro { max-width: 780px; margin-bottom: 22px; }
.chapter h3 { font-size: 23px; line-height: 1.5; }
.chapter-intro p { color: var(--text-muted); font-size: 15px; margin-top: 9px; }
.chapter-list { padding: 0; margin: 0; list-style: none; }
.article-row { min-width: 0; display: flex; gap: 24px; justify-content: space-between; padding-block: 13px; }
.article-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.article-row a { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 24px; text-decoration: none; }
.available { font-weight: 650; }
.available a > span:first-child { text-decoration: underline; text-decoration-color: #c5c5bd; }
.row-status, .row-action { flex: 0 0 auto; font-size: 13px; font-weight: 400; color: var(--text-muted); }
.row-action { color: var(--action-text); }
.site-footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; padding-block: 36px 44px; font-size: 13px; color: var(--text-muted); }
.site-footer p:first-child { font-weight: 650; }
.site-footer a { margin-left: auto; }
.reading-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 32px 20px; }
.reading-sidebar { position: sticky; top: 28px; min-width: 0; }
.article-toc summary { font-size: 15px; font-weight: 650; cursor: pointer; padding-block: 8px; }
.article-toc ol { list-style: none; padding: 12px 0 0; margin: 0; }
.article-toc li + li { margin-top: 12px; }
.article-toc a { display: block; color: var(--text-muted); font-size: 15px; line-height: 1.65; text-decoration: none; }
.article-toc a:hover { color: var(--action-text); text-decoration: underline; }
.article-tools { margin-top: 24px; padding-top: 20px; border-top: var(--border); }
.quiet-button { color: var(--text-muted); padding: 10px 0; border: 0; background: transparent; text-align: left; font-size: 13px; }
.quiet-button:hover { color: var(--action-text); }
.reading-main { min-width: 0; }
.article-header { margin-bottom: 32px; }
.article-header h1 { font-size: 38px; letter-spacing: -.02em; line-height: 1.45; }
.prose { font-size: 22px; line-height: 1.85; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 22px; }
.prose h2 { margin-top: 48px; margin-bottom: 20px; font-size: 32px; line-height: 1.5; }
.prose h3 { margin-top: 36px; font-size: 26px; line-height: 1.6; }
.prose a { color: var(--action-text); }
.prose blockquote { background: var(--surface-subtle); padding: 22px 26px; margin-inline: 0; border-radius: 4px; }
.prose blockquote p + p { margin-top: 16px; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: 8px; }
.prose pre { margin-inline: 0; padding: 24px; background: var(--surface-subtle); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; font-size: 17px; line-height: 1.85; border-radius: 4px; }
.prose code { font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .88em; }
.prose pre code { font-size: inherit; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 18px; }
.prose th, .prose td { padding: 12px; border: var(--border); text-align: left; min-width: 90px; }
.prose img { display: block; max-width: 100%; height: auto; }
.copy-block { background: var(--surface-subtle); border-radius: var(--radius); }
.copy-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: var(--border); font-size: 13px; color: var(--text-muted); }
.copy-button { flex: 0 0 auto; padding: 8px 12px; background: white; color: var(--text-primary); border: var(--border); border-radius: 6px; font-size: 13px; }
.copy-button:hover { border-color: var(--action-text); color: var(--action-text); }
.copy-block pre { margin: 0; background: transparent; }
.copy-status { padding: 0 24px 18px; color: var(--text-muted); font-size: 13px; line-height: 1.65; }
.copy-status:empty { display: none; }
.article-end { border-top: var(--border); margin-top: 48px; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; font-size: 15px; }
.text-link { color: var(--action-text); }
@media (max-width: 1000px) {
  .opening { gap: 36px; }
  .opening h1 { font-size: 48px; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 16px; }
  .reading-sidebar { position: static; }
  .prose { font-size: 21px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .site-header { min-height: 64px; gap: 16px; }
  .wordmark { font-size: 15px; gap: 8px; }
  .site-header nav { gap: 16px; font-size: 13px; }
  .opening { grid-template-columns: 1fr; gap: 32px; padding-block: 36px 40px; }
  .opening h1 { font-size: 42px; line-height: 1.25; }
  .opening-description { font-size: 17px; margin-top: 16px; }
  .first-read { margin-top: 26px; }
  .first-read h2 { font-size: 22px; }
  .mascot { max-width: 240px; justify-self: center; }
  .directory-heading { align-items: start; flex-direction: column; gap: 8px; }
  .directory-heading h2 { font-size: 26px; }
  .theme-navigation { gap: 8px 22px; margin-top: 20px; padding-bottom: 24px; }
  .theme-navigation a { font-size: 13px; }
  .chapter { padding-block: 30px; }
  .chapter h3 { font-size: 21px; }
  .chapter-intro p { font-size: 14px; }
  .article-row, .article-row a { gap: 16px; }
  .article-row { font-size: 15px; padding-block: 12px; }
  .row-status, .row-action { font-size: 12px; }
  .site-footer { padding-block: 28px 36px; gap: 6px 16px; }
  .site-footer p:nth-child(2) { flex-basis: 100%; }
  .site-footer a { margin-left: 0; }
  .reading-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 12px; }
  .reading-sidebar { position: static; border-bottom: var(--border); padding-bottom: 4px; }
  .article-toc summary { min-height: 44px; display: list-item; padding-block: 9px; }
  .article-toc a { padding-block: 5px; font-size: 14px; }
  .article-toc li + li { margin-top: 6px; }
  .article-tools { margin-top: 12px; padding-top: 8px; border: 0; }
  .quiet-button { padding-block: 8px; }
  .article-header { margin-bottom: 26px; }
  .article-header h1 { font-size: 29px; line-height: 1.5; }
  .prose { font-size: 20px; }
  .prose h2 { font-size: 26px; margin-top: 38px; }
  .prose h3 { font-size: 23px; }
  .prose blockquote { padding: 18px 20px; }
  .prose pre { padding: 18px; font-size: 16px; }
  .prose table { font-size: 16px; }
  .copy-toolbar { padding: 12px 16px; }
  .copy-status { padding-inline: 20px; }
}
@media (max-width: 370px) {
  .shell { width: calc(100% - 32px); }
  .site-header nav { gap: 10px; }
  .site-header nav a { font-size: 12px; }
  .wordmark { font-size: 13px; gap: 6px; }
}
@media (min-width: 1600px) {
  .prose { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media print {
  :root { color: #000; background: #fff; }
  .site-header, .site-footer, .reading-sidebar, .article-end, .skip-link, .copy-toolbar, .copy-status { display: none !important; }
  .shell, .reading-main { width: 100%; max-width: none; }
  .reading-layout { display: block; padding: 0; }
  .article-header h1 { font-size: 25pt; }
  .prose { font-size: 11pt; line-height: 1.7; }
  .prose h2 { font-size: 16pt; break-after: avoid; }
  .prose h3, .prose pre, .prose blockquote { break-inside: avoid; }
  .prose a { color: #000; }
  .prose pre, .prose blockquote, .copy-block { background: transparent; }
  .prose pre { border: 1px solid #aaa; }
  @page { margin: 18mm; }
}
