@charset "UTF-8";
.p-article,
.p-article * {
  box-sizing: border-box;
}
.p-article {
  overflow-wrap: anywhere;   /* 長い英数字・URLで横にはみ出さない */
  word-break: normal;
}
.p-article img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

/* 記事の左右余白（サイトCSSが効かない環境でも最低限の余白を確保） */
.p-article .c-layout-one-column-1200 {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------------
   公開日・更新日
   --------------------------------------------------------- */
.p-article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 16px;
  margin: 0 0 20px;
  font-size: 13px;
  color: #666;
}

/* ---------------------------------------------------------
   画像
   --------------------------------------------------------- */
.p-article .c-contents-image-and-text-full-width {
  margin: 0 0 30px;
}
.p-article .c-contents-image-and-text-full-width__image {
  width: 100%;
  border-radius: 8px;
}

/* PC（768px以上）：元の画像サイズより大きく引き伸ばさない＝粗くならない
   表示の最大幅は 720px。大きさを変えたいときはこの数字だけ変更してください */
@media screen and (min-width: 768px) {
  .p-article .c-contents-image-and-text-full-width__image {
    width: auto;
    max-width: min(100%, 720px);
  }
}

/* ---------------------------------------------------------
   目次
   --------------------------------------------------------- */
.p-article-toc {
  margin: 30px 0 10px;
  padding: 20px 24px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #f7f9f5;
}
.p-article-toc__title {
  margin: 0 0 10px;
  font-weight: bold;
  font-size: 16px;
}
.p-article-toc__list {
  margin: 0;
  padding-left: 1.5em;
  list-style: decimal;
}
.p-article-toc__list li + li {
  margin-top: 8px;
}
.p-article-toc__list a {
  color: inherit;
  text-decoration: underline;
}

/* 目次リンクで飛んだとき、追従ヘッダーに見出しが隠れないように */
.p-article section[id] {
  scroll-margin-top: 100px;
}

/* ---------------------------------------------------------
   表（2列：項目／内容）
   --------------------------------------------------------- */
.p-article .c-contents-table1-2 {
  width: 100%;
  border-collapse: collapse;
}
.p-article .c-contents-table1-2__header {
  width: 30%;
}

/* ---------------------------------------------------------
   関連記事
   --------------------------------------------------------- */
.p-article-related {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #d9d9d9;
}
.p-article-related__item {
  border-bottom: 1px solid #d9d9d9;
}
.p-article-related__item a {
  display: block;
  padding: 16px 8px;
  color: inherit;
  text-decoration: none;
}
.p-article-related__item a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   PCだけ改行する <br class="p-article-br-pc">
   --------------------------------------------------------- */
.p-article-br-pc { display: inline; }

/* =========================================================
   タブレット（768px〜1023px）
   ========================================================= */
@media screen and (max-width: 1023px) {
  .p-article .c-layout-one-column-1200 {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* =========================================================
   スマホ（〜767px）
   ========================================================= */
@media screen and (max-width: 767px) {

  /* 左右余白 */
  .p-article .c-layout-one-column-1200 {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* H1の改行をスマホでは外して自然に折り返す */
  .p-article-br-pc { display: none; }
  .c-contents-heading-bg-color__title {
    font-size: 22px;
    line-height: 1.5;
  }

  /* 本文 */
  .p-article .c-contents-text-normal {
    font-size: 15px;
    line-height: 1.8;
  }

  /* 見出し */
  .p-article .c-contents-heading-left-line {
    font-size: 20px;
    line-height: 1.5;
  }
  .p-article .c-contents-highlight-heading3 {
    font-size: 17px;
    line-height: 1.5;
  }

  /* 公開日・更新日 */
  .p-article-meta {
    justify-content: flex-start;
    font-size: 12px;
  }

  /* 画像 */
  .p-article .c-contents-image-and-text-full-width {
    margin-bottom: 20px;
  }

  /* 目次 */
  .p-article-toc {
    padding: 16px;
  }
  .p-article-toc__list {
    font-size: 14px;
  }
  .p-article section[id] {
    scroll-margin-top: 70px;
  }

  /* 表：項目を上、内容を下に縦積み */
  .p-article .c-contents-table1-2,
  .p-article .c-contents-table1-2 tbody,
  .p-article .c-contents-table1-2 tr,
  .p-article .c-contents-table1-2__header,
  .p-article .c-contents-table1-2__data {
    display: block;
    width: 100%;
  }

  /* 枠囲みボックス */
  .p-article .c-contents-text-border-article-box {
    padding: 16px;
  }

  /* ボタンは横幅いっぱい */
  .p-article .c-contents-button-main--detail {
    display: block;
    width: 100%;
    max-width: none;
    text-align: center;
  }

  /* 関連記事 */
  .p-article-related__item a {
    padding: 14px 4px;
    font-size: 14px;
  }
}

/* =========================================================
   画像のタップ拡大（img に class="js-zoom" を付けたものだけ）
   ========================================================= */
.p-article-zoom-trigger {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}
/* 右下の虫めがねアイコン（拡大できる目印） */
.p-article-zoom-trigger::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 20px no-repeat;
  pointer-events: none;
}
.p-article-zoom-trigger:focus-visible {
  outline: 3px solid #00843d;
  outline-offset: 3px;
}

/* 拡大表示の黒背景 */
.p-article-zoom {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 16px;
  background: rgba(0, 0, 0, .9);
  opacity: 0;
  transition: opacity .2s ease;
  cursor: zoom-out;
}
.p-article-zoom[hidden] { display: none; }
.p-article-zoom.is-active { opacity: 1; }
.p-article-zoom__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}
/* 閉じるボタン（×） */
.p-article-zoom__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  cursor: pointer;
}
.p-article-zoom__close::before,
.p-article-zoom__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #fff;
}
.p-article-zoom__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.p-article-zoom__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* 拡大中は背景をスクロールさせない */
body.is-zoom-open {
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
}

/* =========================================================
   CTAバナー（PC/SPで画像を出し分ける <picture> 用）
   記事中の画像（720px上限・拡大あり）とは別ルールにしています
   ========================================================= */
.p-article-cta-banner {
  display: flex;             /* 中身を必ず中央に置く */
  justify-content: center;
  width: 100%;
  margin: 40px 0;
  text-align: center;
}
.p-article-cta-banner__link {
  display: block;
  width: 100%;
  max-width: 800px;          /* PCでの最大表示幅。変えたいときはここだけ */
  margin-left: auto;         /* 外側の div が無い場合も中央寄せ */
  margin-right: auto;
  border-radius: 8px;
  overflow: hidden;
  transition: opacity .2s ease;
}
.p-article-cta-banner__link:hover { opacity: .8; }
.p-article-cta-banner__link:focus-visible {
  outline: 3px solid #00843d;
  outline-offset: 3px;
}
.p-article-cta-banner__link picture { display: block; }
.p-article-cta-banner__image {
  display: block;
  margin: 0 auto;
  width: 100%;               /* 枠いっぱいに表示（文字が読める大きさを保つ） */
  height: auto;
}

@media screen and (max-width: 767px) {
  .p-article-cta-banner { margin: 30px 0; }
  .p-article-cta-banner__link { max-width: none; }  /* スマホは横幅いっぱい */
  .p-article-cta-banner__link:hover { opacity: 1; }  /* タップ後に薄いまま残らないように */
}

/* =========================================================
   記事中CTA（サイト既存ボタン c-contents-button-main--detail のみ）
   - 色・矢印・角丸はサイトのCSSのまま
   - 横幅は文字の長さに合わせて伸び縮み（固定幅300pxを解除）
   - スマホで改行したい位置に <br class="p-article-br-sp"> を入れる
   ========================================================= */
.p-article-cta {
  margin: 40px 0;
  text-align: center;
}
.p-article .p-article-cta .c-contents-button-main--detail {
  display: inline-block;
  width: auto;
  min-width: 240px;          /* 短い文言でも小さくなりすぎないように */
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 20px 56px 20px 40px;  /* 右は矢印のぶん広め */
  line-height: 1.5;
  text-align: center;
}

/* スマホだけ改行する <br class="p-article-br-sp"> */
.p-article-br-sp { display: none; }

@media screen and (max-width: 767px) {
  .p-article-cta {
    margin: 30px 0;
  }
  .p-article .p-article-cta .c-contents-button-main--detail {
    min-width: 0;
    width: auto;             /* 上の共通指定「スマホはボタン横幅いっぱい」を打ち消す */
    padding: 14px 40px 14px 28px;
  }
  .p-article-br-sp { display: inline; }
}

/* =========================================================
   表（3列以上：c-contents-table1-1 を使う表）
   ========================================================= */
.p-article-table {
  margin: 0 0 30px;
}
.p-article-table .c-contents-table1-1 {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.p-article-table .c-contents-table3__header:first-child,
.p-article-table .c-contents-table3__sub-header {
  width: 40%;
}
.p-article-table .c-contents-table3__header,
.p-article-table .c-contents-table3__sub-header,
.p-article-table .c-contents-table1-1__data {
  padding: 16px 12px;        /* サイト標準より詰めて、行の高さを抑える */
  line-height: 1.5;
  vertical-align: middle;
}
.p-article-table .c-contents-table1-1__data {
  text-align: center;
}
.p-article-table__caption {
  caption-side: top;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: bold;
  text-align: left;
}
/* 区分の補足（自営業・フリーランス など）は改行して小さめに */
.p-article-table__note {
  display: block;
  font-size: 0.85em;
  font-weight: normal;
}

@media screen and (max-width: 767px) {
  .p-article-table .c-contents-table1-1 {
    font-size: 13px;
  }
  .p-article-table .c-contents-table3__header,
  .p-article-table .c-contents-table3__sub-header,
  .p-article-table .c-contents-table1-1__data {
    padding: 10px 6px;
  }
  .p-article-table .c-contents-table3__header:first-child,
  .p-article-table .c-contents-table3__sub-header {
    width: 36%;
  }
  .p-article-table__note {
    font-size: 11px;
  }
}

/* 文章が入る表（NISAとiDeCoの比較など）：中身を左揃えにする */
.p-article-table--text .c-contents-table1-1__data {
  text-align: left;
}