/* ============================================================
   CPPO — Project Page
   Aesthetic: "Typeset Research Monograph"
   Paper-cream ground · ink type · single vermilion accent
   Fraunces (display) · Spectral (body) · IBM Plex Mono (technical)
   Original design — not derived from any template.
   ============================================================ */

/* ---------- Bilingual toggle ---------- */
:root { --cjk: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif; }
.zh { display: none; }
html[data-lang="zh"] .en { display: none; }
html[data-lang="zh"] .zh { display: inline; }
/* CJK font applied ONLY to Chinese spans, so English-only elements
   (title, subtitle, buttons, section headings, figure labels) never shift */
.zh { font-family: var(--cjk); }
/* looser leading scoped to prose blocks only — never the masthead, so
   toggling language cannot change the masthead's height (no vertical jitter) */
html[data-lang="zh"] .tldr-lead,
html[data-lang="zh"] .tldr-points li,
html[data-lang="zh"] .callout p,
html[data-lang="zh"] .entry-body p,
html[data-lang="zh"] .tab-desc,
html[data-lang="zh"] .bignum .t,
html[data-lang="zh"] .figcap,
html[data-lang="zh"] .vcard li,
html[data-lang="zh"] .stat p { line-height: 1.85; }

/* language toggle control */
.langtoggle {
    display: inline-flex;
    margin: clamp(1.4rem, 4vw, 2rem) auto 0;
    border: 1.5px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    background: var(--paper);
}
.langtoggle { display: flex; justify-content: center; width: fit-content; margin-left: auto; margin-right: auto; }
.lang-btn {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.06em;
    padding: 0.5em 1.1em;
    border: none;
    background: transparent;
    color: var(--ink-mute);
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}
.lang-btn + .lang-btn { border-left: 1.5px solid var(--line); }
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { background: var(--accent); color: #fff; }
/* the 简体中文 label always uses the CJK face (independent of current language)
   so the toggle's height never changes when switching */
.lang-btn[data-lang="zh"] { font-family: var(--cjk); }


/* ---------- Tokens ---------- */
:root {
    --paper:        #eef1f8;
    --paper-panel:  #e4e9f3;
    --paper-deep:   #d9e0ee;
    --ink:          #141821;
    --ink-soft:     #3a4254;
    --ink-mute:     #79839a;
    --accent:       #0a54d6;
    --accent-deep:  #0540ac;
    --accent-tint:  rgba(10, 84, 214, 0.09);
    --pine:         #2c5d52;
    --line:         rgba(20, 30, 55, 0.16);
    --line-soft:    rgba(20, 30, 55, 0.08);

    --display: "Fraunces", Georgia, serif;
    --serif:   "Spectral", Georgia, serif;
    --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

    --shadow-plate: 0 1px 0 rgba(20,30,55,.03), 0 26px 50px -34px rgba(20,30,55,.55);
    --maxw: 1080px;
    --narrow: 720px;
    --pad: clamp(1.25rem, 5vw, 3rem);
}

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

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

body {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.72;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* paper grain */
.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--accent); color: var(--paper); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 2; }
.narrow { max-width: var(--narrow); }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.tinted { background: linear-gradient(180deg, rgba(10,84,214,.07), rgba(10,84,214,.02)); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* mono kicker / labels */
.kicker {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

/* section header: §idx + title + rule */
.sec-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2.4rem;
    border-bottom: 1.5px solid var(--ink);
    padding-bottom: 0.7rem;
}
.sec-idx {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
    transform: translateY(-0.15em);
}
.sec-title {
    font-family: var(--display);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(1.7rem, 3.6vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
}
.sec-head .sec-aside {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-mute);
    align-self: flex-end;
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
    position: relative;
    padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.masthead::before {
    /* faint engraving grid */
    content: "";
    position: absolute; inset: 0; z-index: 0;
    background-image:
        linear-gradient(var(--line-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 75%);
            mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 75%);
    opacity: 0.7;
}
.masthead .wrap { position: relative; z-index: 2; }

.masthead-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: clamp(2rem, 6vw, 3.5rem);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mute);
}
.masthead-top .rule { flex: 1; height: 1px; background: var(--line); min-width: 30px; }
.masthead-top .brand { display: inline-flex; align-items: center; }
.masthead-top .brand img {
    height: 1.55rem;
    width: auto;
    display: block;
}

.wordmark {
    font-family: var(--display);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--ink);
    font-variation-settings: "SOFT" 0, "WONK" 1;
}

.lede {
    font-family: var(--display);
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.15rem, 3vw, 1.9rem);
    line-height: 1.25;
    text-align: center;
    color: var(--ink-soft);
    max-width: 40ch;
    margin: 1.1rem auto 0;
    text-wrap: balance;
}

/* authors — two explicit rows */
.byline { margin-top: clamp(1.8rem, 5vw, 2.8rem); text-align: center; }
.author-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.4rem;
    font-size: 1.02rem;
    color: var(--ink);
}
.author-row + .author-row { margin-top: 0.35rem; }
.author { white-space: nowrap; }
.author sup { color: var(--accent); font-size: 0.66em; font-family: var(--mono); }

.affil {
    margin-top: 1rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    text-align: center;
}
.notes {
    margin-top: 0.4rem;
    font-family: var(--mono);
    font-size: 0.68rem;
    line-height: 1.4;
    letter-spacing: 0.04em;
    color: var(--ink-mute);
    text-align: center;
    white-space: nowrap;
}
.notes .zh { font-family: var(--mono); }
.notes sup { color: var(--accent); }

/* action links */
.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-top: clamp(1.8rem, 5vw, 2.6rem);
}
.act {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.7em 1.25em;
    border: 1.5px solid var(--ink);
    border-radius: 2px;
    color: var(--ink);
    background: transparent;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.act:hover { text-decoration: none; transform: translateY(-2px); }
.act.primary { background: var(--ink); color: var(--paper); }
.act.primary:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 10px 22px -12px var(--accent-deep); }
.act.ghost:hover { background: var(--ink); color: var(--paper); }
.act.dim {
    border-color: var(--line);
    color: var(--ink-mute);
    cursor: not-allowed;
}
.act.dim:hover { transform: none; }
.act .soon { font-size: 0.66em; opacity: 0.75; }
.act .ico { flex-shrink: 0; display: block; }
.act.primary .ico path { fill: var(--paper); }
.act.primary .ico text { fill: var(--ink); }
.act.primary:hover .ico path { fill: var(--paper); }
.act.primary:hover .ico text { fill: var(--accent); }

/* ============================================================
   TOKEN-WEIGHT STRIP  (signature motif: w_t decays early→late)
   ============================================================ */
.tokenstrip {
    margin-top: clamp(2.2rem, 6vw, 3.4rem);
}
.tokenstrip-cells {
    display: flex;
    gap: 3px;
    height: 30px;
    align-items: stretch;
}
.tokenstrip-cells i {
    flex: 1;
    border-radius: 1px;
    background: var(--accent);
    display: block;
}
.tokenstrip-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 0.6rem;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
}
.tokenstrip-legend b { color: var(--accent-deep); font-weight: 600; }

/* ============================================================
   TL;DR  — the one-screen summary
   ============================================================ */
.tldr {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 3.5rem);
    align-items: start;
}
.tldr-lead {
    font-family: var(--display);
    font-optical-sizing: auto;
    font-weight: 400;
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    line-height: 1.4;
    color: var(--ink);
    text-wrap: pretty;
}
.tldr-lead strong { font-weight: 600; color: var(--accent-deep); }
.tldr-points { list-style: none; }
.tldr-points li {
    position: relative;
    padding: 0.9rem 0 0.9rem 2.2rem;
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--ink-soft);
}
.tldr-points li:last-child { border-bottom: none; }
.tldr-points li strong { color: var(--ink); font-weight: 600; }
.tldr-points li::before {
    counter-increment: tldr;
    content: counter(tldr, decimal-leading-zero);
    position: absolute; left: 0; top: 0.95rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
}
.tldr-points { counter-reset: tldr; }

/* ============================================================
   PLATES (figures, equations, generic framed blocks)
   ============================================================ */
.plate {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: var(--shadow-plate);
    padding: clamp(1rem, 3vw, 1.6rem);
}
.plate img { border-radius: 2px; }

.figcap {
    margin-top: 1rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--ink-soft);
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
}
.figcap b { color: var(--ink); font-weight: 600; }
.figcap .lab { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--accent-deep); text-transform: uppercase; }

/* equation plate */
.eq {
    position: relative;
    margin: 1.6rem 0;
    padding: 1.3rem 1.2rem;
    background: var(--paper-panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow-x: auto;
    overflow-y: hidden;
}
.eq .katex-display { margin: 0; }
.eq .katex { white-space: normal; }
.eq.small .katex { font-size: 1em; }

/* ============================================================
   OVERVIEW
   ============================================================ */
.overview-fig img { width: 100%; }

/* ============================================================
   ABSTRACT
   ============================================================ */
.abstract p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.abstract p:first-of-type { color: var(--ink); }
.abstract p:first-of-type::first-letter {
    font-family: var(--display);
    font-weight: 600;
    float: left;
    font-size: 4.4rem;
    line-height: 0.72;
    padding: 0.12em 0.12em 0 0;
    color: var(--accent);
}
.abstract strong { color: var(--ink); font-weight: 600; }

.panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 2.4rem;
}
.panel {
    padding: 1.5rem;
    border-radius: 3px;
    border: 1px solid var(--line);
    background: var(--paper);
}
.panel .tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.panel.problem { border-color: var(--line); }
.panel.problem .tag { color: var(--ink-mute); }
.panel.problem .tag::before { content: "×"; font-weight: 700; font-size: 1.1em; color: var(--ink); }
.panel.solution { border-color: rgba(10,84,214,.35); background: var(--accent-tint); }
.panel.solution .tag { color: var(--accent-deep); }
.panel.solution .tag::before { content: "→"; font-weight: 700; }
.panel p { font-size: 0.95rem; line-height: 1.6; color: var(--ink-soft); }
.panel strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   MOTIVATION
   ============================================================ */
.prose { font-size: 1.04rem; color: var(--ink-soft); }
.prose strong { color: var(--ink); }

.callout {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.4rem 1.5rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 0 3px 3px 0;
}
.callout .mark {
    font-family: var(--display);
    font-style: italic;
    font-weight: 600;
    font-size: 2rem;
    color: var(--accent);
    line-height: 1;
    flex-shrink: 0;
}
.callout h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 0.4rem; }
.callout p { font-size: 0.98rem; line-height: 1.62; color: var(--ink-soft); }

.versus {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 2rem;
}
.vcard { padding: 1.4rem 1.5rem; border-radius: 3px; border: 1px solid var(--line); }
.vcard h4 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.vcard.old { background: var(--paper); }
.vcard.old h4 { color: var(--ink-mute); }
.vcard.new { background: var(--accent-tint); border-color: rgba(10,84,214,.35); }
.vcard.new h4 { color: var(--accent-deep); }
.vcard ul { list-style: none; }
.vcard li { font-size: 0.94rem; line-height: 1.5; padding: 0.35rem 0 0.35rem 1.4rem; position: relative; color: var(--ink-soft); border-bottom: 1px solid var(--line-soft); }
.vcard li:last-child { border-bottom: none; }
.vcard li::before { position: absolute; left: 0; top: 0.35rem; font-family: var(--mono); font-size: 0.85em; }
.vcard.old li::before { content: "·"; color: var(--ink-mute); font-weight: 700; }
.vcard.new li::before { content: "+"; color: var(--accent); font-weight: 700; }

/* ============================================================
   METHOD  — editorial numbered entries (block layout, no flex traps)
   ============================================================ */
.entries { border-top: 1px solid var(--line); margin-bottom: 2.6rem; }
.entry {
    display: grid;
    grid-template-columns: minmax(0, 6rem) minmax(0, 1fr);
    gap: clamp(1rem, 4vw, 2.6rem);
    padding: 2rem 0;
    border-bottom: 1px solid var(--line);
}
.entry-num {
    font-family: var(--display);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(2.6rem, 6vw, 4rem);
    line-height: 0.9;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.entry-body { min-width: 0; }
.entry-body h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.15; margin-bottom: 0.6rem; }
.entry-body p { font-size: 0.98rem; color: var(--ink-soft); }
.entry-body strong { color: var(--ink); font-weight: 600; }
.entry-body .detail { margin-top: 0.6rem; color: var(--ink); }

.objective {
    text-align: center;
    padding: 1.6rem clamp(1rem, 4vw, 2rem) 1.8rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
}
.objective h3 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 1.2rem; }
.objective .note { margin-top: 1.1rem; font-size: 0.92rem; color: var(--ink-soft); }
.objective .note strong { color: var(--ink); }

/* ============================================================
   RESULTS — tabs + table
   ============================================================ */
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.tab {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: none;
    border: none;
    color: var(--ink-mute);
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .18s ease, border-color .18s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-deep); border-bottom-color: var(--accent); }

.panel-tab { display: none; animation: rise .35s ease; }
.panel-tab.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: none; } }

.tab-desc { font-size: 0.98rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.tab-desc strong { color: var(--ink); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); }
table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.06rem;
    font-variant-numeric: tabular-nums lining-nums;
    white-space: nowrap;
}
table.data th, table.data td { padding: 0.85rem 1.25rem; text-align: center; border-bottom: 1px solid var(--line-soft); }
table.data thead th {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 1.5px solid var(--ink);
    background: var(--paper-panel);
}
table.data th:first-child, table.data td:first-child { text-align: left; font-family: var(--mono); font-size: 0.92rem; }
table.data tbody tr:hover { background: rgba(20,30,55,.025); }
table.data tr.ours { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
table.data tr.ours:hover { background: rgba(10,84,214,.12); }
table.data tr.ours td { color: var(--ink); font-weight: 600; }
table.data tr.ours td:first-child { color: var(--accent-deep); }
.under { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--ink-mute); }
.collapse { color: var(--accent); font-style: italic; font-family: var(--display); }

.bignum {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-top: 1.6rem;
    padding: 1.2rem 1.4rem;
    background: var(--paper-panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 0 3px 3px 0;
}
.bignum .n { font-family: var(--display); font-weight: 600; font-size: 2.6rem; line-height: 1; color: var(--accent); flex-shrink: 0; }
.bignum .t { font-size: 0.95rem; color: var(--ink-soft); }

.result-fig { margin-top: 0; }
.result-fig + .result-fig { margin-top: 2rem; }
.result-fig img { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); }

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.chip { padding: 1.1rem; border: 1px solid var(--line); border-radius: 3px; text-align: center; background: var(--paper); }
.chip h4 { font-family: var(--mono); font-size: 0.82rem; color: var(--accent-deep); margin-bottom: 0.3rem; }
.chip p { font-size: 0.82rem; color: var(--ink-mute); line-height: 1.45; }

/* ============================================================
   TAKEAWAYS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--paper); }
.stat { padding: 2rem 1.5rem; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .n { font-family: var(--display); font-weight: 600; font-size: 2.6rem; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.stat h3 { font-size: 1.05rem; font-weight: 600; margin: 0.7rem 0 0.4rem; }
.stat p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }

/* ============================================================
   CITATION
   ============================================================ */
.cite {
    position: relative;
    background: var(--ink);
    border-radius: 3px;
    padding: 1.6rem 1.5rem;
    overflow: hidden;
}
.cite code {
    display: block;
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.7;
    color: #e7e0d2;
    white-space: pre;
    overflow-x: auto;
}
.copy {
    position: absolute;
    top: 1rem; right: 1rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e7e0d2;
    background: rgba(244,239,227,.08);
    border: 1px solid rgba(244,239,227,.22);
    padding: 0.45em 0.8em;
    border-radius: 2px;
    cursor: pointer;
    transition: background .18s ease;
}
.copy:hover { background: rgba(244,239,227,.18); }
.copy.done { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ============================================================
   FOOTER (colophon)
   ============================================================ */
.colophon {
    padding: 2.6rem 0;
    border-top: 1px solid var(--line);
    text-align: center;
}
.colophon p { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-mute); line-height: 1.8; }
.colophon .accent { color: var(--accent-deep); }

/* ============================================================
   MOTION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@keyframes floatUp { from { opacity: 0; transform: translateY(22px);} to { opacity: 1; transform: none; } }
.masthead .anim { opacity: 0; animation: floatUp .9s cubic-bezier(.2,.7,.2,1) forwards; }
.masthead .anim.d1 { animation-delay: .05s; }
.masthead .anim.d2 { animation-delay: .18s; }
.masthead .anim.d3 { animation-delay: .31s; }
.masthead .anim.d4 { animation-delay: .44s; }
.masthead .anim.d5 { animation-delay: .57s; }
.masthead .anim.d6 { animation-delay: .70s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .masthead .anim { opacity: 1 !important; transform: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
    .tldr { grid-template-columns: 1fr; }
    .panels, .versus { grid-template-columns: 1fr; }
    .chips { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat:nth-child(2) { border-right: none; }
    .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
    body { font-size: 17px; }
    .entry { grid-template-columns: 1fr; gap: 0.5rem; }
    .entry-num { font-size: 2.4rem; }
    .stats { grid-template-columns: 1fr; }
    .stat { border-right: none; border-bottom: 1px solid var(--line); }
    .stat:last-child { border-bottom: none; }
    .sec-head { flex-wrap: wrap; }
    .sec-head .sec-aside { display: none; }
    .author-row { font-size: 0.95rem; }
}

@media print {
    .grain, .masthead::before { display: none; }
    .reveal, .masthead .anim { opacity: 1 !important; transform: none !important; }
    body { background: #fff; }
}
