/* Project-specific layer. Template vendor files stay untouched. */
:root {
  --evm-blue: #2563eb;
  --evm-cyan: #06b6d4;
  --evm-ink: #0f172a;
  --evm-muted: #64748b;
  --evm-border: #e2e8f0;
  --evm-soft: #f8fafc;
  --evm-code: #0b1220;
  --evm-shadow: 0 18px 50px rgb(15 23 42 / 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    sans-serif !important;
  color: var(--evm-ink);
  background: #fff;
}

body.lang-zh [lang="en"], body.lang-en [lang="zh"] { display: none !important; }
body.lang-zh .content { line-height: 1.85; }

.lang-switch {
  position: fixed; top: 1.1rem; right: 1.1rem; z-index: 20;
  display: inline-flex; overflow: hidden; border: 1px solid var(--evm-border);
  border-radius: 999px; background: #fff; box-shadow: 0 6px 20px rgb(15 23 42 / .1);
}
.lang-switch button {
  border: 0; background: transparent; color: var(--evm-muted); cursor: pointer;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; padding: .58rem .78rem;
}
.lang-switch button[aria-pressed="true"] { color: #fff; background: var(--evm-blue); }

.publication-header { background: linear-gradient(145deg, #eff6ff 0%, #f8fafc 55%, #ecfeff 100%); }
.publication-header .hero-body { padding: 6.8rem 1.5rem 4.4rem; }
.publication-title { color: var(--evm-ink) !important; letter-spacing: -.045em; }
.publication-kicker { color: var(--evm-blue); font: 700 .78rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.publication-title { max-width: 980px; margin: 1rem auto 1.1rem !important; font-size: clamp(2rem, 5vw, 3.7rem) !important; line-height: 1.1 !important; }
.authors { margin: .6rem auto .25rem; color: #1e293b; font-size: 1.08rem; }
.affiliations, .paper-meta { color: var(--evm-muted); font-size: .86rem; line-height: 1.6; }
.paper-subtitle { margin: 1.15rem auto .25rem; color: #334155; font-size: 1.22rem; line-height: 1.45; }
.paper-meta { max-width: 760px; margin: 1.15rem auto 0; }
.eyebrow { margin-bottom: .7rem; color: var(--evm-blue); font: 800 .73rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.publication-subtitle { color: #334155; font-size: 1.25rem; line-height: 1.45; }
.publication-subtitle-alt { color: var(--evm-muted); font-size: .96rem; margin-top: .45rem; }
.publication-venue { display: inline-block; margin-top: 1.1rem; padding: .45rem .8rem; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-weight: 700; }
.link-block a { margin: .35rem .2rem; }
.button.is-dark { background: var(--evm-ink) !important; }
.button.is-dark:hover { background: var(--evm-blue) !important; transform: translateY(-2px); }
.button svg { width: 1em; height: 1em; fill: currentColor; }

.hero-teaser { padding: 2rem 1.5rem 4rem; }
.terminal { max-width: 820px; margin: 0 auto; overflow: hidden; border-radius: 16px; background: var(--evm-code); box-shadow: var(--evm-shadow); text-align: left; }
.terminal-bar { display: flex; align-items: center; gap: .45rem; padding: .75rem 1rem; background: #172033; }
.terminal-bar i { display: block; width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar .r { background: #ff5f57; } .terminal-bar .y { background: #febc2e; } .terminal-bar .g { background: #28c840; }
.terminal-bar span { margin-left: .45rem; color: #94a3b8; font: .75rem ui-monospace, monospace; }
.terminal pre { margin: 0 !important; padding: 1.35rem 1.5rem !important; border: 0 !important; background: transparent !important; color: #dbeafe; font-size: .92rem !important; line-height: 1.8; }
.terminal .pr { color: #64748b; } .terminal .cmd { color: #e0f2fe; } .terminal .ok { color: #4ade80; font-weight: 700; } .terminal .cyan { color: #67e8f9; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 2rem auto 0; max-width: 820px; }
.stat { padding: 1.1rem; border: 1px solid var(--evm-border); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgb(15 23 42 / .05); }
.stat b { display: block; color: var(--evm-blue); font: 800 1.55rem/1 ui-monospace, monospace; }
.stat span { display: block; margin-top: .45rem; color: var(--evm-muted); font-size: .84rem; }

.section.hero.is-light { border-top: 1px solid var(--evm-border); border-bottom: 1px solid var(--evm-border); background: var(--evm-soft); }
.title.is-3 { position: relative; margin-bottom: 2rem !important; }
.title.is-3::after { content: ""; display: block; width: 60px; height: 3px; margin: .85rem auto 0; border-radius: 99px; background: linear-gradient(90deg, var(--evm-cyan), var(--evm-blue)); }
.section-lead { max-width: 780px; margin: 0 auto 1.4rem; color: var(--evm-muted); font-size: 1.03rem; }
.content code, .chip, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.narrow-copy { max-width: 860px !important; }
.figure-section { background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%); border-top: 1px solid #e5edf9; border-bottom: 1px solid #e5edf9; }
.figure-intro { display: grid; grid-template-columns: .85fr 1.15fr; gap: 2.2rem; align-items: center; }
.figure-intro.reverse { grid-template-columns: 1.15fr .85fr; }
.figure-intro.reverse > div { order: 2; }
.paper-figure { margin: 0; padding: .8rem; border: 1px solid #d8e4f2; border-radius: 18px; background: #fff; box-shadow: 0 16px 40px rgb(15 23 42 / .1); }
.paper-figure img { display: block; width: 100%; height: auto; border-radius: 10px; }
.paper-figure figcaption { margin: .7rem .25rem .1rem; color: #64748b; font-size: .72rem; line-height: 1.45; }
.figure-facts { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.figure-facts span { padding: .48rem .65rem; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1e3a8a; font: 700 .72rem ui-monospace, monospace; }
.three-grid, .role-grid, .insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.evidence-card, .role-grid > div, .insight-grid > div { padding: 1.25rem; border: 1px solid var(--evm-border); border-radius: 14px; background: #fff; }
.evidence-card h3 { margin: .45rem 0 .55rem; font-size: 1.05rem; }
.evidence-card p, .role-grid span, .insight-grid span { color: var(--evm-muted); font-size: .9rem; line-height: 1.65; }
.card-number { color: var(--evm-blue); font: 800 1.35rem ui-monospace, monospace; }
.role-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1.5rem; }
.role-grid b, .insight-grid b { display: block; margin-bottom: .35rem; color: var(--evm-blue); font-size: .88rem; }

.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; align-items: stretch; margin-top: 1.6rem; }
.pipe-step { position: relative; padding: 1.1rem .85rem; border: 1px solid var(--evm-border); border-radius: 12px; background: #fff; text-align: left; }
.pipe-step:not(:last-child)::after { content: "→"; position: absolute; right: -.65rem; top: 50%; z-index: 2; color: var(--evm-blue); font-weight: 800; transform: translateY(-50%); }
.pipe-step b { display: block; color: var(--evm-blue); font-size: .88rem; }
.pipe-step span { display: block; margin-top: .38rem; color: var(--evm-muted); font-size: .82rem; line-height: 1.45; }

.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.mode-card { height: 100%; padding: 1.4rem; border: 1px solid var(--evm-border); border-radius: 14px; background: #fff; box-shadow: 0 7px 25px rgb(15 23 42 / .06); text-align: left; }
.mode-card.atomic { border-top: 4px solid var(--evm-blue); } .mode-card.composite { border-top: 4px solid #0f766e; }
.mode-card h3 { margin: 0 0 .55rem; font-size: 1.2rem; } .mode-card p { color: var(--evm-muted); }
.mode-card ul { margin: .9rem 0 0 1.1rem; color: #334155; }

.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.case-card { height: 100%; padding: 1.35rem; border: 1px solid var(--evm-border); border-radius: 15px; background: #fff; box-shadow: 0 7px 25px rgb(15 23 42 / .06); }
.case-label { color: var(--evm-blue); font: 700 .76rem ui-monospace, monospace; letter-spacing: .04em; }
.composite-label { color: #0f766e; }
.case-card h3 { margin: .65rem 0 1rem; font-size: 1.2rem; line-height: 1.35; }
.case-block { margin-top: .75rem; overflow: hidden; border: 1px solid #dbeafe; border-radius: 10px; background: #f8fafc; }
.case-block b { display: block; padding: .5rem .75rem; border-bottom: 1px solid #dbeafe; color: #1e3a8a; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.case-block pre, .case-block p, .case-block ol { margin: 0 !important; padding: .75rem !important; color: #334155; font-size: .76rem !important; line-height: 1.6; white-space: pre-wrap; }
.case-block ol { padding-left: 2rem !important; }
.case-checks { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.case-checks span { padding: .42rem .6rem; border-radius: 999px; background: #eff6ff; color: #1e3a8a; font: 700 .7rem ui-monospace, monospace; }

.code-card { overflow: hidden; border-radius: 14px; background: var(--evm-code); box-shadow: var(--evm-shadow); text-align: left; }
.code-card .code-head { padding: .7rem 1rem; border-bottom: 1px solid #263449; color: #94a3b8; font: .76rem ui-monospace, monospace; }
.code-card pre { margin: 0 !important; padding: 1.1rem 1.2rem !important; background: transparent !important; color: #dbeafe; font-size: .82rem !important; line-height: 1.7; }
.code-card .kw { color: #c4b5fd; } .code-card .fn { color: #67e8f9; } .code-card .str { color: #86efac; } .code-card .cm { color: #64748b; }
.check-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; margin-top: 1rem; }
.check { padding: .8rem .55rem; border-radius: 10px; background: #eff6ff; color: #1e3a8a; font-size: .8rem; font-weight: 700; text-align: center; }

.score-bar { display: flex; height: 42px; overflow: hidden; border-radius: 10px; box-shadow: 0 5px 18px rgb(15 23 42 / .08); }
.score-bar span { display: flex; align-items: center; justify-content: center; color: #fff; font: 700 .76rem ui-monospace, monospace; }
.score-bar .s1 { width: 30%; background: #2563eb; } .score-bar .s2 { width: 20%; background: #0ea5e9; } .score-bar .s3 { width: 30%; background: #14b8a6; } .score-bar .s4 { width: 10%; background: #f59e0b; } .score-bar .s5 { width: 10%; background: #ef4444; }
.score-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin-top: .65rem; color: var(--evm-muted); font-size: .75rem; text-align: center; }
.callout { margin-top: 1.25rem; padding: 1rem 1.2rem; border-left: 4px solid var(--evm-blue); border-radius: 10px; background: #eff6ff; color: #1e3a8a; text-align: left; }
.callout strong { color: #1d4ed8; }
.decay { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.1rem; }
.decay span { padding: .85rem .55rem; border-radius: 10px; background: #ecfdf5; color: #065f46; font-size: .78rem; font-weight: 700; text-align: center; }
.result-table { border-radius: 12px; overflow: hidden; box-shadow: 0 7px 25px rgb(15 23 42 / .06); }
.result-table th { background: #e0f2fe; color: #0f3c5f; font-size: .78rem; }
.result-table td { font-size: .84rem; vertical-align: middle; }
.result-table .winner td { background: #eff6ff; }
.insight-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.5rem; }
.result-visuals { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1.5rem; align-items: center; margin-top: 2rem; }
.paper-figure.compact { max-width: 390px; }
.result-takeaway { padding: 1.6rem; border-radius: 16px; background: #0f172a; color: #dbeafe; box-shadow: 0 16px 40px rgb(15 23 42 / .16); }
.result-takeaway h3 { margin: 0 0 .8rem; color: #fff; font-size: 1.35rem; line-height: 1.35; }
.result-takeaway p:not(.eyebrow) { color: #b8c7dc; line-height: 1.75; }
.result-takeaway .eyebrow { color: #67e8f9; }
.command-block, .bibtex { overflow-x: auto; padding: 1.1rem 1.2rem !important; border-radius: 12px; background: var(--evm-code) !important; color: #dbeafe !important; font-size: .82rem !important; line-height: 1.7; }
.resource-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.resource-links a { color: var(--evm-blue); font-weight: 700; }
.citation-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; color: #334155; font-weight: 700; }
.copy-status { min-height: 1.3rem; margin-top: .45rem; color: var(--evm-muted); font-size: .8rem; }
.footer a { color: var(--evm-blue); }

@media screen and (max-width: 800px) {
  .stat-grid, .pipeline, .three-grid, .role-grid, .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .figure-intro, .figure-intro.reverse, .result-visuals { grid-template-columns: 1fr; }
  .figure-intro.reverse > div { order: 0; }
  .paper-figure.compact { max-width: none; }
  .pipe-step:not(:last-child)::after { display: none; }
  .check-list, .score-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 480px) {
  .stat-grid, .pipeline, .three-grid, .role-grid, .insight-grid { grid-template-columns: 1fr; }
  .publication-header .hero-body { padding-top: 4.5rem; }
  .citation-head { align-items: flex-start; flex-direction: column; }
}
