/* ================================================================
   PDF Extraction Viewer — portal temasıyla uyumlu
   ================================================================ */

:root {
  --bg:         #f4f6f9;
  --surface:    #ffffff;
  --surface-2:  #f0f3f8;
  --border:     #dde3ed;
  --text:       #1a2640;
  --muted:      #5a6a85;
  --primary:    #003F87;
  --primary-lt: #1a5fa8;
  --accent:     #E63329;
  --ok:         #1a7a40;
  --warn:       #92590a;
  --error:      #c5221f;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 6px 24px rgba(0,63,135,0.12);
}

/* ── Full-screen layout: portal header/footer gizli, viewer tüm ekran ── */
body.viewer-page .site-header,
body.viewer-page .site-footer {
  display: none !important;
}

.viewer-wrapper {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: var(--bg);
}

/* ── Topbar ──────────────────────────────────────────────────────── */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  margin-right: 4px;
}

input, select {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,63,135,0.1);
}

button {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}
button:hover  { background: var(--primary-lt); border-color: var(--primary-lt); }
button:active { transform: translateY(1px); }

.status {
  justify-self: end;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

/* ── Toolbar ─────────────────────────────────────────────────────── */
.toolbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.slot {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.slot label {
  font-size: 11px;
  color: var(--muted);
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.slot label .kbd {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  background: rgba(0,63,135,0.07);
  border: 1px solid rgba(0,63,135,0.2);
  color: var(--primary);
  padding: 1px 5px;
  border-radius: 4px;
}

.slot select { width: 100%; }

/* ── Panel grid ──────────────────────────────────────────────────── */
#grid {
  display: grid;
  gap: 10px;
  padding: 10px;
  height: 100%;
  min-height: 0;
}

.layout-single { grid-template-columns: 1fr;     grid-template-rows: 1fr; }
.layout-two    { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.layout-four   { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

#grid.has-maximized {
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
}
#grid.has-maximized .panel:not(.maximized) { display: none; }

/* ── Panel ───────────────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  min-height: 120px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel:hover:not(.maximized) {
  border-color: #b8c8e0;
  box-shadow: var(--shadow-lg);
}

.panel.maximized {
  animation: panel-zoom 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,63,135,0.15), var(--shadow-lg);
}

@keyframes panel-zoom {
  from { transform: scale(0.97); opacity: 0.85; }
  to   { transform: scale(1);    opacity: 1; }
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  flex-shrink: 0;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
  user-select: none;
  flex: 1;
  padding: 3px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.panel-header-left:hover  { background: rgba(0,63,135,0.06); }
.panel-header-left:active { background: rgba(0,63,135,0.12); }

.panel-slot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(0,63,135,0.1);
  border: 1px solid rgba(0,63,135,0.25);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.panel.maximized .panel-slot-badge {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.panel-title {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
}

.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.panel-action {
  height: 24px;
  width: 26px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.panel-action:hover {
  background: rgba(0,63,135,0.08);
  border-color: var(--primary);
  color: var(--primary);
}
.panel-action svg { display: block; }

.panel.maximized .panel-action {
  background: rgba(0,63,135,0.08);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Panel content ───────────────────────────────────────────────── */
.content {
  flex: 1;
  overflow: auto;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}

iframe,
.pdf-frame {
  width: 100%;
  height: calc(100% - 28px);
  border: 0;
  background: #fff;
  min-height: 380px;
}

.pdf-fallback {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 12px;
}

.pdf-fallback a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.pdf-fallback a:hover {
  text-decoration: underline;
}

pre {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  background: #f6f8fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.empty { color: var(--muted); font-size: 12px; }
.ok    { color: var(--ok); }
.warn  { color: var(--warn); }
.err   { color: var(--error); }
.kv    { margin-bottom: 10px; }
.k     { color: var(--primary); font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.v     { color: var(--text); }

/* ── Markdown toolbar ────────────────────────────────────────────── */
.md-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 6;
  padding: 8px 6px;
  margin: -4px -4px 10px -4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.md-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  font-size: 11px;
  height: 26px;
  padding: 0 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.md-btn:hover { background: var(--surface-2); border-color: #b8c8e0; }
.md-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

.md-toc-info {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  padding-right: 4px;
}

/* ── Loading overlay ─────────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(244, 246, 249, 0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.loading-overlay.active { opacity: 1; pointer-events: auto; }

.loading-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 12.5px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err  { border-color: rgba(197, 34, 31, 0.4); }
.toast.ok   { border-color: rgba(26, 122, 64, 0.4); }

/* ── Help FAB & popover ──────────────────────────────────────────── */
.help-fab {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  box-shadow: var(--shadow);
}
.help-fab:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.help-pop {
  position: fixed;
  bottom: 56px;
  left: 16px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  z-index: 30;
  display: none;
  font-size: 12px;
  color: var(--text);
}
.help-pop.show { display: block; }
.help-pop h4 {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--text);
}
.help-row .kbd {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10.5px;
  background: rgba(0,63,135,0.07);
  border: 1px solid rgba(0,63,135,0.2);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── New ground truth editor ────────────────────────────────────── */
.gt-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
}
.gt-modal.show { display: flex; }

.gt-dialog {
  width: min(1180px, 96vw);
  height: min(820px, 92vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.32);
  overflow: hidden;
  position: relative;
}

.gt-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 76px;
  padding: 12px 230px 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.gt-dialog-head strong { color: var(--text); font-size: 14px; }
.gt-dialog-head span { color: var(--muted); font-size: 12px; }

.gt-title-block {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.gt-save-hint {
  flex-basis: 100%;
  margin-top: 4px;
}

.gt-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 2;
}

.gt-close,
.gt-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.gt-close {
  width: 34px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.gt-save-button {
  min-width: 168px;
  padding: 0 18px;
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,63,135,0.18);
}

.gt-choice {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.gt-choice p { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.gt-choice-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.gt-dialog-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
}

.gt-tree {
  overflow: auto;
  padding: 12px;
  border-right: 1px solid var(--border);
  background: #f8fafc;
}

.gt-tree-node {
  width: 100%;
  height: auto;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 3px 0;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}
.gt-tree-node:hover { background: #eef5ff; color: var(--primary); }
.gt-tree-node.filled { border-color: #86efac; background: #f0fdf4; }
.gt-tree-children {
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1px dashed #cbd5e1;
}
.gt-node-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gt-node-kind {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.gt-editor { overflow: auto; padding: 16px; }
.gt-editor h3 { margin: 0 0 8px; color: var(--text); font-size: 15px; }
.gt-editor label {
  display: block;
  margin: 12px 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.gt-editor textarea,
.gt-editor input[type="text"],
.gt-editor input[type="number"],
.gt-editor select { width: 100%; min-height: 36px; }
.gt-editor textarea {
  min-height: 120px;
  resize: vertical;
  padding: 10px;
}
.gt-source-preview {
  max-height: 170px;
  overflow: auto;
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.gt-array-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.gt-array-row span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

@media (max-width: 900px) {
  .gt-dialog-body { grid-template-columns: 1fr; grid-template-rows: 260px minmax(0, 1fr); }
  .gt-tree { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* ============================================================
   MARKDOWN PREVIEW — GitHub Light stili
   ============================================================ */
.md-preview {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  word-wrap: break-word;
  white-space: normal;
  padding: 4px 6px 24px;
}
.md-preview > *:first-child { margin-top: 0 !important; }
.md-preview > *:last-child  { margin-bottom: 0 !important; }

.md-preview h1, .md-preview h2, .md-preview h3,
.md-preview h4, .md-preview h5, .md-preview h6 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #0d1117;
}
.md-preview h1 { font-size: 1.85em; padding-bottom: 0.3em; border-bottom: 1px solid var(--border); }
.md-preview h2 { font-size: 1.45em; padding-bottom: 0.28em; border-bottom: 1px solid var(--border); }
.md-preview h3 { font-size: 1.2em; }
.md-preview h4 { font-size: 1.05em; }
.md-preview h5 { font-size: 0.9em; }
.md-preview h6 { font-size: 0.85em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.md-preview p  { margin: 0 0 14px; }

.md-preview a { color: var(--primary); text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color 0.15s ease; }
.md-preview a:hover { color: var(--primary-lt); border-bottom-color: var(--primary); }

.md-preview :not(pre) > code {
  background: rgba(0,63,135,0.06);
  border: 1px solid rgba(0,63,135,0.14);
  border-radius: 5px;
  padding: 1.5px 5px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: var(--primary);
  white-space: break-spaces;
}

.md-preview pre {
  background: #f6f8fa !important;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow: auto;
  margin: 14px 0;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre;
  word-break: normal;
}
.md-preview pre code,
.md-preview pre code.hljs {
  background: transparent !important;
  border: none;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: inherit;
  color: var(--text);
  white-space: pre;
}

.md-preview .code-block-wrapper { position: relative; }
.md-preview .code-block-wrapper .code-lang {
  position: absolute; top: 8px; right: 56px;
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  pointer-events: none; user-select: none;
}
.md-preview .code-copy-btn {
  position: absolute; top: 6px; right: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  font-weight: 600;
  font-family: inherit;
}
.md-preview .code-block-wrapper:hover .code-copy-btn { opacity: 1; }
.md-preview .code-copy-btn:hover { background: var(--surface-2); border-color: #b8c8e0; }
.md-preview .code-copy-btn.copied {
  background: #e6f4ec;
  border-color: #b3ddc2;
  color: var(--ok);
  opacity: 1;
}

.md-preview blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  border-left: 4px solid var(--primary);
  background: rgba(0,63,135,0.04);
  color: var(--text);
  border-radius: 0 6px 6px 0;
}
.md-preview blockquote > :first-child { margin-top: 0; }
.md-preview blockquote > :last-child  { margin-bottom: 0; }

.md-preview ul, .md-preview ol { margin: 8px 0 12px; padding-left: 28px; }
.md-preview li { margin: 4px 0; }
.md-preview li > ul, .md-preview li > ol { margin: 4px 0; }
.md-preview li::marker { color: var(--primary); }

.md-preview .task-list-item { list-style-type: none; margin-left: -22px; }
.md-preview .task-list-item input[type="checkbox"] {
  margin: 0 8px 0 0;
  accent-color: var(--primary);
  vertical-align: middle;
}

.md-preview table {
  border-collapse: collapse;
  margin: 16px 0;
  width: 100%;
  display: block;
  overflow-x: auto;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.md-preview thead { background: var(--surface-2); }
.md-preview th, .md-preview td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.md-preview th { font-weight: 700; color: var(--text); white-space: nowrap; }
.md-preview tbody tr:nth-child(2n) td { background: rgba(0,63,135,0.02); }
.md-preview tbody tr:hover td { background: rgba(0,63,135,0.04); }

.md-preview hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.md-preview img { max-width: 100%; border-radius: 6px; margin: 8px 0; border: 1px solid var(--border); }
.md-preview.hide-images img { display: none !important; }
.md-preview strong { color: #0d1117; font-weight: 700; }
.md-preview em     { font-style: italic; }
.md-preview del    { color: var(--muted); }
.md-preview mark   { background: #fff3b0; color: #4a3500; padding: 1px 4px; border-radius: 3px; }
.md-preview sub, .md-preview sup { font-size: 0.78em; line-height: 0; }

.md-preview .footnotes {
  margin-top: 32px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted);
}
.md-preview .footnotes ol { padding-left: 22px; }
.md-preview .footnotes li { margin: 6px 0; }
.md-preview sup.footnote-ref a { color: var(--accent); font-weight: 600; padding: 0 2px; }

.md-preview dl dt { font-weight: 700; color: var(--text); margin-top: 10px; }
.md-preview dl dd { margin-left: 18px; color: var(--muted); }

.md-preview .heading-anchor {
  opacity: 0; margin-left: 8px;
  color: var(--primary); text-decoration: none;
  font-weight: 400; font-size: 0.85em;
  transition: opacity 0.15s ease;
}
.md-preview h1:hover .heading-anchor,
.md-preview h2:hover .heading-anchor,
.md-preview h3:hover .heading-anchor,
.md-preview h4:hover .heading-anchor,
.md-preview h5:hover .heading-anchor,
.md-preview h6:hover .heading-anchor { opacity: 1; }

.md-preview .katex { font-size: 1.05em; }
.md-preview .katex-display { margin: 16px 0; overflow-x: auto; }
.md-preview abbr[title] { text-decoration: underline dotted; cursor: help; }
.md-preview ::selection { background: rgba(0,63,135,0.15); }
