.katex-display { overflow-x: auto; overflow-y: hidden; padding: .6rem .15rem; max-width: 100%; }
.post-main, .post-body, .math-preview { min-width: 0; }
.post-body .katex { font-size: 1.13em; }
.math-editor-bar, .contribution-fields, [data-reference-chips] { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.math-editor-bar { padding: .8rem; border-bottom: 1px solid var(--line); }
.math-editor-bar a { font-size: 0.8925rem; margin-left: auto; }
.math-preview { padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .8rem; }
.math-preview[hidden] { display: none; }
.math-dialog { width: min(650px, calc(100vw - 2rem)); max-height: 90vh; overflow: auto; padding: 1.4rem; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 1rem; }
.math-dialog::backdrop { background: #0009; }
.math-dialog label { display: block; margin: 1rem 0; }
.math-dialog textarea { width: 100%; font-family: ui-monospace, monospace; margin-top: .5rem; }
.ql-editor .convi-math-source { display: inline-block; max-width: 100%; overflow-wrap: anywhere; white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: .9em; background: #b9913a22; border-radius: .25rem; padding: .12rem .25rem; cursor: pointer; }
.contribution-fields { margin: .5rem 0 1rem; align-items: flex-start; }
.contribution-fields small { display: block; margin-top: .4rem; color: var(--muted); }
.field-label { font-weight: 600; display: block; margin-bottom: .45rem; }
.reference-chip { background: transparent; color: inherit; border: 1px solid var(--line); border-radius: 1rem; padding: .25rem .6rem; cursor: pointer; }
.post-dependencies { padding: .6rem 0; font-size: 0.9135rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.dependency-stale { color: #dc8d56; font-weight: 600; }
.post-source { margin: .65rem 0; font-size: 0.8925rem; }
.post-source summary { cursor: pointer; color: var(--muted); }
.post-source textarea { width: 100%; margin-top: .6rem; font-family: ui-monospace, monospace; font-size: 0.8925rem; }
.post-source code { overflow-wrap: anywhere; }
.math-notice { margin: 1rem 0; }
.math-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.math-hero h1 { margin: 0 0 .7rem; }
.math-guide { margin: 1.5rem 0; }
.math-guide summary { font-size: 1.2075rem; font-weight: 600; cursor: pointer; }
.math-guide pre { overflow: auto; padding: 1rem; border: 1px solid var(--line); border-radius: .5rem; }
.math-thread-list { display: grid; gap: .8rem; margin: 1rem 0; }
.math-thread-list h3 { margin: .3rem 0; }
.math-thread-list .thread-page-meta { flex-wrap: wrap; }
@media(max-width: 700px) { .math-hero { grid-template-columns: 1fr; gap: .8rem; } .math-editor-bar a { margin-left: 0; } .contribution-fields > .field { width: 100%; } }
