
:root {
  --theme-color: #00A1CC;
  --theme-color-light: #f0f9ff; 
  --text-primary: #1f2937;    
  --text-secondary: #4b5563;  
  --border-color: #e5e7eb;    
}

.prose {
  color: var(--text-primary);
  font-size: 1.125rem; 
  line-height: 1.8;
  max-width: 75ch; 
  margin-left: auto;
  margin-right: auto;
}

/* --- 段落と改行 --- */
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}
.prose p:first-child {
  margin-top: 0;
}
.prose br {
  display: block;
  margin-bottom: 1em;
  content: "";
}

/* --- 見出し (H1-H6) --- */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: #111827; 
  font-weight: 800;
  line-height: 1.3;
}
.prose h1 {
  font-size: 2.5rem; 
  margin: 2em 0 1em;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.4em;
}
.prose h2 {
  font-size: 1.875rem; 
  margin: 2.5em 0 1em;
  border-left: 5px solid var(--theme-color);
  padding-left: 0.8em;
}
.prose h3 {
  font-size: 1.5rem; 
  margin: 2em 0 1em;
  border-bottom: 2px dotted var(--theme-color);
  padding-bottom: 0.3em;
}
.prose h4 {
  font-size: 1.25rem; 
  margin: 1.5em 0 0.5em;
  font-weight: 700;
  color: var(--theme-color);
}

/* --- リスト (ul, ol) --- */
.prose ul, .prose ol {
  margin: 1.5em 0;
  padding-left: 1.5em;
}
.prose li {
  margin-bottom: 0.5em;
  padding-left: 0.5em;
}
.prose ul > li::marker {
  color: var(--theme-color);
  font-weight: bold;
}
.prose ol > li::marker {
  color: var(--theme-color);
  font-weight: bold;
}

/* --- 引用 (blockquote) --- */
.prose blockquote {
  margin: 1.5em 0;
  padding: 1.5em 2em;
  background-color: var(--theme-color-light);
  border-left: 5px solid var(--theme-color);
  color: #0369a1; 
  font-style: normal;
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
}
.prose blockquote::before {
  content: '“';
  font-family: serif;
  font-size: 6em;
  font-weight: bold;
  color: rgba(0, 161, 204, 0.1);
  position: absolute;
  left: 0.1em;
  top: -0.1em;
  line-height: 1;
}
.prose blockquote p {
  margin: 0;
  position: relative;
}

/* --- リンク (a) --- */
.prose a {
  color: var(--theme-color);
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(currentColor, currentColor) bottom / 0 .1em no-repeat;
  transition: background-size .3s ease-in-out;
}
.prose a:hover {
  background-size: 100% .1em;
}

/* --- 画像 (img) と キャプション (figcaption) --- */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem; 
  margin: 2em auto;
  display: block;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.prose figcaption {
  margin-top: -1em;
  margin-bottom: 2em;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- テーブル (table) --- */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border-radius: 0.75rem;
  overflow: hidden;
}
.prose th, .prose td {
  border: none;
  padding: 1em 1.25em;
  text-align: left;
}
.prose thead {
  background-color: #111827; 
  color: white;
  font-weight: 600;
}
.prose tbody tr {
  border-bottom: 1px solid var(--border-color);
}
.prose tbody tr:last-child {
  border-bottom: none;
}
.prose tbody tr:nth-child(even) {
  background-color: #f9fafb; 
}

/* --- コードブロック (pre, code) --- */
/* インラインコード */
.prose code {
  background-color: var(--theme-color-light);
  color: var(--theme-color);
  font-weight: 600;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.9em;
}
/* 複数行コードブロック */
.prose pre {
  background-color: #1f2937; 
  color: #d1d5db; 
  padding: 1.5rem;
  margin: 2em 0;
  border-radius: 0.5rem;
  overflow-x: auto;
  white-space: pre;
  position: relative;
}
.prose pre code {
  background-color: transparent;
  color: inherit;
  font-weight: normal;
  padding: 0;
}
/* コピーボタンやファイル名の表示エリア（デザインのみ） */
.prose pre::before {
  content: 'Code Block'; 
  display: block;
  background: #374151;
  color: #9ca3af; 
  font-size: 0.8em;
  font-family: sans-serif;
  padding: 0.5em 1em;
  border-radius: 0.25rem 0.25rem 0 0;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
}

/* --- 水平線 (hr) --- */
.prose hr {
  border: none;
  height: 4px;
  background-image: linear-gradient(to right, transparent, var(--theme-color), transparent);
  margin: 3em auto;
  width: 50%;
}
/* === Synfortech流 インテリジェント目次スタイル === */
#toc {
  background-color: #fff;
  border-radius: 0.75rem; /* rounded-xl */
  padding: 1.5rem; /* p-6 */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  border-left: 4px solid #00A1CC;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03), 0 2px 4px -2px rgba(0,0,0,0.03);
}

/* タイトル */
#toc .toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem; /* text-lg */
  font-weight: 700;
  color: #1f2937; /* text-gray-800 */
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6; /* border-gray-100 */
}

/* リスト全体 */
#toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* 階層を示すガイドライン */
#toc ul::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.5rem; /* アイコンの中心あたり */
  width: 1px;
  background-color: #e5e7eb; /* border-gray-200 */
}

/* リスト項目 */
#toc li {
  position: relative;
  padding-left: 1.75rem; /* アイコン分のスペース */
}

/* リンクスタイル */
#toc a {
  display: block;
  padding: 0.5rem 0;
  color: #4b5563; /* text-gray-600 */
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  font-weight: 500;
}
#toc a:hover {
  color: #00A1CC;
  transform: translateX(4px);
}

/* 階層マーカー (h2, h3共通) */
#toc a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0.5rem; /* ガイドライン上 */
  width: 8px;
  height: 8px;
  border: 1px solid #cbd5e1; /* border-slate-300 */
  background-color: #fff;
  border-radius: 9999px;
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* h3 (下位レベル) のインデント */
#toc li.toc-level-3 {
  padding-left: 3rem; /* さらにインデント */
}

/* アクティブな項目のスタイル */
#toc a.active {
  color: #00A1CC;
  font-weight: 700;
}
#toc a.active::before {
  background-color: #00A1CC;
  border-color: #00A1CC;
}