/* PESA paper — builds on home.css tokens (--canvas, --surface, --ink, --muted, --line, --wash, --on-ink, --control-line). */
:root {
  --ok-bg: rgba(22, 163, 74, .10); --ok-ink: #15803d; --ok-line: rgba(22, 163, 74, .28);
  --wip-bg: rgba(37, 99, 235, .10); --wip-ink: #1d4ed8; --wip-line: rgba(37, 99, 235, .28);
  --deny-bg: rgba(220, 38, 38, .08); --deny-ink: #b91c1c; --deny-line: rgba(220, 38, 38, .32);
  --code-kw: #0f172a; --code-str: #0369a1; --code-cmt: #64748b; --code-op: #7c3aed;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ok-bg: rgba(74, 222, 128, .12); --ok-ink: #4ade80; --ok-line: rgba(74, 222, 128, .32);
    --wip-bg: rgba(96, 165, 250, .14); --wip-ink: #60a5fa; --wip-line: rgba(96, 165, 250, .34);
    --deny-bg: rgba(248, 113, 113, .12); --deny-ink: #f87171; --deny-line: rgba(248, 113, 113, .34);
    --code-kw: #f8fafc; --code-str: #38bdf8; --code-cmt: #94a3b8; --code-op: #c084fc;
  }
}
:root[data-theme="dark"] {
  --ok-bg: rgba(74, 222, 128, .12); --ok-ink: #4ade80; --ok-line: rgba(74, 222, 128, .32);
  --wip-bg: rgba(96, 165, 250, .14); --wip-ink: #60a5fa; --wip-line: rgba(96, 165, 250, .34);
  --deny-bg: rgba(248, 113, 113, .12); --deny-ink: #f87171; --deny-line: rgba(248, 113, 113, .34);
  --code-kw: #f8fafc; --code-str: #38bdf8; --code-cmt: #94a3b8; --code-op: #c084fc;
}

.paper-site { --page-padding: 28px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* Neutralise naked details/summary element rules inherited from home.css */
.paper-site details { border-bottom: 0; }
.paper-site details > summary { padding-block: 0; min-height: 0; font-weight: inherit; }
.paper-site .faq-item { border-bottom: 1px solid var(--line); }
.paper-site .faq-item > summary { min-height: 54px; padding-block: 14px; font-weight: 600; }
.paper-site .faq-item[open] > summary .disclosure::after { transform: rotate(90deg) scaleX(0); opacity: 0; }
.paper-site .export-menu > summary { min-height: 40px; padding: 0 15px; }
.paper-site .paper-toc summary { min-height: 42px; padding: 0; }
.paper-header-inner, .paper-main, .paper-footer-inner { width: min(1240px, 100% - 64px); margin-inline: auto; }

/* Unified site header + responsive nav drawer + synced theme picker */
.paper-header { border-bottom: 1px solid var(--line); background: var(--canvas); position: relative; z-index: 30; }
.paper-header-inner { min-height: 76px; display: flex; align-items: center; gap: 20px; }
.paper-header .brand { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; flex-shrink: 0; }
.nav-drawer { margin-left: auto; display: flex; align-items: center; }
.nav-drawer > summary { display: none; }
.nav-drawer-panel { display: flex; align-items: center; gap: 20px; }
.paper-nav { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.paper-nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); transition: color .2s ease; white-space: nowrap; }
.paper-nav a:hover, .paper-nav a[aria-current="page"] { color: var(--ink); font-weight: 550; }
.paper-header .theme-control { min-height: 36px; gap: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.paper-header .nav-cta { display: inline-flex; align-items: center; padding: 0 16px; min-height: 38px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; white-space: nowrap; flex-shrink: 0; transition: opacity .2s ease; }
.paper-header .nav-cta:hover { color: var(--on-ink); opacity: .82; }

/* Breadcrumb, hero & paper head */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: 12px; color: var(--muted); padding-top: 26px; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.paper-head { padding: 34px 0 32px; border-bottom: 1px solid var(--line); }
.paper-head h1, .hub h1 { max-width: 900px; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.14; letter-spacing: -.04em; margin: 16px 0 16px; font-weight: 650; text-wrap: balance; }
.paper-subtitle { font-size: clamp(16px, 1.55vw, 19px); color: var(--muted); line-height: 1.7; max-width: 740px; }
.paper-subtitle span { display: block; }
.paper-meta { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 36px; margin: 28px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.paper-meta div { display: grid; gap: 2px; }
.paper-meta dt { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.paper-meta dd { margin: 0; font-weight: 550; }
.paper-meta .author-orcid { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 7px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--wash); color: var(--muted); font: 600 10px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; text-decoration: none; vertical-align: 1px; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.paper-meta .author-orcid::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok-ink); flex-shrink: 0; }
.paper-meta .author-orcid:hover { color: var(--ink); border-color: var(--ink); background: var(--canvas); }
.paper-meta .affil { color: var(--muted); font-weight: 450; }
.paper-meta .doi-badge { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--wash); color: var(--ink); font: 600 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .01em; text-decoration: none; white-space: nowrap; transition: border-color .18s ease, background .18s ease; }
.paper-meta .doi-badge:hover { border-color: var(--ink); background: var(--canvas); }

/* Folded action toolbar: segmented language switcher + PDF & export drawer */
.paper-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 26px; }
.lang-switch { display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 3px; background: var(--wash); border: 1px solid var(--line); border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; color: var(--muted); white-space: nowrap; transition: color .2s ease, background .2s ease; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="page"] { color: var(--on-ink); background: var(--ink); font-weight: 550; }
.paper-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.action-pdf { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: opacity .2s ease; }
.action-pdf:hover { opacity: .84; }
.export-menu { position: relative; }
.export-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--canvas); color: var(--ink); font-size: 12.5px; font-weight: 550; cursor: pointer; list-style: none; user-select: none; white-space: nowrap; transition: border-color .2s ease, background .2s ease; }
.export-trigger::-webkit-details-marker { display: none; }
.export-trigger:hover { border-color: var(--ink); background: var(--wash); }
.export-menu[open] .export-trigger { border-color: var(--ink); background: var(--wash); }
.export-menu[open] .chev { transform: rotate(180deg); display: inline-block; }
.export-popover { position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: min(272px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas); box-shadow: 0 18px 46px rgba(0, 0, 0, .14); display: grid; gap: 2px; }
.export-popover a, .export-popover button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.export-popover a:hover, .export-popover button:hover { background: var(--wash); }
.export-popover kbd { font: 600 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); border: 1px solid var(--line); background: var(--wash); padding: 2px 6px; border-radius: 6px; }
.export-popover hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }

/* Responsive rail + bento + reading body grid */
.paper-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 40px 0 72px; align-items: start; }
.paper-toc { position: sticky; top: 28px; max-height: calc(100dvh - 56px); overflow: auto; scrollbar-width: thin; min-width: 0; }
.paper-toc summary { font-size: 12px; font-weight: 650; letter-spacing: .06em; color: var(--muted); min-height: 38px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; user-select: none; }
.paper-toc summary::-webkit-details-marker { display: none; }
.paper-toc ol { list-style: none; margin: 4px 0 0; padding: 0; border-left: 1px solid var(--line); }
.paper-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 12.5px; line-height: 1.55; color: var(--muted); transition: color .18s ease, border-color .18s ease; }
.paper-toc a:hover { color: var(--ink); }
.paper-toc a[aria-current] { color: var(--ink); border-color: var(--ink); font-weight: 600; }

.paper-body { max-width: 940px; min-width: 0; font-size: 16.5px; line-height: 1.92; overflow-wrap: anywhere; }
.paper-body > p, .paper-body > ul, .paper-body > ol, .paper-body > h2, .paper-body > h3, .paper-body > blockquote { max-width: 72ch; }
.paper-body h2 { position: relative; font-size: clamp(22px, 2.2vw, 27px); line-height: 1.38; letter-spacing: -.02em; margin: 56px 0 18px; scroll-margin-top: 24px; }
.paper-body h2:first-child { margin-top: 0; }
.paper-body h3 { position: relative; font-size: 19px; line-height: 1.48; margin: 36px 0 12px; scroll-margin-top: 24px; }
.paper-body a.sec-anchor { opacity: 0; margin-left: 8px; font-weight: 450; font-size: .8em; color: var(--muted); text-decoration: none; transition: opacity .16s ease, color .16s ease; }
.paper-body h2:hover a.sec-anchor, .paper-body h3:hover a.sec-anchor, .paper-body a.sec-anchor:focus { opacity: 1; }
.paper-body a.sec-anchor:hover { color: var(--ink); }
.paper-body p { margin: 0 0 18px; }
.paper-body ul, .paper-body ol { margin: 0 0 20px; padding-left: 1.4em; }
.paper-body li { margin: 6px 0; }
.paper-body strong { font-weight: 650; }
.paper-body code { font: .86em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--wash); padding: 1px 5px; border-radius: 4px; border: 0; }
.paper-body pre code { background: none; padding: 0; border: 0; border-radius: 0; font-size: inherit; }
.math { font-variant-numeric: lining-nums; font-family: "STIX Two Math", "Cambria Math", "Times New Roman", Georgia, serif; }
.math var { font-style: italic; font-family: "STIX Two Math", "Times New Roman", Georgia, serif; font-size: 1.03em; padding-right: .09em; }
.math sub, .math sup { font-size: .72em; font-style: normal; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; margin-left: 1px; line-height: 0; }
.math .frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 3px; line-height: 1.2; font-size: .92em; }
.math .frac-num { padding: 0 4px 2px; border-bottom: 1px solid currentColor; }
.math .frac-den { padding: 2px 4px 0; }
.math .math-cases { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; text-align: left; }
.math .cases-brace { font-family: "STIX Two Math", "Times New Roman", Georgia, serif; font-size: 2.8em; font-weight: 300; line-height: .9; transform: scaleY(1.1); color: var(--ink); }
.math .cases-grid { display: grid; grid-template-columns: auto auto; gap: 4px 16px; align-items: baseline; }
.math .case-rhs { color: var(--muted); font-size: .92em; }
.math-block { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 16px 0 22px; padding: 14px 20px; background: var(--wash); border: 1px solid var(--line); border-radius: 10px; font-size: 15px; line-height: 1.75; overflow-x: auto; max-width: 72ch; font-variant-numeric: lining-nums; }
.math-block.math-numbered { justify-content: space-between; }
.math-block.math-numbered .math { flex: 1 1 auto; text-align: center; }
.math-block .eq-num { flex: 0 0 auto; font: 500 13px/1 Georgia, "Times New Roman", serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.math-block .math { white-space: normal; }
.qed { float: right; font-size: 1em; line-height: 1.4; color: var(--muted); margin-left: 8px; }
.paper-body a:not(.cite-ref):not(.sec-anchor):not(.faq-item) { text-decoration: underline; text-decoration-color: var(--control-line); }
.paper-body a:not(.cite-ref):not(.sec-anchor):hover { text-decoration-color: var(--ink); }

/* Abstract, Definition callout & Concept + Takeaways Bento Grid */
.abstract-box { display: block; padding: 28px 30px 14px; margin: 0 0 22px; background: var(--wash); border: 1px solid var(--line); border-radius: 14px; max-width: 940px; }
.abstract-box h2 { margin-top: 0; }
.abstract-box p { max-width: 74ch; }
#abstract { font-size: 12px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; margin-bottom: 14px; }
#abstract + p, #abstract + p + p, #abstract + p + p + p, #abstract + p + p + p + p { color: var(--ink); }

.paper-bento { display: grid; grid-template-columns: minmax(300px, .95fr) minmax(0, 1.05fr); gap: 20px; margin: 20px 0 36px; align-items: stretch; }
.concept-card, .keypoints { margin: 0; padding: 24px 26px; border-radius: 14px; background: var(--canvas); }
.concept-card { border: 1px solid var(--ink); }
.keypoints { border: 1px solid var(--line); background: var(--wash); }
.concept-card .eyebrow, .keypoints .eyebrow { margin: 0 0 14px; }
.concept-card dl { margin: 0; display: grid; gap: 0; }
.concept-card dl div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.concept-card dt { font-size: 12px; color: var(--muted); padding-top: 2px; }
.concept-card dd { margin: 0; font-size: 14.5px; line-height: 1.65; }
.concept-card dl div:first-child dd { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.keypoints ol { list-style: none; counter-reset: kp; padding: 0; margin: 0; }
.keypoints li { counter-increment: kp; position: relative; padding: 10px 0 10px 36px; margin: 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.7; }
.keypoints li:first-child { border-top: 0; }
.keypoints li::before { content: counter(kp, decimal-leading-zero); position: absolute; left: 0; top: 12px; font: 600 11.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }

.paper-body blockquote { margin: 22px 0; padding: 16px 22px; border: 1px solid var(--line); border-left: 3.5px solid var(--ink); background: var(--wash); border-radius: 0 10px 10px 0; }
.paper-body blockquote.def-box { border-left-width: 4px; border-radius: 4px 10px 10px 4px; padding: 18px 22px; }
.paper-body blockquote.prop-box { border: 1px solid var(--control-line); border-left: 4px solid var(--ink); background: var(--canvas); border-radius: 4px 10px 10px 4px; padding: 16px 20px; }
.paper-body blockquote.proof-box { margin-top: -10px; border: 0; border-left: 2px solid var(--line); background: transparent; border-radius: 0; padding: 8px 18px 10px; font-size: .95em; color: var(--muted); }
.paper-body blockquote.proof-box strong { color: var(--ink); font-style: italic; }
.paper-body blockquote.intuition-box { border: 0; border-left: 2.5px solid var(--control-line); background: var(--wash); border-radius: 0 8px 8px 0; padding: 14px 18px; font-size: .96em; }
.paper-body blockquote p { margin: 0; }
.paper-body blockquote p + p { margin-top: 10px; }
.def-kicker { font: 650 10.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; color: var(--muted); margin: 0 0 10px !important; text-transform: uppercase; }

/* Semantic Algorithm Cards */
.algo-card { margin: 22px 0 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas); overflow: hidden; }
.algo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; background: var(--wash); border-bottom: 1px solid var(--line); font: 600 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.algo-copy { min-height: 28px; padding: 0 12px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--canvas); color: var(--ink); font: 500 11.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; cursor: pointer; transition: border-color .18s ease; }
.algo-copy:hover { border-color: var(--ink); }
.algo-pre { margin: 0 !important; padding: 14px 16px !important; border: 0 !important; border-radius: 0 !important; background: var(--canvas) !important; overflow-x: auto; font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace !important; }
.algo-pre code { display: block; white-space: pre; }
.algo-pre .al { display: inline-block; min-width: 100%; }
.algo-pre .al::before { content: attr(data-ln); display: inline-block; width: 28px; margin-right: 12px; color: var(--muted); opacity: .55; user-select: none; text-align: right; font-size: 11px; }
.algo-pre .ak { color: var(--code-kw); font-weight: 700; }
.algo-pre .as { color: var(--code-str); }
.algo-pre .ac { color: var(--code-cmt); font-style: italic; }
.algo-pre .ao { color: var(--code-op); font-weight: 600; }

/* Tables + Status Pills */
.cite-ref { font-size: .78em; vertical-align: super; line-height: 0; color: var(--muted); margin-left: 1px; font-variant-numeric: tabular-nums; }
.cite-ref:hover { color: var(--ink); }
.table-card { margin: 22px 0 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas); overflow: hidden; }
.table-title { padding: 13px 18px; font-size: 13.5px; font-weight: 650; border-bottom: 1px solid var(--line); background: var(--wash); color: var(--ink); }
.table-wrap { width: 100%; overflow-x: auto; padding: 4px 18px 8px; -webkit-overflow-scrolling: touch; box-sizing: border-box; }
.paper-body table { width: 100%; border-collapse: collapse; margin: 0; font-size: 13.8px; line-height: 1.68; display: table; font-variant-numeric: tabular-nums; }
.paper-body th, .paper-body td { text-align: left; vertical-align: top; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); }
.paper-body th:last-child, .paper-body td:last-child { padding-right: 0; }
.paper-body th { font-size: 11.5px; color: var(--muted); font-weight: 650; letter-spacing: .04em; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.paper-body tbody tr:last-child td { border-bottom: 0; }
.paper-body tbody tr:hover td { background: var(--wash); }
.paper-body td:first-child { font-weight: 600; }
.paper-body td.nowrap { white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.6; border: 1px solid var(--line); background: var(--wash); color: var(--ink); }
.status-done { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
.status-wip { background: var(--wip-bg); color: var(--wip-ink); border-color: var(--wip-line); }
.status-plan { background: var(--wash); color: var(--muted); border-color: var(--control-line); }
.status-zero { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* Interactive Appendix B FAQ accordions matching home.css */
.faq-list { margin: 18px 0 32px; border-top: 1px solid var(--line); max-width: 72ch; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 54px; padding: 14px 4px; font-size: 16.5px; font-weight: 600; line-height: 1.5; cursor: pointer; list-style: none; user-select: none; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover .disclosure { border-color: var(--ink); }
.faq-item[open] summary .disclosure::after { transform: rotate(90deg) scaleX(0); opacity: 0; }
.faq-answer { padding: 0 4px 18px; color: var(--muted); font-size: 15.5px; line-height: 1.85; }
.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.disclosure { flex: 0 0 28px; position: relative; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; transition: border-color .2s ease; }
.disclosure::before, .disclosure::after { content: ""; position: absolute; inset: auto; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -.75px 0 0 -5px; background: var(--ink); transition: transform .22s ease, opacity .22s ease; }
.disclosure::after { transform: rotate(90deg); }

/* Figures, Hero & SVG Lightbox Modal */
.paper-hero { margin: 28px 0 4px; max-width: 900px; }
.pesa-hero { width: 100%; height: auto; display: block; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Segoe UI", sans-serif; }
.paper-figure { margin: 28px 0 38px; }
.figure-stage { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--canvas); }
.paper-figure svg { width: 100%; height: auto; display: block; min-width: 620px; }
.figure-zoom { position: absolute; top: 12px; right: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--canvas); color: var(--muted); font: 500 11.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; cursor: pointer; transition: color .18s ease, border-color .18s ease; }
.figure-zoom:hover { color: var(--ink); border-color: var(--ink); }
.paper-figure figcaption { margin-top: 12px; padding: 0 4px; font-size: 13px; line-height: 1.75; color: var(--muted); }
.svg-modal { width: min(1080px, calc(100vw - 32px)); max-width: none; max-height: 90dvh; margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--canvas); color: var(--ink); box-shadow: 0 28px 70px rgba(0, 0, 0, .28); }
.svg-modal::backdrop { background: rgba(0, 0, 0, .58); backdrop-filter: blur(4px); }
.svg-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.svg-modal-close { flex-shrink: 0; min-height: 34px; padding: 0 12px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--canvas); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.svg-modal-body { padding: 20px; overflow: auto; }
.svg-modal-svg { width: 100%; height: auto; min-width: 0 !important; max-height: 74dvh; }

/* Figure SVG styles + semantic status nodes */
.pesa-figure { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Segoe UI", sans-serif; }
.pesa-figure .f-region { fill: var(--wash); stroke: var(--line); stroke-width: 1.1; }
.pesa-figure .f-region.hands { fill: var(--canvas); stroke: var(--line); }
.pesa-figure .f-label { font-size: 11px; font-weight: 650; letter-spacing: 1.4px; fill: var(--muted); }
.pesa-figure .f-box rect { fill: var(--canvas); stroke: var(--ink); stroke-width: 1.25; }
.pesa-figure .f-box.strong rect { fill: var(--ink); stroke: var(--ink); }
.pesa-figure .f-box.soft rect { fill: var(--wash); stroke: var(--line); }
.pesa-figure .f-box.ghost rect { fill: var(--canvas); stroke: var(--muted); stroke-dasharray: 5 5; }
.pesa-figure .f-box.deny rect { fill: var(--deny-bg); stroke: var(--deny-line); stroke-width: 1.3; }
.pesa-figure .f-box.ok rect { fill: var(--ok-bg); stroke: var(--ok-line); stroke-width: 1.3; }
.pesa-figure .f-t { font-size: 15.5px; font-weight: 650; fill: var(--ink); }
.pesa-figure .f-d { font-size: 12px; fill: var(--muted); }
.pesa-figure .f-box.sm .f-t { font-size: 13.5px; }
.pesa-figure .f-box.sm .f-d { font-size: 11px; }
.pesa-figure .f-box.strong .f-t, .pesa-figure .f-box.strong .f-d { fill: var(--on-ink); }
.pesa-figure .f-box.deny .f-t { fill: var(--deny-ink); }
.pesa-figure .f-box.ok .f-t { fill: var(--ok-ink); }
.pesa-figure .f-wall { stroke: var(--deny-ink); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .75; }
.pesa-figure .f-line { stroke: var(--muted); stroke-width: 1.4; }
.pesa-figure .f-line.dash { stroke-dasharray: 4 5; }
.pesa-figure .f-head { fill: var(--muted); }
.pesa-figure .f-devices { font-size: 18px; font-weight: 600; fill: var(--ink); }
.pesa-figure .f-small { font-size: 12px; fill: var(--muted); }
.pesa-figure .f-small.strong { fill: var(--ink); font-weight: 650; }
.pesa-figure .f-level { font-size: 26px; font-weight: 700; fill: var(--ink); letter-spacing: -.5px; }
.pesa-figure .f-box.strong .f-level { fill: var(--on-ink); }
.pesa-figure .f-pill rect { fill: var(--wash); stroke: var(--line); }
.pesa-figure .f-pill text { font-size: 11px; font-weight: 550; fill: var(--ink); }
.pesa-figure .f-life { stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 3 5; }
.pesa-figure .f-off { fill: var(--wash); stroke: var(--line); }
.pesa-figure .f-dot { fill: var(--ink); }
.pesa-hero .h-bus { stroke: var(--line); stroke-width: 1.5; }
.pesa-hero .h-pulse { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 8 200; stroke-dashoffset: 8; }
.pesa-hero .h-dev rect { fill: var(--canvas); stroke: var(--ink); stroke-width: 1.5; }
.pesa-hero .h-chip { fill: var(--wash); stroke: var(--line); }
.pesa-hero .h-bar, .pesa-figure .h-bar { fill: var(--control-line); }
.pesa-hero .h-ink, .pesa-figure .h-ink { fill: var(--ink); }
.pesa-hero .h-mute, .pesa-figure .h-mute { fill: var(--muted); opacity: .55; }
.pesa-hero .h-band { fill: var(--wash); stroke: var(--line); stroke-width: 1.2; }
.pesa-hero .h-check { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pesa-hero { --pk-stage: #f0f0f0; --pk-s1: #f2f2f2; --pk-depth: #e8e8e8; }
.pesa-hero .h-stage { fill: var(--pk-stage); }
.pesa-hero .pk-s0 { stop-color: #fff; }
.pesa-hero .pk-s1 { stop-color: var(--pk-s1); }
.pesa-hero .pk-depth { fill: var(--pk-depth); }
.pesa-hero .pk-eye { fill: #0a0a0a; transform-box: fill-box; transform-origin: center; animation: pesa-blink 4.8s linear infinite; }
.pesa-hero .pk-body { transform-box: fill-box; transform-origin: center; animation: pesa-breathe 14s ease-in-out infinite; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pesa-hero { --pk-stage: #0e0e0e; --pk-s1: #e8e8e8; --pk-depth: #d6d6d6; } }
:root[data-theme="dark"] .pesa-hero { --pk-stage: #0e0e0e; --pk-s1: #e8e8e8; --pk-depth: #d6d6d6; }
@keyframes pesa-blink { 0%, 95.5%, 100% { transform: scaleY(1); } 97%, 98.6% { transform: scaleY(.19); } }
@keyframes pesa-breathe { 0%, 64%, 100% { transform: none; } 82% { transform: translateY(-1.6px) scale(1.025); } }
.pesa-hero .h-halo { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pesa-hero .h-cap { fill: var(--muted); font-size: 12.5px; }
.pesa-hero .h-cap.strong { fill: var(--ink); font-weight: 600; }
@keyframes pesa-flow { to { stroke-dashoffset: -26; } }
@keyframes pesa-pulse { 0% { stroke-dashoffset: 8; opacity: 0; } 8% { opacity: 1; } 34% { stroke-dashoffset: -72; opacity: 1; } 40%, 100% { stroke-dashoffset: -72; opacity: 0; } }
@keyframes pesa-halo { 0% { transform: scale(.96); opacity: 0; } 12% { opacity: .35; } 40%, 100% { transform: scale(1.2); opacity: 0; } }
.pesa-figure .f-line.dash { animation: pesa-flow 1.6s linear infinite; }
.pesa-hero .h-pulse { animation: pesa-pulse 4.2s cubic-bezier(.4, 0, .2, 1) infinite; }
.pesa-hero .h-pulse.p1 { animation-delay: .45s; }
.pesa-hero .h-pulse.p2 { animation-delay: 2.1s; }
.pesa-hero .h-pulse.p3 { animation-delay: 2.55s; }
.pesa-hero .h-halo { animation: pesa-halo 4.2s ease-out infinite; }

/* Declarations, Citation Tabs, References & Progress */
.paper-decl, .paper-cite, .paper-refs { border-top: 1px solid var(--line); margin-top: 52px; padding-top: 8px; }
.paper-decl h2, .paper-cite h2, .paper-refs h2 { margin-top: 32px; }
.paper-decl dl, .cite-formats { margin: 0 0 20px; font-size: 14px; line-height: 1.8; }
.paper-decl dl div, .cite-formats div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.paper-decl dl div:first-child, .cite-formats div:first-child { border-top: 0; }
.paper-decl dt, .cite-formats dt { font-size: 12px; color: var(--muted); padding-top: 2px; }
.paper-decl dd, .cite-formats dd { margin: 0; overflow-wrap: anywhere; }
.cite-formats dd { user-select: all; }
.cite-formats div:last-child dd, .cite-formats .cite-doi-row dd { user-select: auto; }
.cite-formats .cite-sub { color: var(--muted); font-size: 13px; }
.cite-tabs { display: inline-flex; gap: 4px; margin-bottom: 10px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--wash); }
.cite-tabs [role="tab"] { min-height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 550; cursor: pointer; }
.cite-tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--on-ink); }
.bibtex { position: relative; }
.bibtex pre { margin: 0; padding: 18px 20px; background: var(--wash); border: 1px solid var(--line); border-radius: 14px; font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre; }
.bibtex .copy { position: absolute; top: 10px; right: 10px; min-height: 32px; padding: 0 12px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--canvas); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; transition: border-color .2s ease; }
.bibtex .copy:hover { border-color: var(--ink); }
.paper-refs ol { font-size: 14px; line-height: 1.8; padding-left: 2.2em; max-width: 78ch; }
.paper-refs li { padding: 4px 8px; margin-left: -8px; border-radius: 8px; scroll-margin-top: 24px; transition: background .3s ease; }
.paper-refs li:target { background: var(--wash); }
.paper-refs a { overflow-wrap: break-word; word-break: normal; }
.note { font-size: 12.5px; line-height: 1.8; color: var(--muted); margin-top: 18px; }
.tm { margin-top: 44px; max-width: 78ch; }

/* Hub /research Bento Grid */
.hub { padding: 48px 0 88px; }
.hub-head { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.hub-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 20px; font-size: 12.5px; color: var(--muted); }
.hub-strip a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); transition: border-color .18s ease; }
.hub-strip a:hover { border-color: var(--ink); }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 32px; }
.hub-card { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--canvas); transition: border-color .22s ease, transform .22s ease; }
.hub-card:first-child { border-color: var(--ink); }
.hub-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.hub-title { margin: 4px 0 0; font-size: 21px; line-height: 1.35; letter-spacing: -.02em; }
.hub-title a:hover { text-decoration: underline; }
.hub-sub { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.hub-by { margin: auto 0 0; font-size: 12.5px; color: var(--muted); }
.hub-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 14px; margin-top: 0; border-top: 1px solid var(--line); font-size: 11.5px; }
.hub-links a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; transition: color .18s ease, border-color .18s ease; }
.hub-links a:hover { color: var(--ink); border-color: var(--ink); }
.hub-links a.hub-read { flex-basis: 100%; justify-content: center; display: inline-flex; align-items: center; padding: 8px 14px; margin-bottom: 4px; background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-size: 12.5px; font-weight: 600; }

/* Unified Footer */
.paper-footer { border-top: 1px solid var(--line); padding: 34px 0 40px; }
.paper-footer-inner { display: grid; gap: 18px; }
.footer-brand-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-brand-row .brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.footer-brand-row p { margin: 0; font-size: 13px; color: var(--muted); }
.paper-footer .footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.paper-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.paper-footer nav a, .paper-footer .back-to-top { min-height: 36px; display: inline-flex; align-items: center; color: var(--muted); transition: color .18s ease; }
.paper-footer nav a:hover, .paper-footer .back-to-top:hover { color: var(--ink); text-decoration: underline; }

/* Progress bar, Popover & Floating Top Pill */
.read-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 50; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform .12s linear; }
.cite-pop { position: absolute; z-index: 60; width: min(360px, calc(100vw - 32px)); padding: 14px 16px; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .14); font-size: 13px; line-height: 1.7; opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.cite-pop.on { opacity: 1; transform: none; pointer-events: auto; }
.cite-pop .n { display: block; font: 600 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); margin-bottom: 4px; }
.cite-pop a { word-break: break-all; text-decoration: underline; text-decoration-color: var(--control-line); }
.cite-pop .go { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.fab-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--control-line); background: var(--canvas); color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); font-size: 16px; text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.fab-top[hidden] { display: none; }
.fab-top:hover { border-color: var(--ink); transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .pesa-figure .f-line.dash, .pesa-hero .h-pulse, .pesa-hero .h-halo, .pesa-hero .pk-eye, .pesa-hero .pk-body { animation: none; }
  .cite-pop, .read-progress span, .paper-refs li, .hub-card, .lang-switch a, .paper-toc a { transition: none; }
  .hub-card:hover { transform: none; }
}

/* iPad Landscape & Small Mac */
@media (max-width: 1179px) {
  .paper-layout { grid-template-columns: 206px minmax(0, 1fr); gap: 36px; }
}

/* iPad Portrait (<= 960px) */
@media (max-width: 960px) {
  .paper-header-inner, .paper-main, .paper-footer-inner { width: calc(100% - 48px); }
  .paper-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
  .paper-meta .meta-doi { grid-column: 1 / -1; }
  .paper-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; }
  .paper-toc { position: static; max-height: none; overflow: visible; background: var(--wash); border: 1px solid var(--line); border-radius: 14px; padding: 2px 16px; }
  .paper-toc summary { min-height: 44px; }
  .paper-toc summary::after { content: "▾"; font-size: 12px; color: var(--muted); transition: transform .2s ease; }
  .paper-toc details[open] summary::after { transform: rotate(180deg); }
  .paper-toc details:not([open]) ol { display: none; margin: 0; }
  .paper-toc details[open] ol { padding: 8px 0 12px; margin: 2px 0 0; border-top: 1px solid var(--line); }
}
@media (max-width: 819px) {
  .paper-bento { grid-template-columns: minmax(0, 1fr); }
}

/* Phone / Mobile (<= 760px): crisp foldable header drawer + single-row folded toolbar */
@media (max-width: 760px) {
  .paper-header-inner, .paper-main, .paper-footer-inner { width: calc(100% - 32px); }
  .paper-header-inner { min-height: 64px; gap: 10px; position: relative; }
  .paper-header .brand { font-size: 18px; }
  .nav-drawer { margin-left: auto; position: static; }
  .nav-drawer > summary { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid var(--control-line); border-radius: 50%; cursor: pointer; list-style: none; color: var(--ink); }
  .nav-drawer > summary::-webkit-details-marker { display: none; }
  .nav-burger { display: grid; gap: 4px; width: 16px; }
  .nav-burger span { display: block; height: 1.5px; background: currentColor; border-radius: 2px; }
  .nav-drawer:not([open]) .nav-drawer-panel { display: none; }
  .nav-drawer[open] .nav-drawer-panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 45; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas); box-shadow: 0 18px 44px rgba(0, 0, 0, .16); display: grid; gap: 10px; }
  .paper-nav { display: grid; gap: 2px; }
  .paper-nav a { min-height: 42px; padding: 0 6px; }
  .paper-header .theme-control { border-left: 0; padding: 8px 6px 0; border-top: 1px solid var(--line); justify-content: space-between; }
  .paper-header .theme-control select { max-width: none; font-size: 13px; }
  .paper-header .nav-cta { min-height: 36px; padding: 0 14px; font-size: 12.5px; }
  .paper-head { padding: 22px 0 24px; }
  .paper-meta .affil { display: block; margin-top: 2px; }
  .paper-meta .affil-sep { display: none; }
  .paper-head h1, .hub h1 { font-size: clamp(24px, 6.8vw, 31px); letter-spacing: -.03em; }
  .paper-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lang-switch { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lang-switch a { padding: 0 8px; font-size: 12px; }
  .paper-actions { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .export-popover { right: 0; }
  .paper-body { font-size: 15.5px; line-height: 1.88; }
  .abstract-box, .concept-card, .keypoints { padding: 20px; }
  .concept-card dl div, .paper-decl dl div, .cite-formats div { grid-template-columns: 1fr; gap: 2px; }
  .paper-body table { font-size: 13px; }
  .table-wrap { padding: 2px 12px 6px; }
  .pesa-hero .h-cap { font-size: 13.5px; }
  .paper-footer .footer-bottom { align-items: flex-start; }
  .fab-top { right: 14px; bottom: 14px; width: 38px; height: 38px; }
}

@media print {
  @page { size: A4; margin: 18mm 18mm 18mm; }
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --canvas: #ffffff;
    --surface: #ffffff;
    --elevated: #f4f4f6;
    --ink: #111111;
    --on-ink: #ffffff;
    --muted: #52525b;
    --line: #d4d4d8;
    --wash: #fafafa;
    --panel: #fafafa;
    --control-line: #a1a1aa;
    --ok-bg: transparent; --ok-ink: #111111; --ok-line: #a1a1aa;
    --wip-bg: transparent; --wip-ink: #111111; --wip-line: #a1a1aa;
    --deny-bg: #fef2f2; --deny-ink: #991b1b; --deny-line: #fca5a5;
    --code-kw: #111111; --code-str: #1f2937; --code-cmt: #6b7280; --code-op: #111111;
  }
  .paper-header, .breadcrumb, .paper-toc, .paper-toolbar, .paper-footer, .read-progress, .skip-link, .cite-pop, .bibtex .copy, .algo-copy, .figure-zoom, .fab-top, .cite-tabs, .preview-note, .sec-anchor, .svg-modal, .paper-hero, .paper-bento { display: none !important; }
  [data-cite-panel][hidden] { display: none !important; }
  body.paper-site { background: #fff; color: #111; }
  .paper-header-inner, .paper-main, .paper-footer-inner { width: 100%; }
  .paper-layout { display: block; padding: 0; }

  /* Classic Academic Paper Title Block (Page 1) */
  .paper-head { max-width: none; padding: 0 0 10pt; border-bottom: 0; text-align: center; }
  .paper-head .eyebrow { font-size: 7.8pt; letter-spacing: .12em; color: #555; margin: 0 0 6pt; }
  .paper-head h1 { max-width: none; margin: 0 auto 6pt; font-family: Georgia, "Times New Roman", "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif CJK TC", serif; font-size: 19pt; line-height: 1.22; letter-spacing: -.01em; font-weight: 700; text-align: center; }
  .paper-subtitle { max-width: 90%; margin: 0 auto 10pt; font-family: Georgia, "Times New Roman", "Songti SC", "STSong", serif; font-size: 10pt; line-height: 1.48; color: #444; font-style: italic; }
  html[lang^="zh"] .paper-subtitle { font-style: normal; }
  .paper-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4pt 18pt; margin: 6pt auto 2pt; padding-top: 8pt; border-top: .5pt solid #d4d4d8; font-size: 8.2pt; text-align: left; }
  .paper-meta div { display: inline-flex; align-items: baseline; gap: 5pt; }
  .paper-meta dt { font-size: 7.6pt; color: #666; text-transform: uppercase; letter-spacing: .04em; }
  .paper-meta dt::after { content: ":"; }
  .paper-meta dd { font-weight: 500; color: #111; }
  .paper-meta .author-orcid { padding: 0 4pt; border: .5pt solid #999; background: transparent; color: #333; font-size: 7pt; }
  .paper-meta .author-orcid::before { display: none; }
  .paper-meta .doi-badge { padding: 0; border: 0; background: transparent; font-size: 8pt; font-weight: 500; }

  /* Classic Scholarly Body Typography */
  .paper-body { max-width: none; font-family: Georgia, "Times New Roman", "STIX Two Text", serif; font-size: 9.6pt; line-height: 1.54; color: #111; text-align: justify; hyphens: auto; }
  html[lang^="zh"] .paper-body { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif CJK TC", Georgia, serif; font-size: 9.4pt; line-height: 1.64; hyphens: none; }
  .paper-body > p, .paper-body > ul, .paper-body > ol, .paper-body > h2, .paper-body > h3, .paper-body > blockquote { max-width: none; }

  /* Academic Abstract Box with Top & Bottom Rules */
  .abstract-box { padding: 8pt 12pt 5pt; margin: 4pt 0 12pt; border: 0; border-top: 1.1pt solid #111; border-bottom: 1.1pt solid #111; border-radius: 0; background: transparent; font-size: 8.7pt; line-height: 1.48; max-width: none; text-align: justify; }
  .abstract-box p { margin: 0 0 5pt; max-width: none; }
  .abstract-box p:last-child { margin-bottom: 2pt; font-size: 8.2pt; }
  #abstract { text-align: center; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", sans-serif; font-size: 8.5pt; font-weight: 700; letter-spacing: .12em; color: #111; margin: 0 0 6pt; }

  /* Headings: Crisp Sans-Serif Hierarchy */
  .paper-body h2 { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Helvetica Neue", sans-serif; font-size: 12pt; font-weight: 700; letter-spacing: -.01em; margin: 16pt 0 6pt; padding-bottom: 2pt; border-bottom: .5pt solid #d4d4d8; break-after: avoid; text-align: left; }
  .paper-body h3 { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Helvetica Neue", sans-serif; font-size: 10pt; font-weight: 650; margin: 11pt 0 4pt; break-after: avoid; text-align: left; }
  .paper-body p { margin-bottom: 6.5pt; orphans: 3; widows: 3; }
  .paper-body ul, .paper-body ol { margin: 0 0 8pt; padding-left: 16pt; }
  .paper-body li { margin: 3pt 0; }
  .paper-body code { font-size: .84em; background: #f4f4f6; padding: .5pt 2.5pt; border-radius: 2pt; border: 0; color: #111; }

  /* Academic Callouts (Definition, Proposition, Proof, Intuition) */
  .paper-body blockquote { margin: 8pt 0 10pt; padding: 7pt 11pt; border: .6pt solid #bbb; border-left: 2.5pt solid #111; border-radius: 0; background: #fafafa; font-size: 9pt; line-height: 1.5; break-inside: avoid; }
  .paper-body blockquote.prop-box { border: .75pt solid #888; border-left: 2.5pt solid #111; background: #ffffff; }
  .paper-body blockquote.proof-box { margin-top: -5pt; margin-bottom: 10pt; border: 0; border-left: 1.2pt solid #ccc; background: transparent; padding: 4pt 10pt; font-size: 8.8pt; color: #333; }
  .paper-body blockquote.intuition-box { border: 0; border-left: 2pt solid #999; background: #f8f8fa; padding: 6pt 10pt; font-size: 8.8pt; color: #222; }

  /* Equations */
  .math-block { background: transparent; border: 0; border-radius: 0; padding: 4pt 4pt; margin: 6pt 0 9pt; font-size: 9pt; line-height: 1.5; max-width: none; overflow: visible !important; break-inside: avoid; }
  .math-block .eq-num { font-size: 8.8pt; color: #333; }
  .math { white-space: normal; }

  /* LaTeX booktabs Three-Line Tables */
  .table-card { border: 0; border-radius: 0; background: transparent; overflow: visible !important; break-inside: auto; margin: 10pt 0 13pt; }
  .table-title { background: transparent; border: 0; padding: 0 0 4pt; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", sans-serif; font-size: 8.6pt; font-weight: 700; color: #111; break-after: avoid; text-align: left; }
  .table-wrap { overflow: visible !important; padding: 0; }
  .paper-body table { width: 100%; table-layout: auto; display: table; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", sans-serif; font-size: 7.7pt; line-height: 1.4; border-top: 1.25pt solid #111; border-bottom: 1.25pt solid #111; overflow: visible !important; text-align: left; }
  .paper-body thead { display: table-header-group; }
  .paper-body th { font-size: 7.6pt; font-weight: 700; color: #111; border-bottom: .75pt solid #222; letter-spacing: 0; padding: 4pt 7pt 4pt 0; }
  .paper-body td { border-bottom: .35pt solid #e4e4e7; padding: 3.8pt 7pt 3.8pt 0; color: #111; }
  .paper-body th, .paper-body td, .paper-body td:first-child, .paper-body td.nowrap { white-space: normal !important; overflow-wrap: break-word; word-break: normal; }
  .paper-body th:last-child, .paper-body td:last-child { padding-right: 0; }
  .status-pill { border: 0; background: transparent !important; color: #111 !important; padding: 0; font-size: 7.6pt; font-weight: 700; white-space: nowrap !important; }
  .paper-body tr, .paper-figure, .algo-card, .paper-refs li { break-inside: avoid; }

  /* Figures */
  .paper-figure { margin: 10pt 0 13pt; }
  .figure-stage { border: 0; padding: 0; overflow: visible !important; }
  .paper-figure svg { min-width: 0; max-height: 122mm; }
  .paper-figure figcaption { margin-top: 5pt; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", sans-serif; font-size: 8.2pt; line-height: 1.45; color: #444; text-align: left; }

  /* LaTeX Three-Rule Algorithm Floats */
  .algo-card { border: 0; border-top: 1.25pt solid #111; border-bottom: 1.25pt solid #111; border-radius: 0; background: transparent; overflow: visible !important; margin: 9pt 0 12pt; }
  .algo-head { padding: 4pt 2pt; background: transparent; border-bottom: .6pt solid #333; font-size: 8.4pt; font-weight: 700; color: #111; }
  .algo-pre { padding: 5pt 2pt !important; background: transparent !important; }
  .algo-pre, .algo-pre code, .algo-pre .al { font-size: 7.8pt !important; line-height: 1.48 !important; white-space: pre-wrap !important; overflow-wrap: anywhere !important; overflow: visible !important; }
  .bibtex pre, .bibtex code { font-size: 7.6pt !important; line-height: 1.44 !important; white-space: pre-wrap !important; overflow-wrap: anywhere !important; overflow: visible !important; padding: 7pt 9pt; border-radius: 3pt; }

  /* Appendix B & Backmatter */
  .faq-list { border-top: .6pt solid #bbb; max-width: none; }
  .faq-item { display: block; break-inside: avoid; border-bottom: .4pt solid #e4e4e7; }
  .faq-item summary { min-height: 0; padding: 6pt 0 3pt; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", sans-serif; font-size: 9.2pt; font-weight: 700; }
  .faq-item .disclosure { display: none; }
  .faq-answer { display: block !important; color: #222; font-size: 8.9pt; line-height: 1.5; padding: 0 0 6pt; }
  .paper-decl, .paper-cite, .paper-refs { margin-top: 16pt; padding-top: 4pt; border-top: .75pt solid #999; }
  .paper-decl h2, .paper-cite h2, .paper-refs h2 { margin-top: 8pt; border-bottom: 0; }
  .paper-decl dl, .cite-formats { font-size: 8.4pt; line-height: 1.48; margin-bottom: 8pt; text-align: left; }
  .paper-decl dt, .paper-decl dd, .cite-formats dt, .cite-formats dd { text-align: left; hyphens: none; }
  .paper-decl dl div, .cite-formats div { grid-template-columns: 108px minmax(0, 1fr); gap: 8px; padding: 3.5pt 0; border-top: .35pt solid #e4e4e7; }
  .paper-refs ol { font-size: 8.1pt; line-height: 1.48; padding-left: 2.2em; max-width: none; text-align: left; }
  .paper-refs li { margin-left: 0; padding: 1.8pt 0; }
  .paper-refs a, .paper-body a { text-decoration: none; color: #111; }
  .tm { margin-top: 14pt; font-size: 7.6pt; color: #555; }
  .pesa-figure .f-line.dash, .pesa-hero .h-pulse, .pesa-hero .h-halo, .pesa-hero .pk-eye, .pesa-hero .pk-body { animation: none; }
}
