/* AIエージェント編集部 — カスタムスタイル */

/* =====================
   コードブロック
   ===================== */
pre {
  overflow-x: auto;
  white-space: pre;
}

/* コードブロックを黒系背景に（既存・新規の全記事に一括適用）
   ※ Tailwind typography の prose-pre 指定（薄ベージュ）を上書きする。
     prose の :where() は class 相当の詳細度のため !important で確実に勝たせる。 */
.prose pre {
  background-color: #1c1814 !important;   /* 昭和テーマに合わせた温かみのある黒 */
  border-color: #3d352b !important;
  color: #e8e0d2 !important;              /* 明るいオフホワイトで可読性確保 */
  /* 余白・角丸（Tailwind CDN の prose padding が効かず縁に密着するため明示指定） */
  padding: 1.15rem 1.35rem !important;    /* 内側の余白（上下・左右） */
  margin: 1.6rem 0 !important;            /* ブロック上下のマージン */
  border-radius: 8px !important;          /* 角丸でコードカード化 */
  /* シャープな表示 */
  font-size: 0.9rem !important;           /* やや小さめでキリッと */
  line-height: 1.65 !important;
  -webkit-font-smoothing: antialiased;    /* Mac で細く鮮明に描画（auto は太く滲む） */
  -moz-osx-font-smoothing: grayscale;
  tab-size: 2;
}

/* コードブロック内の <code> は背景透過・文字色を明色に
   （インライン code 用の金色＝#6b5010 がブロック内で低コントラストになるのを防ぐ）
   フォントは他サイトのコード表示に近いシャープな monospace スタックを指定 */
.prose pre code {
  background-color: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Code",
    "JetBrains Mono", "Fira Code", Menlo, Consolas, "Liberation Mono", monospace !important;
  font-size: inherit !important;
  font-variant-ligatures: contextual;
}

/* =====================
   記事カード（トップページ）
   ===================== */
.article-card {
  border: 1px solid #c4b898;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #f0ead8;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.article-card:hover {
  border-color: #8b6914;
  box-shadow: 0 2px 8px rgba(80, 60, 20, 0.08);
}
.article-card .thumbnail {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  object-position: top;
  display: block;
}
.article-card .card-body {
  padding: 1.25rem;
}
.article-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1410;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}
.article-card .date {
  font-size: 0.72rem;
  color: #8a7f72;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.article-card .desc {
  font-size: 0.875rem;
  color: #6b6058;
  line-height: 1.65;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #ddd4c0;
}

/* =====================
   記事本文 — リンク
   ===================== */
.prose a {
  color: #8b6914 !important;          /* design-system.md アクセントカラー */
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-color: rgba(139, 105, 20, 0.45);
  transition: color 0.15s, text-decoration-color 0.15s;
}
.prose a:hover {
  color: #6b5010 !important;
  text-decoration-color: #6b5010;
}

/* =====================
   記事本文 — 見出し
   ===================== */
.prose h2 {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: #1a1410 !important;
  letter-spacing: -0.01em;
  line-height: 1.35 !important;
  margin-top: 3rem !important;
  padding-top: 1.5rem !important;
  padding-bottom: 0.5rem !important;
  border-top: 2px solid #c4b898;
  border-bottom: 1px solid #e0d8c8;
}
.prose h2:first-child {
  border-top: none;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.prose h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #2a2520 !important;
  line-height: 1.4 !important;
  margin-top: 2rem !important;
  margin-bottom: 0.5rem !important;
  padding-left: 0.75rem !important;
  border-left: 3px solid #c4a84a;
}

/* =====================
   記事本文 — ブロック引用
   ===================== */
.prose blockquote {
  background-color: #ece4ce;
  border-left: 4px solid #c4a84a !important;
  border-radius: 0 0.375rem 0.375rem 0;
  padding: 0.875rem 1.25rem !important;
  margin: 1.5rem 0 !important;
}
.prose blockquote p {
  margin: 0 !important;
  color: #5a5048 !important;
  font-style: italic;
}

/* =====================
   記事本文 — ニュースアイテムカード
   ===================== */
.news-item {
  background-color: #f0ead8;
  border: 1px solid #c4b898;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}
.news-item h3 {
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
  padding-left: 0 !important;
  border-left: none !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #2a2520 !important;
}
.news-item p {
  margin-bottom: 0.5rem !important;
}
.news-item .news-source {
  font-size: 0.8rem;
  color: #8a7f72;
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
}

/* =====================
   記事本文 — リスト
   ===================== */
.prose ul li,
.prose ol li {
  margin-bottom: 0.4rem;
}

/* =====================
   記事本文 — まとめボックス
   ===================== */
.summary-box {
  background-color: #ece4ce;
  border: 1px solid #c4a84a;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.summary-box p {
  margin-bottom: 0.5rem !important;
  color: #3a3530;
}
.summary-box p:last-child {
  margin-bottom: 0 !important;
}

/* ── バイライン ─────────────────────────────────── */
.byline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #c4b898;
}
.byline-label {
  font-size: 12px;
  color: #a09080;
  letter-spacing: 0.05em;
}
.byline-name {
  font-size: 15px;
  font-weight: 700;
  color: #8b6914;
}
