/* ==========================================================================
   Blog prose — rendered Markdown body (.post-body) + table of contents
   (.post-toc). Shared by the public article page and the admin editor preview,
   so "Önizle" matches the live post exactly. Themed via CSS variables.
   ========================================================================== */

.post-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--fg2);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.post-body > *:first-child { margin-top: 0; }
.post-body > *:last-child { margin-bottom: 0; }

.post-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--fg);
  margin: 42px 0 16px;
  scroll-margin-top: 90px;
}
.post-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg);
  margin: 32px 0 12px;
  scroll-margin-top: 90px;
}
.post-body h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin: 26px 0 10px;
}

.post-body p { margin: 0 0 18px; text-wrap: pretty; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.post-body a:hover { color: var(--accent2); }
.post-body strong { color: var(--fg); font-weight: 600; }
.post-body em { font-style: italic; }

.post-body ul, .post-body ol {
  margin: 0 0 18px;
  padding-left: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-body li { padding-left: 4px; }
.post-body li::marker { color: var(--accent); }
.post-body ul ul, .post-body ol ol, .post-body ul ol, .post-body ol ul { margin: 8px 0 0; }

.post-body blockquote {
  margin: 0 0 20px;
  padding: 6px 20px;
  border-left: 3px solid var(--accent);
  background: var(--glow);
  border-radius: 0 8px 8px 0;
  color: var(--fg2);
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}
.post-body pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
}
.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg);
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 6px 0 20px;
}
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: 9px 13px;
  text-align: left;
}
.post-body th { background: var(--bg2); color: var(--fg); font-weight: 600; }

.post-body input[type="checkbox"] { margin-right: 8px; accent-color: var(--accent); }

/* --- Table of contents --------------------------------------------------- */
.post-toc { counter-reset: toc; }
.post-toc ol { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.post-toc a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--fg2);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s;
}
.post-toc a:hover { color: var(--accent); }
.post-toc a.lvl-3 { margin-left: 26px; font-size: 14px; }
.post-toc a.lvl-2::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  flex: none;
}
.post-toc a.lvl-3::before {
  content: "›";
  color: var(--accent);
  flex: none;
}
