/* Wiki's reading home. Scoped so article, editor, and Books layouts stay independent. */
body.wiki-home-modern {
  --wh-bg: #f6f8fb;
  --wh-surface: #fff;
  --wh-ink: #172137;
  --wh-muted: #6b778b;
  --wh-line: #e4e9f1;
  --wh-blue: #2866d9;
  --wh-soft: #edf3ff;
  --wh-books: #f4f0eb;
  --bg: var(--wh-bg);
  --text: var(--wh-ink);
  --text-muted: var(--wh-muted);
  --border: var(--wh-line);
  --header-bg: var(--wh-surface);
  background: var(--wh-bg);
  color: var(--wh-ink);
  font-family: -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] body.wiki-home-modern {
  --wh-bg: #0d1421;
  --wh-surface: #151f30;
  --wh-ink: #edf2fb;
  --wh-muted: #9ba9bd;
  --wh-line: #29354a;
  --wh-blue: #8db3ff;
  --wh-soft: #1b2c48;
  --wh-books: #211f26;
}
body.wiki-home-modern .wiki-main { max-width: none; width: 100%; margin: 0; padding: var(--wiki-chrome-h) 0 0; }
.wiki-home-modern .wiki-subheader { background: var(--wh-surface); border-color: var(--wh-line); backdrop-filter: none; }
.wiki-home-modern .wiki-subheader__inner { max-width: 1240px; padding: 0 28px; gap: 32px; }
.wiki-home-modern .wiki-subheader .main-nav { gap: 8px; }
.wiki-home-modern .wiki-subheader .main-nav a { border-radius: 7px; padding: 7px 12px; font-weight: 550; color: var(--wh-muted); }
.wiki-home-modern .wiki-subheader .main-nav a.active { color: var(--wh-blue); background: var(--wh-soft); }
.wiki-home-modern .wiki-subheader .spotlight-trigger { border: 0; background: var(--wh-bg); border-radius: 7px; box-shadow: none; }
.wh-shell { max-width: 1240px; margin: 0 auto; padding: 0 28px 56px; }
.wh-shell svg { width: 20px; height: 20px; flex: 0 0 auto; }
.wh-shell a { color: inherit; text-decoration: none; }
.wh-shell button { font: inherit; }
.wh-shell :is(a,button):focus-visible { outline: 3px solid var(--wh-blue); outline-offset: 5px; }
.wh-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding: 46px 0 40px; }
.wh-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--wh-blue); font-size: 10px; font-weight: 750; letter-spacing: 1.9px; }
.wh-eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wh-intro h1 { font-size: clamp(28px,3.05vw,40px); line-height: 1.27; font-weight: 740; letter-spacing: -1.4px; margin: 12px 0; }
.wh-intro-copy > p { color: var(--wh-muted); font-size: 14px; line-height: 1.8; margin: 0; max-width: 550px; }
.wh-stats { display: flex; gap: 22px; margin-top: 17px; color: var(--wh-muted); font-size: 11px; }
.wh-stats > span { display: flex; align-items: center; gap: 5px; }
.wh-stats svg { width: 13px; height: 13px; margin-right: 2px; }
.wh-stats strong { color: var(--wh-ink); font-weight: 650; }
.wh-search { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 62px; padding: 12px 17px; text-align: left; border: 1px solid var(--wh-line); border-radius: 12px; background: var(--wh-surface); color: var(--wh-muted); box-shadow: 0 5px 22px #14244405; cursor: pointer; transition: border-color .18s,box-shadow .18s; }
.wh-search:hover { border-color: var(--wh-blue); box-shadow: 0 4px 20px #2866d914; }
.wh-search > svg { color: var(--wh-blue); width: 23px; height: 23px; }
.wh-search span { flex: 1; font-size: 14px; }
.wh-search kbd { white-space: nowrap; font-size: 10px; border: 1px solid var(--wh-line); background: var(--wh-bg); padding: 2px 6px; border-radius: 5px; font-family: inherit; }
.wh-search-suggestions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; padding-left: 2px; font-size: 11px; color: var(--wh-muted); }
.wh-search-suggestions a { display: inline-flex; align-items: center; gap: 4px; }
.wh-search-suggestions svg { width: 12px; height: 12px; }
.wh-search-suggestions a:hover { color: var(--wh-blue); }
.wh-section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 20px; }
.wh-section-head h2 { margin: 0; font-size: 22px; line-height: 1.4; font-weight: 720; letter-spacing: -.6px; }
.wh-section-head p { color: var(--wh-muted); margin: 5px 0 0; font-size: 12px; }
.wh-text-link { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--wh-blue) !important; }
.wh-text-link svg { width: 15px; height: 15px; }
.wh-featured-layout { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(280px,1fr); gap: 24px; }
.wh-lead { position: relative; overflow: hidden; border-radius: 16px; background: #193d65; min-width: 0; }
.wh-lead > a { display: block; position: relative; height: 100%; min-height: 410px; color: #fff; }
.wh-lead-image { position: absolute; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; opacity: .85; }
.wh-lead > a:hover .wh-lead-image { transform: scale(1.035); }
.wh-lead-shade { position: absolute; inset: 0; background: linear-gradient(180deg,#0c1a2a05 8%,#0c1a2a50 30%,#0c1a2aed 100%); }
.wh-lead-copy { position: absolute; inset: auto 28px 25px; }
.wh-lead-tag { display: inline-block; font-size: 10px; letter-spacing: .3px; font-weight: 650; background: #ffffff24; padding: 4px 10px; border: 1px solid #ffffff30; border-radius: 5px; margin-bottom: 13px; }
.wh-lead-copy h2 { font-size: clamp(23px,2.3vw,30px); line-height: 1.36; letter-spacing: -.7px; font-weight: 720; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; color: #fff; }
.wh-lead-copy > p { margin: 11px 0 0; font-size: 12px; color: #e3eaf4; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wh-lead-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 21px; padding-top: 15px; border-top: 1px solid #ffffff35; font-size: 10px; color: #d7e1ee; }
.wh-lead-bottom > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-lead-read { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 600; color: #fff; }
.wh-lead-read svg { width: 16px; height: 16px; }
.wh-trending { background: var(--wh-surface); border: 1px solid var(--wh-line); padding: 23px 23px 14px; border-radius: 16px; min-width: 0; }
.wh-trending-head { display: flex; align-items: center; gap: 9px; }
.wh-trending-head h2 { font-size: 16px; line-height: 1.5; margin: 0; font-weight: 700; }
.wh-live-dot { width: 7px; height: 7px; background: #e0a359; border-radius: 50%; box-shadow: 0 0 0 4px #e0a35915; }
.wh-trending-desc { font-size: 11px; margin: 5px 0 15px; color: var(--wh-muted); }
.wh-trending ol { margin: 0; padding: 0; list-style: none; }
.wh-trending li { display: flex; gap: 13px; padding: 12px 0; border-top: 1px solid var(--wh-line); }
.wh-rank { font-size: 17px; font-weight: 500; line-height: 1.4; color: #9faabc; font-variant-numeric: tabular-nums; padding-top: 2px; }
.wh-trending li > div { min-width: 0; }
.wh-trending li a { font-size: 13px; font-weight: 600; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wh-trending li a:hover { color: var(--wh-blue); }
.wh-trend-count { display: block; margin-top: 4px; font-size: 9px; color: var(--wh-muted); }
.wh-topics { margin-top: 42px; padding: 30px 0; border-block: 1px solid var(--wh-line); scroll-margin-top: 130px; }
.wh-topic-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.wh-topic { display: flex; align-items: center; gap: 9px; padding: 10px 8px; min-width: 0; border-radius: 9px; transition: background .18s; }
.wh-topic:hover { background: var(--wh-surface); }
.wh-topic-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: hsl(var(--topic-hue) 45% 45%); background: hsl(var(--topic-hue) 55% 92%); flex-shrink: 0; }
html[data-theme="dark"] .wh-topic-icon { color: hsl(var(--topic-hue) 65% 75%); background: hsl(var(--topic-hue) 25% 24%); }
.wh-topic-icon svg { width: 17px; height: 17px; }
.wh-topic > span:nth-child(2) { min-width: 0; }
.wh-topic strong { display: block; font-size: 12px; font-weight: 650; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-topic small { display: block; font-size: 9px; color: var(--wh-muted); margin-top: 2px; }
.wh-topic > svg { display: none; }
.wh-latest { margin-top: 38px; scroll-margin-top: 130px; }
.wh-article-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.wh-article { min-width: 0; overflow: hidden; border: 1px solid var(--wh-line); border-radius: 13px; background: var(--wh-surface); transition: transform .2s,border-color .2s,box-shadow .2s; }
.wh-article:hover { transform: translateY(-3px); border-color: #a7bfec; box-shadow: 0 9px 26px #152c4e0b; }
.wh-article-link { height: 100%; display: flex; flex-direction: column; }
.wh-article-image { overflow: hidden; aspect-ratio: 1.95; background: var(--wh-soft); }
.wh-article-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.wh-article:hover img { transform: scale(1.025); }
.wh-article-copy { padding: 19px 20px 16px; display: flex; flex-direction: column; flex: 1; }
.wh-article h3 { font-size: 16px; font-weight: 680; letter-spacing: -.2px; line-height: 1.55; margin: 0 0 9px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wh-article-copy > p { color: var(--wh-muted); font-size: 12px; line-height: 1.8; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wh-byline { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--wh-muted); padding-top: 10px; margin-top: auto; border-top: 1px solid var(--wh-line); }
.wh-avatar { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--wh-soft); color: var(--wh-blue); font-size: 8px; font-weight: 700; flex-shrink: 0; }
.wh-author { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-byline time { white-space: nowrap; margin-left: auto; }
.wh-dot { display: none; }
.wh-empty { color: var(--wh-muted); grid-column: 1/-1; padding: 30px; }
.wh-books { margin-top: 42px; border: 1px solid var(--wh-line); border-radius: 16px; padding: 30px; display: grid; grid-template-columns: 1.05fr 1.6fr; gap: 35px; background: var(--wh-books); }
.wh-books-brand { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: 1.6px; font-weight: 750; color: var(--wh-muted); }
.wh-books-brand img { width: 26px; height: 26px; }
.wh-books-intro h2 { font-size: 25px; font-weight: 720; line-height: 1.35; letter-spacing: -.6px; margin: 13px 0 10px; }
.wh-books-intro p { font-size: 12px; line-height: 1.8; color: var(--wh-muted); margin: 0; max-width: 365px; }
.wh-books-cta { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--wh-ink); border-radius: 7px; margin-top: 20px; font-size: 11px; font-weight: 650; }
.wh-books-cta:hover { color: var(--wh-surface); background: var(--wh-ink); }
.wh-books-cta svg { width: 14px; height: 14px; }
.wh-book-picks { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; align-items: center; }
.wh-book { text-align: center; min-width: 0; }
.wh-book-cover { height: 125px; width: 89px; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; background: var(--book-color); color: #f8f1d8; border-radius: 3px 6px 6px 3px; border: 1px solid #ffffff25; box-shadow: inset 5px 0 0 #0000001f,inset 7px 0 1px #ffffff14,4px 5px 0 -1px #dfdacd,7px 10px 14px #00000014; position: relative; transition: transform .2s; }
.wh-book-cover::after { content: ''; position: absolute; inset: 12px 11px 12px 16px; border: 1px solid #f8f1d838; }
.wh-book-cover > span { font-family: 'Noto Serif TC','Songti SC','PMingLiU',serif; writing-mode: vertical-rl; font-size: 20px; letter-spacing: 3px; z-index: 1; }
.wh-book:hover .wh-book-cover { transform: translateY(-4px) rotate(-2deg); }
.wh-book-copy strong { display: block; font-size: 11px; line-height: 1.6; font-weight: 650; }
.wh-book-copy small { display: block; font-size: 10px; color: var(--wh-muted); margin-top: 3px; }
.wh-book-copy > span { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; color: var(--wh-muted); margin-top: 10px; }
.wh-book-copy svg { width: 11px; height: 11px; }
.wh-book:hover .wh-book-copy > span { color: var(--wh-blue); }
.wh-random { display: flex; align-items: center; gap: 18px; padding: 29px 0 0; margin-top: 4px; }
.wh-random-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--wh-blue); background: var(--wh-soft); flex-shrink: 0; }
.wh-random h2 { font-size: 15px; line-height: 1.5; margin: 0 0 3px; font-weight: 650; }
.wh-random p { font-size: 11px; color: var(--wh-muted); margin: 0; }
.wh-random > a { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--wh-blue); font-weight: 600; white-space: nowrap; margin-left: auto; }
.wh-random > a svg { width: 15px; height: 15px; }
.wiki-home-modern .wiki-footer { background: var(--wh-surface); border-top: 1px solid var(--wh-line); margin-top: 0; padding-top: 36px; }
.wiki-home-modern .wiki-footer-grid,.wiki-home-modern .wiki-footer-bottom { max-width: 1184px; margin-inline: auto; }
.wiki-home-modern .wiki-footer-col h4 { font-size: 10px; letter-spacing: 1px; color: var(--wh-ink); }
.wiki-home-modern .wiki-footer-col a,.wiki-home-modern .wiki-footer-brand p { font-size: 11px; color: var(--wh-muted); }
.wiki-home-modern .wiki-footer-bottom { font-size: 10px; color: var(--wh-muted); border-color: var(--wh-line); }
@media(min-width:1400px) { .wh-intro { padding-top: 54px; padding-bottom: 45px; } }
@media(max-width:1050px) {
  .wh-intro { gap: 28px; grid-template-columns: 1.1fr 1fr; }
  .wh-intro h1 { font-size: 31px; }
  .wh-featured-layout { grid-template-columns: minmax(0,1.5fr) minmax(275px,1fr); gap: 18px; }
  .wh-lead-copy { inset-inline: 23px; }
  .wh-lead-copy h2 { font-size: 26px; }
  .wh-topic-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .wh-article-grid { gap: 18px; }
  .wh-article-copy { padding: 16px; }
  .wh-article h3 { font-size: 15px; }
  .wh-books { grid-template-columns: .9fr 1.2fr; gap: 25px; padding: 25px; }
  .wh-book-picks { gap: 15px; }
}
@media(max-width:780px) {
  .wh-shell { padding-inline: 20px; }
  .wiki-home-modern .wiki-subheader__inner { padding-inline: 20px; gap: 14px; }
  .wiki-home-modern .wiki-subheader .search-container { --wiki-search-w: 210px; }
  .wh-intro { grid-template-columns: 1fr; gap: 24px; padding: 34px 0 32px; }
  .wh-intro h1 { font-size: 35px; }
  .wh-search-area { max-width: none; }
  .wh-search { min-height: 58px; }
  .wh-featured-layout { grid-template-columns: 1fr; }
  .wh-lead > a { min-height: 380px; }
  .wh-trending { padding: 22px 24px 12px; }
  .wh-trending ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; }
  .wh-trending li:last-child:nth-child(odd) { grid-column: 1/-1; }
  .wh-article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wh-topics { margin-top: 28px; }
  .wh-books { grid-template-columns: 1fr; gap: 28px; }
  .wh-books-intro p { max-width: 560px; }
  .wh-book-cover { height: 140px; width: 98px; }
  .wh-book-copy strong { font-size: 13px; }
  .wh-random { flex-wrap: wrap; }
  .wh-random > a { margin-left: 60px; }
}
@media(max-width:520px) {
  .wiki-home-modern { --wiki-subheader-h: 48px; }
  .wh-shell { padding: 0 16px 34px; }
  .wiki-home-modern .wiki-subheader__inner { padding-inline: 12px; gap: 8px; }
  .wiki-home-modern .wiki-subheader .search-container { display: none; }
  .wiki-home-modern .wiki-subheader .main-nav { justify-content: space-between; gap: 0; }
  .wiki-home-modern .wiki-subheader .main-nav a { font-size: 11px; padding: 6px 8px; }
  .wiki-home-modern .wiki-subheader .main-nav a:not(.nav-create) { display: inline-flex !important; align-items: center; }
  .wiki-home-modern .wiki-subheader .nav-create { display: none !important; }
  .wh-intro { padding-top: 29px; gap: 22px; }
  .wh-eyebrow { font-size: 9px; }
  .wh-intro h1 { font-size: 30px; letter-spacing: -1px; }
  .wh-intro-copy > p { font-size: 13px; }
  .wh-search span { font-size: 12px; }
  .wh-search kbd { display: none; }
  .wh-search-suggestions { gap: 14px; font-size: 10px; }
  .wh-section-head { align-items: start; gap: 13px; margin-bottom: 16px; }
  .wh-section-head h2 { font-size: 20px; }
  .wh-section-head p { font-size: 11px; }
  .wh-text-link { font-size: 10px; margin-top: 5px; gap: 4px; }
  .wh-text-link svg { width: 12px; height: 12px; }
  .wh-lead > a { min-height: 390px; }
  .wh-lead-copy { inset-inline: 20px; bottom: 22px; }
  .wh-lead-copy h2 { font-size: 24px; -webkit-line-clamp: 5; }
  .wh-lead-copy > p { font-size: 11px; }
  .wh-trending ol { display: block; }
  .wh-trending li { padding: 12px 0; }
  .wh-trending li a { font-size: 13px; }
  .wh-trend-count { font-size: 10px; }
  .wh-topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 8px; }
  .wh-topic { padding-inline: 0; }
  .wh-topic strong { font-size: 11px; }
  .wh-topic small { font-size: 10px; }
  .wh-article-grid { grid-template-columns: 1fr; gap: 18px; }
  .wh-article h3 { font-size: 17px; }
  .wh-article-copy > p { font-size: 12px; }
  .wh-article-image { aspect-ratio: 2; }
  .wh-article-copy { padding: 20px; }
  .wh-byline { font-size: 10px; }
  .wh-books { padding: 22px 18px; margin-top: 30px; gap: 25px; }
  .wh-books-intro h2 { font-size: 24px; }
  .wh-book-picks { grid-template-columns: 1fr; gap: 19px; }
  .wh-book { display: flex; align-items: center; gap: 20px; text-align: left; padding-top: 18px; border-top: 1px solid var(--wh-line); }
  .wh-book-cover { width: 55px; height: 79px; margin: 0 0 0 3px; flex-shrink: 0; }
  .wh-book-cover::after { inset: 7px 6px 7px 10px; }
  .wh-book-cover > span { font-size: 13px; letter-spacing: 1px; }
  .wh-book-copy strong { font-size: 13px; }
  .wh-book-copy small { font-size: 11px; }
  .wh-book-copy > span { font-size: 10px; margin-top: 7px; }
  .wh-random { gap: 12px; padding-top: 24px; }
  .wh-random > div { flex: 1; }
  .wh-random h2 { font-size: 14px; }
  .wh-random p { font-size: 11px; }
  .wh-random > a { margin-left: 54px; font-size: 12px; }
  .wiki-home-modern .wiki-footer-grid { gap: 22px; }
}
@media(prefers-reduced-motion:reduce) {
  .wh-shell *,.wh-shell *::before,.wh-shell *::after { transition: none !important; scroll-behavior: auto !important; }
}

.wiki-books-link::after { content: "↗"; font-size: .8em; margin-left: 5px; opacity: .7; }
