/* ═══════════════════════════════════════════════════════════════════
   启核 Nexcore / 浅色纸感杂志式设计系统
   ───────────────────────────────────────────────────────────────────
   设计原则
   1. 版面优先：靠字号、行距、发丝线与留白建立层级，不靠阴影与渐变。
   2. 单一强调色：品牌青绿仅用于索引、链接与关键节点，其余全部墨色。
   3. 网格硬朗：章节编号 + 英文小标签 + 中文标题，固定左侧信息栏。
   4. 动效克制：只保留淡入位移，不做弹跳、发光、粒子。
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 变量 ─── */
:root {
    /* 纸与墨 */
    --paper:       #f6f4ee;
    --paper-2:     #fdfcf8;
    --paper-3:     #edebe2;
    --ink:         #14161a;
    --ink-2:       #383d45;
    --ink-3:       #6b7178;
    --ink-4:       #9ba1a8;
    --rule:        #ded9cc;
    --rule-2:      #c9c3b2;

    /* 品牌色（取自 logo 渐变的青绿、海蓝与嫩芽绿） */
    --brand:       #0d6e78;
    --brand-deep:  #0a5a62;
    --brand-aqua:  #12bcd2;
    --sprout:      #4ec98a;
    --wash:        rgba(13, 110, 120, 0.045);

    /* 字体 */
    --f-display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', Georgia, 'Times New Roman', serif;
    --f-sans: 'Inter', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --f-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace;

    --wrap: 1180px;
    --rail: 186px;
    --nav-h: 66px;
    --ease: cubic-bezier(0.22, 0.7, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    isolation: isolate;
    color: var(--ink-2);
    font-family: var(--f-sans);
    font-size: 15.5px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.paper-surface {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 12%, #fbfaf6, transparent 42%),
        radial-gradient(circle at 84% 76%, #f0eee6, transparent 46%),
        var(--paper);
}

.paper-surface canvas {
    width: 100% !important;
    height: 100% !important;
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--ink); }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; }
::selection { background: rgba(18, 188, 210, 0.22); }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ─── 版面容器 ─── */
.wrap {
    width: min(var(--wrap), 100% - 2 * clamp(20px, 5vw, 60px));
    margin-inline: auto;
}

/* ─── 顶部阅读进度 ─── */
.progress {
    position: fixed;
    inset: 0 auto auto 0;
    height: 2px;
    width: 0;
    background: var(--brand);
    z-index: 60;
}

/* ═══════════════ 报头 ═══════════════ */
.masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 244, 238, 0.9);
    border-bottom: 1px solid var(--rule);
    backdrop-filter: saturate(150%) blur(10px);
    -webkit-backdrop-filter: saturate(150%) blur(10px);
    transition: border-color 0.3s;
}
.masthead.scrolled { border-bottom-color: var(--rule-2); }

.masthead-in {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    height: var(--nav-h);
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark { height: 30px; width: auto; display: block; }
.brand-word { display: block; line-height: 1.1; }
.brand-word b {
    display: block;
    font-family: var(--f-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--ink);
}
.brand-word i {
    display: block;
    font-style: normal;
    font-size: 9px;
    letter-spacing: 0.3em;
    color: var(--ink-4);
    margin-top: 3px;
}

.masthead-nav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.2vw, 30px);
    margin-left: auto;
}
.masthead-nav a {
    position: relative;
    font-size: 13.5px;
    color: var(--ink-3);
    padding: 4px 0;
    transition: color 0.25s;
}
.masthead-nav a::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.38s var(--ease);
}
.masthead-nav a:hover,
.masthead-nav a.active { color: var(--ink); }
.masthead-nav a:hover::after,
.masthead-nav a.active::after { transform: scaleX(1); }

.masthead-end { display: flex; align-items: center; gap: 12px; flex: none; }

.masthead-cta {
    font-size: 12.5px;
    letter-spacing: 0.05em;
    color: var(--ink);
    border: 1px solid var(--ink);
    padding: 9px 17px;
    transition: background 0.3s, color 0.3s;
}
.masthead-cta:hover { background: var(--ink); color: var(--paper); }

.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--rule-2);
    background: transparent;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 16px;
    height: 1px;
    background: var(--ink);
    transition: transform 0.3s var(--ease);
}
.nav-toggle.active span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle.active span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ═══════════════ 封面 ═══════════════ */
.cover {
    padding: clamp(30px, 4.5vw, 62px) 0 clamp(48px, 7vw, 96px);
}

.cover-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--rule-2);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-4);
}

.cover-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(170px, 23vw, 292px);
    gap: clamp(26px, 5vw, 76px);
    align-items: end;
    margin-top: clamp(34px, 6vw, 76px);
}

.kicker {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: clamp(16px, 2vw, 26px);
}

.cover h1 {
    font-family: var(--f-display);
    font-size: clamp(37px, 6.6vw, 82px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.005em;
}
.cover h1 span { display: block; }
.cover h1 span:last-child { color: var(--brand-deep); font-weight: 600; }

.cover-mark { margin: 0; }
.cover-mark img { display: block; width: 100%; height: auto; }
.cover-mark figcaption {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--rule);
    font-size: 10.5px;
    letter-spacing: 0.15em;
    color: var(--ink-4);
    text-align: center;
}

.cover-lead {
    margin-top: clamp(26px, 3.4vw, 46px);
    max-width: 620px;
    font-size: clamp(15px, 1.35vw, 17.5px);
    line-height: 2;
    color: var(--ink-2);
}
.cover-lead b { color: var(--ink); font-weight: 600; }

.cover-index {
    margin-top: clamp(34px, 4.6vw, 62px);
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 13px 26px;
}
.ci-label {
    grid-column: 1 / -1;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 3px;
}
.cover-index a {
    display: flex;
    align-items: baseline;
    gap: 9px;
    font-size: 13.5px;
    color: var(--ink-2);
    transition: color 0.25s;
}
.cover-index a b {
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--brand);
}
.cover-index a:hover { color: var(--brand-deep); }

/* ═══════════════ 章节骨架 ═══════════════ */
.sect {
    border-top: 1px solid var(--rule);
    padding: clamp(56px, 8vw, 118px) 0;
}
.sect-contact { padding-bottom: clamp(48px, 6vw, 92px); }

.rail {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: clamp(26px, 4.4vw, 74px);
}

.rail-head {
    position: sticky;
    top: calc(var(--nav-h) + 30px);
    align-self: start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule-2);
}
.rail-num {
    display: block;
    font-family: var(--f-display);
    font-size: 40px;
    line-height: 1;
    color: var(--ink);
}
.rail-en {
    display: block;
    margin-top: 9px;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.rail-cn {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    color: var(--ink-3);
}

.sect-title {
    font-family: var(--f-display);
    font-size: clamp(26px, 3.4vw, 44px);
    font-weight: 600;
    line-height: 1.34;
    letter-spacing: -0.005em;
}

.sect-note {
    margin-top: clamp(18px, 2.2vw, 28px);
    max-width: 60ch;
    font-size: 14.5px;
    line-height: 2;
    color: var(--ink-3);
}

.lead {
    margin-top: clamp(22px, 2.8vw, 36px);
    max-width: 60ch;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 2.05;
    color: var(--ink-2);
}

/* ─── 事实条目 ─── */
.facts {
    margin-top: clamp(34px, 4.4vw, 58px);
    border-top: 1px solid var(--rule-2);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fact {
    padding: 24px 30px 24px 0;
    border-bottom: 1px solid var(--rule);
}
.fact:nth-child(odd) {
    border-right: 1px solid var(--rule);
    padding-right: 30px;
}
.fact:nth-child(even) { padding-left: 30px; padding-right: 0; }
.fact dt {
    font-size: 10.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 11px;
}
.fact dd { font-size: 14.5px; line-height: 1.9; color: var(--ink-2); }

/* ═══════════════ 技术方向 ═══════════════ */
.dirs {
    list-style: none;
    padding: 0;
    margin-top: clamp(32px, 4.2vw, 56px);
    border-top: 1px solid var(--rule-2);
}
.dir {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) clamp(190px, 23vw, 278px);
    gap: clamp(18px, 3vw, 44px);
    padding: clamp(24px, 3vw, 36px) 0;
    border-bottom: 1px solid var(--rule);
    transition: background 0.4s;
}
.dir:hover { background: var(--wash); }

.dir-num {
    font-family: var(--f-display);
    font-size: 25px;
    line-height: 1.15;
    color: var(--rule-2);
    transition: color 0.35s;
}
.dir:hover .dir-num { color: var(--brand); }

.dir-name {
    font-family: var(--f-display);
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 600;
    line-height: 1.35;
}
.dir-en {
    display: block;
    margin-top: 8px;
    font-family: var(--f-sans);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.dir-lead {
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.9;
    color: var(--ink);
}
.dir-desc {
    margin-top: 10px;
    max-width: 58ch;
    font-size: 14.5px;
    line-height: 1.98;
    color: var(--ink-3);
}

.dir-side {
    border-left: 1px solid var(--rule);
    padding-left: clamp(16px, 2vw, 26px);
}
.dir-side h6 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 13px;
}
.dir-tags {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}
.dir-tags li {
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--ink-2);
    border: 1px solid var(--rule);
    padding: 2px 9px;
}
.dir-out {
    font-size: 13px;
    line-height: 1.85;
    color: var(--ink-3);
}
.dir-out b {
    display: block;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 3px;
}

/* ═══════════════ 产品矩阵 ═══════════════ */
.prods {
    list-style: none;
    padding: 0;
    margin-top: clamp(32px, 4.2vw, 56px);
    border-top: 1px solid var(--rule-2);
}
.prod {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) clamp(190px, 23vw, 278px);
    gap: clamp(18px, 3vw, 44px);
    padding: clamp(24px, 3vw, 36px) 0;
    border-bottom: 1px solid var(--rule);
    transition: background 0.4s;
}
.prod:hover { background: var(--wash); }

.prod-num {
    font-family: var(--f-display);
    font-size: 25px;
    line-height: 1.15;
    color: var(--rule-2);
    transition: color 0.35s;
}
.prod:hover .prod-num { color: var(--brand); }

.prod-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
}
.prod-mark {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--paper-2);
}
.prod-mark img { width: 100%; height: 100%; object-fit: cover; }
.prod-name {
    min-width: 0;
    font-family: var(--f-display);
    font-size: clamp(20px, 2.2vw, 27px);
    font-weight: 600;
    line-height: 1.3;
}
.prod-en {
    display: block;
    margin-top: 7px;
    font-family: var(--f-sans);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.prod-tag {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand);
    white-space: nowrap;
}

.prod-lead {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.9;
    color: var(--ink);
}
.prod-desc {
    margin-top: 9px;
    max-width: 58ch;
    font-size: 14.5px;
    line-height: 1.98;
    color: var(--ink-3);
}
.prod-feats {
    list-style: none;
    padding: 0;
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.prod-feats li {
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--ink-2);
    border: 1px solid var(--rule);
    padding: 2px 9px;
}

.prod-side {
    border-left: 1px solid var(--rule);
    padding-left: clamp(16px, 2vw, 26px);
}
.prod-side h6 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 13px;
}
.prod-meta { margin: 0; }
.prod-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 12.5px;
    line-height: 1.7;
}
.prod-meta-row:first-child { border-top: 1px solid var(--rule); }
.prod-meta-row dt { flex: none; color: var(--ink-4); }
.prod-meta-row dd { margin: 0; color: var(--ink-2); text-align: right; }

.prod-links {
    margin-top: 18px;
    display: grid;
    gap: 8px;
}
.prod-links a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--rule);
    font-size: 13px;
    color: var(--brand-deep);
    transition: color 0.25s;
}
.prod-links a:hover { color: var(--ink); }
.prod-links a span { color: var(--ink-4); font-size: 11px; }

/* ═══════════════ 方法 ═══════════════ */
.method-grid {
    margin-top: clamp(32px, 4.2vw, 56px);
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
    gap: clamp(28px, 4.6vw, 76px);
}
.method-list { border-top: 1px solid var(--rule-2); }
.method-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--rule);
}
.mi-num {
    font-family: var(--f-display);
    font-size: 15px;
    color: var(--brand);
    line-height: 1.7;
}
.method-item h4 {
    font-family: var(--f-display);
    font-size: 17.5px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 10px;
}
.method-item p {
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--ink-3);
}

.method-side {
    display: grid;
    gap: clamp(30px, 3.4vw, 44px);
    align-content: start;
}
.stack h5,
.method-side h5 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 16px;
}
.tags {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.tags li {
    font-size: 12px;
    line-height: 1.7;
    color: var(--ink-2);
    border: 1px solid var(--rule);
    padding: 4px 11px;
    transition: border-color 0.3s, color 0.3s;
}
.tags li:hover { border-color: var(--brand); color: var(--brand-deep); }

.metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 22px;
    border-top: 1px solid var(--rule-2);
    padding-top: 24px;
}
.metric { padding-top: 0; }
.metric-num {
    display: block;
    font-family: var(--f-display);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.metric-label {
    display: block;
    margin-top: 9px;
    font-size: 10.5px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-4);
}

/* ═══════════════ 核心架构 ═══════════════ */
.arch-explorer {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    margin-top: clamp(32px, 4.2vw, 56px);
    border-top: 1px solid var(--rule-2);
    border-bottom: 1px solid var(--rule-2);
}

.arch-tabs {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--rule);
}

.arch-tab {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 9px;
    width: 100%;
    padding: 17px 14px;
    border: 0;
    border-bottom: 1px solid var(--rule);
    background: transparent;
    color: var(--ink-3);
    text-align: left;
    cursor: pointer;
    transition: color .2s, background-color .2s;
}
.arch-tab:last-child { border-bottom: 0; }
.arch-tab > span {
    padding-top: 2px;
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--brand);
}
.arch-tab b { display: block; font-size: 14px; line-height: 1.35; color: currentColor; }
.arch-tab small { display: block; margin-top: 5px; font-size: 10.5px; line-height: 1.5; color: var(--ink-4); }
.arch-tab:hover { color: var(--ink); background: rgba(13, 110, 120, .035); }
.arch-tab.is-active { color: var(--paper-2); background: var(--ink); }
.arch-tab.is-active small { color: #b9b7ae; }

.arch-panels { min-width: 0; }
.arch-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    min-height: 0;
    padding: clamp(24px, 3vw, 42px);
}
.arch-panel[hidden] { display: none; }
.arch-panel.is-entering { animation: arch-enter .4s var(--ease); }
.arch-panel figure {
    margin: 0;
    border: 1px solid var(--rule);
    background: #f7fbfc;
}
.arch-panel figure a { position: relative; display: block; }
.arch-panel figure a::after {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 8px;
    border: 1px solid rgba(13, 110, 120, .2);
    background: rgba(253, 252, 248, .94);
    color: var(--brand-deep);
    content: "查看大图 ↗";
    font-size: 10.5px;
    letter-spacing: .04em;
}
.arch-panel figure img {
    display: block;
    width: 100%;
    height: auto;
}
.arch-copy h3 {
    grid-column: 1;
    grid-row: 2 / span 2;
    margin: 0;
    font-family: var(--f-display);
    font-size: clamp(22px, 2.3vw, 31px);
    font-weight: 600;
    line-height: 1.35;
}
.arch-figure-no {
    grid-column: 1 / -1;
    color: var(--brand);
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: .12em;
}
.arch-copy p {
    grid-column: 2;
    margin: 0;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--ink-3);
}
.arch-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
    padding: 0 0 4px;
    border: 0;
    border-bottom: 1px solid var(--rule-2);
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.arch-read:hover { color: var(--brand-deep); border-color: var(--brand); }

.arch-copy {
    display: grid;
    grid-template-columns: minmax(240px, .82fr) minmax(0, 1.18fr);
    gap: 10px clamp(28px, 4vw, 58px);
    align-items: end;
}

@keyframes arch-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ═══════════════ 技术文章 ═══════════════ */
.art-layout {
    margin-top: clamp(32px, 4.2vw, 56px);
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(28px, 4.6vw, 70px);
    align-items: start;
}

.art-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--rule-2);
}
.art-search {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    color: var(--ink-4);
}
.art-search input {
    flex: 1;
    width: 100%;
    padding: 4px 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--ink);
    outline: none;
}
.art-search input::placeholder { color: var(--ink-4); }
.art-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.art-count {
    font-family: var(--f-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    white-space: nowrap;
}

.art-list { list-style: none; }

.article {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: clamp(16px, 2.4vw, 34px);
    padding: 26px 0 24px;
    border-bottom: 1px solid var(--rule);
}
.art-date {
    display: block;
    font-family: var(--f-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    letter-spacing: -0.01em;
}
.art-cat {
    display: inline-block;
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-deep);
    border: 1px solid var(--rule);
    padding: 2px 8px;
}
.art-title {
    font-family: var(--f-display);
    font-size: clamp(18.5px, 2vw, 22.5px);
    font-weight: 600;
    line-height: 1.5;
}
.art-by {
    margin-top: 11px;
    font-size: 12.5px;
    color: var(--ink-4);
}
.art-excerpt {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--ink-3);
}
.art-ops {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.tbtn {
    padding: 2px 0;
    border: 0;
    border-bottom: 1px solid var(--rule-2);
    background: transparent;
    font-family: inherit;
    font-size: 12.5px;
    letter-spacing: 0.05em;
    color: var(--ink);
    cursor: pointer;
    transition: color 0.25s, border-color 0.25s;
}
.tbtn:hover { color: var(--brand-deep); border-color: var(--brand); }
.tbtn.is-muted { color: var(--ink-4); border-color: transparent; }
.tbtn.is-muted:hover { color: var(--ink-2); border-color: var(--rule-2); }
.tbtn.is-danger { color: #a8382c; border-color: transparent; }
.tbtn.is-danger:hover { color: #8d2c21; border-color: #a8382c; }

.art-empty {
    padding: 62px 0;
    border-bottom: 1px solid var(--rule);
    text-align: center;
    color: var(--ink-4);
}
.art-empty h4 {
    font-family: var(--f-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink-3);
    margin-bottom: 9px;
}
.art-empty p { font-size: 13.5px; }

.art-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding-top: 26px;
}
.ap-btn {
    padding: 6px 11px;
    border: 1px solid var(--rule);
    background: transparent;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.ap-btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.ap-btn.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ap-btn:disabled { opacity: 0.32; cursor: default; }
.ap-ellipsis { font-size: 12.5px; color: var(--ink-4); padding: 0 3px; }

/* ─── 投稿表单 ─── */
.au {
    position: sticky;
    top: calc(var(--nav-h) + 26px);
    padding: clamp(22px, 2.6vw, 32px);
    border: 1px solid var(--rule-2);
    background: var(--paper-2);
}
.au-head h3 {
    font-family: var(--f-display);
    font-size: 20px;
    font-weight: 600;
}
.au-head p {
    margin-top: 9px;
    margin-bottom: 26px;
    font-size: 13px;
    line-height: 1.85;
    color: var(--ink-4);
}

.au-field { margin-bottom: 18px; }
.au-field > label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 8px;
}
.au-field input[type='text'],
.au-field input[type='password'],
.au-field select,
.au-field textarea {
    width: 100%;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--rule-2);
    border-radius: 0;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ink);
    outline: none;
    transition: border-color 0.3s;
}
.au-field textarea { resize: vertical; min-height: 150px; }
.au-field input:focus,
.au-field select:focus,
.au-field textarea:focus { border-bottom-color: var(--brand); }
.au-field input::placeholder,
.au-field textarea::placeholder { color: var(--ink-4); }
.au-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-4) 50%), linear-gradient(135deg, var(--ink-4) 50%, transparent 50%);
    background-position: calc(100% - 12px) 52%, calc(100% - 7px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 26px;
}

.au-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.au-file { display: flex; align-items: center; gap: 11px; min-width: 0; }
.au-file-btn {
    flex: none;
    padding: 6px 12px;
    border: 1px solid var(--rule-2);
    font-size: 12px;
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s;
}
.au-file-btn:hover { border-color: var(--ink); color: var(--ink); }
.au-file-name {
    font-size: 12px;
    color: var(--ink-4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.au-msg {
    min-height: 20px;
    margin: 4px 0 14px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--ink-4);
}
.au-msg.ok { color: var(--brand-deep); }
.au-msg.err { color: #a8382c; }

/* ─── 按钮 ─── */
.btn {
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 22px;
    background: var(--ink);
    color: var(--paper);
    font-size: 13.5px;
    letter-spacing: 0.06em;
    transition: background 0.3s;
}
.btn-primary:hover { background: var(--brand-deep); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }

.btn-ghost {
    padding: 9px 18px;
    border: 1px solid var(--rule-2);
    font-size: 13px;
    color: var(--ink-2);
    transition: border-color 0.3s, color 0.3s;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-danger {
    padding: 9px 18px;
    background: #a8382c;
    color: #fdfcf8;
    font-size: 13px;
    transition: background 0.3s;
}
.btn-danger:hover { background: #8d2c21; }
.btn-danger:disabled { opacity: 0.55; cursor: default; }

.au-cancel {
    width: 100%;
    margin-top: 10px;
    padding: 10px 0;
    border: 1px solid var(--rule);
    font-size: 12.5px;
    color: var(--ink-4);
    transition: border-color 0.3s, color 0.3s;
}
.au-cancel:hover { border-color: var(--rule-2); color: var(--ink-2); }

/* ═══════════════ 联系 ═══════════════ */
.contact-line {
    font-family: var(--f-display);
    font-size: clamp(26px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.34;
    letter-spacing: -0.005em;
}

.contact-links {
    list-style: none;
    padding: 0;
    margin-top: clamp(32px, 4.2vw, 56px);
    border-top: 1px solid var(--rule-2);
}
.contact-links li { border-bottom: 1px solid var(--rule); }
.contact-links a {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) 22px;
    gap: 20px;
    align-items: center;
    padding: 21px 0;
    color: var(--ink);
    transition: color 0.3s, padding-left 0.35s var(--ease);
}
.contact-links a:hover { color: var(--brand-deep); padding-left: 10px; }
.cl-k {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.cl-v { font-family: var(--f-display); font-size: clamp(16px, 1.9vw, 21px); }
.cl-x { text-align: right; color: var(--ink-4); font-size: 14px; }

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(150px, 17vw, 196px);
    gap: clamp(28px, 4vw, 58px);
    align-items: start;
}
.contact-qr {
    margin: clamp(32px, 4.2vw, 56px) 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--rule-2);
}
.contact-qr img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--rule);
    background: var(--paper-2);
}
.contact-qr figcaption {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--ink-3);
}
.contact-qr figcaption b {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-4);
}

/* ═══════════════ 页脚 ═══════════════ */
.colophon {
    border-top: 1px solid var(--rule-2);
    background: var(--paper-3);
    padding: clamp(40px, 5vw, 66px) 0 32px;
}
.colophon-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.05fr);
    gap: clamp(28px, 4vw, 66px);
}
.colophon-brand { display: flex; align-items: flex-start; gap: 14px; }
.colophon-brand img { height: 40px; width: auto; flex: none; }
.colophon-brand b {
    display: block;
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.04em;
}
.colophon-brand p {
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--ink-4);
}

.colophon-cols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}
.colophon-col h5 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 14px;
}
.colophon-col a {
    display: block;
    padding: 5px 0;
    font-size: 13.5px;
    color: var(--ink-2);
    transition: color 0.25s;
}
.colophon-col a:hover { color: var(--brand-deep); }

.colophon-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: clamp(34px, 4vw, 56px);
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    font-size: 11.5px;
    letter-spacing: 0.04em;
    color: var(--ink-4);
}

/* ═══════════════ 弹层 ═══════════════ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 40px);
}
.modal[hidden] { display: none; }
.modal-veil {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 26, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.modal-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 100%;
    background: var(--paper);
    border: 1px solid var(--rule-2);
    box-shadow: 0 30px 70px rgba(20, 22, 26, 0.2);
}
.modal-article { max-width: 820px; }
.modal-x {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 1px solid var(--rule);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink-2);
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s;
}
.modal-x:hover { border-color: var(--ink); color: var(--ink); }

.ma-scroll {
    overflow-y: auto;
    padding: clamp(28px, 4vw, 58px) clamp(22px, 4vw, 64px) clamp(36px, 5vw, 64px);
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.ma-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--f-mono);
    font-size: 11.5px;
    color: var(--ink-4);
}
.chip {
    padding: 2px 8px;
    border: 1px solid var(--rule);
    font-family: var(--f-sans);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-deep);
}
.ma-title {
    margin-top: 20px;
    font-family: var(--f-display);
    font-size: clamp(23px, 3.2vw, 35px);
    font-weight: 600;
    line-height: 1.42;
}
.ma-author {
    margin-top: 14px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--rule);
    font-size: 13px;
    color: var(--ink-4);
}

.modal-slim { max-width: 396px; padding: 30px; }
.modal-slim h3 {
    font-family: var(--f-display);
    font-size: 20px;
    font-weight: 600;
}
.modal-note {
    margin: 11px 0 22px;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--ink-3);
}
.modal-slim input {
    width: 100%;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid var(--rule-2);
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.3s;
}
.modal-slim input:focus { border-bottom-color: var(--brand); }
.modal-msg {
    min-height: 18px;
    margin-top: 11px;
    font-size: 12.5px;
    color: #a8382c;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* ═══════════════ 正文 Markdown 排版 ═══════════════ */
.md {
    font-size: 15.5px;
    line-height: 2;
    color: var(--ink-2);
    overflow-wrap: break-word;
}
.md > *:first-child { margin-top: 1.7em; }
.md h1, .md h2, .md h3, .md h4 {
    font-family: var(--f-display);
    font-weight: 600;
    line-height: 1.45;
    color: var(--ink);
}
.md h1 {
    font-size: clamp(21px, 2.5vw, 28px);
    margin: 2.1em 0 0.7em;
    padding-bottom: 0.45em;
    border-bottom: 1px solid var(--rule);
}
.md h2 {
    font-size: clamp(18px, 2.1vw, 23px);
    margin: 2em 0 0.65em;
}
.md h3 { font-size: 16.5px; margin: 1.8em 0 0.6em; }
.md h4 { font-size: 15px; margin: 1.6em 0 0.5em; }
.md p { margin: 1.15em 0 0; }
.md ul, .md ol { margin: 1.15em 0 0; padding-left: 1.45em; }
.md li + li { margin-top: 0.45em; }
.md strong { color: var(--ink); font-weight: 600; }
.md em { font-style: normal; color: var(--brand-deep); }
.md a {
    color: var(--brand-deep);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.25s;
}
.md a:hover { color: var(--brand-aqua); }
.md blockquote {
    margin: 1.6em 0;
    padding: 2px 0 2px 20px;
    border-left: 2px solid var(--brand);
    color: var(--ink-3);
}
.md blockquote p { margin: 0.5em 0; }
.md code {
    padding: 0.14em 0.42em;
    border: 1px solid var(--rule);
    background: var(--paper-3);
    font-family: var(--f-mono);
    font-size: 0.86em;
    color: var(--ink);
}
.md pre {
    margin: 1.6em 0;
    padding: 18px 20px;
    overflow-x: auto;
    background: #1c2025;
    color: #e6e4de;
    font-size: 12.8px;
    line-height: 1.8;
    scrollbar-width: thin;
}
.md pre code {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}
.md .tw { margin: 1.7em 0; overflow-x: auto; scrollbar-width: thin; }
.md table {
    width: 100%;
    min-width: 440px;
    border-collapse: collapse;
    font-size: 13.5px;
}
.md th, .md td {
    padding: 9px 13px;
    border: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
    line-height: 1.8;
}
.md th {
    background: var(--paper-3);
    font-weight: 600;
    font-size: 12.5px;
    color: var(--ink);
    white-space: nowrap;
}
.md hr {
    margin: 2.3em 0;
    border: 0;
    border-top: 1px solid var(--rule);
}
.md img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.7em 0;
    border: 1px solid var(--rule);
}

/* ═══════════════ 进场动效 ═══════════════ */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══════════════ 响应式 ═══════════════ */
@media (max-width: 1080px) {
    :root { --rail: 150px; }
    .dir,
    .prod { grid-template-columns: 56px minmax(0, 1fr) clamp(170px, 22vw, 240px); }
    .colophon-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 26px; }
}

@media (max-width: 940px) {
    .rail {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
    .rail-head {
        position: static;
        display: flex;
        align-items: baseline;
        gap: 12px;
        padding-bottom: 10px;
    }
    .rail-num { font-size: 26px; }
    .rail-en { margin-top: 0; }
    .rail-cn { margin-top: 0; margin-left: auto; }

    .cover-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
        align-items: center;
    }
    .cover-mark { max-width: 210px; margin-inline: auto; }

    .method-grid,
    .art-layout { grid-template-columns: minmax(0, 1fr); }
    .au { position: static; }
    .arch-explorer { grid-template-columns: minmax(0, 1fr); }
    .arch-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-right: 0;
        border-bottom: 1px solid var(--rule);
    }
    .arch-tab { border-right: 1px solid var(--rule); }
    .arch-tab:nth-child(3n) { border-right: 0; }
    .arch-tab:nth-last-child(-n + 3) { border-bottom: 0; }
    .arch-panel {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }
    .colophon-top { grid-template-columns: minmax(0, 1fr); }
    .colophon-cols { margin-top: 6px; }
}

@media (max-width: 800px) {
    .masthead-nav {
        position: absolute;
        inset: var(--nav-h) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 6px clamp(20px, 5vw, 60px) 18px;
        background: var(--paper);
        border-bottom: 1px solid var(--rule);
        display: none;
    }
    .masthead-nav.open { display: flex; }
    .masthead-nav a {
        padding: 13px 0;
        border-bottom: 1px solid var(--rule);
        font-size: 15px;
    }
    .masthead-nav a::after { display: none; }
    .masthead-nav a:last-child { border-bottom: 0; }
    .masthead-in { position: relative; }
    .nav-toggle { display: flex; }
    .masthead-cta { display: none; }

    .dir,
    .prod {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 16px;
    }
    .dir-side,
    .prod-side {
        grid-column: 2;
        margin-top: 20px;
        padding: 18px 0 0;
        border-left: 0;
        border-top: 1px solid var(--rule);
    }
    .facts { grid-template-columns: minmax(0, 1fr); }
    .fact { padding: 22px 0; }
    .fact:nth-child(odd) { border-right: 0; padding-right: 0; }
    .fact:nth-child(even) { padding-left: 0; }
    .fact:last-child { border-bottom: 0; }

    .article {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
    .arch-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .arch-tab:nth-child(3n) { border-right: 1px solid var(--rule); }
    .arch-tab:nth-child(even) { border-right: 0; }
    .arch-tab:nth-last-child(-n + 3) { border-bottom: 1px solid var(--rule); }
    .arch-tab:nth-last-child(-n + 2) { border-bottom: 0; }
    .art-date { display: inline-block; }
    .art-cat { margin: 0 0 0 12px; }

    .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .contact-qr { max-width: 210px; }
    .contact-links a {
        grid-template-columns: minmax(0, 1fr) 22px;
        gap: 6px 14px;
        padding: 18px 0;
    }
    .cl-k { grid-column: 1 / -1; }
    .colophon-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-label { letter-spacing: 0.08em; }
}

@media (max-width: 560px) {
    body { font-size: 15px; }
    .cover h1 { font-size: clamp(31px, 9vw, 42px); }
    .prod-head {
        grid-template-columns: 38px minmax(0, 1fr);
        row-gap: 10px;
    }
    .prod-mark { width: 38px; height: 38px; }
    .prod-tag { grid-column: 2; }
    .metrics { gap: 20px 18px; }
    .arch-panel { padding: 20px 0; gap: 20px; }
    .arch-copy { display: block; }
    .arch-copy p { margin-top: 17px; }
    .arch-read { margin-top: 20px; }
    .arch-tab { padding: 14px 10px; }
    .au-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .ma-scroll { padding-inline: 20px; }
    .modal-slim { padding: 24px; }
    .colophon-bottom { flex-direction: column; }
}

/* ─── 打印 ─── */
@media print {
    .masthead, .progress, .art-aside, .modal, .cover-index { display: none; }
    body { background: #fdfcf8; }
    .sect { padding: 24px 0; }
}
