/* ============================================================
   column-training-hours.css
   /column/training-hours/ 専用スタイル。
   共通は guide-common.css。ここでは教習時限表と補助要素のみ上書きする。
   ============================================================ */

/* ---- 表の見方 / 凡例 ---- */
.th-legend {
  margin: 8px 0 4px;
  padding-left: 1.2em;
}

.th-legend li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* ---- 教習時間について（意味の補足・関連ページへの導線） ---- */
.th-meaning {
  margin: 12px 0 0;
  line-height: 1.75;
}

/* ---- 教習時間について（ルールカード） ---- */
.th-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 8px;
}

.th-rule {
  padding: 18px 20px;
  background: var(--guide-soft);
  border: 1px solid var(--guide-border);
  border-radius: 12px;
}

.th-rule h3 {
  margin: 0 0 8px;
  color: var(--guide-ink);
  font-size: 1.04rem;
}

.th-rule p {
  margin: 0;
  line-height: 1.75;
}

.th-rule p + p {
  margin-top: 8px;
}

.th-firstaid {
  margin: 4px 0;
  padding-left: 1.2em;
}

.th-firstaid li {
  margin-bottom: 6px;
  line-height: 1.7;
}

/* ---- 目次（第一種／第二種免許のグループ表示） ---- */
.guide-toc__group {
  min-width: 0;
}

.guide-toc__group-title {
  display: block;
  margin-bottom: 4px;
  color: var(--guide-ink);
  font-weight: 700;
}

.guide-toc ol.guide-toc__group-list {
  display: block;
  grid-template-columns: none;
  margin: 0;
  padding-left: 1.2em;
}

.guide-toc__group-list li {
  margin-bottom: 2px;
}

/* ---- 車種別の教習時限表（第一種／第二種免許でグルーピング） ---- */
.th-table-section {
  scroll-margin-top: 16px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--guide-border);
}

.th-table-section:first-of-type {
  margin-top: 24px;
  padding-top: 0;
  border-top: none;
}

.th-table-section h3 {
  margin: 0 0 4px;
  color: var(--guide-ink);
  font-size: 1.18rem;
}

.th-table caption {
  caption-side: top;
  padding: 0 2px 12px;
  color: var(--guide-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
}

/* 所持免許の列は少し広めに */
.th-table .th-held {
  min-width: 210px;
}

/* AT/MT のまとめセル */
.th-table .th-atmt {
  min-width: 64px;
  background: var(--guide-gold-pale);
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
}

/* 数値セル */
.th-table .th-num {
  min-width: 78px;
  font-variant-numeric: tabular-nums;
  font-size: 1.02rem;
}

/* 限定解除（要確認）行 */
.th-table .th-row--limited th,
.th-table .th-row--limited td {
  background: #fbf6ef;
}

.th-table .th-note {
  color: var(--guide-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* 表の直後の車種ページ導線 */
.th-carlink {
  margin: 12px 0 0;
}

.th-carlink a {
  display: inline-block;
  color: var(--guide-gold-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- 関連ページ ---- */
.th-related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.th-related a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--guide-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.th-related a:hover {
  border-color: var(--guide-gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.th-related strong {
  color: var(--guide-gold-dark);
}

.th-related span {
  font-size: 0.9rem;
  color: var(--guide-muted);
  line-height: 1.6;
}

/* ---- 下部の車種導線 ---- */
.training-hours-finder__sub {
  margin-top: 14px;
  text-align: center;
}

.training-hours-finder__sub a {
  color: var(--guide-gold-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- モバイル ---- */
@media (max-width: 768px) {
  .th-rules,
  .th-related {
    grid-template-columns: 1fr;
  }

  .th-table .th-held {
    min-width: 170px;
  }
}
