/* Ortak yazı tipi ve düzen: editör (.a4-page.doc) ile okuma sayfası (.read.doc) AYNI kuralları kullanır. */
:root { --doc-font: 'Source Serif 4', Georgia, 'Times New Roman', serif; --doc-ac: #800000; }

.doc { font-family: var(--doc-font); font-size: 11pt; line-height: 1.7; color: #2c2c2c; overflow-wrap: anywhere; }
.read.doc { font-size: 11pt !important; line-height: 1.7 !important; color: var(--fg, #2c2c2c); margin-top: 1.2rem; }
/* Tek tip font: KaTeX dışındaki her şey sabit fontla çizilir (yapıştırılan font/boyut etkisiz) */
.doc :is(p,li,td,th,blockquote,h2,h3,figcaption,a,strong,em,u,sub,sup,pre,code,span,font):not(.katex *):not(.katex) {
  font-family: var(--doc-font) !important;
}
.doc p { margin: 0 0 .9em; text-align: justify; text-justify: inter-word; hyphens: auto; }
.doc h2 { font-size: 15pt; font-weight: 700; line-height: 1.3; color: var(--doc-ac); margin: 1.6em 0 .55em; padding-bottom: .2em; border-bottom: 1px solid #eadfd2; text-align: left; }
.doc h3 { font-size: 12.5pt; font-weight: 700; line-height: 1.35; color: #3b3b3b; margin: 1.3em 0 .45em; text-align: left; }
.doc h2:first-child, .doc h3:first-child { margin-top: 0; }
.doc ul, .doc ol { margin: 0 0 .9em; padding-left: 1.7em; }
.doc li { margin: .25em 0; text-align: justify; }
.doc li > p { margin: 0; }
.doc blockquote { margin: 1em 0; padding: .1em 1em; border-left: 3px solid #d9cdbd; color: #555; }
.doc table { border-collapse: collapse; margin: 1em 0; max-width: 100%; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid #cfc6bb; padding: .35em .7em; }
.doc img { max-width: 100%; height: auto; }
.doc pre { padding: .8em 1em; background: #f6f3ee; border-radius: 6px; overflow-x: auto; }
.doc a { color: var(--doc-ac); }
.doc a.cite { vertical-align: super; font-size: .75em; text-decoration: none; }

/* Denklemler */
.doc .math-block { position: relative; display: block; margin: 1.1em 0; padding: .4em 3.2em; text-align: center; overflow-x: auto; overflow-y: hidden; }
.doc .math-block .eq-num { position: absolute; right: .6em; top: 50%; transform: translateY(-50%); color: #555; }
.doc .math-inline { display: inline-block; }
.doc [data-latex][contenteditable="false"] { cursor: pointer; border-radius: 4px; }
.doc [data-latex][contenteditable="false"]:hover { background: #f7efe9; }
.doc [data-latex].selected { outline: 2px solid var(--doc-ac); background: #fbf3ee; }

/* Seçimde beliren mini araç çubuğu */
.mini-bar { position: fixed; z-index: 9000; display: none; align-items: center; gap: 2px; padding: 4px 6px; background: #fff; border: 1px solid #ddd3c8; border-radius: 8px; box-shadow: 0 6px 22px rgba(0,0,0,.18); font: 600 13px 'Plus Jakarta Sans', sans-serif; }
.mini-bar.show { display: flex; }
.mini-bar button, .mini-bar .mb-color { border: 0; background: transparent; padding: 5px 8px; border-radius: 5px; cursor: pointer; color: #333; font: inherit; }
.mini-bar button:hover, .mini-bar .mb-color:hover { background: #f1ebe4; }
.mini-bar button.active { background: #800000; color: #fff; }
.mini-bar .mb-sep { width: 1px; height: 18px; background: #e0d8cf; margin: 0 3px; }
.mini-bar .mb-color { position: relative; color: #800000; }
.mini-bar .mb-color input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* Okuma sayfası: A4 genişliği */
.article-paper { max-width: 210mm; margin: 1.2rem auto 0; padding: 20mm 18mm; }
@media (max-width: 760px) { .article-paper { padding: 1.2rem; } }
