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

.lh-flow {
  --lh-flow-arrow: 28px;
  --lh-flow-gap: 6px;
  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__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-left: 4px solid #2b2b2b;
  padding-left: 16px;
  margin-bottom: 48px;
}

.lh-flow__title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.lh-flow__subtitle {
  font-size: 16px;
  font-weight: 500;
  color: #4a4a4a;
}

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

.lh-flow__chevron {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 16px calc(var(--lh-flow-arrow) + 8px) 16px 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  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 - var(--lh-flow-gap));
}

.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__cards {
  display: flex;
  align-items: stretch;
  margin-top: 40px;
}

.lh-flow__card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 8px;
  text-align: center;
  font-size: 13px;
  line-height: 2.1;
  letter-spacing: 0;
  background: var(--lh-step-bg);
  word-break: auto-phrase;
  text-wrap: pretty;
  line-break: strict;
}

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

.lh-flow__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  color: #111;
}

.lh-flow__arrow svg {
  width: 34px;
  height: auto;
  display: block;
}

/* --- 段階ごとの濃さ --- */
.lh-flow__step-1 { --lh-step-bg: #ececec; }
.lh-flow__step-2 { --lh-step-bg: #e8e9ea; }
.lh-flow__step-3 { --lh-step-bg: #e3e6e8; }
.lh-flow__step-4 { --lh-step-bg: #dde2e6; }
.lh-flow__step-5 { --lh-step-bg: #cfd6db; }

/* --- 締めの一文 --- */
.lh-flow__note {
  margin: 56px 0 0;
  padding: 28px 24px;
  background: #ececec;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

/* --- タブレット --- */
@media (max-width: 900px) {
  .lh-flow__chevron { font-size: 13px; min-height: 112px; }
  .lh-flow__card { font-size: 13px; line-height: 1.9; padding: 24px 12px; }
  .lh-flow__arrow { width: 32px; }
  .lh-flow__arrow svg { width: 22px; }
  .lh-flow__note { font-size: 16px; }
}

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

  .lh-flow__ribbon,
  .lh-flow__arrow {
    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;
    padding: 0 0 28px 48px;
    background: 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__note {
    margin-top: 36px;
    font-size: 16px;
    padding: 20px 16px;
  }
}
