/* 設問文・選択肢内の markdown ブロック要素のスタイル
   （instruction-markdown と同系のトーンで、設問文向けに余白を詰めている）
   公開過去問ページ(MPA)にも配布する(scripts/exams/lib/shared-assets.mjs)。
   MPA は * { padding: 0 } のリセットを持つため、ul/ol の余白はここが唯一の根拠 */

.markdown-text p {
  margin: 0 0 8px 0;
}

.markdown-text > *:last-child {
  margin-bottom: 0;
}

.markdown-text h2,
.markdown-text h3,
.markdown-text h4,
.markdown-text h5 {
  font-size: 1em;
  margin: 12px 0 6px 0;
  color: var(--fg);
}

.markdown-text > h2:first-child,
.markdown-text > h3:first-child,
.markdown-text > h4:first-child,
.markdown-text > h5:first-child {
  margin-top: 0;
}

.markdown-text ol,
.markdown-text ul {
  margin: 0 0 8px 0;
  padding-left: 1.5em;
}

.markdown-text li {
  margin-bottom: 4px;
}

.markdown-text table {
  border-collapse: collapse;
  font-size: 15px;
  margin: 8px 0;
}

.markdown-text th,
.markdown-text td {
  border: 2px solid var(--border-color);
  padding: 6px 10px;
  text-align: left;
  color: var(--fg);
}

.markdown-text th {
  background: var(--eval-bg);
  font-weight: 600;
}

.markdown-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--eval-bg);
  padding: 1px 4px;
  border-radius: 3px;
}

.markdown-text pre {
  background: var(--eval-bg);
  padding: 8px 12px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 0 0 8px 0;
}

.markdown-text pre code {
  background: none;
  padding: 0;
}

/* 下線(<u id label>)と空欄(<blank>)。InstructionSection.css の
   .instruction-markdown u / .blank-label と同じ見た目を .markdown-text でも出す */
.markdown-text u {
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  display: inline;
  font-weight: bold;
}

.markdown-text .underline-label {
  vertical-align: baseline;
  margin-right: 0.1em;
}
