/* ===========================================================
   記事ページ用のスタイル（styles.css の続き）
   診断ツールと同じ「診断書」の様式を保つ。
   =========================================================== */

/* ===== パンくず ===== */
.crumbs {
  font-size: 0.82rem;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  padding: 14px 0 0;
  margin: 0;
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.crumbs li::after { content: "›"; margin-left: 6px; color: var(--rule); }
.crumbs li:last-child::after { content: none; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--seal); text-decoration: underline; }

/* ===== 記事ヘッダー ===== */
.article-head {
  background: var(--surface);
  border-bottom: 2px solid var(--rule-dark);
  padding-bottom: 26px;
}
.article-cat {
  display: inline-block;
  margin: 16px 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  text-decoration: none;
}
.article-cat:hover { border-color: var(--seal); color: var(--seal); }

.article-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}
.article-meta {
  font-size: 0.82rem;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  line-height: 1.9;
}
.article-meta a { color: var(--ink-2); }
.article-lead {
  margin: 18px 0 0;
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.9;
}

/* ===== 本文 ===== */
.article-body { padding: 4px 0 0; }
.article-body h2 {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 34px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.article-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 24px 0 8px;
  line-height: 1.6;
}
.article-body p { margin: 0 0 14px; line-height: 1.95; }
.article-body ul,
.article-body ol { margin: 0 0 16px; padding-left: 1.4em; }
.article-body li { margin-bottom: 8px; line-height: 1.9; }
.article-body strong { font-weight: 700; }
/* 本文中のリンクは色だけに頼らず、下線でも示す */
.article-body a {
  color: var(--seal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 補足の囲み */
.note-box {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 18px;
  background: var(--surface);
}
.note-box__label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--seal);
  margin-bottom: 6px;
}
.note-box p { margin: 0; font-size: 0.92rem; color: var(--ink-2); line-height: 1.85; }

/* 表 */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 0.88rem;
}
.article-body th,
.article-body td {
  border: 1px solid var(--rule);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.75;
}
.article-body th { background: var(--seal-tint); font-weight: 500; color: var(--ink-2); }
.table-scroll { overflow-x: auto; }
/* 最低幅を与えないと、狭い画面で列が潰れてスクロールもされない */
.table-scroll > table { min-width: 30em; }

/* ===== 診断への導線 ===== */
.to-diagnosis {
  border: 1px solid var(--seal);
  border-radius: var(--radius);
  padding: 20px 20px 22px;
  margin: 26px 0;
  background: var(--surface);
}
.to-diagnosis h2 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
  padding: 0;
  border: none;
}
.to-diagnosis p { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 14px; line-height: 1.85; }
.to-diagnosis .btn { width: 100%; }

/* ===== 出典 ===== */
.sources { margin: 30px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); }
.sources h2 {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  padding: 0;
  border: none;
  font-family: var(--sans);
}
.sources ol { margin: 0; padding-left: 1.3em; }
.sources__note {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--ink-2);
  line-height: 1.8;
}
.sources li { font-size: 0.86rem; color: var(--ink-2); line-height: 1.8; margin-bottom: 6px; }

/* ===== 署名 ===== */
.byline {
  margin: 26px 0 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
}
.byline__name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.byline p { font-size: 0.88rem; color: var(--ink-2); margin: 0 0 8px; line-height: 1.85; }
.byline ul { margin: 0; padding-left: 1.2em; }
.byline li { font-size: 0.86rem; color: var(--ink-2); line-height: 1.8; }

/* ===== 関連記事・一覧 ===== */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.article-list li:last-child { border-bottom: none; }
.article-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.6;
}
.article-list a:hover { color: var(--seal); text-decoration: underline; }
.article-list__meta {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.article-list__desc { font-size: 0.9rem; color: var(--ink-2); margin: 6px 0 0; line-height: 1.8; }

/* 診断ページ側に置く「関連する解説」 */
.related-articles { margin-top: 4px; }

@media (min-width: 600px) {
  .article-title { font-size: 1.95rem; }
  .article-body h2 { font-size: 1.35rem; }
  .to-diagnosis .btn { width: auto; min-width: 280px; }
}

@media print {
  .to-diagnosis, .crumbs { display: none; }
}

/* ===== 節のラベル =====
   出典・診断への導線など、本文の節ではないものの見出し。
   本文のh2階層に混ぜず、見出しとしての見え方だけを与える。 */
.section-label {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-family: var(--sans);
}
.section-label--cta {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===== 記事タイプごとの差 =====
   新しい部品は作らず、既存の罫線・見出し・note-box の重みだけを変える。 */

/* 統計記事：数値の表と「平均＝適正額ではない」の注意書きを先に目立たせる */
[data-article-type="stats"] .article-body table { border-top: 2px solid var(--rule-dark); }
[data-article-type="stats"] .article-body th {
  background: var(--seal-tint);
  color: var(--ink);
  font-weight: 700;
}
[data-article-type="stats"] .note-box {
  border-left: 3px solid var(--seal);
}

/* 手順記事：見出しの左に短い罫を置き、診断UIの節番号と同じ調子にする。
   手順番号は本文の見出しがすでに持っているため、CSSでは振らない。 */
[data-article-type="steps"] .article-body h2 {
  position: relative;
  padding-left: 16px;
}
[data-article-type="steps"] .article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 6px;
  height: 1em;
  background: var(--seal);
}

/* 考え方記事：部品を足さない。段落の間だけ少し開けて読みやすくする。 */
[data-article-type="essay"] .article-body p { margin-bottom: 18px; }

/* ===== 比較（適合表） =====
   順位を作らないための表。1位・★評価・No.1バッジは定義しない。
   使うのは「条件が合うかどうか」だけ。 */
.fit-table { margin: 0 0 8px; }
.fit-table table {
  width: 100%;
  min-width: 40em; /* 潰さずに横スクロールさせる */
  border-collapse: collapse;
  /* 列幅をそろえる。1社だけ広く／狭く見えると、それ自体が強弱になるため */
  table-layout: fixed;
  font-size: 0.88rem;
}
.fit-table th,
.fit-table td {
  border: 1px solid var(--rule);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.75;
}
/* 行見出し（比較軸）。列（サービス）に強弱を付けない */
.fit-table th[scope="row"] {
  background: var(--seal-tint);
  color: var(--ink-2);
  font-weight: 500;
  width: 9em;
}
.fit-table th[scope="col"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  border-bottom: 2px solid var(--rule-dark);
}
/* 掲載順が優劣に見えないよう、並び順の根拠を必ず添える */
.fit-table__order {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.8;
}
/* 各社の確認日。情報の鮮度を列ごとに持てるようにする */
.fit-table__checked {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-2);
}
.fit-table__note {
  margin: 8px 0 18px;
  font-size: 0.84rem;
  color: var(--ink-2);
  line-height: 1.8;
}
/* CTAは全列で同じ見た目にする（1社だけ目立たせない） */
.fit-table .fit-cta {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--seal);
  text-decoration: none;
  border: 1px solid var(--seal);
  border-radius: var(--radius);
  padding: 8px 14px;
  line-height: 1.5;
  background: var(--surface);
}
.fit-table .fit-cta:hover { background: var(--seal-tint); }
/* 「どれも使わない」を必ず並べる。比較表とセットで初めて成立する */
.fit-optout {
  margin: 0 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-strong);
  font-size: 0.94rem;
  line-height: 1.8;
}

/* ===== 記事本文の中でも、部品は部品の色を保つ =====
   .article-body a（詳細度 0,1,1）が .btn--primary（0,1,0）に勝つため、
   これが無いと記事内の主CTAが「緑地に緑文字」になって読めなくなる。
   同じファイルの後方で、より高い詳細度で明示的に打ち消す。 */
.article-body .btn--primary,
.article-body .btn--primary:visited {
  color: #fff;
  text-decoration: none;
}
.article-body .btn--ghost,
.article-body .btn--ghost:visited {
  color: var(--ink);
  text-decoration: none;
}
.article-body .fit-cta,
.article-body .fit-cta:visited {
  color: var(--seal);
  text-decoration: none;
}

/* ===== 記事クラスターのナビ（確認する順番の図を兼ねる） =====
   4本のつながりを、記事の冒頭で見せる。いま読んでいる回を印で示す。
   画像は使わず、番号と罫線だけで組む。 */
.cluster {
  margin: 0 0 24px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px 6px;
}
.cluster__title {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.cluster__steps { list-style: none; padding: 0; margin: 0; counter-reset: cstep; }
.cluster__step {
  position: relative;
  padding: 0 0 12px 34px;
  line-height: 1.7;
}
.cluster__step::before {
  counter-increment: cstep;
  content: counter(cstep);
  position: absolute;
  left: 0;
  top: 9px;
  width: 23px;
  height: 23px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--ink-2);
  font-size: 0.76rem;
  line-height: 21px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  z-index: 1;
}
/* 縦の線でつなぐ */
.cluster__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 33px;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}
.cluster__step a {
  display: flex;
  align-items: center;
  min-height: 40px; /* 指で押せる高さを確保する */
  font-size: 0.92rem;
  color: var(--seal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cluster__note { display: block; font-size: 0.82rem; color: var(--ink-2); line-height: 1.7; }
/* いま読んでいる回 */
.cluster__step--current::before { border-color: var(--seal); background: var(--seal); color: #fff; }
.cluster__step--current > .cluster__name {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.92rem;
}
.cluster__here {
  margin-left: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--seal);
  border: 1px solid var(--seal);
  border-radius: var(--radius);
  padding: 1px 7px;
  white-space: nowrap;
}

/* ===== この記事で分かること ===== */
.takeaway {
  margin: 0 0 22px;
  border-left: 3px solid var(--seal);
  background: var(--seal-tint);
  border-radius: var(--radius);
  padding: 14px 16px 14px 18px;
}
.takeaway__title {
  margin: 0 0 8px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.takeaway ul { margin: 0; padding-left: 1.2em; }
.takeaway li { font-size: 0.92rem; line-height: 1.8; margin-bottom: 4px; color: var(--ink); }
.takeaway li:last-child { margin-bottom: 0; }
.takeaway__conclusion {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule-strong);
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--ink);
}
.takeaway__conclusion strong { font-weight: 700; }

/* ===== 次に読む（記事末尾） ===== */
.next-read {
  margin: 26px 0 0;
  border-top: 2px solid var(--rule-dark);
  padding-top: 16px;
}
.next-read__title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.next-read__lead { margin: 0 0 10px; font-size: 0.86rem; color: var(--ink-2); line-height: 1.75; }

/* ===== カテゴリ目次（記事一覧の先頭） =====
   探しているテーマへ、スクロールせずに飛べるようにする。 */
.cat-index {
  margin: 18px 0 4px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}
.cat-index__title {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}
.cat-index__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-index__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--surface);
}
.cat-index__list a:hover { border-color: var(--seal); color: var(--seal); background: var(--seal-tint); }
.cat-index__count {
  font-size: 0.78rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.cat-index__list a:hover .cat-index__count { color: var(--seal); }

/* ===== 比較表の中のCTA =====
   3社とも同じ器・同じ大きさ。1社だけ目立たせない。
   .ad-card をそのまま使い、表のセルに収まるよう余白だけ詰める。 */
.fit-ad.ad-card {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.fit-ad .ad-tag { margin-top: 0; display: inline-block; }
.fit-ad .ad-card__link { margin: 8px 0 0; }
/* 3社のボタンを同じ幅・同じ高さにそろえる。
   アンカーテキストはASP発行コードの原文で、社名の長さが違う。
   放っておくと行数の差でボタンの高さが変わり、それ自体が強弱になるため、
   いちばん長い社名が3行で収まる高さに固定してそろえる。 */
.fit-ad .ad-card__link a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 5.8em;
  padding: 8px 10px;
  font-size: 0.84rem;
  text-align: center;
  line-height: 1.45;
}
.fit-row-cta th[scope="row"],
.fit-row-cta td { vertical-align: top; }
