/* ==========================================================================
   ページタイトル
   ========================================================================== */
.p-case-hero {
  padding: 10.67vw 0 6.4vw; /* 40px 24px */
}

.p-case-hero__title {
  font-size: 5.87vw; /* 22px */
  font-weight: 700;
  text-align: center;
  line-height: 8vw; /* 30px */
}

@media (min-width: 769px) {
  .p-case-hero {
    padding: 60px 0 40px;
  }

  .p-case-hero__title {
    font-size: 36px;
    line-height: 1.5;
  }
}

/* ==========================================================================
   イントロカード
   ========================================================================== */
.p-tofu-intro {
  padding-bottom: 10.67vw; /* カード〜ボタン間 40px */
}

.p-tofu-intro__card {
  background-color: #fff;
  padding: 8vw 5.33vw;
  margin: 0 calc(-1 * var(--inner-padding-sp));
}

@media (min-width: 769px) {
  .p-tofu-intro {
    padding-bottom: 40px; /* カード〜ボタン間 */
  }

  .p-tofu-intro__card {
    max-width: 1000px;
    margin: 0 auto;
    padding: 46px 40px;
  }
}

/* ドット：左揃え */
.c-dots--left {
  justify-content: flex-start;
  margin-bottom: 5.33vw; /* ~20px */
}

/* ドットカラー：ゴールド系 */
.c-dots__item--gold       { background-color: #dfb216; }
.c-dots__item--gold-light { background-color: #f0d897; }

.p-tofu-intro__title {
  font-size: 5.87vw; /* 22px */
  font-weight: 700;
  line-height: 8vw; /* 30px */
  margin-bottom: 5.33vw;
}

/* 事業情報（点線ボーダー上下） */
.p-tofu-intro__info {
  position: relative;
  padding: 4.8vw 0; /* ~18px */
  margin-bottom: 5.33vw;
  line-height: 6.93vw; /* 26px */
}

.p-tofu-intro__info::before,
.p-tofu-intro__info::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background-image: radial-gradient(circle, var(--color-text) 1.5px, transparent 1.5px);
  background-size: 8px 3px;
  background-repeat: repeat-x;
}

.p-tofu-intro__info::before { top: 0; }
.p-tofu-intro__info::after  { bottom: 0; }

.p-tofu-intro__info p + p {
  margin-top: 0.3em;
}

@media (min-width: 769px) {
  .c-dots--left {
    margin-bottom: 32px;
  }

  .p-tofu-intro__title {
    font-size: 50px;
    line-height: 1.5;
    margin-bottom: 32px;
  }

  .p-tofu-intro__info {
    font-size: 24px;
    line-height: 1.875;
    padding: 28px 0;
    margin-bottom: 32px;
  }
}

/* ==========================================================================
   章ナビゲーション
   ========================================================================== */
.p-chapter-nav {
  padding-bottom: 14.13vw; /* 共通余白 53px */
}

.p-chapter-nav__list {
  display: flex;
  justify-content: space-between;
}

.p-chapter-nav__list li {
  flex: none;
  width: 27.73vw; /* 104px */
}

.p-chapter-nav__list li + li {
  border-left: none;
}

.p-chapter-nav__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.73vw 0; /* ~6.5px */
  background-color: var(--color-text);
  color: var(--color-white);
  font-size: 5.33vw; /* 20px */
  font-weight: 500;
  transition: opacity 0.2s;
}

.p-chapter-nav__btn:hover {
  opacity: 0.8;
}

@media (min-width: 769px) {
  .p-chapter-nav {
    padding-bottom: 80px; /* 共通余白 */
  }

  .p-chapter-nav .l-inner {
    padding-left: 0;
    padding-right: 0;
  }

  .p-chapter-nav__list {
    max-width: 1000px;
    margin: 0 auto;
    gap: 14px;
  }

  .p-chapter-nav__list li {
    flex: none;
    width: 324px;
  }

  .p-chapter-nav__list li + li {
    border-left: none;
  }

  .p-chapter-nav__btn {
    padding: 14px 0;
    font-size: 20px;
  }
}

/* ==========================================================================
   イントロカード（章ページ：コンパクト版）
   ========================================================================== */
.p-tofu-intro--chapter {
  padding-bottom: 0;
}

/* ==========================================================================
   章タブナビゲーション（章ページ用）
   ========================================================================== */
.p-chapter-tabs {
  padding-top: 8vw; /* イントロカードとの間のベージュ余白 ~30px */
}

.p-chapter-tabs__list {
  display: flex;
  gap: 3.07vw; /* ~11.5px */
}

.p-chapter-tabs__list li {
  flex: none;
  width: 27.73vw; /* 104px */
}

.p-chapter-tabs__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.73vw 0; /* ~6.5px */
  background-color: var(--color-text);
  color: var(--color-white);
  font-size: 5.33vw; /* 20px */
  font-weight: 500;
  transition: opacity 0.2s;
}

.p-chapter-tabs__btn:not(.is-active):hover {
  background-color: var(--color-white);
  color: var(--color-text);
  border-top: 2px solid var(--color-text);
  margin-bottom: -2px;
}

.p-chapter-tabs__btn.is-active {
  background-color: var(--color-white);
  color: var(--color-text);
  border-top: 2px solid var(--color-text);
}

@media (min-width: 769px) {
  .p-chapter-tabs {
    padding-top: 40px;
  }

  .p-chapter-tabs .l-inner {
    padding-left: 0;
    padding-right: 0;
  }

  .p-chapter-tabs__list {
    max-width: 1000px;
    margin: 0 auto;
    gap: 14px;
  }

  .p-chapter-tabs__list li {
    flex: none;
    width: 324px;
  }

  .p-chapter-tabs__btn {
    padding: 14px 0;
    font-size: 20px;
  }
}

/* ==========================================================================
   章コンテンツ
   ========================================================================== */
.p-chapter-body {
  padding-bottom: 14.13vw; /* 53px */
}

.p-chapter-body__card {
  background-color: var(--color-white);
  padding: 8vw 5.33vw;
  margin: 0 calc(-1 * var(--inner-padding-sp));
}

/* 章見出し（ゴールド系） */
.p-chapter-body__heading {
  font-size: 5.87vw; /* 22px */
  font-weight: 700;
  color: #cd6715;
  text-align: center;
  line-height: 8vw; /* 30px */
  margin-bottom: 8vw;
}

/* リード文 */
.p-chapter-body__lead {
  margin-bottom: 5.33vw;
}

/* 点線区切り */
.p-chapter-body__divider {
  height: 3px;
  background-image: radial-gradient(circle, var(--color-text) 1.5px, transparent 1.5px);
  background-size: 8px 3px;
  background-repeat: repeat-x;
  margin-bottom: 11.73vw; /* ~44px */
}

/* セクション間余白 */
.p-chapter-section + .p-chapter-section {
  margin-top: 13.33vw; /* 50px */
}

/* セクション見出し（チェックアイコン＋テキスト） */
.p-chapter-section__heading {
  display: flex;
  align-items: flex-start;
  gap: 2.67vw; /* 10px */
  font-size: 4.8vw; /* 18px */
  font-weight: 700;
  line-height: 5.87vw; /* 22px */
  margin-bottom: 4.27vw; /* 16px */
}

.p-chapter-section__heading::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 6.4vw;   /* 24px */
  height: 5.33vw; /* 20px */
  background-image: url('../img/check.svg');
  background-size: contain;
  background-repeat: no-repeat;
  margin-top: 0.67vw;
}

.p-chapter-section__heading--narrow {
  letter-spacing: -0.06em;
}

/* セクション本文 */
.p-chapter-section__body p + p {
  margin-top: 4.27vw; /* 16px */
}

/* 図表 */
.p-chapter-section__figure {
  margin-top: 5.33vw;
}

.p-chapter-section__caption {
  font-size: 3.73vw; /* 14px */
  margin-top: 2.67vw;
}

/* 画像（2枚横並び） */
.p-chapter-section__imgs {
  display: flex;
  margin-top: 5.33vw; /* 20px */
}

.p-chapter-section__imgs img {
  width: 100%;
  height: auto;
}

/* テキスト＋画像（SP：縦積み／PC：横並び） */
.p-chapter-section__row {
  display: flex;
  flex-direction: column;
}

.p-chapter-section__img-side {
  order: -1; /* SP：画像を上に */
  margin-bottom: 5.33vw; /* 20px */
}

.p-chapter-section__img-side img {
  width: 100%;
  height: auto;
}

@media (min-width: 769px) {
  .p-tofu-intro--chapter {
    padding-bottom: 0;
  }

  .p-chapter-body {
    padding-bottom: 80px;
  }

  .p-chapter-body__card {
    max-width: 1000px;
    margin: 0 auto;
    padding: 46px 40px;
  }

  .p-chapter-body__heading {
    font-size: 36px;
    line-height: 1.4;
    margin-top: 36px;
    margin-bottom: 32px;
  }

  .p-chapter-body__lead {
    margin-bottom: 24px;
  }

  .p-chapter-body__divider {
    margin-bottom: 48px;
  }

  .p-chapter-section + .p-chapter-section {
    margin-top: 64px;
  }

  .p-chapter-section__heading {
    font-size: 22px;
    line-height: 1.5;
    gap: 12px;
    margin-bottom: 20px;
  }

  .p-chapter-section__heading::before {
    width: 28px;
    height: 23px;
    margin-top: 4px;
  }

  .p-chapter-section__body p + p {
    margin-top: 20px;
  }

  .p-chapter-section__imgs {
    margin-top: 24px;
  }

  .p-chapter-section__row {
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
  }

  .p-chapter-section__row .p-chapter-section__body {
    flex: 1;
  }

  .p-chapter-section__img-side {
    order: 0;
    flex-shrink: 0;
    width: 295px;
    margin-bottom: 0;
  }

  .p-chapter-section__figure {
    margin-top: 24px;
  }

  .p-chapter-section__caption {
    font-size: 14px;
    margin-top: 12px;
  }
}

/* ==========================================================================
   データ表（コスト指標バックデータ）
   ========================================================================== */
.p-data-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.p-data-table table {
  border-collapse: collapse;
  font-size: 3.2vw; /* ~12px */
  min-width: 700px;
  width: 100%;
  line-height: 1.5;
}

.p-data-table th,
.p-data-table td {
  border: 1px solid #231815;
  padding: 1.07vw 1.33vw; /* ~4px 5px */
  vertical-align: middle;
}

.p-data-table thead th {
  background-color: #fef9eb;
  text-align: center;
  font-weight: 700;
}

.p-data-table .c-table__cat {
  background-color: #fef9eb;
  font-weight: 700;
  width: 2em;
  text-align: center;
  vertical-align: middle;
}

.p-data-table .c-table__cat > span {
  display: inline-block;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
}

.p-data-table .c-table__subcat {
  background-color: #fef9eb;
  font-weight: 700;
  text-align: center;
  width: 5em;
}

.p-data-table .c-table__item {
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
}

.p-data-table td {
  text-align: center;
}

.p-data-table .c-table__formula-col {
  width: 65px;
  padding: 0;
}

.p-data-table .c-table__formula-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 6px 4px;
  gap: 6px;
}

.p-data-table .c-table__formula-inner span {
  display: block;
  text-align: center;
}

.p-data-table .c-table__formula-inner img {
  display: block;
  height: auto;
  flex-shrink: 0;
}

.p-data-table .c-formula--01 { width: 24px; }
.p-data-table .c-formula--02 { width: 23px; }
.p-data-table .c-formula--03 { width: 27px; }
.p-data-table .c-formula--04 { width: 50px; }
.p-data-table .c-formula--05 { width: 52px; }

.p-data-table .c-table__total th,
.p-data-table .c-table__total td {
  background-color: transparent;
}

.p-data-table tfoot th,
.p-data-table tfoot td {
  background-color: #fef9eb;
  font-weight: 700;
}

@media (min-width: 769px) {
  .p-data-table table {
    font-size: 12px;
    min-width: auto;
  }

  .p-data-table th,
  .p-data-table td {
    padding: 6px 8px;
  }
}
