/* ---------- tokens ---------- */
:root {
  --r-xs: 4px; --r-sm: 5px; --r-md: 7px; --r-lg: 9px; --r-xl: 14px;
  --font: "JetBrains Mono", "Noto Sans SC", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sb-w: 22rem;
}
html {
  --page:#ececeb; --wall:#f3f3f2; --surface:#f7f7f6; --content-bg:#fbfbfa;
  --fg:#121211; --muted:#5c5c5a;
  --border:rgba(28,28,26,.07); --ring:rgba(28,28,26,.14); --line3:rgba(28,28,26,.26);
  --tint:rgba(28,28,26,.035); --hover:rgba(28,28,26,.045);
  --fill:#0c0c0b; --onfill:#fbfbfa;
  --btnshadow: inset 0 0 0 .5px #0c0c0b, 0 1px 2px rgba(28,28,26,.16), 0 6px 14px -4px rgba(28,28,26,.18), 0 16px 30px -12px rgba(28,28,26,.16);
  background: var(--wall);
  color-scheme: light;
}
html[data-palette="sepia"] { --page:#dad7cc; --wall:#e4e1d7; --surface:#ece9e0; --content-bg:#f1efe8; --fg:#131110; --muted:#57544a; --border:rgba(35,35,32,.085); --ring:rgba(35,35,32,.17); --line3:rgba(35,35,32,.3); --tint:rgba(35,35,32,.045); --hover:rgba(35,35,32,.055); --fill:#0b0b0a; --onfill:#ece9e0; }
html[data-palette="azure"] { --page:#d6dde5; --wall:#e0e6ec; --surface:#e7ecf1; --content-bg:#eef2f6; --fg:#1a2430; --muted:#4e5a68; --border:rgba(26,36,48,.085); --ring:rgba(26,36,48,.17); --line3:rgba(26,36,48,.3); --tint:rgba(26,36,48,.045); --hover:rgba(26,36,48,.055); --fill:#0d1520; --onfill:#e7ecf1; }
html[data-palette="moss"] { --page:#d8dfd2; --wall:#e2e7dc; --surface:#e8ece3; --content-bg:#eff2eb; --fg:#1d241c; --muted:#525c50; --border:rgba(29,36,28,.085); --ring:rgba(29,36,28,.17); --line3:rgba(29,36,28,.3); --tint:rgba(29,36,28,.045); --hover:rgba(29,36,28,.055); --fill:#0e130d; --onfill:#e8ece3; }
html[data-palette="mauve"] { --page:#dfd8dd; --wall:#e6e0e4; --surface:#ece7eb; --content-bg:#f2eef1; --fg:#241c24; --muted:#5c525c; --border:rgba(36,28,36,.085); --ring:rgba(36,28,36,.17); --line3:rgba(36,28,36,.3); --tint:rgba(36,28,36,.045); --hover:rgba(36,28,36,.055); --fill:#150e15; --onfill:#ece7eb; }

html[data-scheme="dark"] {
  --page:#050608; --wall:#0a0b0d; --surface:#101113; --content-bg:#131416;
  --fg:#f7f8f8; --muted:#8a8f98;
  --border:rgba(255,255,255,.035); --ring:rgba(255,255,255,.075); --line3:rgba(255,255,255,.13);
  --tint:rgba(255,255,255,.026); --hover:rgba(255,255,255,.045);
  --fill:#edeef0; --onfill:#0a0b0d; --btnshadow:none;
  color-scheme: dark;
}
html[data-scheme="dark"][data-palette="sepia"] { --page:#0a0806; --wall:#100e0b; --surface:#1b1814; --content-bg:#201d18; --fg:#f4eee4; --muted:#8d8578; --border:rgba(244,238,228,.05); --ring:rgba(244,238,228,.09); --line3:rgba(244,238,228,.15); --tint:rgba(244,238,228,.03); --hover:rgba(244,238,228,.05); --fill:#f4eee4; --onfill:#100e0b; }
html[data-scheme="dark"][data-palette="azure"] { --page:#04060b; --wall:#090c14; --surface:#101622; --content-bg:#141b28; --fg:#e8eef8; --muted:#8590a3; --border:rgba(232,238,248,.045); --ring:rgba(232,238,248,.085); --line3:rgba(232,238,248,.145); --tint:rgba(232,238,248,.028); --hover:rgba(232,238,248,.048); --fill:#e8eef8; --onfill:#090c14; }
html[data-scheme="dark"][data-palette="moss"] { --page:#050807; --wall:#0a0d0c; --surface:#121816; --content-bg:#161d1b; --fg:#e8f0e8; --muted:#86918a; --border:rgba(232,240,232,.045); --ring:rgba(232,240,232,.085); --line3:rgba(232,240,232,.145); --tint:rgba(232,240,232,.028); --hover:rgba(232,240,232,.048); --fill:#e8f0e8; --onfill:#0a0d0c; }
html[data-scheme="dark"][data-palette="mauve"] { --page:#08060a; --wall:#0d0a0f; --surface:#18131b; --content-bg:#1d1721; --fg:#f2eaf4; --muted:#948a99; --border:rgba(242,234,244,.045); --ring:rgba(242,234,244,.085); --line3:rgba(242,234,244,.145); --tint:rgba(242,234,244,.028); --hover:rgba(242,234,244,.048); --fill:#f2eaf4; --onfill:#0d0a0f; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; font-family: var(--font); background: var(--wall); color: var(--fg); font-size: 13px; line-height: 1.6; }
::selection { background: var(--fill); color: var(--onfill); }
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid color-mix(in oklab, var(--fg) 68%, transparent); outline-offset: 2px; border-radius: var(--r-xs); }
svg { display: block; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.ico { flex: none; }

@keyframes vol-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* shared type roles */
.kicker { font-size: 11px; line-height: 16px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.meta { font-size: 11px; line-height: 16px; color: var(--muted); }
.tag { max-width: 100%; overflow: hidden; padding: 1px 5px; border: .5px solid var(--border); border-radius: var(--r-xs); background: var(--tint); color: var(--muted); font-size: 8px; line-height: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tag--warn { border-style: dashed; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-sm); font-size: 11px; line-height: 16px; cursor: pointer; white-space: nowrap; }
.btn--fill { background: var(--fill); color: var(--onfill); box-shadow: var(--btnshadow); }
.btn--fill:hover { opacity: .86; color: var(--onfill); }
.btn--ghost { border: .5px solid var(--border); background: var(--tint); color: var(--muted); padding: 0 11px; }
.btn--ghost:hover { background: var(--hover); color: var(--fg); }
.btn--sm { min-height: 28px; height: auto; padding: 5px 9px; font-size: 10px; gap: 6px; }
.btn--text { background: none; border: 0; padding: 0; height: auto; color: var(--muted); gap: 7px; }
.btn--text:hover { color: var(--fg); }
.chip { min-height: 28px; padding: 5px 9px; border: .5px solid var(--border); border-radius: var(--r-sm); background: var(--tint); color: var(--muted); font-size: 10px; line-height: 16px; white-space: nowrap; cursor: pointer; }
.chip:hover { background: var(--hover); color: var(--fg); border-color: color-mix(in oklab, var(--fg) 24%, var(--border)); }
.chip[aria-pressed="true"] { border-color: var(--fill); background: var(--fill); color: var(--onfill); box-shadow: var(--btnshadow); }

/* ---------- shell ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 0; height: 100vh; position: sticky; top: 0; border-right: .5px solid var(--border); }
.sb-head { display: flex; flex-direction: column; gap: 32px; padding: 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; height: 32px; align-self: flex-start; }
.logo-mark { width: 28px; height: 28px; flex: none; border: .5px solid var(--line3); border-radius: var(--r-xs); display: grid; place-items: center; font-size: 11px; letter-spacing: -.03em; }
.logo-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.logo-name { font-size: 13px; letter-spacing: -.01em; }
.logo-sub { font-size: 10px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { margin: 0 0 8px 8px; font-size: 11px; line-height: 16px; letter-spacing: .3px; text-transform: uppercase; color: color-mix(in oklab, var(--muted) 70%, transparent); }
.nav-label + .nav-label, .nav-link + .nav-label { margin-top: 24px; }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; padding: 6px 8px 6px 12px; border-radius: var(--r-sm); font-size: 12px; line-height: 20px; color: var(--muted); }
.nav-link:hover { background: var(--page); color: var(--fg); }
.nav-link[aria-current="page"] { color: var(--fg); }
.nav-link > span:first-child { flex: 1; }
.nav-link .n { font-size: 11px; color: var(--muted); flex: none; }
.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; width: 100%; padding: 3px; border: .5px solid var(--border); border-radius: var(--r-md); background: var(--tint); }
.seg-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; height: 30px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-size: 11px; line-height: 16px; cursor: pointer; }
.seg-btn:hover { background: var(--hover); color: var(--fg); }
.seg-btn[aria-pressed="true"] { background: var(--fill); color: var(--onfill); box-shadow: var(--btnshadow); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fill); border: .5px solid var(--line3); flex: none; }
.sb-copy { font-size: 11px; line-height: 16px; color: var(--muted); padding: 4px 2px 0; }
.menu-btn { display: none; }

main { min-width: 0; }
.wrap { width: min(100%, 1440px); margin: 0 auto; padding: 32px 28px 96px; }
.wrap--narrow { max-width: 1100px; }
.wrap--writing { max-width: 1000px; }
.wrap--article { max-width: 800px; }

/* ---------- page head ---------- */
.page-head { margin-bottom: 28px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.page-head h1 { font-size: 28px; letter-spacing: -.035em; font-weight: 500; margin: 10px 0 8px; }
.page-head .lead { max-width: 42rem; font-size: 12px; line-height: 1.8; color: var(--muted); }
.search { position: relative; display: flex; align-items: center; flex: none; width: 216px; min-height: 32px; overflow: hidden; border: .5px solid var(--border); border-radius: var(--r-sm); background: var(--tint); }
.search:hover, .search:focus-within { background: var(--hover); border-color: color-mix(in oklab, var(--fg) 20%, var(--border)); }
.search svg { position: absolute; left: 9px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-width: 0; min-height: 32px; padding: 6px 9px 6px 31px; border: 0; outline: 0; background: transparent; color: var(--fg); font-family: var(--font); font-size: 11px; line-height: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }

/* ---------- home: volumes ---------- */
.volumes { overflow: hidden; border: .5px solid color-mix(in oklab, var(--fg) 12%, transparent); border-radius: var(--r-md); background: var(--surface); padding: 20px 24px 26px; }
.volumes-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.volumes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 780px; margin: 0 auto; }
.vol { animation: vol-in 520ms cubic-bezier(.16,1,.3,1) both; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; aspect-ratio: 4/5; padding: 15px; text-align: left; color: inherit; background: var(--tint); border: .5px solid var(--border); border-radius: var(--r-sm); transition: border-color 180ms ease, background-color 180ms ease, transform 180ms cubic-bezier(.16,1,.3,1); }
.vol:nth-child(2) { animation-delay: 70ms; } .vol:nth-child(3) { animation-delay: 140ms; }
.vol:hover { border-color: color-mix(in oklab, var(--fg) 30%, transparent); background: var(--hover); transform: translateY(-2px); color: inherit; }
.vol-row > span { white-space: nowrap; }
.vol-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 8px; line-height: 13px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.vol-latin { display: block; font-size: 19px; letter-spacing: -.03em; line-height: 1.15; }
.vol-title { display: block; font-size: 11.5px; line-height: 1.65; color: var(--muted); margin-top: 6px; }
.vol-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.vol-read { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 10px; line-height: 16px; color: var(--fg); }
.cap { padding: 10px 2px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; line-height: 18px; color: var(--muted); }
.plate { position: relative; aspect-ratio: 16/5; overflow: hidden; border: .5px solid color-mix(in oklab, var(--fg) 12%, transparent); border-radius: var(--r-md); background: var(--surface); }
.plate svg { width: 100%; height: 100%; color: var(--fg); }
.plate-tags { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 4px; }
.plate img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- home: hero ---------- */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; padding: 44px 0 0; align-items: start; }
.hero .kicker { margin-bottom: 16px; }
.hero h1 { font-size: 44px; line-height: 1.06; letter-spacing: -.04em; font-weight: 500; }
.hero-latin { font-size: 15px; color: var(--muted); margin-top: 8px; }
.hero-lead { font-size: 13px; line-height: 1.85; max-width: 42rem; margin-top: 20px; text-wrap: pretty; }
.hero-meta { display: flex; flex-direction: column; gap: 5px; margin-top: 22px; }
.hero-meta div { display: grid; grid-template-columns: 16px 1fr; gap: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.65; }
.hero-cta { display: flex; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.card { background: var(--content-bg); border: .5px solid var(--border); border-radius: var(--r-lg); padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card h4 { font-size: 14px; letter-spacing: -.01em; margin-bottom: 10px; }
.now-item { display: grid; grid-template-columns: 22px 1fr; gap: 4px; font-size: 11.5px; line-height: 1.75; padding: 10px 0; border-top: .5px solid var(--border); color: var(--muted); }

/* ---------- home: index ---------- */
.section { padding: 48px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 18px; }
.section-head h2 { font-size: 11px; line-height: 16px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cat { text-align: left; color: inherit; background: var(--content-bg); border: .5px solid var(--border); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 236px; }
.cat:hover { border-color: color-mix(in oklab, var(--fg) 24%, var(--border)); background: var(--surface); color: inherit; }
.cat h3 { font-size: 18px; letter-spacing: -.025em; line-height: 1.25; }
.cat p { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.cat-list { display: flex; flex-direction: column; flex: 1; }
.cat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 18px; padding: 7px 0; border-top: .5px solid var(--border); font-size: 12px; line-height: 18px; min-width: 0; }
.cat-row span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 16px; color: var(--fg); }

/* ---------- home: timeline ---------- */
.table { border: .5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--content-bg); }
.tr { display: grid; grid-template-columns: 150px 1fr 1.3fr; gap: 20px; align-items: baseline; padding: 14px 16px; border-bottom: .5px solid var(--border); }
.tr:hover { background: var(--hover); }
.tr--head { padding: 8px 16px; background: var(--tint); }
.tr .yrs { font-size: 11.5px; color: var(--muted); }
.tr .org { font-size: 12.5px; letter-spacing: -.01em; }
.tr .place { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tr .role { font-size: 11.5px; color: var(--muted); line-height: 1.65; }

/* ---------- works grid ---------- */
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 12px; }
.work { display: block; min-width: 0; color: inherit; }
.work:hover { color: inherit; }
.cover { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; border: .5px solid color-mix(in oklab, var(--fg) 12%, transparent); border-radius: var(--r-md); background: var(--surface); }
.work:hover .cover { border-color: color-mix(in oklab, var(--fg) 30%, transparent); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.cover-ph svg { width: 100%; height: 100%; color: var(--fg); }
.work-body { display: block; padding: 10px 2px 0; }
.work-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 18px; }
.work-row strong { overflow: hidden; color: var(--fg); font-size: 12px; font-weight: 400; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.work-desc { display: block; font-size: 11px; line-height: 1.7; color: var(--muted); margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 17px; margin-top: 5px; }
.empty { display: none; flex-direction: column; gap: 4px; padding: 32px 0; border-top: .5px solid var(--border); color: var(--muted); font-size: 11px; }
.empty strong { color: var(--fg); font-weight: 400; }
.grid4:empty + .empty, .grid4[data-empty="true"] + .empty { display: flex; }

/* ---------- work detail ---------- */
.back { margin-bottom: 24px; }
.detail-cover { aspect-ratio: 16/9; overflow: hidden; border: .5px solid color-mix(in oklab, var(--fg) 12%, transparent); border-radius: var(--r-md); background: var(--surface); position: relative; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.crumb { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.detail h1 { font-size: 32px; letter-spacing: -.04em; font-weight: 500; line-height: 1.12; margin-top: 10px; max-width: 26ch; }
.detail .lead { font-size: 13px; line-height: 1.85; max-width: 42rem; margin-top: 12px; color: var(--muted); text-wrap: pretty; }
.detail-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 44px; margin-top: 40px; align-items: start; }
.detail-grid h2 { font-size: 11px; line-height: 16px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.detail-grid h2 + h2, .bullets + h2 { margin-top: 30px; }
.prose-p { font-size: 13px; line-height: 1.95; max-width: 42rem; margin-bottom: 16px; }
.bullets { display: flex; flex-direction: column; }
.bullet { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 12px 0; border-top: .5px solid var(--border); font-size: 12px; line-height: 1.75; }
.bullet svg { color: var(--muted); margin-top: 4px; }
.fact { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: .5px solid var(--border); font-size: 11.5px; }
.fact span:first-child { color: var(--muted); }
.facts .kicker { margin-bottom: 10px; }
.facts .kicker--stack { margin: 18px 0 8px; }
.facts .btn { width: 100%; margin-top: 6px; }
.facts .btn--fill { margin-top: 18px; }

/* ---------- papers ---------- */
.list { border-top: .5px solid var(--border); }
.paper { display: grid; grid-template-columns: 40px 1fr 92px; gap: 16px; align-items: start; padding: 18px 4px; border-bottom: .5px solid var(--border); }
.paper:hover { background: var(--hover); }
.paper h3 { font-size: 13.5px; font-weight: 500; line-height: 1.5; letter-spacing: -.015em; max-width: 54ch; text-wrap: pretty; }
.paper .authors, .paper .venue { font-size: 11px; margin-top: 7px; color: var(--muted); line-height: 1.7; }
.paper .venue { margin-top: 4px; }
.paper .me { color: var(--fg); border-bottom: .5px solid var(--line3); padding-bottom: 1px; }
.paper .venue em { font-style: italic; color: var(--fg); }
.paper .btn--text { margin-top: 10px; font-size: 11px; }
.paper details summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; line-height: 16px; color: var(--muted); }
.paper details summary::-webkit-details-marker { display: none; }
.paper details summary:hover { color: var(--fg); }
.paper details summary .lbl-hide, .paper details[open] summary .lbl-show { display: none; }
.paper details[open] summary .lbl-hide { display: inline; }
.paper details summary svg { transition: transform 150ms; }
.paper details[open] summary svg { transform: rotate(180deg); }
.abstract { margin-top: 10px; padding: 12px 14px; max-width: 42rem; background: var(--tint); border: .5px solid var(--border); border-radius: var(--r-md); }
.abstract .kicker { margin-bottom: 6px; }
.abstract p { font-size: 11.5px; line-height: 1.9; color: var(--muted); }
.paper .pdf { justify-self: end; width: 100%; }
.paper .pdf[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* ---------- writing ---------- */
.post { display: grid; width: 100%; grid-template-columns: 1fr 92px; gap: 16px; align-items: baseline; padding: 14px 6px; border-bottom: .5px solid var(--border); color: inherit; }
.post:hover { background: var(--hover); color: inherit; }
.post-title { font-size: 12.5px; letter-spacing: -.015em; line-height: 1.5; }
.post-excerpt { font-size: 11px; margin-top: 4px; color: var(--muted); line-height: 1.7; }
.post-date { font-size: 11px; text-align: right; color: var(--muted); }

/* ---------- article ---------- */
.article .back { margin-bottom: 28px; }
.article .crumb { margin: 0 0 12px; }
.article h1 { font-size: 26px; letter-spacing: -.035em; font-weight: 500; line-height: 1.28; text-wrap: pretty; }
.article .lead { font-size: 13px; line-height: 1.85; margin-top: 12px; color: var(--muted); text-wrap: pretty; }
.rule { width: 48px; height: 1px; background: var(--line3); margin: 28px 0; }
.prose { font-size: 13px; line-height: 2; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose table, .prose figure { margin: 0 0 20px; }
.prose h2 { font-size: 15px; font-weight: 500; letter-spacing: -.02em; margin: 36px 0 12px; }
.prose h3 { font-size: 13px; font-weight: 500; margin: 28px 0 10px; }
.prose h4 { font-size: 11px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); margin: 24px 0 8px; }
.prose a { border-bottom: .5px solid var(--line3); }
.prose a:hover { border-color: var(--fg); }
.prose strong { font-weight: 600; }
.prose code { font-size: .92em; padding: 1px 5px; border: .5px solid var(--border); border-radius: var(--r-xs); background: var(--tint); }
.prose pre { padding: 14px 16px; border: .5px solid var(--border); border-radius: var(--r-md); background: var(--tint); overflow-x: auto; line-height: 1.7; font-size: 12px; }
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.prose blockquote { padding: 2px 0 2px 16px; border-left: 1px solid var(--line3); color: var(--muted); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose img { border: .5px solid var(--border); border-radius: var(--r-md); }
.prose hr { border: 0; border-top: .5px solid var(--border); margin: 32px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 12px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: .5px solid var(--border); vertical-align: top; }
.prose th { font-weight: 500; font-size: 11px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.article-foot { border-top: .5px solid var(--border); margin-top: 36px; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .grid4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  :root { --sb-w: 18rem; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 36px; }
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .tr { grid-template-columns: 110px 1fr 1.2fr; }
}
@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; border-right: 0; border-bottom: .5px solid var(--border); background: var(--wall); }
  .sb-head { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: .5px solid var(--border); border-radius: var(--r-sm); background: var(--tint); color: var(--muted); font-size: 11px; cursor: pointer; }
  .nav, .sb-foot { display: none; }
  .sidebar[data-open="true"] .nav { display: flex; padding: 0 16px 8px; }
  .sidebar[data-open="true"] .sb-foot { display: flex; padding-top: 0; }
  .sidebar[data-open="true"] .sb-head { flex-wrap: wrap; }
  .sidebar[data-open="true"] { max-height: 100vh; overflow-y: auto; }
  .wrap { padding: 20px 16px 72px; }
  .volumes { padding: 16px 14px 18px; }
  .volumes-grid { gap: 8px; }
  .vol { padding: 11px; gap: 10px; }
  .vol-latin { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vol > .vol-row > span:first-child { display: none; }
  .vol-title { display: none; }
  .vol-foot > .kicker, .vol-foot > span:first-child { display: none; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 30px; }
  .cats { grid-template-columns: 1fr; }
  .cat { min-height: 0; }
  .grid4 { grid-template-columns: 1fr; gap: 22px; }
  .tr { grid-template-columns: 1fr; gap: 4px; }
  .tr--head { display: none; }
  .page-head-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .search { width: 100%; }
  .paper { grid-template-columns: 28px 1fr; }
  .paper .pdf { grid-column: 2; justify-self: start; width: auto; }
  .post { grid-template-columns: 1fr; gap: 4px; }
  .post-date { text-align: left; }
  .section { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .vol { animation: none; transition: none; }
}
