@import url("./fonts/noto-serif-sc.css");

@view-transition { navigation: auto; }

:root {
  --desk: #edf1f5;
  --paper: #fff;
  --ink: #172333;
  --muted: #586778;
  --blue: #244dab;
  --blue-soft: #e7edf8;
  --line: #d2dae4;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --reading: "Songti SC", "STSong", "SimSun", serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; color: var(--ink); background: var(--desk); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: default; }
svg { width: 20px; height: 20px; flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
::selection { color: var(--ink); background: #cbd9f2; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
.container { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; padding: 10px 20px; background: var(--ink); color: #fff; z-index: 20; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 11; pointer-events: none; }
.reading-progress span { display: block; width: 100%; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.site-header { background: var(--desk); position: relative; z-index: 10; }
.header-inner { width: min(1280px, calc(100% - 80px)); margin-inline: auto; min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 700; line-height: 1.2; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; background: var(--blue); color: #fff; border-radius: 2px; }
.brand-mark svg { width: 26px; height: 26px; }
.brand-sub { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; letter-spacing: .13em; font-weight: 400; }
.main-nav { display: flex; gap: 30px; align-items: center; font-size: 14px; }
.main-nav a { display: inline-flex; gap: 7px; align-items: center; padding-block: 9px; position: relative; }
.main-nav a::after { content: ""; position: absolute; inset: auto 0 2px; height: 1px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav svg { width: 15px; height: 15px; }
.home-main { padding-block: 64px 96px; }
.directory-intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 70px; align-items: end; margin-bottom: 58px; }
.intro-copy h1 { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 4.5vw, 57px); letter-spacing: -.025em; line-height: 1.28; }
.intro-copy h1 span { color: var(--blue); }
.intro-copy > p { color: var(--muted); font-size: 15px; line-height: 1.8; margin-top: 23px; }
.search-form { padding-bottom: 4px; }
.search-form label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.search-field { display: flex; align-items: center; background: var(--paper); border: 1px solid #aebbc9; border-radius: 4px; transition: border-color .2s, box-shadow .2s; }
.search-field:focus-within { border-color: var(--blue); box-shadow: 0 4px 16px rgb(31 53 81 / 8%); }
.search-field input { min-width: 0; width: 100%; padding: 17px 18px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search-field input::placeholder { color: #637284; }
.search-field button { display: grid; place-items: center; align-self: stretch; padding: 15px 21px; background: transparent; color: var(--blue); border: 0; }
.search-field button:hover { background: var(--blue-soft); }
.search-form > p { margin-top: 11px; color: var(--muted); font-size: 12px; }
.lead-entry { display: grid; grid-template-columns: 205px 1fr; gap: 54px; background: var(--paper); padding: 42px 52px 46px; box-shadow: 0 10px 28px rgb(32 49 71 / 5%); position: relative; }
.lead-index { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; padding-top: 13px; color: var(--muted); font-size: 12px; }
.spine-line { display: block; width: 48px; height: 3px; margin-bottom: 12px; background: var(--blue); transform-origin: left; }
.lead-index time { color: var(--ink); font-size: 14px; }
.drive-label { padding: 4px 9px; color: var(--blue); background: var(--blue-soft); font-size: 11px; border-radius: 3px; }
.lead-body { min-width: 0; }
.lead-body h2 { font-family: var(--display); font-size: clamp(25px, 2.8vw, 34px); letter-spacing: -.02em; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.lead-body h2 a { transition: color .2s; }
.lead-body h2 a:hover { color: var(--blue); }
.lead-body > p { margin: 17px 0 25px; font-size: 14px; color: var(--muted); line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.text-link { color: var(--blue); display: inline-flex; align-items: center; gap: 11px; font-size: 13px; font-weight: 600; background: transparent; border: 0; padding: 0; }
.text-link svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }
.directory { margin-top: 65px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 25px; padding-bottom: 23px; border-bottom: 1px solid #abb9c9; }
.section-heading h2 { font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.section-heading p { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.entry-row { display: grid; grid-template-columns: 145px minmax(0, 1fr) 48px; gap: 30px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: start; transition: background-color .25s; }
.entry-row:hover { background: rgb(255 255 255 / 45%); }
.entry-date { color: var(--muted); padding-top: 7px; font-size: 12px; }
.entry-date span { display: block; margin-top: 9px; font-size: 11px; }
.entry-content h3 { font-size: 18px; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; }
.entry-content h3 a:hover { color: var(--blue); }
.entry-content > p { margin-top: 9px; max-width: 69ch; font-size: 13px; color: var(--muted); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry-tags { display: flex; gap: 13px; margin-top: 11px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.entry-open { width: 40px; height: 40px; margin-top: 3px; display: grid; place-items: center; color: var(--blue); background: transparent; border-radius: 50%; transition: color .3s, background .3s, transform .3s var(--ease); }
.entry-row:hover .entry-open { color: #fff; background: var(--blue); transform: translateX(3px); }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 35px; font-size: 13px; gap: 12px; }
.pagination > a { display: inline-flex; gap: 10px; align-items: center; color: var(--blue); padding: 12px 0; }
.pagination [aria-disabled] { color: #788697; }
.page-current { font-variant-numeric: tabular-nums; }
.page-current span { color: var(--muted); padding-left: 5px; }
.empty-state { padding: 50px 0 65px; }
.empty-state h3 { font-size: 20px; margin-bottom: 14px; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 23px; }
.notice { padding-bottom: 18px; }
.notice p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.notice strong { color: var(--ink); font-weight: 600; margin-right: 10px; }
.article-main { padding-top: 36px; padding-bottom: 85px; }
.breadcrumb { display: flex; gap: 12px; font-size: 12px; color: var(--muted); align-items: center; }
.breadcrumb a { color: var(--blue); }
.article-header { max-width: 980px; padding: 46px 0 42px; }
.article-header h1 { font-family: var(--display); font-size: clamp(30px, 3.5vw, 45px); font-weight: 600; line-height: 1.45; letter-spacing: -.025em; overflow-wrap: anywhere; }
.article-meta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 23px; color: var(--muted); font-size: 12px; }
.article-meta > span + span { padding-left: 22px; border-left: 1px solid #b3bfcd; }
.copy-link { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 12px; padding: 6px 0; background: transparent; border: 0; }
.copy-link svg { width: 16px; height: 16px; }
.copy-link:hover span { text-decoration: underline; text-underline-offset: 4px; }
.reading-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 42px; }
.sidebar-inner { position: sticky; top: 34px; padding-top: 12px; }
.toc { padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.toc summary { cursor: pointer; font-size: 14px; font-weight: 600; padding-block: 5px; }
.toc summary::marker { color: var(--blue); font-size: 10px; }
.toc nav { display: flex; flex-direction: column; gap: 3px; margin-top: 17px; }
.toc nav a { padding: 7px 12px; font-size: 12px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; border-radius: 3px; transition: background .2s, color .2s; }
.toc nav a:hover, .toc nav a[aria-current="location"] { color: var(--blue); background: var(--blue-soft); }
.sidebar-tags { margin-top: 25px; }
.sidebar-tags h2 { font-size: 12px; font-weight: 600; margin-bottom: 14px; }
.sidebar-tags a { display: inline-block; margin: 0 7px 8px 0; padding: 4px 8px; background: #e1e7ee; color: #45566b; font-size: 11px; border-radius: 3px; overflow-wrap: anywhere; }
.sidebar-tags a:hover { color: var(--blue); background: #dae4f6; }
.sidebar-note { margin-top: 40px; font-family: var(--reading); color: var(--muted); font-size: 12px; line-height: 1.9; }
.reading-paper { background: var(--paper); padding: 47px 54px 38px; min-width: 0; box-shadow: 0 10px 28px rgb(32 49 71 / 5%); }
.article-copy { font-family: var(--reading); font-size: 17px; line-height: 2.05; color: #273344; overflow-wrap: anywhere; }
.article-copy p { max-width: 70ch; margin-bottom: 25px; }
.article-copy h2 { font-family: var(--sans); color: var(--ink); font-size: 23px; line-height: 1.55; font-weight: 600; margin: 45px 0 18px; }
.article-copy h2:first-child { margin-top: 0; }
.article-copy .content-empty { color: var(--muted); font-family: var(--sans); font-size: 15px; }
.resource-links, .resource-source { margin-top: 42px; padding-top: 33px; border-top: 1px solid var(--line); }
.resource-links h2, .resource-source h2 { font-size: 22px; font-weight: 600; margin-bottom: 13px; }
.resource-links > p, .resource-source > p { font-size: 13px; line-height: 1.8; color: var(--muted); }
.resource-link-list { margin-top: 20px; }
.resource-link-list > a { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--blue); background: #edf2fb; border-radius: 3px; padding: 16px 19px; margin-bottom: 10px; font-size: 14px; transition: background .25s; }
.resource-link-list > a:hover { background: #e0e9f9; }
.resource-link-list > a span { min-width: 0; overflow-wrap: anywhere; }
.resource-link-list small { color: #526a91; font-size: 11px; display: block; margin-top: 4px; }
.resource-source .text-link { margin-top: 18px; }
.article-close { padding-top: 43px; margin-top: 45px; text-align: center; color: var(--muted); }
.article-close > span { display: block; margin: 0 auto 23px; width: 30px; height: 1px; background: #9aa9bb; }
.article-close p { font-family: var(--reading); font-size: 14px; }
.article-close a { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 16px; color: var(--blue); }
.article-close svg { width: 17px; height: 17px; }
.related-section { padding: 60px 0 0 252px; }
.related-list a { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 23px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.7; }
.related-list a:hover { color: var(--blue); }
.related-list a > span { overflow-wrap: anywhere; }
.related-list small { display: block; margin-top: 7px; font-size: 11px; color: var(--muted); }
.related-list svg { color: var(--blue); }
.error-main { padding-top: 75px; padding-bottom: 130px; min-height: 65vh; }
.error-code { font-size: 90px; line-height: 1.1; font-weight: 300; color: #8192aa; letter-spacing: -.03em; }
.error-main h1 { margin-top: 24px; font-family: var(--display); font-size: clamp(28px, 3vw, 40px); font-weight: 600; }
.error-main > p:not(.error-code) { color: var(--muted); max-width: 65ch; font-size: 15px; margin-top: 20px; overflow-wrap: anywhere; }
.error-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 25px; margin-top: 33px; }
.solid-button { display: inline-flex; align-items: center; gap: 17px; background: var(--blue); color: #fff; padding: 13px 20px; border-radius: 3px; font-size: 13px; }
.solid-button:hover { background: #1c408f; }
.page-content { background: var(--paper); width: min(800px, calc(100% - 80px)); padding: 50px 60px; margin: 55px auto 85px; }
.page-content h1 { font-family: var(--display); font-size: 36px; line-height: 1.5; margin-bottom: 30px; }
.page-content h2 { font-size: 22px; margin: 35px 0 15px; }
.page-content p, .page-content li { font-size: 15px; line-height: 1.95; margin-bottom: 15px; color: #364557; }
.page-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.site-footer { padding-block: 34px; border-top: 1px solid var(--line); }
.footer-inner { width: min(1280px, calc(100% - 80px)); margin-inline: auto; display: flex; align-items: center; gap: 30px; justify-content: space-between; font-size: 11px; color: var(--muted); }
.footer-brand { color: var(--ink); font-size: 13px; font-weight: 600; }
.footer-inner > a:last-child { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); }
.footer-inner svg { width: 15px; height: 15px; }
.back-top { position: fixed; right: 24px; bottom: 25px; width: 42px; height: 42px; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: 50%; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .3s, transform .35s var(--ease); }
.back-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* The opening paper settles once; content stays visible without JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  .intro-copy { animation: title-settle .9s var(--ease) both; }
  .lead-entry, .reading-paper { animation: paper-settle 1s var(--ease) both; }
  .spine-line { animation: index-open 1.1s var(--ease) both; }
  ::view-transition-old(root) { animation-duration: .2s; }
  ::view-transition-new(root) { animation-duration: .35s; }
}
@keyframes title-settle { from { transform: translateY(10px); } to { transform: translateY(0); } }
@keyframes paper-settle { from { clip-path: inset(0 0 7px 0); transform: translateY(14px); box-shadow: 0 2px 8px rgb(32 49 71 / 2%); } to { clip-path: inset(-40px); transform: translateY(0); box-shadow: 0 10px 28px rgb(32 49 71 / 5%); } }
@keyframes index-open { from { transform: scaleX(.2); } to { transform: scaleX(1); } }

@media (max-width: 1000px) {
  .container, .header-inner, .footer-inner { width: calc(100% - 56px); }
  .directory-intro { gap: 35px; }
  .lead-entry { grid-template-columns: 155px 1fr; gap: 32px; padding: 35px; }
  .reading-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 26px; }
  .reading-paper { padding: 35px; }
  .related-section { padding-left: 201px; }
  .footer-inner { flex-wrap: wrap; gap: 15px 25px; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 25px; }
  .container, .header-inner, .footer-inner { width: calc(100% - 40px); }
  .header-inner { min-height: 116px; align-items: flex-start; padding-top: 20px; gap: 16px; flex-direction: column; padding-bottom: 15px; }
  .brand { font-size: 16px; gap: 11px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-mark svg { width: 23px; height: 23px; }
  .brand-sub { font-size: 10px; margin-top: 5px; }
  .main-nav { width: 100%; justify-content: space-between; font-size: 12px; gap: 15px; }
  .main-nav a { padding-block: 3px; }
  .main-nav svg { width: 13px; height: 13px; }
  .home-main { padding-block: 38px 60px; }
  .directory-intro { display: block; margin-bottom: 30px; }
  .intro-copy h1 { font-size: 38px; }
  .intro-copy > p { font-size: 14px; margin-top: 18px; }
  .search-form { margin-top: 28px; }
  .search-form label { font-size: 12px; margin-bottom: 9px; }
  .search-field input { font-size: 14px; padding: 14px; }
  .search-field button { padding-inline: 16px; }
  .search-form > p { font-size: 11px; }
  .lead-entry { display: block; padding: 25px; }
  .lead-index { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 0; margin-bottom: 19px; }
  .spine-line { width: 22px; height: 2px; margin: 0; }
  .lead-index time { font-size: 11px; }
  .lead-index .drive-label { display: none; }
  .lead-body h2 { font-size: 25px; }
  .lead-body > p { font-size: 13px; margin: 15px 0 20px; }
  .directory { margin-top: 38px; }
  .section-heading { padding-bottom: 17px; gap: 12px; align-items: center; }
  .section-heading h2 { font-size: 21px; flex: 0 0 auto; }
  .section-heading p { font-size: 11px; text-align: right; }
  .entry-row { grid-template-columns: minmax(0, 1fr) 28px; gap: 8px 14px; padding-block: 23px; }
  .entry-date { grid-column: 1; padding-top: 0; display: flex; gap: 14px; align-items: center; font-size: 11px; }
  .entry-date span { margin: 0; }
  .entry-content { grid-column: 1; }
  .entry-content h3 { font-size: 16px; }
  .entry-content > p { font-size: 12px; margin-top: 8px; }
  .entry-tags { margin-top: 9px; font-size: 10px; }
  .entry-open { grid-column: 2; grid-row: 1 / span 2; margin-top: 21px; width: 28px; height: 32px; }
  .entry-open svg { width: 18px; height: 18px; }
  .pagination { font-size: 12px; }
  .article-main { padding-block: 26px 55px; }
  .article-header { padding: 28px 0 27px; }
  .article-header h1 { font-size: 30px; line-height: 1.45; }
  .article-meta { margin-top: 18px; gap: 10px 18px; font-size: 11px; }
  .article-meta > span + span { padding-left: 18px; }
  .copy-link { font-size: 11px; }
  .reading-layout { display: flex; flex-direction: column; gap: 23px; }
  .article-sidebar { width: 100%; }
  .sidebar-inner { padding-top: 0; position: static; }
  .toc { padding-bottom: 18px; }
  .toc summary { font-size: 12px; }
  .toc nav { flex-direction: row; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
  .toc nav a { font-size: 11px; padding: 6px 9px; }
  .sidebar-tags, .sidebar-note { display: none; }
  .reading-paper { padding: 27px 23px; margin-inline: -7px; }
  .article-copy { font-size: 16px; line-height: 2; }
  .article-copy p { margin-bottom: 23px; }
  .article-copy h2 { font-size: 21px; margin-top: 34px; }
  .resource-links, .resource-source { padding-top: 27px; margin-top: 32px; }
  .resource-links h2, .resource-source h2 { font-size: 20px; }
  .resource-links > p, .resource-source > p { font-size: 12px; }
  .resource-link-list > a { padding: 14px; font-size: 13px; }
  .article-close { margin-top: 30px; padding-top: 32px; }
  .related-section { padding: 40px 0 0; }
  .related-section .text-link { font-size: 11px; }
  .related-list a { font-size: 14px; padding-block: 21px; }
  .error-main { padding-block: 50px 80px; }
  .error-code { font-size: 72px; }
  .error-main h1 { font-size: 28px; }
  .error-main > p:not(.error-code) { font-size: 14px; }
  .page-content { width: calc(100% - 40px); padding: 28px; margin-block: 35px 55px; }
  .page-content h1 { font-size: 28px; }
  .site-footer { padding-block: 28px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-inner p { max-width: 32ch; line-height: 1.9; }
  .back-top { width: 36px; height: 36px; right: 13px; bottom: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
