/* 契約の流れ（5ステップ）— 画像を使わず HTML/CSS で再現 */

.lh-flow {
  --lh-flow-arrow: 34px; /* シェブロンの矢の深さ */
  --lh-navy: #3f4e63;
  --lh-ink: #202b3a;
  box-sizing: border-box;
  flex: none;
  width: 1120px;
  max-width: 100%;
  margin: 0 auto;
  padding: 96px 24px 8px;
  color: #2b2b2b;
  font-family: inherit;
}

.lh-flow *,
.lh-flow *::before,
.lh-flow *::after {
  box-sizing: border-box;
}

.lh-flow ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- 見出し --- */
.lh-flow__head {
  border-left: 3px solid var(--lh-navy);
  padding-left: 20px;
  margin-bottom: 44px;
}

.lh-flow__title {
  margin: 0;
  color: var(--lh-ink);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.lh-flow__subtitle {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lh-flow__sub {
  margin: 12px 0 0;
  color: #5a6675;
  font-size: 14px;
  letter-spacing: 0.03em;
  line-height: 1.8;
}

/* --- 帯（シェブロン） --- */
.lh-flow__ribbon {
  display: flex;
  align-items: stretch;
}

.lh-flow__chevron {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 122px;
  padding: 18px calc(var(--lh-flow-arrow) + 6px) 18px calc(var(--lh-flow-arrow) + 6px);
  text-align: center;
  background: var(--lh-step-bg);
  clip-path: polygon(
    0 0,
    calc(100% - var(--lh-flow-arrow)) 0,
    100% 50%,
    calc(100% - var(--lh-flow-arrow)) 100%,
    0 100%,
    var(--lh-flow-arrow) 50%
  );
  margin-left: calc(var(--lh-flow-arrow) * -1);
}

.lh-flow__chevron:first-child {
  margin-left: 0;
  padding-left: 20px;
  clip-path: polygon(
    0 0,
    calc(100% - var(--lh-flow-arrow)) 0,
    100% 50%,
    calc(100% - var(--lh-flow-arrow)) 100%,
    0 100%
  );
}

.lh-flow__num {
  color: #8593a6;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
}

.lh-flow__label {
  color: var(--lh-ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* 最後のステップだけ塗りつぶし */
.lh-flow__chevron.lh-flow__step-5 .lh-flow__num {
  color: #c3cddb;
}

.lh-flow__chevron.lh-flow__step-5 .lh-flow__label {
  color: #fff;
}

/* --- 帯とカードをつなぐレール --- */
.lh-flow__rail {
  position: relative;
  display: flex;
  height: 34px;
}

.lh-flow__rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #93a1b3;
}

.lh-flow__dot {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lh-flow__dot span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lh-navy);
}

.lh-flow__dot.lh-flow__step-5 span {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--lh-navy);
}

/* --- カード --- */
.lh-flow__cards {
  display: flex;
  align-items: stretch;
}

.lh-flow__card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 196px;
  padding: 28px calc(var(--lh-flow-arrow) + 4px) 28px calc(var(--lh-flow-arrow) + 4px);
  text-align: center;
  font-size: 13px;
  line-height: 2.1;
  letter-spacing: 0.02em;
  color: #33404f;
  background: var(--lh-step-bg);
  clip-path: polygon(
    0 0,
    calc(100% - var(--lh-flow-arrow)) 0,
    100% 50%,
    calc(100% - var(--lh-flow-arrow)) 100%,
    0 100%,
    var(--lh-flow-arrow) 50%
  );
  margin-left: calc(var(--lh-flow-arrow) * -1);
}

.lh-flow__card:first-child {
  margin-left: 0;
  padding-left: 20px;
  clip-path: polygon(
    0 0,
    calc(100% - var(--lh-flow-arrow)) 0,
    100% 50%,
    calc(100% - var(--lh-flow-arrow)) 100%,
    0 100%
  );
}

/* ラベルはスマホでだけ見せる（デスクトップは帯が担う） */
.lh-flow__card-label {
  display: none;
}

/* --- 段階ごとの濃さ --- */
.lh-flow__chevron.lh-flow__step-1 { --lh-step-bg: #f3f4f6; }
.lh-flow__chevron.lh-flow__step-2 { --lh-step-bg: #eff1f4; }
.lh-flow__chevron.lh-flow__step-3 { --lh-step-bg: #eaedf1; }
.lh-flow__chevron.lh-flow__step-4 { --lh-step-bg: #e5e9ef; }
.lh-flow__chevron.lh-flow__step-5 { --lh-step-bg: #3f4e63; }

.lh-flow__card.lh-flow__step-1 { --lh-step-bg: #f4f5f7; }
.lh-flow__card.lh-flow__step-2 { --lh-step-bg: #f1f2f5; }
.lh-flow__card.lh-flow__step-3 { --lh-step-bg: #eef0f3; }
.lh-flow__card.lh-flow__step-4 { --lh-step-bg: #eaedf1; }
.lh-flow__card.lh-flow__step-5 { --lh-step-bg: #e3e7ed; }

/* --- 締めの一文 --- */
.lh-flow__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 64px 0 0;
  color: var(--lh-ink);
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.lh-flow__note::before,
.lh-flow__note::after {
  content: "";
  width: 92px;
  height: 1px;
  background: #7e8ea3;
}

/* --- タブレット --- */
@media (max-width: 900px) {
  .lh-flow {
    --lh-flow-arrow: 22px;
  }

  .lh-flow__title { font-size: 22px; }
  .lh-flow__subtitle { font-size: 19px; }
  .lh-flow__sub { font-size: 12px; }
  .lh-flow__chevron { min-height: 104px; gap: 6px; }
  .lh-flow__num { font-size: 14px; }
  .lh-flow__label { font-size: 12px; }
  .lh-flow__card { font-size: 12px; line-height: 1.95; min-height: 168px; }
  .lh-flow__note { font-size: 15px; gap: 16px; }
  .lh-flow__note::before,
  .lh-flow__note::after { width: 44px; }
}

/* --- スマホ：番号付きの縦タイムライン --- */
@media (max-width: 640px) {
  .lh-flow {
    padding: 64px 20px 0;
  }

  .lh-flow__ribbon,
  .lh-flow__rail {
    display: none;
  }

  .lh-flow__cards {
    position: relative;
    display: block;
    margin-top: 28px;
    counter-reset: lh-step;
  }

  /* ステップを繋ぐ縦線。最初と最後の番号の中心で止める */
  .lh-flow__cards::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: #d9dde0;
  }

  .lh-flow__card {
    position: relative;
    display: block;
    counter-increment: lh-step;
    min-height: 0;
    padding: 0 0 28px 48px;
    margin-left: 0;
    background: none;
    clip-path: none;
    text-align: left;
    font-size: 15px;
    line-height: 1.9;
    color: #444;
  }

  .lh-flow__card:last-child {
    padding-bottom: 0;
  }

  /* 番号の丸。段階ごとの濃さをそのまま使う */
  .lh-flow__card::before {
    content: counter(lh-step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--lh-step-bg);
    color: #2b2b2b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .lh-flow__card-label {
    display: block;
    margin-bottom: 6px;
    padding-top: 4px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
    color: #1f1f1f;
  }

  /* スマホでは本文の改行は成り行きに任せる */
  .lh-flow__card-body br,
  .lh-flow__card-label br {
    display: none;
  }

  .lh-flow__note {
    margin-top: 36px;
    font-size: 16px;
  }

  .lh-flow__note::before,
  .lh-flow__note::after {
    display: none;
  }
}
