/* =============================================================
   rassic 記事ページ シンプルフラット ブラッシュアップ
   - 2026-05-21 趙(Redmine A2 / B 領域横断)
   - 対象テンプレ: resources/views/training/show.blade.php
   ============================================================= */

/* ---------- H2 / H3 ミニマル装飾 ---------- */
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0rem 0 4.2rem;
  scroll-margin-top: 7rem;
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.65;
  margin: 3rem 0 1.2rem;
  letter-spacing: 0.03em;
  color: #1a1a1a;
}

/* ---------- 強調・リスト ---------- */
.article-body strong { font-weight: 700; color: #111; }
.article-body em {
  font-style: normal;
  background: linear-gradient(transparent 60%, #ffe98a 60%);
  padding: 0 .1em;
}
.article-body ul, .article-body ol {
  margin: 1.5rem 0 2rem;
  padding-left: 1.4rem;
  line-height: 1.95;
  letter-spacing: 0.03em;
}
.article-body ul li, .article-body ol li { margin-bottom: 0.55rem; }

/* ---------- 画像 / figure ---------- */
.article-body img, .article-body figure {
  border-radius: 12px;
  margin: 2.4rem auto;
}
.article-body figure figcaption {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin-top: 0.6rem;
}

/* ---------- テーブル(早見表)シンプルフラット ---------- */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}
.article-body table th, .article-body table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e7e7e7;
  text-align: left;
  vertical-align: top;
  letter-spacing: 0.02em;
}
.article-body table th {
  background: #fafafa;
  font-weight: 600;
  color: #1a1a1a;
}
.article-body table tr:last-child td { border-bottom: none; }

/* ---------- FAQ アコーディオン ---------- */
.article-body details.faq-item {
  border-bottom: 1px solid #e7e7e7;
  padding: 0;
  margin: 0;
}
.article-body details.faq-item:first-of-type {
  border-top: 1px solid #e7e7e7;
}
.article-body details.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.4rem 0;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  letter-spacing: 0.03em;
  color: #1a1a1a;
  line-height: 1.6;
}
.article-body details.faq-item summary::-webkit-details-marker { display: none; }
.article-body details.faq-item summary::before {
  content: "+";
  flex: 0 0 1.2rem;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  color: #999;
  transition: color 0.2s ease;
}
.article-body details.faq-item[open] summary::before {
  content: "−";
  color: #1a1a1a;
}
.article-body details.faq-item summary:hover::before { color: #1a1a1a; }
.article-body details.faq-item .faq-answer {
  padding: 0 0 1.6rem 2.1rem;
  line-height: 2.0;
  letter-spacing: 0.04em;
  color: #333;
}

/* ---------- HowTo 手順番号バッジ(旧構造 / 行頭「1.」「2.」… の p 自動装飾)---------- */
.article-body p.howto-step {
  position: relative;
  padding-left: 0;
  padding-top: 3.4rem;
  margin-bottom: 1.8rem;
  margin-top: 2.2rem;
  line-height: 2;
  letter-spacing: 0.16em;
}
.article-body p.howto-step::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: #ed8936;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: 'Roboto', 'Hiragino Sans', sans-serif;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.article-body p.howto-step + img,
.article-body p.howto-step + figure {
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
}

/* ---------- HowTo 新構造(有島さん提案 / li > span + p + figure)---------- */
.article-body ol.howto-list,
.article-body ul.howto-list,
.article-body ol.howto-steps,
.article-body ul.howto-steps {
  list-style: none;
  padding-left: 0;
  margin: 2.5rem 0;
}
.article-body li.howto-step {
  list-style: none;
  position: relative;
  padding: 3.4rem 0 0 0;
  margin: 0 0 2.8rem 0;
}
.article-body li.howto-step::before { content: none; }
.article-body .howto-step__num {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: #ed8936;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: 'Roboto', 'Hiragino Sans', sans-serif;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.article-body .howto-step__text {
  margin: 0 0 1rem 0;
  padding: 0;
  line-height: 2;
  letter-spacing: 0.16em;
  font-size: 1.0625rem;
  color: #1a1a1a;
}
.article-body .howto-step__figure {
  margin: 0;
  padding: 0;
}
.article-body .howto-step__figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin: 0;
}

/* 手順用 ol(汎用カウンター版) */
.article-body ol.howto-list > li {
  counter-increment: howto;
  position: relative;
  padding-left: 0;
  padding-top: 3.4rem;
  margin-bottom: 1.8rem;
  margin-top: 2.2rem;
  line-height: 2;
  letter-spacing: 0.16em;
}
.article-body ol.howto-list { counter-reset: howto; }
.article-body ol.howto-list > li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: #ed8936;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: 'Roboto', 'Hiragino Sans', sans-serif;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---------- スマホ調整 ---------- */
@media (max-width: 768px) {
  .article-body h2 { font-size: 1.3rem; margin: 4rem 0 1.6rem; }
  .article-body h3 { font-size: 1.05rem; margin: 2.4rem 0 1rem; }
  .article-body details.faq-item summary { font-size: 1rem; padding: 1.2rem 0; }
  .article-body details.faq-item .faq-answer { padding-left: 1.6rem; padding-bottom: 1.3rem; }
  .article-body table { font-size: 0.88rem; }
  .article-body table th, .article-body table td { padding: 0.65rem 0.7rem; }
}
