@charset "utf-8";

/*
 * コラム（column）専用スタイル（リフォームサイト版・グリーン配色）
 *
 * scss/_object/_project/_column.scss と対になる手書きCSS。
 * このサーバーには compiler/ の Node ビルド環境が無いため、
 * styles.css を再生成せず本ファイルを functions.php から個別に読み込んでいる。
 * SCSS を更新した場合は本ファイルにも同じ内容を反映すること。
 */

/* --------------------------------------------------------------------------
 * カテゴリ絞り込み
 * -------------------------------------------------------------------------- */
.c-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.c-category-filter__link {
  display: block;
  border: 1px solid #c8e6c8;
  background-color: #fff;
  color: #02773a;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.c-category-filter__link:hover {
  border-color: #02773a;
  background-color: #f0faf0;
}

.c-category-filter__link--current,
.c-category-filter__link--current:hover {
  border-color: #02773a;
  background-color: #02773a;
  color: #fff;
}

/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
 * 一覧カード（reform の c-list--secondary c-list--flexible を土台に拡張）
 * -------------------------------------------------------------------------- */
.c-list--column .c-list__item-inner {
  margin-left: 0;
}

.c-list--column .c-list__item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem;
  margin-bottom: 0.08rem;
}

.c-list--column .c-list__item-category {
  background-color: #f0faf0;
  color: #02773a;
  font-size: 0.12rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.c-list--column .c-list__item-image {
  background-color: #f0faf0;
}

.c-list--column .c-list__item-title {
  margin-bottom: 0;
  color: #1e1e1e;
  font-weight: 700;
}

.c-list--column .c-list__item-wrapper {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.c-list--column .c-list__item-wrapper:hover {
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
 * 一覧・詳細セクション
 * （余白は c-keyvisual / c-mb-1 が持つため、ここでは中身だけ整える）
 * -------------------------------------------------------------------------- */
.p-section-column__description,
.p-section-column__empty {
  letter-spacing: 0.06em;
}

.p-section-column-details__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.12rem;
}

.p-section-column-details__time {
  color: #02773a;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
}

.p-section-column-details__category {
  display: inline-block;
  border-radius: 0.15rem;
  background-color: #f0faf0;
  color: #02773a;
  font-size: 0.12rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.p-section-column-details__category:hover {
  opacity: 0.6;
}

.p-section-column-details__title {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.p-section-column--details .c-post img {
  width: 100%;
  height: auto;
}

.p-section-column--details .c-post .wp-block-table table {
  width: 100%;
}

@media print, (width >= 768px) {
  .c-category-filter__link {
    padding: 0.07rem 0.2rem;
    border-radius: 0.2rem;
    font-size: 0.14rem;
  }

  .p-section-column__description {
    margin-bottom: 0.4rem;
    font-size: 0.18rem;
  }

  .p-section-column__filter {
    margin-bottom: 0.6rem;
  }

  .p-section-column .c-list--column {
    margin-bottom: 0.34rem;
  }

  .p-section-column--details .p-section-column__wrapper .l-wrapper {
    max-width: 9.2rem;
  }

  .p-section-column-details__head {
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #c8e6c8;
  }

  .p-section-column-details__meta {
    margin-bottom: 0.18rem;
  }

  .p-section-column-details__category {
    padding: 0.04rem 0.14rem;
  }

  .p-section-column-details__title {
    font-size: 0.34rem;
    line-height: 1.5;
  }

  .p-section-column--details .c-block-content {
    margin-bottom: 0.8rem;
  }
}

@media only screen and (width < 768px) {
  .c-category-filter {
    gap: 0.08rem;
  }

  .c-category-filter__link {
    padding: 0.06rem 0.14rem;
    border-radius: 0.18rem;
    font-size: 0.12rem;
  }

  .p-section-column__description {
    margin-bottom: 0.3rem;
  }

  .p-section-column__filter {
    margin-bottom: 0.4rem;
  }

  .p-section-column .c-list--column {
    margin-bottom: 0.3rem;
  }

  .c-list--column .c-list__item-category {
    padding: 0.03rem 0.11rem;
    border-radius: 0.13rem;
  }

  .p-section-column-details__head {
    margin-bottom: 0.36rem;
    padding-bottom: 0.24rem;
    border-bottom: 1px solid #c8e6c8;
  }

  .p-section-column-details__meta {
    margin-bottom: 0.14rem;
  }

  .p-section-column-details__category {
    padding: 0.03rem 0.12rem;
  }

  .p-section-column-details__title {
    font-size: 0.22rem;
    line-height: 1.5;
  }

  .p-section-column--details .c-block-content {
    margin-bottom: 0.6rem;
  }
}

/* --------------------------------------------------------------------------
 * 記事内の解説図（HTML版）
 * 画像ではなく HTML + CSS で描画するため、拡大しても劣化せず、
 * 文字は選択・検索・読み上げが可能。
 * -------------------------------------------------------------------------- */

.c-post .c-fig {
  margin: 0 0 2em;
  padding: 0.34rem 0.32rem 0.3rem;
  border-radius: 0.14rem;
  background-color: #f0faf0;
}

.c-post .c-fig:last-child {
  margin-bottom: 0;
}

.c-post .c-fig .c-fig__title {
  display: block;
  position: relative;
  margin: 0 0 0.28rem;
  padding-left: 0.16rem;
  color: #006428;
  font-size: 0.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-align: left;
}

.c-post .c-fig .c-fig__title::before {
  content: "";
  position: absolute;
  top: 0.04rem;
  bottom: 0.04rem;
  left: 0;
  width: 0.05rem;
  border-radius: 0.025rem;
  background-color: #02773a;
}

.c-post .c-fig__body {
  margin: 0;
}

.c-post .c-fig__note {
  margin: 0.22rem 0 0;
  color: #647a64;
  font-size: 0.13rem;
  letter-spacing: 0.02em;
  line-height: 1.6;
  text-align: right;
}

.c-post .c-fig__note--center {
  color: #02773a;
  font-weight: 500;
  text-align: center;
}

/* ---- 共通のカード ------------------------------------------------------- */

.c-post .c-fig-panel,
.c-post .c-fig-step,
.c-post .c-fig-row,
.c-post .c-fig-vbox,
.c-post .c-fig-quad,
.c-post .c-fig-rowflow__box {
  border: 2px solid #c8e6c8;
  border-radius: 0.1rem;
  background-color: #fff;
}

/* ---- 箇条書き ----------------------------------------------------------- */

.c-post .c-fig-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.c-post .c-fig-list li {
  position: relative;
  margin: 0 0 0.1rem;
  padding-left: 0.22rem;
  color: #1e1e1e;
  font-size: 0.145rem;
  letter-spacing: 0.02em;
  line-height: 1.6;
  text-align: left;
}

.c-post .c-fig-list li:last-child {
  margin-bottom: 0;
}

.c-post .c-fig-list--dot li::before {
  content: "";
  position: absolute;
  top: 0.085rem;
  left: 0.06rem;
  width: 0.06rem;
  height: 0.06rem;
  border-radius: 50%;
  background-color: #02773a;
}

.c-post .c-fig-list--check li::before {
  content: "";
  position: absolute;
  top: 0.055rem;
  left: 0.05rem;
  width: 0.05rem;
  height: 0.09rem;
  transform: rotate(42deg);
  border-right: 0.025rem solid #007800;
  border-bottom: 0.025rem solid #007800;
}

.c-post .c-fig-list--cross li::before,
.c-post .c-fig-list--cross li::after {
  content: "";
  position: absolute;
  top: 0.105rem;
  left: 0.035rem;
  width: 0.11rem;
  height: 0.022rem;
  border-radius: 0.011rem;
  background-color: #8a9a8a;
}

.c-post .c-fig-list--cross li::before { transform: rotate(45deg); }
.c-post .c-fig-list--cross li::after  { transform: rotate(-45deg); }

/* ---- 区切り（矢印・掛ける）--------------------------------------------- */

.c-post .c-fig-sep {
  flex: 0 0 auto;
  align-self: center;
  position: relative;
  width: 0.26rem;
  height: 0.2rem;
}

.c-post .c-fig-sep::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.09rem;
  height: 0.09rem;
  transform: translate(-70%, -50%) rotate(45deg);
  border-top: 0.028rem solid #9ecf9e;
  border-right: 0.028rem solid #9ecf9e;
}

.c-post .c-fig-sep--times {
  color: #02773a;
  font-size: 0.2rem;
  font-weight: 700;
  line-height: 0.2rem;
  text-align: center;
}

.c-post .c-fig-sep--times::before { content: none; }

.c-post .c-fig-sep--ghost { visibility: hidden; }

/* 縦の区切り（▼） */
.c-post .c-fig-vsep {
  display: block;
  position: relative;
  width: 100%;
  height: 0.24rem;
}

.c-post .c-fig-vsep::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: 0.09rem solid #9ecf9e;
  border-right: 0.075rem solid transparent;
  border-left: 0.075rem solid transparent;
}

/* ---- パネル ------------------------------------------------------------- */

.c-post .c-fig-panels {
  display: grid;
  gap: 0.16rem;
}

.c-post .c-fig-panels--col2 { grid-template-columns: repeat(2, 1fr); }
.c-post .c-fig-panels--col3 { grid-template-columns: repeat(3, 1fr); }
.c-post .c-fig-panels--col4 { grid-template-columns: repeat(4, 1fr); }

.c-post .c-fig-panel {
  display: flex;
  overflow: hidden;
  flex-direction: column;
}

.c-post .c-fig-panel__head {
  margin: 0;
  padding: 0.1rem 0.1rem 0.11rem;
  background-color: #006428;
  color: #fff;
  font-size: 0.145rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
  text-align: center;
}

.c-post .c-fig-panel--gray .c-fig-panel__head { background-color: #8a9a8a; }
.c-post .c-fig-panel--gray { border-color: #cadcca; }

.c-post .c-fig-panel__body {
  flex: 1 1 auto;
  padding: 0.16rem 0.14rem;
}

.c-post .c-fig-panel__lead,
.c-post .c-fig-panel__sub {
  margin: 0;
  font-size: 0.145rem;
  letter-spacing: 0.02em;
  line-height: 1.55;
  text-align: center;
}

.c-post .c-fig-panel__lead { color: #1e1e1e; font-weight: 500; }
.c-post .c-fig-panel__sub  { margin-top: 0.06rem; color: #647a64; font-size: 0.13rem; }

/* ---- ステップ ----------------------------------------------------------- */

.c-post .c-fig-steps {
  display: flex;
  align-items: stretch;
}

.c-post .c-fig-step {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0.16rem 0.08rem;
  text-align: center;
}

.c-post .c-fig-step--light { border-color: #cadcca; }

.c-post .c-fig-step__t,
.c-post .c-fig-step__s,
.c-post .c-fig-step__s2 {
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.4;
  text-align: center;
}

.c-post .c-fig-step__t  { color: #006428; font-size: 0.15rem; font-weight: 700; }
.c-post .c-fig-step__s  { margin-top: 0.07rem; color: #1e1e1e; font-size: 0.135rem; }
.c-post .c-fig-step__s2 { margin-top: 0.04rem; color: #647a64; font-size: 0.12rem; }

.c-post .c-fig-steps--n5 .c-fig-step__t  { font-size: 0.14rem; }
.c-post .c-fig-steps--n5 .c-fig-step__s  { font-size: 0.125rem; }
.c-post .c-fig-steps--n5 .c-fig-step__s2 { font-size: 0.115rem; }
.c-post .c-fig-steps--n5 .c-fig-sep      { width: 0.2rem; }

/* ---- 行（チップ＋本文）-------------------------------------------------- */

.c-post .c-fig-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.c-post .c-fig-row {
  display: flex;
  overflow: hidden;
  align-items: stretch;
  margin: 0 0 0.1rem;
}

.c-post .c-fig-row:last-child { margin-bottom: 0; }
.c-post .c-fig-rows--arrow .c-fig-row { margin-bottom: 0; }

.c-post .c-fig-row__chip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  padding: 0.1rem 0.06rem;
  background-color: #006428;
  color: #fff;
  font-size: 0.135rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-align: center;
}

.c-post .c-fig-rows--gray .c-fig-row__chip { background-color: #8a9a8a; }

.c-post .c-fig-row__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  padding: 0.11rem 0.16rem;
  color: #1e1e1e;
  font-size: 0.15rem;
  letter-spacing: 0.02em;
  line-height: 1.55;
  text-align: left;
}

.c-post .c-fig-row__t { color: #006428; font-weight: 700; }
.c-post .c-fig-row__s { margin-top: 0.03rem; color: #647a64; font-size: 0.13rem; }

/* 番号つき */
.c-post .c-fig-rows--num { counter-reset: figrow; }

.c-post .c-fig-rows--num .c-fig-row { counter-increment: figrow; }

.c-post .c-fig-rows--num .c-fig-row::before {
  content: counter(figrow);
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 0.5rem;
  background-color: #006428;
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.17rem;
  font-weight: 700;
}

/* ---- 縦フロー ----------------------------------------------------------- */

.c-post .c-fig-vflow {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.c-post .c-fig-vbox {
  width: 100%;
  max-width: 5.2rem;
  padding: 0.14rem 0.16rem;
  text-align: center;
}

.c-post .c-fig-vbox__t,
.c-post .c-fig-vbox__s {
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-align: center;
}

.c-post .c-fig-vbox__t { color: #006428; font-size: 0.155rem; font-weight: 700; }
.c-post .c-fig-vbox__s { margin-top: 0.05rem; color: #647a64; font-size: 0.13rem; }

/* ---- 行ごとのフロー ------------------------------------------------------ */

.c-post .c-fig-rowflow__heads,
.c-post .c-fig-rowflow__row {
  display: flex;
  align-items: stretch;
  margin-bottom: 0.12rem;
}

.c-post .c-fig-rowflow__row:last-child { margin-bottom: 0; }

.c-post .c-fig-rowflow__heads {
  align-items: center;
  margin-bottom: 0.08rem;
}

.c-post .c-fig-rowflow__label {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  margin-right: 0.16rem;
  padding: 0.08rem;
  border-radius: 0.1rem;
  background-color: #006428;
  color: #fff;
  font-size: 0.14rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.c-post .c-fig-rowflow--plain .c-fig-rowflow__label {
  width: 0.8rem;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  color: #006428;
  text-align: left;
}

.c-post .c-fig-rowflow__head {
  flex: 1 1 0;
  min-width: 0;
  color: #647a64;
  font-size: 0.13rem;
  font-weight: 500;
  text-align: center;
}

.c-post .c-fig-rowflow__box {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0.12rem 0.08rem;
  color: #1e1e1e;
  font-size: 0.145rem;
  line-height: 1.45;
  text-align: center;
}

.c-post .c-fig-rowflow__t { color: #006428; font-weight: 700; }
.c-post .c-fig-rowflow__s { margin-top: 0.03rem; color: #647a64; font-size: 0.125rem; }

/* ---- 2×2マトリクス -------------------------------------------------------- */

.c-post .c-fig-matrix {
  display: grid;
  grid-template-areas: "y grid" ". x";
  grid-template-columns: 0.44rem 1fr;
}

.c-post .c-fig-matrix__y {
  display: flex;
  grid-area: y;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-right: 0.1rem;
}

.c-post .c-fig-matrix__y-name {
  margin-bottom: 0.08rem;
  color: #647a64;
  font-size: 0.125rem;
  font-weight: 500;
  writing-mode: vertical-rl;
  letter-spacing: 0.06em;
}

.c-post .c-fig-matrix__end {
  color: #647a64;
  font-size: 0.12rem;
}

.c-post .c-fig-matrix__y .c-fig-matrix__line {
  width: 2px;
  height: 100%;
  min-height: 0.3rem;
  margin: 0.06rem 0;
  background-color: #c2dcc2;
}

.c-post .c-fig-matrix__grid {
  display: grid;
  grid-area: grid;
  gap: 0.14rem;
  grid-template-columns: repeat(2, 1fr);
}

.c-post .c-fig-quad {
  padding: 0.16rem 0.16rem 0.18rem;
}

.c-post .c-fig-quad__t {
  position: relative;
  margin: 0 0 0.08rem;
  padding-left: 0.13rem;
  color: #006428;
  font-size: 0.16rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.c-post .c-fig-quad__t::before {
  content: "";
  position: absolute;
  top: 0.03rem;
  bottom: 0.03rem;
  left: 0;
  width: 0.04rem;
  border-radius: 0.02rem;
  background-color: #02773a;
}

.c-post .c-fig-quad__s {
  margin: 0;
  color: #1e1e1e;
  font-size: 0.135rem;
  line-height: 1.6;
  text-align: left;
}

.c-post .c-fig-matrix__x {
  display: flex;
  grid-area: x;
  align-items: center;
  justify-content: center;
  margin: 0.14rem 0 0;
  gap: 0.06rem;
}

.c-post .c-fig-matrix__x-name {
  margin-right: 0.06rem;
  color: #647a64;
  font-size: 0.125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.c-post .c-fig-matrix__x .c-fig-matrix__line {
  width: 0.5rem;
  height: 2px;
  background-color: #c2dcc2;
}

/* --------------------------------------------------------------------------
 * SP
 * -------------------------------------------------------------------------- */

@media only screen and (width < 768px) {

  .c-post .c-fig {
    padding: 0.28rem 0.2rem 0.24rem;
    border-radius: 0.12rem;
  }

  .c-post .c-fig .c-fig__title { font-size: 0.18rem; }
  .c-post .c-fig__note  { font-size: 0.12rem; }

  .c-post .c-fig-list li { font-size: 0.14rem; }

  /* 複数カラムは縦積みに */
  .c-post .c-fig-panels--col2,
  .c-post .c-fig-panels--col3,
  .c-post .c-fig-panels--col4 {
    grid-template-columns: 1fr;
  }

  .c-post .c-fig-steps {
    flex-direction: column;
  }

  .c-post .c-fig-step {
    width: 100%;
    padding: 0.14rem 0.12rem;
  }

  .c-post .c-fig-steps--n5 .c-fig-step__t  { font-size: 0.15rem; }
  .c-post .c-fig-steps--n5 .c-fig-step__s  { font-size: 0.135rem; }
  .c-post .c-fig-steps--n5 .c-fig-step__s2 { font-size: 0.12rem; }

  /* 横矢印を下向きに */
  .c-post .c-fig-sep,
  .c-post .c-fig-steps--n5 .c-fig-sep {
    width: 100%;
    height: 0.24rem;
  }

  .c-post .c-fig-sep::before {
    transform: translate(-50%, -60%) rotate(135deg);
  }

  .c-post .c-fig-sep--times {
    height: 0.24rem;
    font-size: 0.18rem;
    line-height: 0.24rem;
  }

  .c-post .c-fig-row__chip { width: 0.9rem; font-size: 0.125rem; }
  .c-post .c-fig-row__body { padding: 0.1rem 0.12rem; font-size: 0.14rem; }
  .c-post .c-fig-rows--num .c-fig-row::before { width: 0.42rem; font-size: 0.15rem; }

  .c-post .c-fig-vbox { max-width: none; }

  /* 行フローも縦積み */
  .c-post .c-fig-rowflow__heads { display: none; }

  .c-post .c-fig-rowflow__row {
    flex-direction: column;
    margin-bottom: 0.2rem;
  }

  .c-post .c-fig-rowflow__label {
    width: 100%;
    margin: 0 0 0.1rem;
    padding: 0.06rem 0.1rem;
  }

  .c-post .c-fig-rowflow--plain .c-fig-rowflow__label {
    width: 100%;
    text-align: left;
  }

  .c-post .c-fig-rowflow__box { width: 100%; padding: 0.1rem; }

  .c-post .c-fig-matrix {
    grid-template-areas: "y grid" ". x";
    grid-template-columns: 0.36rem 1fr;
  }

  .c-post .c-fig-matrix__grid { grid-template-columns: 1fr; gap: 0.12rem; }
  .c-post .c-fig-quad { padding: 0.13rem; }
  .c-post .c-fig-quad__t { font-size: 0.15rem; }
  .c-post .c-fig-quad__s { font-size: 0.13rem; }
}

/* --------------------------------------------------------------------------
 * 日本語の改行位置
 *
 * 図をHTML化したことで文字が枠幅で折り返すようになったため、
 * 文節の途中で切れないように改行位置を制御する。
 *   word-break: auto-phrase … 文節（意味のまとまり）単位で改行する
 *   text-wrap: balance / pretty … 行の長さをそろえ、最終行の孤立を防ぐ
 *   line-break: strict … 禁則処理を厳密に適用する
 * 非対応ブラウザでは従来どおりの折り返しになるだけで、崩れは起きない。
 * -------------------------------------------------------------------------- */

.c-post .c-fig,
.c-post .c-fig p,
.c-post .c-fig li,
.c-post .c-fig span {
  line-break: strict;
  overflow-wrap: break-word;
}

/* 短いラベル：文節で折り返し、行長をそろえる */
.c-post .c-fig .c-fig__title,
.c-post .c-fig-panel__head,
.c-post .c-fig-panel__lead,
.c-post .c-fig-panel__sub,
.c-post .c-fig-step__t,
.c-post .c-fig-step__s,
.c-post .c-fig-step__s2,
.c-post .c-fig-row__chip,
.c-post .c-fig-vbox__t,
.c-post .c-fig-vbox__s,
.c-post .c-fig-rowflow__label,
.c-post .c-fig-rowflow__head,
.c-post .c-fig-rowflow__box,
.c-post .c-fig-rowflow__t,
.c-post .c-fig-rowflow__s,
.c-post .c-fig-quad__t {
  word-break: auto-phrase;
  text-wrap: balance;
}

/* 本文寄りの要素：文節で折り返し、最終行の孤立を防ぐ */
.c-post .c-fig-list li,
.c-post .c-fig-row__body,
.c-post .c-fig-row__t,
.c-post .c-fig-row__s,
.c-post .c-fig-quad__s,
.c-post .c-fig__note {
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* 見出し・タイトル類も同じ扱いにそろえる */
.p-section-column-details__title,
.p-section-column--details .c-post h2,
.p-section-column--details .c-post h3,
.p-section-column--details .c-post h4,
.c-list--column .c-list__item-text,
.p-section-column__description {
  word-break: auto-phrase;
  line-break: strict;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
 * 記事末尾のCTAボタン
 * Word 由来の「裸のURLを本文に貼る」表記をボタンに置き換えたもの。
 * -------------------------------------------------------------------------- */

.c-post .c-post-cta {
  display: flex;
  margin: 0;
  justify-content: center;
  text-align: center;
}

.c-post .c-post-cta .c-button {
  width: auto;
  min-width: 2.4rem;
  max-width: 100%;
  color: #fff;
  text-decoration: none;
}

.c-post .c-post-cta .c-button:hover,
.c-post .c-post-cta .c-button:focus {
  color: #fff;
  text-decoration: none;
}

@media only screen and (width < 768px) {
  .c-post .c-post-cta .c-button {
    width: 100%;
    min-width: 0;
  }
}

/* --------------------------------------------------------------------------
 * 目次（column.php の fc_column_toc が出力）
 * 見出しから自動生成するため、記事側に目次データは持たない。
 * -------------------------------------------------------------------------- */

.c-post .c-toc {
  margin: 0 0 2em;
}

.c-post .c-toc__details {
  padding: 0.22rem 0.3rem 0.26rem;
  border: 2px solid #c8e6c8;
  border-radius: 0.14rem;
  background-color: #f0faf0;
}

.c-post .c-toc__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  color: #006428;
  cursor: pointer;
  font-size: 0.19rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  list-style: none;
}

.c-post .c-toc__title::-webkit-details-marker { display: none; }
.c-post .c-toc__title::marker { content: ""; }

.c-post .c-toc__icon {
  position: relative;
  flex: 0 0 auto;
  width: 0.18rem;
  height: 0.18rem;
}

.c-post .c-toc__icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.09rem;
  height: 0.09rem;
  transform: translate(-50%, -75%) rotate(135deg);
  transition: transform 0.3s ease;
  border-top: 0.024rem solid #02773a;
  border-right: 0.024rem solid #02773a;
}

.c-post .c-toc__details[open] .c-toc__icon::before {
  transform: translate(-50%, -25%) rotate(-45deg);
}

.c-post .c-toc__list {
  counter-reset: toc;
  margin: 0.18rem 0 0;
  padding: 0;
  list-style: none;
}

.c-post .c-toc__item {
  counter-increment: toc;
  position: relative;
  margin: 0;
  padding: 0.1rem 0 0.1rem 0.42rem;
  border-top: 1px solid #d6ebd6;
}

.c-post .c-toc__item:first-child {
  padding-top: 0.02rem;
  border-top: none;
}

.c-post .c-toc__item::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  top: 0.12rem;
  left: 0.02rem;
  color: #02773a;
  font-family: "Outfit", sans-serif;
  font-size: 0.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.c-post .c-toc__item:first-child::before { top: 0.04rem; }

.c-post .c-toc__link {
  color: #1e1e1e;
  font-size: 0.155rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.3s ease;
}

.c-post .c-toc__link:hover,
.c-post .c-toc__link:focus {
  color: #02773a;
  text-decoration: underline;
}

.c-post .c-toc__sub {
  margin: 0.06rem 0 0;
  padding: 0;
  list-style: none;
}

.c-post .c-toc__sub-item {
  position: relative;
  margin: 0.03rem 0 0;
  padding-left: 0.2rem;
}

.c-post .c-toc__sub-item::before {
  content: "";
  position: absolute;
  top: 0.115rem;
  left: 0.02rem;
  width: 0.09rem;
  height: 0.02rem;
  border-radius: 0.01rem;
  background-color: #9ecf9e;
}

.c-post .c-toc__link--sub {
  color: #3f4f3f;
  font-size: 0.14rem;
  font-weight: 400;
}

/* 固定ヘッダーに隠れないようにアンカー位置をずらす（JS無効時の保険） */
.p-section-column--details .c-post h2,
.p-section-column--details .c-post h3 {
  scroll-margin-top: 0.3rem;
}

@media only screen and (width < 768px) {
  .c-post .c-toc__details {
    padding: 0.2rem 0.2rem 0.22rem;
  }

  .c-post .c-toc__title { font-size: 0.17rem; }
  .c-post .c-toc__list  { margin-top: 0.14rem; }

  .c-post .c-toc__item {
    padding: 0.09rem 0 0.09rem 0.38rem;
  }

  .c-post .c-toc__item::before { font-size: 0.14rem; }
  .c-post .c-toc__link { font-size: 0.145rem; }
  .c-post .c-toc__link--sub { font-size: 0.135rem; }

  .p-section-column--details .c-post h2,
  .p-section-column--details .c-post h3 {
    scroll-margin-top: 0.7rem;
  }
}

/* --------------------------------------------------------------------------
 * 解説図の追加バリエーション（リフォーム版で使用）
 * -------------------------------------------------------------------------- */

/* 5カラムのパネル */
.c-post .c-fig-panels--col5 { grid-template-columns: repeat(5, 1fr); }

.c-post .c-fig-panels--col5 .c-fig-panel__head { font-size: 0.135rem; }
.c-post .c-fig-panels--col5 .c-fig-list li { font-size: 0.13rem; padding-left: 0.2rem; }

/* 中央寄せ本文の2行目を強調（bodyStyle: center2） */
.c-post .c-fig-panel__accent {
  margin: 0.07rem 0 0;
  color: #02773a;
  font-size: 0.14rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.55;
  text-align: center;
}

/* 6ステップ以上は折り返す */
.c-post .c-fig-steps--wrap { flex-wrap: wrap; }

.c-post .c-fig-steps--wrap .c-fig-step { flex: 1 1 26%; }

/* グレー階層の行（協力業者の階層など） */
.c-post .c-fig-row--gray { border-color: #cadcca; }
.c-post .c-fig-row--gray .c-fig-row__chip { background-color: #8a9a8a; }

/* 縦フローの終端（悪化した結果） */
.c-post .c-fig-vbox--gray { border-color: #cadcca; }
.c-post .c-fig-vbox--gray .c-fig-vbox__t { color: #647a64; }

@media only screen and (width < 768px) {
  .c-post .c-fig-panels--col5 { grid-template-columns: 1fr; }
  .c-post .c-fig-panels--col5 .c-fig-panel__head { font-size: 0.145rem; }
  .c-post .c-fig-panels--col5 .c-fig-list li { font-size: 0.14rem; padding-left: 0.22rem; }
  .c-post .c-fig-steps--wrap .c-fig-step { flex: 1 1 auto; }
}

/* ==========================================================================
 * 一覧UIの改善
 *
 * 旧実装の課題と対応:
 *  1. カードに面がなく、ホバーが opacity 0.6 だけだった（画像もろとも薄くなる）。
 *     → 白い面＋枠線のカードにし、ホバーは浮き上がり＋枠線の強調＋画像の拡大に変更。
 *  2. c-list--flexible の固定サイズ画像（2.91rem×1.95rem）とカード幅が連動せず、
 *     タイトルの行数差で1行内のカード下端もバラついていた。
 *     → grid + align-items: stretch にし、画像は aspect-ratio 3/2 で幅に追従させる。
 *  3. 日付が .l-body の 0.16rem を継承し、タイトルとほぼ同じ強さだった。
 *     → 0.13rem に落として、視線がタイトルへ向くようにする。
 *  4. タイトルが2行で切れて、長い記事名の内容が読み取れなかった。
 *     → 3行まで表示する。
 *  5. カード内のカテゴリが絞り込みボタンと同じピル形で、押せそうに見えて押せない。
 *     → 角丸を小さくしたラベル表現にし、押せる絞り込みピルと形で区別する。
 *  6. キーボード操作時のフォーカスが見えなかった。
 *     → :focus-visible のアウトラインを追加。
 *  7. 絞り込んでも件数が分からず、結果の手応えがなかった。
 *     → 絞り込みボタンに件数、一覧の上に該当件数を表示。
 * ========================================================================== */

/* ---- 絞り込み ----------------------------------------------------------- */

.c-category-filter__link {
  display: inline-flex;
  align-items: center;
  gap: 0.06rem;
}

.c-category-filter__count {
  color: #7d9c7d;
  font-family: "Outfit", sans-serif;
  font-size: 0.11rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.c-category-filter__link--current .c-category-filter__count {
  color: rgba(255, 255, 255, 0.72);
}

.c-category-filter__link:focus-visible {
  outline: 0.02rem solid #02773a;
  outline-offset: 0.02rem;
}

/* ---- 該当件数 ----------------------------------------------------------- */

.p-section-column__count {
  margin: 0 0 0.16rem;
  color: #55655a;
  font-size: 0.13rem;
  letter-spacing: 0.04em;
}

.p-section-column__count em {
  color: #02773a;
  font-family: "Outfit", sans-serif;
  font-size: 0.17rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ---- カードのレイアウト（1行の高さをそろえる）--------------------------- */

.p-section-column .c-list--column .c-list__wrapper {
  display: grid;
  align-items: stretch;
}

.c-list--column.c-list--flexible .c-list__item {
  display: flex;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ---- カードの面 --------------------------------------------------------- */

.c-list--column .c-list__item-wrapper {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  width: 100%;
  border: 1px solid #d8ecd8;
  background-color: #fff;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* styles.css の `.c-list--secondary a.c-list__item-wrapper:hover { opacity: .8 }`
   と詳細度をそろえる必要があるため、要素セレクタ a を含めて打ち消す。 */
.c-list--column a.c-list__item-wrapper,
.c-list--column a.c-list__item-wrapper:hover {
  opacity: 1;
}

@media (hover: hover) {
  .c-list--column .c-list__item-wrapper:hover {
    transform: translateY(-0.03rem);
    border-color: #02773a;
    box-shadow: 0 0.05rem 0.16rem rgba(6, 66, 31, 0.13);
  }

  .c-list--column .c-list__item-wrapper:hover .c-list__item-image .u-object {
    transform: scale(1.05);
  }
}

.c-list--column .c-list__item-wrapper:focus-visible {
  outline: 0.02rem solid #02773a;
  outline-offset: 0.02rem;
}

.c-list--column .c-list__item-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
}

/* ---- 画像（固定サイズをやめて幅に追従させる）--------------------------- */

.c-list--column.c-list--flexible .c-list__item-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid #eef7ee;
}

.c-list--column .c-list__item-image .u-object {
  transition: transform 0.5s ease;
}

/* ---- テキスト ----------------------------------------------------------- */

.c-list--column.c-list--flexible .c-list__item-inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin-top: 0;
  margin-bottom: 0;
}

.c-list--column .c-list__item-date {
  font-size: 0.13rem;
}

/* 押せない情報なので、絞り込みピルとは形を変える */
.c-list--column .c-list__item-category {
  border: 1px solid #ddefdd;
  border-radius: 0.03rem;
  background-color: #f2faf2;
}

.c-list--column.c-list--flexible .c-list__item-title {
  margin: 0;
  -webkit-line-clamp: 3;
}

/* ---- 記事がないとき ----------------------------------------------------- */

.p-section-column__empty {
  margin: 0;
  padding: 0.5rem 0.3rem;
  border: 1px solid #d8ecd8;
  border-radius: 0.14rem;
  background-color: #f7fcf7;
  text-align: center;
}

.p-section-column__empty-text {
  margin: 0;
  color: #55655a;
  letter-spacing: 0.06em;
}

.p-section-column__empty-link {
  display: inline-block;
  margin-top: 0.2rem;
  color: #02773a;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: underline;
}

.p-section-column__empty-link:hover {
  text-decoration: none;
}

/* ---- PC ---------------------------------------------------------------- */

@media print, (width >= 768px) {
  .p-section-column .c-list--column .c-list__wrapper {
    gap: 0.4rem 0.34rem;
    grid-template-columns: repeat(3, 1fr);
  }

  .c-list--column .c-list__item-wrapper {
    border-radius: 0.14rem;
  }

  .c-list--column.c-list--flexible .c-list__item-inner {
    padding: 0.18rem 0.2rem 0.22rem;
  }

  .c-list--column .c-list__item-meta {
    margin-bottom: 0.12rem;
  }

  .c-list--column .c-list__item-title {
    font-size: 0.18rem;
    line-height: 1.6;
  }
}

/* ---- SP ---------------------------------------------------------------- */

@media only screen and (width < 768px) {
  .p-section-column .c-list--column .c-list__wrapper {
    gap: 0.24rem;
    grid-template-columns: 1fr;
  }

  .c-list--column .c-list__item-wrapper {
    border-radius: 0.12rem;
  }

  .c-list--column.c-list--flexible .c-list__item-inner {
    padding: 0.16rem 0.16rem 0.2rem;
  }

  .c-list--column .c-list__item-meta {
    margin-bottom: 0.1rem;
  }

  .c-list--column .c-list__item-date {
    font-size: 0.12rem;
  }

  .c-list--column .c-list__item-title {
    font-size: 0.16rem;
    line-height: 1.6;
  }

  .p-section-column__count {
    margin-bottom: 0.14rem;
    font-size: 0.12rem;
  }

  .p-section-column__count em {
    font-size: 0.15rem;
  }

  .p-section-column__empty {
    padding: 0.4rem 0.2rem;
    border-radius: 0.12rem;
  }
}

/* ---- カード内の画像を縮ませない ---------------------------------------- */
/* カードは grid で1行の高さにそろえるため、余った高さは本文側が吸う。
   画像に flex-shrink が効くと 3:2 が崩れるので固定する。 */
.c-list--column.c-list--flexible .c-list__item-image {
  flex: 0 0 auto;
}

/* ---- SP：絞り込みを横スクロールの1行にする ----------------------------- */
/*
 * カテゴリが9件あり、日本語のラベルが長いため、
 * 折り返すとピルだけで5〜6行になり一覧が画面外に押し出されていた。
 * SPでは1行の横スクロールにして、右端のフェードで続きがあることを示す。
 */
@media only screen and (width < 768px) {
  .p-section-column__filter {
    position: relative;
  }

  .p-section-column__filter .c-category-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-right: 0.3rem;
    scroll-padding-left: 0.02rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .p-section-column__filter .c-category-filter::-webkit-scrollbar {
    display: none;
  }

  .p-section-column__filter .c-category-filter__item {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  /* 右端のフェード（続きがある合図。クリックは透過させる） */
  .p-section-column__filter::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0.32rem;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 72%);
  }
}
