/* ============================================================
   article.css — 博客文章阅读页 v4（read-*）
   ============================================================ */
body:has(main.read) #main-nav { display: none !important; }
body:has(main.read) .read-bar { top: 0; }
body:has(main.read) .read-hero { padding-top: 28px; }
body:has(main.read) .read-rail { top: 20px; }
main.read { position: relative; z-index: 1; padding-top: 0; padding-bottom: 0; }
.read-bar { position: fixed; top: var(--nav-height, 68px); left: 0; width: 100%; height: 2px; z-index: 9998; pointer-events: none; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, rgba(22, 101, 52, 0.85), #22c55e, rgba(167, 243, 208, 0.75)); box-shadow: 0 0 10px rgba(74, 222, 128, 0.22); transition: transform 0.1s ease-out; }
.read-hero { padding: calc(var(--nav-height, 68px) + 28px) 0 40px; border-bottom: 1px solid rgba(167, 243, 208, 0.1); background: radial-gradient(ellipse 90% 80% at 50% -30%, rgba(74, 222, 128, 0.12) 0%, transparent 55%), linear-gradient(180deg, rgba(18, 40, 32, 0.95) 0%, rgba(14, 34, 26, 0.94) 55%, rgba(12, 30, 24, 0.96) 100%); }
.read-hero__inner { max-width: var(--nav-inner-max, 1180px); margin: 0 auto; padding: 0 20px; }
.read-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: rgba(187, 247, 208, 0.95); text-decoration: none; margin-bottom: 16px; }
.read-back:hover { color: #ecfdf5; }
.read-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; font-weight: 600; color: rgba(236, 253, 245, 0.42); margin: 0 0 18px; }
.read-crumb a { color: rgba(167, 243, 208, 0.88); text-decoration: none; }
.read-crumb-sep { color: rgba(236, 253, 245, 0.22); user-select: none; }
.read-crumb-current { color: rgba(236, 253, 245, 0.55); font-weight: 700; }
.read-chip { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(236, 253, 245, 0.92); background: rgba(167, 243, 208, 0.12); border: 1px solid rgba(167, 243, 208, 0.28); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.read-title { font-size: clamp(26px, 4.2vw, 40px); font-weight: 900; line-height: 1.15; letter-spacing: -0.045em; color: var(--fr-mist, #ecfdf5); margin: 0 0 14px; max-width: 18em; }
.read-meta { margin: 0; font-size: 14px; font-weight: 600; color: rgba(236, 253, 245, 0.5); }
.read-stage { padding: 32px 0 48px; background-color: rgba(10, 26, 20, 0.98); background-image: radial-gradient(ellipse 110% 70% at 8% -5%, rgba(74, 222, 128, 0.11) 0%, transparent 52%), radial-gradient(ellipse 90% 55% at 102% 108%, rgba(22, 101, 52, 0.42) 0%, transparent 48%), repeating-linear-gradient(118deg, transparent 0, transparent 14px, rgba(167, 243, 208, 0.028) 14px, rgba(167, 243, 208, 0.028) 15px), radial-gradient(rgba(167, 243, 208, 0.038) 1px, transparent 1px); background-size: auto, auto, auto, auto, 20px 20px; background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat; }
.read-wrap { max-width: var(--nav-inner-max, 1180px); margin: 0 auto; padding: 0 20px; }
.read-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px 36px; align-items: start; }
.read-paper { position: relative; color: rgba(226, 245, 236, 0.92); border-radius: 22px; border: 1px solid rgba(74, 222, 128, 0.2); background-color: rgba(14, 34, 27, 0.92); background-image: radial-gradient(ellipse 95% 65% at 50% -18%, rgba(94, 234, 212, 0.1) 0%, transparent 46%), linear-gradient(172deg, rgba(20, 48, 38, 0.96) 0%, rgba(12, 32, 26, 0.98) 42%, rgba(10, 26, 22, 0.99) 100%); }
.read-prose { position: relative; z-index: 1; padding: 36px clamp(22px, 4.5vw, 44px) 40px; font-size: 17px; line-height: 1.92; letter-spacing: 0.018em; }
.read-sec + .read-sec { margin-top: 8px; padding-top: 28px; border-top: 1px solid rgba(167, 243, 208, 0.12); }
.read-lead { font-size: 1.08em; line-height: 1.88; color: rgba(220, 235, 228, 0.95); padding: 18px 20px 20px 22px; margin: 0 0 0.5em; border-radius: 14px; background: rgba(8, 22, 18, 0.45); border: 1px solid rgba(74, 222, 128, 0.16); border-left: 4px solid rgba(74, 222, 128, 0.5); }
.read-prose h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: clamp(1.15rem, 2.2vw, 1.35rem); font-weight: 900; color: #bbf7d0; margin: 0 0 0.85rem; padding: 0 0 0.55rem; line-height: 1.35; border-bottom: 1px solid rgba(74, 222, 128, 0.22); }
.read-prose h2::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(145deg, #86efac, #22c55e); }
.read-prose p { margin: 0 0 1.1em; color: rgba(204, 226, 214, 0.88); }
.read-prose strong { color: #ecfdf5; font-weight: 800; }
.read-prose a { color: #5eead4; font-weight: 700; text-decoration: underline; }
.read-prose code { font-size: 0.88em; background: rgba(6, 18, 14, 0.55); padding: 0.12em 0.42em; border-radius: 6px; border: 1px solid rgba(74, 222, 128, 0.2); color: #d1fae5; }
.read-figure { margin: 1.75em 0 1.5em; border-radius: 16px; overflow: hidden; border: 1px solid rgba(74, 222, 128, 0.15); background: rgba(10, 26, 20, 0.55); }
.read-figure__grid { display: grid; grid-template-columns: 1fr; }
.read-figure img { width: 100%; height: auto; display: block; object-fit: cover; }
.read-figure__cap { padding: 12px 16px 14px; font-size: 13px; color: rgba(186, 230, 204, 0.88); background: rgba(8, 22, 18, 0.5); border-top: 1px solid rgba(167, 243, 208, 0.12); }
.read-brand { display: flex; align-items: center; gap: 16px; margin: 1.5em 0; padding: 16px 20px; border-radius: 14px; background: rgba(8, 22, 18, 0.42); border: 1px solid rgba(74, 222, 128, 0.14); }
.read-callout { margin: 1.4em 0; padding: 16px 18px; border-radius: 12px; border-left: 3px solid rgba(74, 222, 128, 0.45); background: rgba(22, 101, 52, 0.22); }
.read-check { list-style: none; padding: 0; margin: 0.9em 0; }
.read-check li { position: relative; padding: 12px 14px 12px 40px; margin-bottom: 8px; border-radius: 12px; background: rgba(8, 22, 18, 0.35); color: rgba(204, 226, 214, 0.9); }
.read-check li::before { content: '✓'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #4ade80; font-weight: 900; }
.read-rail { position: sticky; top: calc(var(--nav-height, 68px) + 20px); }
.read-toc { padding: 18px 16px; border-radius: 16px; background: rgba(15, 31, 24, 0.42); }
.read-toc__ul { list-style: none; padding: 0; }
.read-toc a { display: block; padding: 6px 8px; font-size: 13px; color: rgba(236, 253, 245, 0.72); text-decoration: none; }
.read-toc a.is-active { color: #bbf7d0; border-left: 2px solid #4ade80; }
.read-outro { padding: 48px 0; background: rgba(12, 30, 24, 0.98); }
.read-outro__card { display: flex; flex-wrap: wrap; gap: 28px; padding: 26px 28px; border-radius: 18px; background: rgba(15, 31, 24, 0.75); }
@media (max-width: 960px) { .read-grid { grid-template-columns: 1fr; } .read-rail { position: static; } }
