/* AI Digest - Stylesheet
   Typography: sans-serif body, serif headings.
   Optimized for comfortable long-form reading of mixed Chinese/English content.
   Color identity: deep green (#1a6b3c) on cool white (#fafafa). */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Noto Serif SC Subset";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("/fonts/noto-serif-sc-subset.woff2") format("woff2");
}

/* ── Reset & Base ─────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
a { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

body {
    font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans SC",
                 "Source Han Sans SC", "Helvetica Neue", sans-serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #374151;
    background: #fafafa;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-break: strict;
    text-autospace: normal;
}

/* ── Container ────────────────────────── */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    overflow-x: hidden;
}

/* ── Navigation ───────────────────────── */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #1a6b3c;
    font-size: 0.95rem;
}

.site-nav .nav-title {
    font-weight: 700;
    color: #1a6b3c;
    text-decoration: none;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: color 0.2s, opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.site-nav .nav-title:hover {
    color: #155a31;
}

.site-nav .nav-title:active {
    opacity: 0.6;
    transition: opacity 0.05s;
}

.site-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav .nav-links li {
    display: flex;
    align-items: center;
}

.site-nav .nav-links a {
    display: inline-flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
    color: #1a1a1a;
}

.site-nav .nav-links a svg {
    flex-shrink: 0;
    margin-right: 0.35em;
}

/* ── Page Header (index/archive) ──────── */
.page-header {
    text-align: center;
    padding: 2.5rem 0 1.8rem;
}

.page-header h1 {
    font-family: "Songti SC", "Noto Serif SC Subset", "Noto Serif SC", "Source Han Serif SC",
                 Georgia, serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
}

.page-header p {
    font-size: 0.92rem;
    color: #999;
}

.page-subtitle {
    font-size: 0.95rem;
    color: #5a8a6a;
    font-weight: 400;
}

.page-tagline {
    font-size: 0.88rem;
    color: #888;
    letter-spacing: 0.03em;
}

.section-heading {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a6b3c;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d1fae5;
}

/* ── Article Header ───────────────────── */
header {
    text-align: center;
    padding: 2rem 0 0.5rem;
    margin-bottom: 0;
}

header h1 {
    font-family: "Songti SC", "Noto Serif SC Subset", "Noto Serif SC", "Source Han Serif SC",
                 Georgia, serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: 0.05em;
    line-height: 1.5;
    margin-bottom: 0.3rem;
}

.header-date {
    margin-right: 0.5rem;
}

.article-meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    color: #999;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
}

.article-meta a {
    color: #999;
    text-decoration: underline;
    text-decoration-color: rgba(153, 153, 153, 0.35);
    text-underline-offset: 2px;
}

.article-meta a:hover {
    text-decoration-color: #999;
}

/* ── Article Cover Image ──────────────── */
.article-cover {
    margin: 1.2rem 0;
}
.article-cover img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

/* ── Main Content ─────────────────────── */
main {
    overflow-wrap: break-word;
}

/* Article section cards */
.article-section {
    background: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.2rem;
}

.article-section > h2:first-child {
    margin-top: 0;
}

/* Article number (01, 02, 03) */
.article-num {
    font-family: "JetBrains Mono", monospace;
    font-size: 2.4rem;
    font-weight: 600;
    color: #b87848;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.35rem;
}

/* Section headings */
main h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.5rem;
    letter-spacing: 0.03em;
}

.article-section > h2 {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

main h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #155a31;
    margin: 2.5rem 0 0.6rem;
    line-height: 1.55;
}

main h3:first-child {
    margin-top: 0;
}

main p {
    margin: 1.2em 0;
    line-height: 1.85;
}

:lang(zh) main p {
    text-align: justify;
}

main strong {
    font-weight: 700;
    color: #1a1a1a;
}

/* Links */
main a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
    transition: border-color 0.15s;
}

main a:hover {
    border-bottom-color: #2563eb;
}

/* Blockquotes — regular */
main blockquote {
    border-left: 4px solid #b8d4c8;
    padding: 0.8rem 1.4rem;
    margin: 1.5em 0;
    color: #5a5a5a;
    font-size: 0.95em;
    background: #f7faf8;
    border-radius: 0 4px 4px 0;
}

/* Sources blockquote — special styling for > Sources: */
main blockquote:has(strong:first-child) {
    border-left: none;
    background: #f8f9fa;
    padding: 0.7rem 1.2rem;
    font-size: 0.85em;
    color: #888;
    border-radius: 4px;
}

main blockquote:has(strong:first-child) a {
    color: #888;
    border-bottom-color: rgba(136, 136, 136, 0.25);
    font-size: 0.95em;
}

main blockquote:has(strong:first-child) a:hover {
    color: #666;
    border-bottom-color: #888;
}

main blockquote:has(strong:first-child) strong {
    color: #999;
    font-weight: 600;
}

/* Fallback for browsers without :has() — class-based */
main blockquote.sources-block {
    border-left: none;
    background: #f8f9fa;
    padding: 0.7rem 1.2rem;
    font-size: 0.85em;
    color: #888;
    border-radius: 4px;
}

main blockquote.sources-block a {
    color: #888;
    border-bottom-color: rgba(136, 136, 136, 0.25);
    font-size: 0.95em;
}

main blockquote.sources-block a:hover {
    color: #666;
    border-bottom-color: #888;
}

main blockquote.sources-block strong {
    color: #999;
    font-weight: 600;
}

/* Sources list — vertical layout with domain labels */
.sources-list {
    margin-top: 1.2rem;
    background: #f8f9fa;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
}

.sources-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #bbb;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.source-item {
    display: block;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: #999;
    text-decoration: none;
    border-bottom: none;
    transition: color 0.15s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

main .source-item {
    border-bottom: none;
}

.source-item:hover {
    color: #666;
}

.source-domain {
    display: inline;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.68rem;
    color: #aaa;
    background: #eee;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    margin-left: 0.4rem;
    white-space: nowrap;
}

/* Quick news inline source badge */
.qn-source {
    text-decoration: none;
    border-bottom: none;
}

.qn-source .source-domain {
    margin-left: 0;
    vertical-align: middle;
}

.qn-source:hover .source-domain {
    background: #e0e0e0;
}

/* Lists */
main ul, main ol {
    padding-left: 1.5rem;
    margin: 1em 0;
}

main li {
    margin: 0.7rem 0;
    line-height: 1.9;
}

main li strong {
    color: #1a1a1a;
}

/* Horizontal rules — between articles */
main hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2.8rem 0;
}

/* Inline code */
main code {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85em;
    background: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

/* "Why it matters" emphasis */
main p > strong:first-child {
    color: #1a6b3c;
}

/* ── Quick News Section ──────────────── */
.quick-news-section {
    background: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.2rem;
}

.quick-news-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.8rem 0;
    border-top: 1px solid #f0f0f0;
}

.quick-news-item:first-child {
    border-top: none;
    padding-top: 0;
}

.quick-news-item .paper-num {
    font-size: 1.8rem;
    color: #ccc;
    margin-top: 0.25rem;
}

.quick-news-body {
    flex: 1;
}

.quick-news-body p {
    font-size: 0.95rem;
    line-height: 1.75;
    margin: 0.2em 0;
}

.quick-news-body p:first-child {
    margin-top: 0;
}

.quick-news-body p strong:first-child {
    display: block;
    font-size: 1rem;
    color: #1a1a1a;
}

/* ── Observation Section ──────────────── */
.section-observation {
    background: #f0f7f4 !important;
    border-left: 4px solid #6ba88a;
    border-radius: 0 6px 6px 0 !important;
}

.section-observation h2 {
    font-size: 1rem;
    color: #3d7a5a;
}

.section-observation p {
    color: #4a6b5a;
}

.section-observation strong {
    color: #1a5a3c;
}

/* ── Paper / Article Number ───────────── */
.paper-num {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a6b3c;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Tags ─────────────────────────────── */
.paper-tag {
    display: inline-block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #5a8a6a;
    background: #ecfdf5;
    padding: 0.18em 0.55em 0.22em;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    vertical-align: baseline;
    line-height: 1;
    text-decoration: none;
    border-bottom: none;
}

a.paper-tag:hover {
    background: #d1fae5;
    color: #3d7a5a;
}

/* Key point tags */
.key-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.2rem;
}

.key-tag {
    display: inline-block;
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
}

/* ── Homepage: Featured Card (Latest Digest) ── */
.featured-card {
    position: relative;
    display: block;
    background: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 8px;
    border-top: 3px solid #1a6b3c;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.featured-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.featured-card .card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.featured-divider {
    display: block;
    width: 50px;
    height: 3px;
    background: #1a6b3c;
    margin-bottom: 1.5rem;
}

.featured-card .card-date {
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    color: #999;
    letter-spacing: 0.02em;
    margin-bottom: 0.6rem;
}

.featured-card .card-title {
    font-family: "Songti SC", "Noto Serif SC Subset", "Noto Serif SC", "Source Han Serif SC",
                 Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.featured-card .card-numbered {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.featured-card .card-numbered li {
    display: flex;
    gap: 0.8rem;
    padding: 0.45rem 0;
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    align-items: baseline;
}

.featured-card .card-numbered li .num {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #b87848;
    flex-shrink: 0;
    width: 1.8rem;
    text-align: right;
}

.featured-card .card-numbered strong {
    font-weight: 650;
    color: #1a1a1a;
}

.featured-card .card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #1a6b3c;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.featured-card .card-read-more:hover {
    color: #155a31;
}

/* ── Homepage: Digest Cards (Older) ───── */
.article-list {
    list-style: none;
    padding: 0;
}

.article-card {
    position: relative;
    background: #ffffff;
    padding: 1.6rem 2rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.article-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.article-card:active {
    transform: translateY(0) scale(0.985);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.1s, transform 0.1s;
}

.article-card .card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card .card-header {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.article-card .card-date {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.88rem;
    color: #999;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.article-card .card-stat {
    position: absolute;
    top: 1.6rem;
    right: 2rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: #bbb;
    letter-spacing: 0.02em;
}

.article-card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.5;
}

.article-card .card-numbered {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-card .card-numbered li {
    display: flex;
    gap: 0.8rem;
    padding: 0.35rem 0;
    font-size: 0.92rem;
    color: #888;
    line-height: 1.7;
    align-items: baseline;
    transition: color 0.3s ease;
}

.article-card .card-numbered li .num {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ddd;
    flex-shrink: 0;
    width: 1.8rem;
    text-align: right;
}

.article-card .card-numbered li.lead {
    font-size: 1.13rem;
    color: #333;
    line-height: 1.6;
    padding-bottom: 0.45rem;
    margin-bottom: 0.15rem;
}

.article-card .card-numbered li.lead .num {
    color: #b87848;
}

.article-card .card-numbered strong {
    font-weight: 650;
    color: #1a1a1a;
}

.article-card:hover .card-numbered li {
    color: #666;
}

.view-all {
    text-align: center;
    margin-top: 1.5rem;
}
.view-all a {
    color: #666;
    font-size: 0.9rem;
}

/* ── Share Bar ────────────────────────── */
.share-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2.5rem;
    padding-top: 1.8rem;
    border-top: 1px solid #e5e7eb;
}

.share-label {
    font-size: 0.82rem;
    color: #bbb;
    margin-right: 0.2rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: #999;
    text-decoration: none;
    padding: 0.3rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 100px;
    background: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.5;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.share-btn:hover {
    color: #666;
    border-color: #d1d5db;
    background: #f0fdf4;
}

.share-btn svg {
    flex-shrink: 0;
}

.share-copy.copied {
    color: #1a6b3c;
    border-color: #1a6b3c;
}

/* WeChat QR popover */
.share-wechat {
    position: relative;
}

.wechat-qr-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: popIn 0.12s ease;
}

.wechat-qr-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #fff;
}

.wechat-qr-popover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #e5e7eb;
}

@keyframes popIn { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.wechat-qr-title {
    font-size: 0.8rem;
    color: #999;
    margin: 0 0 0.8rem;
    white-space: nowrap;
}

.wechat-qr-canvas {
    display: block;
    margin: 0 auto;
    border-radius: 3px;
}

/* ── WeChat OA QR trigger & popover ───── */
.oa-qr-trigger {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: color 0.15s;
}

.site-nav .nav-links .oa-qr-trigger {
    color: #666;
}

.site-nav .nav-links .oa-qr-trigger:hover {
    color: #1a1a1a;
}

.footer-links .oa-qr-trigger {
    color: #999;
    text-decoration: none;
}

.footer-links .oa-qr-trigger:hover {
    color: #666;
}

.oa-qr-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    animation: popIn 0.12s ease;
}

.oa-qr-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #fff;
}

.oa-qr-popover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #e5e7eb;
}

.oa-qr-popover.below {
    bottom: auto;
    top: calc(100% + 10px);
}

.oa-qr-popover.below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #fff;
}

.oa-qr-popover.below::before {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #e5e7eb;
}

.oa-qr-title {
    font-size: 0.8rem;
    color: #999;
    margin: 0 0 0.8rem;
    white-space: nowrap;
}

.oa-qr-img {
    display: block;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 3px;
}

/* ── Archive Page ─────────────────────── */
.archive-section {
    margin-bottom: 2.5rem;
}

.archive-section h2 {
    font-family: "Songti SC", "Noto Serif SC Subset", "Noto Serif SC", "Source Han Serif SC",
                 Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e5e7eb;
}

.archive-list {
    list-style: none;
    padding: 0;
}

.archive-list li {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.archive-list .archive-date {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    color: #999;
    flex-shrink: 0;
    min-width: 5.5rem;
}

.archive-list a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
}

.archive-list a:hover {
    border-bottom-color: #2563eb;
}

/* ── Related Digests ──────────────────── */
.related-section {
    margin-top: 2rem;
}

.related-section h2 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.8rem;
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-card {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    background: #ffffff;
    padding: 1rem 1.4rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.related-card-date {
    flex-shrink: 0;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: #bbb;
}

.related-card-title {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}

.related-card:hover .related-card-title {
    color: #1a1a1a;
}

.related-archive {
    margin-top: 0.8rem;
    font-size: 0.85rem;
}

.related-archive a {
    color: #999;
    text-decoration: none;
    transition: color 0.15s;
}

.related-archive a:hover {
    color: #666;
}

/* ── Content Pages (methodology, whatsnew, etc.) ── */
/* Shared card style for all content pages.
   Typography inherits from main h2/h3/p — do NOT add font-size overrides here. */
.methodology-content,
.whatsnew-content {
    background: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.methodology-content h2 {
    margin-top: 2.2rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.45rem;
}

.methodology-content h2:first-child {
    margin-top: 0;
}

.methodology-content h3 {
    margin-top: 1.2rem;
    margin-bottom: 0.35rem;
    color: #333;
}

.methodology-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.methodology-content th,
.methodology-content td {
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.45rem 0.4rem;
}

.methodology-content th {
    color: #666;
    font-weight: 600;
}

.methodology-cover {
    margin: 2.5rem 0 0;
    text-align: center;
}

.methodology-cover img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Timeline entry — date left, dot center, content right */
.wn-entry {
    position: relative;
    padding-left: 9rem;
    padding-bottom: 2.5rem;
}

.wn-entry:last-child {
    padding-bottom: 0;
}

/* Date — left column */
.wn-date {
    position: absolute;
    left: 0;
    top: calc(0.69rem - 0.39rem);
    width: 6.8rem;
    text-align: right;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    color: #999;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* Dot — vertically centered with h2 first line */
.wn-entry::before {
    content: '';
    position: absolute;
    left: 7.5rem;
    top: calc(0.69rem - 5px);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a6b3c;
    z-index: 1;
}

.wn-entry:not(:first-child)::before {
    width: 8px;
    height: 8px;
    left: calc(7.5rem - 1px);
    top: calc(0.69rem - 6px);
    background: #fafafa;
    border: 2px solid #d8d6cf;
}

/* Connecting line */
.wn-entry::after {
    content: '';
    position: absolute;
    left: calc(7.5rem + 4px);
    top: calc(0.69rem + 5px);
    bottom: calc(-0.69rem + 4px);
    width: 2px;
    background: #e8e6df;
}

.wn-entry:not(:first-child)::after {
    top: calc(0.69rem + 4px);
}

.wn-entry:last-child::after {
    display: none;
}

/* Content — right column */
.wn-entry h2 {
    margin: 0 0 0.6rem;
    font-size: 1.15rem;
    line-height: 1.2;
}

.wn-entry p {
    font-size: 0.95rem;
    color: #444;
    margin: 0.4em 0;
}

/* ── Sources Detail Page ─────────────── */
.sources-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.sources-back {
    display: inline-block;
    font-size: 0.85rem;
    color: #999;
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.15s;
}

.sources-back:hover {
    color: #666;
}

.sources-header h1 {
    font-family: "Songti SC", "Noto Serif SC Subset", "Noto Serif SC", "Source Han Serif SC",
                 Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
}

.sources-summary {
    font-size: 0.92rem;
    color: #999;
}

.sources-section {
    margin-bottom: 2rem;
}

.source-entry {
    background: #ffffff;
    padding: 1rem 1.4rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 0.5rem;
}

.source-entry-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 0.4rem;
    transition: color 0.15s;
}

.source-entry-title:hover {
    color: #1a6b3c;
}

.source-entry-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.source-pill {
    display: inline-block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.68rem;
    color: #aaa;
    background: #eee;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    white-space: nowrap;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.68rem;
    font-weight: 600;
    color: #1a6b3c;
    background: #ecfdf5;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    margin-left: auto;
}

.article-card a.card-stat {
    text-decoration: none;
    color: #bbb;
    transition: color 0.15s;
}

.article-card a.card-stat:hover {
    color: #1a6b3c;
}

@media (max-width: 740px) {
    .sources-header h1 { font-size: 1.25rem; }
    .source-entry { padding: 0.8rem 1rem; }
}

/* ── Search (Pagefind) ────────────────── */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.pagefind-ui {
    --pagefind-ui-scale: 1;
    --pagefind-ui-primary: #1a6b3c;
    --pagefind-ui-text: #333;
    --pagefind-ui-background: #fff;
    --pagefind-ui-border: #e5e7eb;
    --pagefind-ui-tag: #ecfdf5;
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: 8px;
    --pagefind-ui-font: inherit;
}

.pagefind-ui .pagefind-ui__search-input {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.pagefind-ui .pagefind-ui__search-input::placeholder {
    font-family: inherit;
    font-weight: 400;
    color: #aaa;
}

.pagefind-ui .pagefind-ui__result-link {
    color: #1a6b3c;
    font-weight: 600;
}

.pagefind-ui .pagefind-ui__result-link:hover {
    text-decoration: underline;
}

.pagefind-ui .pagefind-ui__result-excerpt {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
}

.pagefind-ui mark {
    background: #d1fae5;
    color: inherit;
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

/* ── Subscribe Form ────────────────────── */
.subscribe-box {
    background: #ffffff;
    padding: 1.8rem 2.2rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subscribe-box h3 {
    font-family: "Songti SC", "Noto Serif SC Subset", "Noto Serif SC", "Source Han Serif SC",
                 Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #1a1a1a;
}

.subscribe-box p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

.subscribe-box form {
    display: flex;
    gap: 0.5rem;
    max-width: 420px;
    margin: 0 auto;
}

.subscribe-box input[type="email"] {
    flex: 1;
    padding: 0.55rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
}

.subscribe-box input[type="email"]:focus {
    outline: none;
    border-color: #1a6b3c;
}

.subscribe-box button {
    padding: 0.55rem 1.3rem;
    background: #1a6b3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.subscribe-box button:hover {
    background: #155a31;
}

.subscribe-box button:disabled {
    opacity: 0.6;
    cursor: default;
}

.subscribe-msg {
    font-size: 0.92rem;
    margin-top: 0.8rem;
    margin-bottom: 0;
}

.subscribe-ok {
    color: #16753d;
}

.subscribe-err {
    color: #c23028;
}

/* ── Footer ───────────────────────────── */
footer {
    text-align: center;
    padding: 3.5rem 0 1.5rem;
    font-size: 0.8rem;
    color: #999;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    padding-top: 2rem;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #666;
}

.footer-dot {
    color: #ccc;
}

.footer-copyright {
    color: #999;
}

/* ── Error Page (404) ─────────────────── */
.error-page {
    text-align: center;
    padding: 6rem 1rem 4rem;
}

.error-code {
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    color: #e5e7eb;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.error-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.75rem;
}

.error-desc {
    font-size: 1rem;
    color: #888;
    margin: 0 0 0.25rem;
}

.error-suggestion {
    font-size: 0.9rem;
    color: #aaa;
    margin: 0 0 2.5rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.error-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid #d1d5db;
    color: #555;
    background: #fff;
}

.error-btn:hover {
    border-color: #9ca3af;
    color: #333;
}

.error-btn.primary {
    background: #1a6b3c;
    color: #fff;
    border-color: #1a6b3c;
}

.error-btn.primary:hover {
    background: #155a31;
    border-color: #155a31;
}

/* ── Responsive ───────────────────────── */
@media (max-width: 1024px) {
    .container { padding: 2rem; }
}

@media (max-width: 740px) {
    body { font-size: 1.1rem; }
    .container { padding: 1.25rem; }

    /* Navigation */
    .site-nav { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
    .site-nav .nav-links { gap: 1rem; }

    /* Headers */
    header { padding: 1.5rem 0 0.5rem; }
    header h1 { font-size: 1.25rem; }
    .page-header h1 { font-size: 1.5rem; }

    /* Content */
    main h2 { margin-top: 3rem; font-size: 1.2rem; }
    main h3 { margin-top: 2rem; }
    .article-section { padding: 2rem 1.5rem; }
    .article-num { font-size: 1.8rem; }
    .quick-news-section { padding: 2rem 1.5rem; }

    /* Featured card */
    .featured-card { padding: 1.8rem 1.5rem; }
    .featured-card .card-title { font-size: 1.25rem; }
    .featured-card .card-numbered li { font-size: 0.92rem; }

    /* Subscribe */
    .subscribe-box { padding: 1.5rem; }
    .subscribe-box form { flex-direction: column; }

    /* Article cards */
    .article-card { padding: 1.4rem 1.5rem; }
    .article-card .card-stat { top: 1.4rem; right: 1.5rem; }
    .article-card .card-header { gap: 0.2rem; }

    /* Share */
    .share-bar { gap: 0.4rem; flex-wrap: wrap; }
    .share-btn { font-size: 0.78rem; padding: 0.25rem 0.7rem; }
    .share-bar.has-native .share-btn:not(.share-native):not(.share-copy) { display: none; }
    .wechat-qr-popover { left: 0; transform: none; }
    .wechat-qr-popover::after, .wechat-qr-popover::before { left: 1.5rem; transform: none; }
    .oa-qr-popover { left: 0; transform: none; }
    .oa-qr-popover.below { left: 0; transform: none; }
    .oa-qr-popover::after, .oa-qr-popover::before { left: 1.5rem; transform: none; }
    .oa-qr-popover.below::after, .oa-qr-popover.below::before { left: 1.5rem; transform: none; }

    /* Methodology & Whatsnew */
    .methodology-content, .whatsnew-content { padding: 2rem 1.5rem; }
    .wn-entry { padding-left: 1.8rem; }
    .wn-date { position: static; width: auto; text-align: left; margin-bottom: 0.4rem; }
    .wn-entry::before { left: 0; }
    .wn-entry:not(:first-child)::before { left: 1px; }
    .wn-entry::after { left: 4px; }

    /* Related */
    .related-card { flex-direction: column; gap: 0.2rem; padding: 0.8rem 1rem; }

    /* Tags */
    .key-tags { gap: 0.4rem; }
    .key-tag { font-size: 0.78rem; padding: 0.25rem 0.7rem; }

    /* Sources */
    .source-item { display: flex; flex-direction: column; gap: 0.1rem; white-space: normal; }
    .source-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .source-domain { margin-left: 0; align-self: flex-start; }

    /* Archive */
    .archive-list li { flex-direction: column; gap: 0.15rem; }
    .archive-list .archive-date { min-width: 0; }

    /* Error page */
    .error-page { padding: 4rem 1rem 3rem; }
    .error-code { font-size: 5rem; }
    .error-heading { font-size: 1.25rem; }

}

/* ── Scroll Reveal ────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children slightly */
.reveal:nth-child(2) { transition-delay: 0.06s; }
.reveal:nth-child(3) { transition-delay: 0.12s; }
.reveal:nth-child(4) { transition-delay: 0.18s; }

/* ── Lightbox ─────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* ── Print ────────────────────────────── */
@media print {
    body { background: #fff; }
    .container { padding: 0; }
    .article-section { box-shadow: none; padding: 0; background: #fff; }
    .quick-news-section { box-shadow: none; padding: 0; background: #fff; }
    .featured-card { box-shadow: none; }
    .article-card { box-shadow: none; }
    .site-nav, .subscribe-box { display: none; }
    .share-bar { display: none; }
    footer { display: none; }
    .reveal { opacity: 1; transform: none; }
}

/* ── Section Overview (article list under title) ── */
.section-overview {
    list-style: none;
    padding-left: 0;
    margin: 0.8rem 0 0;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #999;
    text-align: left;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    cursor: pointer;
}

.section-overview.expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.section-overview li {
    display: inline;
}

.section-overview li::before {
    content: " ｜ ";
}

.section-overview li:first-child::before {
    content: none;
}

/* Divider after overview (on header to avoid -webkit-box clipping) */
header:has(.section-overview)::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: #1a6b3c;
    margin: 1.5rem auto 0;
}

header:has(.section-overview) {
    padding-bottom: 1.8rem;
}

/* English typography overrides */
html[lang="en"] body {
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    letter-spacing: 0;
    line-height: 1.7;
}

html[lang="en"] header h1 {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.02em;
}

html[lang="en"] main h2 {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}

html[lang="en"] main h3 {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}

html[lang="en"] main p {
    text-align: left;
    line-height: 1.7;
}

html[lang="en"] .page-header h1 {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.02em;
}

html[lang="en"] .subscribe-box h3 {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[lang="en"] .archive-section h2 {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Keep sans-serif for UI elements that shouldn't inherit serif body */
html[lang="en"] .site-nav,
html[lang="en"] .article-card,
html[lang="en"] .featured-card,
html[lang="en"] .card-date,
html[lang="en"] .card-stat,
html[lang="en"] .subscribe-box,
html[lang="en"] .subscribe-box input,
html[lang="en"] .subscribe-box button,
html[lang="en"] footer,
html[lang="en"] .section-overview,
html[lang="en"] .sources-header {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[lang="en"] .section-overview li::before {
    content: " ｜ ";
}

html[lang="en"] .section-overview li:first-child::before {
    content: none;
}

