/* ==========================================================================
   type-read.css｜② 解説ページ共通CSS（第2層・v1.9）
   作成：2026-11-23｜更新：2026-11-23
   - v1.2：.rd-bar-row を科目名＋役割ラベル＋全幅バーの2段組へ変更し、左右比較の軸とスケールを統一
   - v1.3：比較図の図注（figcaption）を追加（Codex）
   - v1.4：ページ専用の図（対比図・流れ図・2要素図）を subject-and-strategy.css へ移設、
           CTAのプライバシー注記を廃止（②の相談は contact.php へ案内）、
           .rd-section p.rd-keyline の上下余白を修正（ClaudeCode）
   - v1.5：汎用テーブル（.rd-table）・FAQパネル（.rd-faq-panel）・冒頭末尾サマリー余白を追加（Antigravity）
   - v1.6：600px以下の目次バーを1列から2列に変更（ClaudeCode）
   - v1.7：目次バーをPC含め本文幅760pxの2列グリッドへ統一、.rd-sublead の複数段落（div内p）に対応（Antigravity）
   - v1.8：目次バーをPC・タブレットで2行構成（6項目以下3列／7項目以上4列、幅920px）へ変更、
           600px以下は縦余白を詰めたコンパクト2列に調整（Antigravity）
   - v1.9：h1（.rd-hero-title）を語の途中で折り返さず、行の長さをそろえる指定を追加（ClaudeCode）
   - ページ専用の図解・部品は第3層（ページ専用CSS）に置き、この型には全ページ共通の部品だけを置く。
   第1層 style.css（v4.0）土台
   対象：考え方や判断基準を読ませる解説ページ・規約・ハブページ
   - クラス名の頭文字は rd-（read）で統一（帯色補助 .band--blue を除く）。
   - 本文列・CTA・関連は .wrap.wrap--narrow（760px）、図解・多列カードは
     .rd-wide（920px）、目次バーは920px幅・2行構成、大型表は .wrap（1100px）を使い分ける。
   ========================================================================== */

/* ===== 帯色補助（type-guide.css v2.4 と同一色） ===== */
.band--blue {
  background: #e4ecf6;
}

/* ===== 中広枠（920px：図解・多列カード用、左右均等拡張） ===== */
.rd-wide {
  width: 100%;
  max-width: calc(920px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rd-wide .rd-item-grid {
  margin: 28px 0;
}

/* ===== 解説ページの冒頭 ===== */
.rd-hero {
  background: var(--bg-white);
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.rd-hero p.item-kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.rd-hero-title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.9vw, 32px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--navy);
  word-break: auto-phrase;
  text-wrap: balance;
}

.rd-sublead {
  margin: 0 0 24px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--navy);
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-muted);
  font-weight: 500;
}

.rd-sublead p {
  margin: 0 0 12px;
}

.rd-sublead p:last-child {
  margin-bottom: 0;
}

.rd-byline {
  margin: 0 0 22px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-muted);
}

.rd-byline strong {
  color: var(--navy);
}

/* ===== 要点サマリー枠 ===== */
.rd-summary {
  margin: 0 0 28px;
  padding: 20px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: var(--radius);
}

.rd-summary-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.5;
}

.rd-summary ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rd-summary li {
  position: relative;
  padding: 6px 0 6px 18px;
  border-bottom: 1px solid rgba(6, 40, 82, 0.08);
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
}

.rd-summary li:first-child {
  padding-top: 0;
}

.rd-summary li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rd-summary li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(6px + 0.65em);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.rd-summary li:first-child::before {
  top: 0.65em;
}

/* ===== 冒頭導入 ===== */
.rd-lead p {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--text);
}

.rd-lead p:last-child {
  margin-bottom: 0;
}

.rd-lead p.rd-keyline {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--navy);
}

/* ===== スリム目次バー ===== */
.rd-toc-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--line);
}

.rd-toc-bar .wrap {
  max-width: calc(920px + var(--gutter) * 2);
}

.rd-toc-bar-list {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 20px;
}

.rd-toc-bar-list:has(> li:nth-child(7)) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rd-toc-bar-list a {
  display: block;
  padding: 5px 2px 6px;
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  border-bottom: 1px solid rgba(6, 40, 82, 0.1);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.rd-toc-bar-list a:hover,
.rd-toc-bar-list a:focus-visible {
  color: var(--navy-soft);
  text-decoration: none;
  border-bottom-color: var(--navy);
}

/* ===== 章・見出し・本文 ===== */
.rd-section {
  padding: 68px 0;
  border-bottom: 1px solid var(--line);
}

.rd-section:not(.band) {
  background: var(--bg-white);
}

.rd-section.band {
  padding: 68px 0;
}

.rd-section.band.rd-section--compact {
  padding: 48px 0;
}

.rd-section[id] {
  scroll-margin-top: 84px;
}

.rd-sec-head {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.rd-sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background: var(--navy);
}

.rd-sec-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 600;
  line-height: 1.5;
  color: var(--navy);
}

.rd-sec-head--center {
  text-align: center;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 22px;
}

.rd-sec-head--center::after {
  position: static;
  display: block;
  margin: 14px auto 0;
}

.rd-h3 {
  margin: 34px 0 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--navy);
}

.rd-section p {
  margin: 0 0 18px;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--text);
}

.rd-section p:last-child {
  margin-bottom: 0;
}

.rd-section p strong {
  color: var(--navy);
}

/* ===== 結論強調（2段階） ===== */
.rd-keyline {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.85;
  color: var(--navy);
}

.rd-section p.rd-keyline {
  margin: 24px 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.85;
  color: var(--navy);
}

.rd-keyline:last-child,
.rd-section p.rd-keyline:last-child {
  margin-bottom: 0;
}

.rd-keyline--white {
  background: var(--bg-white);
}

.rd-statement {
  margin: 26px 0;
  padding: 24px 26px;
  background: var(--bg-cream);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  text-align: center;
  font-family: var(--serif);
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.85;
  color: var(--navy);
}

/* ===== 確認項目グリッド ===== */
.rd-check-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 24px 0;
  padding: 0;
}

.rd-check-grid li {
  position: relative;
  padding: 13px 16px 13px 38px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text);
}

.rd-check-grid li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 13px;
  color: var(--navy);
  font-weight: 700;
}

/* ===== 構造化項目グリッド ===== */
.rd-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 20px 0 24px;
}

.rd-item-grid > div {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.rd-item-grid--white > div {
  background: var(--bg-white);
}

.rd-item-grid--3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rd-item-grid dt {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--navy);
}

.rd-item-grid dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

/* ===== 注記・汎用リスト ===== */
.rd-section p.rd-small-note {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
}

.rd-list {
  list-style: none;
  margin: 18px 0 22px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rd-list li {
  position: relative;
  padding: 7px 0 7px 18px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  border-bottom: 1px solid rgba(6, 40, 82, 0.08);
}

.rd-list li:first-child {
  padding-top: 0;
}

.rd-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rd-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(7px + 0.65em);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.rd-list li:first-child::before {
  top: 0.65em;
}

.rd-note {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

/* ===== 末尾CTA帯 ===== */
.rd-cta {
  text-align: center;
}

.rd-cta p {
  margin: 0 auto 14px;
  max-width: 680px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.rd-cta p.rd-cta-micro {
  margin: 16px auto 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.rd-cta .cta-actions {
  margin: 22px 0 0;
}

/* ===== 末尾関連リンク（②解説型9ページ共通・細い横罫線1列リスト） ===== */
.rd-related {
  background: var(--bg-white);
  padding: 56px 0 64px;
}

.rd-related h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
}

.rd-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.rd-related-list li {
  border-bottom: 1px solid var(--line);
}

.rd-related-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 12px;
  color: var(--navy);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.rd-related-link:hover,
.rd-related-link:focus-visible {
  background: var(--bg-surface);
  color: var(--navy-soft);
}

.rd-related-title {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--navy);
}

.rd-related-arrow {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.rd-related-link:hover .rd-related-arrow,
.rd-related-link:focus-visible .rd-related-arrow {
  transform: translateX(4px);
}

/* ===== レスポンシブ（<= 960px） ===== */
@media (max-width: 960px) {
  .rd-hero {
    padding: 32px 0 28px;
  }

  .rd-section,
  .rd-section.band {
    padding: 52px 0;
  }

  .rd-section.band.rd-section--compact {
    padding: 36px 0;
  }

  .rd-toc-bar-list {
    gap: 4px 14px;
  }

  .rd-toc-bar-list a {
    font-size: 13px;
    padding: 4px 0 5px;
  }

  .rd-item-grid--3col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rd-related {
    padding: 44px 0 52px;
  }
}

/* ===== レスポンシブ（<= 600px） ===== */
@media (max-width: 600px) {
  .rd-section p,
  .rd-lead p {
    font-size: 15px;
    line-height: 1.9;
  }

  .rd-summary {
    padding: 16px 18px;
  }

  .rd-toc-bar-list,
  .rd-toc-bar-list:has(> li:nth-child(7)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 0;
    gap: 2px 12px;
  }

  .rd-toc-bar-list a {
    font-size: 12.5px;
    line-height: 1.4;
    padding: 4px 0;
  }

  .rd-check-grid,
  .rd-item-grid,
  .rd-item-grid--3col {
    grid-template-columns: 1fr;
  }

  .rd-cta p {
    text-align: left;
  }

  .rd-cta p.rd-cta-micro {
    text-align: center;
  }

  .rd-related-link {
    padding: 15px 6px;
    gap: 12px;
  }

  .rd-related-title {
    font-size: 14.5px;
  }
}


/* ==========================================================================
   v1.5 拡張：汎用テーブル（.rd-table）・FAQパネル（.rd-faq-panel）・冒頭末尾余白
   ========================================================================== */
.rd-hero .rd-summary:last-child {
  margin-top: 22px;
  margin-bottom: 0;
}

/* 汎用テーブル（style.css の .table-scroll と組み合わせて使用） */
.rd-table-wrap {
  margin: 22px 0 24px;
}

.rd-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--navy);
  background: var(--bg-white);
}

.rd-table th,
.rd-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14.5px;
  line-height: 1.8;
}

.rd-table thead th {
  background: var(--bg-surface);
  color: var(--navy);
  font-weight: 700;
  border-bottom: 1px solid var(--line-strong);
}

.rd-table tbody th {
  width: 32%;
  background: var(--bg-surface);
  color: var(--navy);
  font-weight: 700;
}

.rd-table tbody td {
  color: var(--text);
}

/* FAQパネル（style.css の .accordion-list / .accordion-item / .q-mark を内包） */
.rd-faq-panel {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-top: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 8px 26px;
}

.rd-faq-panel .accordion-list {
  border-top: 0;
}

.rd-faq-panel .accordion-item:last-child {
  border-bottom: 0;
}

.rd-faq-panel .accordion-body {
  margin: 0 0 18px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border-left: 3px solid var(--line-strong);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.rd-section .rd-faq-panel .accordion-body p {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text);
}

.rd-section .rd-faq-panel .accordion-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .rd-table th,
  .rd-table td {
    padding: 11px 10px;
    font-size: 13.5px;
    overflow-wrap: anywhere;
  }

  .rd-table tbody th {
    width: 36%;
  }

  .rd-faq-panel {
    padding: 4px 16px;
  }

  .rd-faq-panel .accordion-body {
    margin: 0 0 14px;
    padding: 14px;
  }
}
