/*============================
#risk
============================*/
section#risk {
  padding: var(--padding-block, 80px) var(--padding-inline, 20px)
    var(--scale-40, 40px) var(--padding-inline, 20px);
  background: var(--primary-container, #d0f3ff);
}
section#risk div.risk__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-row, 56px);
  align-self: stretch;
}
section#risk div.risk__container div.risk__heading {
  display: flex;
  max-width: var(--width-mid, 1100px);
  flex-direction: column;
  align-items: center;
  gap: var(--scale-16, 16px);
  align-self: stretch;
  margin-inline: auto;
}
section#risk div.risk__container div.risk__heading div.heading__en {
  color: var(--on-primary-container, #245eb4);
  text-align: center;
  font-family: Barlow;
  font-size: var(--scale-24, 24px);
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 3.84px;
}
section#risk div.risk__container div.risk__heading svg {
  width: 145px;
}

section#risk div.risk__container div.risk__heading div.heading__sub-title {
  color: var(--on-primary-container, #245eb4);
  text-align: center;
  font-family: "Noto Sans JP";
  font-size: var(--scale-32, 32px);
  font-style: normal;
  font-weight: 700;
  flex: 1 0 0;
  line-height: normal;
}
section#risk div.risk__container div.risk__heading h2 {
  color: var(--on-surface, #393f47);
  text-align: center;
  font-family: "Noto Sans JP";
  font-size: var(--scale-40, 40px);
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--scale-8, 8px);
  align-items: stretch;
}
section#risk div.risk__container div.risk__units {
  display: flex;
  max-width: var(--width-mid, 1100px);
  flex-direction: column;
  align-items: flex-start;
  gap: var(--scale-20, 20px);
}
section#risk div.risk__container div.risk__units span.highlight {
}
section#risk div.risk__container div.risk__units div.units__unit {
  display: flex;
  padding: var(--scale-40, 40px) var(--scale-24, 24px);
  align-items: flex-start;
  gap: var(--gap-column, 40px);
  align-self: stretch;
  border-radius: var(--scale-16, 16px);
  border: var(--scale-4, 4px) solid var(--border, #bcc3c6);
  background: var(--surface, #fff);
}

section#risk
  div.risk__container
  div.risk__units
  div.units__unit
  figure.unit__img {
  flex: 1 1 50%;
}
section#risk
  div.risk__container
  div.risk__units
  div.units__unit
  figure.unit__img
  img {
}
section#risk
  div.risk__container
  div.risk__units
  div.units__unit
  div.unit__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--scale-20, 20px);
  flex: 1 1 50%;
}

section#risk
  div.risk__container
  div.risk__units
  div.units__unit:nth-of-type(even) {
  flex-direction: row-reverse;
}
section#risk
  div.risk__container
  div.risk__units
  div.units__unit
  div.unit__text
  .text__h3 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--scale-8, 8px);
  flex: 1 0 0;
}
section#risk
  div.risk__container
  div.risk__units
  div.units__unit
  div.unit__text
  div.text__num {
  color: var(--primary, #2894e2);
  font-family: Barlow;
  font-size: var(--scale-32, 32px);
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 1.28px;
}
section#risk
  div.risk__container
  div.risk__units
  div.units__unit
  div.unit__text
  h3 {
  color: var(--on-surface, #393f47);
  font-family: "Noto Sans JP";
  font-size: var(--scale-32, 32px);
  font-style: normal;
  font-weight: 700;
  line-height: 130%; /* 41.6px */
}
section#risk
  div.risk__container
  div.risk__units
  div.units__unit
  div.unit__text
  div.text__description {
  color: var(--on-surface, #393f47);
  font-family: "Noto Sans JP";
  font-size: var(--scale-18, 18px);
  font-style: normal;
  font-weight: 500;
  line-height: 150%; /* 27px */
}
section#risk
  div.risk__container
  div.risk__units
  div.units__unit
  div.unit__text
  div.text__description
  span.highlight {
  color: var(--on-surface, #393f47);
  display: inline;

  /* underline-[18] */
  font-family: "Noto Sans JP";
  font-size: var(--scale-18, 18px);
  font-style: normal;
  font-weight: 700;
  line-height: 150%;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: none;
  text-decoration-color: rgba(255, 204, 0, 0.5);
  text-decoration-thickness: 30%;
  text-underline-offset: -2%;
  text-underline-position: from-font;
}
section#risk div.risk__container div.risk__result {
  max-width: var(--width-mid, 1100px);
  padding: var(--scale-20, 20px);
  justify-content: center;
  align-items: center;
  color: var(--on-surface, #393f47);
  text-align: center;
  font-family: "Noto Sans JP";
  font-size: var(--scale-24, 24px);
  font-style: normal;
  font-weight: 700;
  line-height: 170%; /* 40.8px */
  border-radius: var(--scale-16, 16px);
  border: var(--scale-4, 4px) solid var(--border, #bcc3c6);
  background: var(--secondary-container, #fffadb);
}
section#risk div.risk__container div.risk__result span.higlight {
  color: var(--tertiary, #018e01);
}
@media screen and (max-width: 768px) {
  section#risk {
    width: 100vw;
    overflow: hidden;
  }
  /* --- SPではflex解除し、Swiperのデフォルト挙動に任せる --- */
  section#risk div.risk__container div.risk__units {
    display: block; /* ← これ重要！ Swiperが自分でflexを付ける */
    max-width: 100%;
  }

  section#risk div.risk__container div.risk__units .units__unit {
    display: block; /* ← 各スライドもflexを解除してOK */
    width: 100%;
    box-sizing: border-box;
  }

  section#risk
    div.risk__container
    div.risk__units
    div.units__unit:nth-of-type(n) {
    flex-direction: column;
  }
  section#risk {
    padding-left: var(--scale-32);
    padding-right: var(--scale-32);
  }
  .swiper-button-next svg,
  .swiper-button-prev svg {
    width: var(--scale-20, 16px) !important;
  }

  .swiper-button-prev,
  .swiper-button-next {
    box-shadow: none !important;
    background: transparent !important;
  }

  /*swiper*/
  /* --- Swiper --- */
  .risk__slider {
    position: relative;
    max-width: var(--width-mid, 1100px);
    margin-inline: auto;
    overflow: visible; /* ← 矢印を切らない */
    padding-inline: 0; /* ← 余白は不要 */
  }

  .risk__slider .swiper {
    overflow: hidden; /* ← スライドだけ切り取る */
  }

  .risk__slider .swiper-slide {
    width: 100%;
  }

  .risk__slider .units__unit {
    display: block;
    background: #fff;
    border-radius: var(--scale-16, 16px);
    border: var(--scale-4, 4px) solid var(--border, #bcc3c6);
    padding: var(--scale-40, 40px) var(--scale-24, 24px);
    box-sizing: border-box;
  }

  /* --- ナビゲーション矢印 --- */
  .risk__slider .swiper-button-prev,
  .risk__slider .swiper-button-next {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transform: translateY(-50%); /* 中央寄せ */
  }

  .risk__slider .swiper-button-prev {
    left: 0;
    transform: translate(-60%, -50%); /* ← はみ出しを見た目で出す */
  }

  .risk__slider .swiper-button-next {
    right: 0;
    transform: translate(60%, -50%);
  }

  .swiper-button-prev::after,
  .swiper-button-next::after {
    display: none;
  }

  /* --- ドット --- */
  .risk__slider .swiper-pagination {
    position: relative;
    margin-top: 20px;
    text-align: center;
  }
  .risk__slider .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
    width: 8px;
    height: 8px;
    margin: 0 4px;
  }
  .risk__slider .swiper-pagination-bullet-active {
    background: #245eb4;
  }
}
