
/* 长文阅读与辅助信息层级 */
:root {
    --reading-line: 2.28;
    --reading-space: 1.55rem;
    --surface-soft: #F2F1E9;
}
.article-body {
    font-size: 15px;
    line-height: var(--reading-line);
    overflow-wrap: anywhere;
}
.article-body p + p { margin-top: var(--reading-space); }
.article-body strong { color: var(--deep); font-weight: 700; }
.article-body a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol {
    margin: 1.2rem 0 1.8rem;
    padding: 1.1rem 1.5rem 1.1rem 2.8rem;
    background: var(--surface-soft);
    color: #394944;
}
.article-body li { padding: .28rem 0; }
.article-body li::marker { color: var(--olive); }
.article-body blockquote {
    margin: 2rem 0;
    padding: 1rem 1.4rem;
    border-left: 3px solid var(--clay);
    background: var(--mist);
    color: #43524E;
}
.article-body blockquote p { margin: 0; }
.article-body h2 {
    margin: 2.7rem 0 1rem;
    color: var(--deep);
    font-family: var(--serif);
    font-size: 1.55rem;
    line-height: 1.55;
}
.article-body h3 {
    margin: 2rem 0 .7rem;
    color: var(--green);
    font-size: 1.12rem;
    line-height: 1.65;
}
.article-body hr {
    width: 100%;
    margin: 2.3rem 0;
    border: 0;
    border-top: 1px solid var(--line);
}
.article-body figure { margin: 2rem 0; }
.article-body figcaption {
    margin-top: .55rem;
    color: var(--muted);
    font-size: .78rem;
    text-align: center;
}
.article-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: .86rem;
}
.article-body th, .article-body td {
    padding: .7rem .8rem;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.article-body th { background: var(--mist); color: var(--deep); }
.article-body tr:nth-child(even) td { background: rgba(234,240,234,.35); }
.article-summary { max-width: 720px; }
.article-notice {
    border-radius: 0;
    box-shadow: inset 0 0 0 1px rgba(40,91,85,.04);
}
.article-notice strong { display: inline-flex; align-items: center; gap: .5rem; }
.article-notice strong::before {
    content: "";
    display: inline-block;
    width: .35rem;
    height: .35rem;
    background: var(--clay);
    border-radius: 50%;
}
.article-meta span + span { padding-left: 18px; border-left: 1px solid var(--line); }
.category-results .index-row:last-child { border-bottom-color: transparent; }
.category-results .row-main p { max-width: 720px; }
.category-aside { position: sticky; top: 24px; }
.aside-links a:hover { padding-left: 4px; color: var(--deep); }
.related-section .index-row { grid-template-columns: 4px minmax(0,1fr) 20px; }
.related-section .row-main h3 { font-size: 14px; }
.related-section .row-main p { font-size: 11px; }
.site-footer a:focus-visible, .site-footer a:hover { color: #F1C6B9; }
.button:focus-visible, .quiet-link:focus-visible, .section-more:focus-visible { outline-offset: 4px; }
::selection { color: #fff; background: var(--green); }
@media (min-width: 1200px) {
    .article-body { font-size: 16px; }
    .article-body > p { line-height: 2.3; }
    .article-shell { padding-top: 55px; }
}
@media (max-width: 980px) {
    .category-aside { position: static; }
    .article-body table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 720px) {
    .article-body { font-size: 14px; line-height: 2.12; }
    .article-body h2 { margin-top: 2.1rem; font-size: 1.35rem; }
    .article-body h3 { margin-top: 1.6rem; font-size: 1.05rem; }
    .article-body ul, .article-body ol { padding: .9rem 1rem .9rem 2.1rem; }
    .article-body blockquote { margin: 1.4rem 0; padding: .9rem 1rem; }
    .article-body th, .article-body td { padding: .55rem .65rem; }
    .article-notice { margin-top: 25px; padding: 15px 16px; }
    .category-aside { padding: 19px; }
    .related-section .section-heading { gap: 8px; }
}
@media print {
    body { color: #111; background: #fff; font-size: 11pt; }
    .site-header, .site-footer, .breadcrumb, .article-footer, .related-section,
    .nav-toggle, .skip-link { display: none !important; }
    .inner-page, .article-shell { width: 100%; max-width: none; padding: 0; margin: 0; }
    .article-header h1 { color: #111; font-size: 24pt; }
    .article-body { color: #222; font-size: 11pt; line-height: 1.8; }
    .article-notice { border: 1px solid #aaa; background: #fff; }
    a { color: #111; text-decoration: none; }
}

/* 可访问性与内容状态细节 */
:target { scroll-margin-top: 96px; }
.primary-nav a:focus-visible { outline-offset: 7px; }
.row-main h3 a, .discussion-item h3 a, .qa-list h3 a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.row-main h3 a:hover, .discussion-item h3 a:hover, .qa-list h3 a:hover { text-decoration: underline; }
.article-header .section-kicker { display: flex; align-items: center; gap: 9px; }
.article-header .section-kicker::before { content: ""; width: 18px; height: 2px; background: var(--clay); }
.article-body > p:first-child::first-letter {
    float: left;
    margin: .12em .12em 0 0;
    color: var(--green);
    font-family: var(--serif);
    font-size: 2.7em;
    line-height: .9;
}
.article-body > p:first-child { min-height: 2.5em; }
.article-notice p { max-width: 680px; }
.category-header .section-kicker { display: flex; align-items: center; gap: 8px; }
.category-header .section-kicker::before { content: ""; width: 17px; height: 2px; background: var(--clay); }
.category-results .row-meta { min-height: 18px; }
.category-results .row-arrow { align-self: center; }
.intro-aside li:hover { color: var(--deep); }
.footer-links a { text-underline-offset: 4px; }
.footer-links a:hover { text-decoration: underline; }
.singles-guide li::marker { color: var(--clay); }
.method-steps article:hover b { color: #fff; }
.qa-list article:hover > span { background: var(--green); }
.not-found .button { margin-top: 4px; }
@media (max-width: 720px) {
    :target { scroll-margin-top: 76px; }
    .article-body > p:first-child::first-letter { font-size: 2.25em; }
    .article-body > p:first-child { min-height: 0; }
    .section-more { align-self: flex-start; }
    .intro-links { gap: 14px 18px; }
    .intro-aside li { font-size: 12px; }
    .row-arrow { font-size: 16px; }
    .qa-list article { grid-template-columns: 24px minmax(0,1fr) 16px; gap: 10px; }
}
@media (hover: none) {
    .primary-nav a:hover::after { right: 100%; }
    .button:hover { transform: none; }
}

/* 高对比度、窄屏导航和打印辅助 */
@media (forced-colors: active) {
    a, button { forced-color-adjust: auto; }
    .brand-mark, .button-primary, .method-band, .qa-list article > span {
        border: 1px solid ButtonText;
    }
    .row-marker, .eyebrow span, .aside-rule { background: CanvasText; }
    .feature-main, .site-footer, .closing-strip { border: 1px solid CanvasText; }
}
@media (prefers-contrast: more) {
    :root {
        --line: rgba(23,53,50,.38);
        --line-strong: rgba(23,53,50,.68);
        --muted: #354640;
    }
    .row-meta, .copyright, .article-meta, .list-heading span { color: #394944; }
    .quiet-link, .section-more, .small-arrow { text-decoration: underline; text-underline-offset: 3px; }
}
.nav-toggle[aria-expanded="true"] { border-color: var(--green); background: var(--mist); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle span { transition: transform .18s ease, opacity .18s ease; }
.nav-open { overflow-x: hidden; }
.article-footer a:hover, .text-link-light:hover { text-decoration: underline; text-underline-offset: 4px; }
.feature-main .read-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 720px) {
    .primary-nav.is-open { animation: nav-reveal .16s ease-out; }
    .nav-toggle span { transform-origin: center; }
}
@keyframes nav-reveal {
    from { opacity: .4; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .primary-nav.is-open { animation: none; }
    .nav-toggle span { transition: none; }
}

/* 细节状态：链接悬停、键盘焦点和阅读区域边界 */
.breadcrumb a:focus-visible { outline-offset: 4px; }
.category-aside a:focus-visible { background: rgba(255,255,255,.65); }
.index-row:focus-within .row-marker { background: var(--clay); }
.discussion-item:focus-within .number-mark { color: var(--clay); }
.qa-list article:focus-within { background: rgba(255,255,255,.35); }
.article-notice a { color: var(--green); text-decoration: underline; }
.article-footer a:focus-visible { outline-offset: 5px; }
.site-footer .footer-name:focus-visible { outline-color: #F1C6B9; }
@media (max-width: 420px) {
    .brand-copy small { font-size: 9px; }
    .intro-copy h1 { letter-spacing: 0; }
    .intro-links .button { min-height: 44px; padding: 0 15px; }
    .singles-guide { padding: 17px; }
    .list-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
}
