/* =========================================================
 * Purpose detail page
 * 01. Common layout
 * 02. Hero
 * 03. Reasons
 * 04. Problems
 * 05. Products / cases / options / estimator
 * 06. Process
 * 07. Responsive
 * 08. Component refinements
 * ======================================================= */

/* 01. Common layout
----------------------------------------------- */
.purpose-detail-page {
  color: #222;
  background: #fff;
}

.purpose-detail-inner {
  max-width: var(--container-max);
  margin: auto;
}

/* 02. Hero
----------------------------------------------- */
.purpose-detail-hero {
  /*
   * 支給KV（1920px幅）の基準線：
   * 本文左端 264px / 画像左端 880px。
   * 画面幅に比例させることで、中間幅でも本文と画像の位置関係を保つ。
   */
  --hero-container-gutter: 13.75vw;
  --hero-copy-width: 29.583vw;
  --hero-column-gap: 2.5vw;
  --hero-space-top: 0px;
  --hero-space-bottom: 95px;

  width: 100%;
  /* KV本体700px + デザイン上の下余白95px。 */
  height: 795px;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns:
    var(--hero-container-gutter)
    minmax(0, var(--hero-copy-width))
    var(--hero-column-gap)
    minmax(0, 1fr);
  padding-block: var(--hero-space-top) var(--hero-space-bottom);
}

.purpose-detail-hero__copy {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0 32px var(--hero-container-gutter);
  transform: translateY(14px);
}

.purpose-detail-hero__copy > p {
  margin: 0 0 24px;
  font-weight: 700;
}

.purpose-detail-hero__copy > p strong {
  font-size: 32px;
  padding: 0 6px;
}

.purpose-detail-hero__copy h1 {
  margin: 0;
  /* 1920px時に50px。画像カラムが縮む中間幅では見出しも同率で縮める。 */
  font-size: clamp(34px, 2.604vw, 50px);
  line-height: 1.52;
  letter-spacing: .02em;
}

.purpose-detail-hero__copy h1 > span {
  display: block;
  white-space: nowrap;
}

.purpose-detail-hero__copy > div {
  display: flex;
  gap: 12px;
  width: min(100%, 512px);
  margin: 34px 0 72px;
}

.purpose-detail-hero__copy > div span {
  min-width: 0;
  flex: 1;
  min-height: 32px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f47b27;
  color: #fff;
  font-size: clamp(10px, .833vw, 16px);
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.purpose-detail-hero__copy > .btn-cta {
  position: relative;
  width: min(100%, 512px);
  min-height: 60px;
  justify-content: center;
  padding: 14px 64px;
  border: 2px solid var(--estimate-green);
  font-size: 20px;
  font-weight: 400;
  transform: translateY(30px);
}

.purpose-detail-hero__copy > .btn-cta .btn-cta__arrow {
  position: absolute;
  right: 32px;
}

.purpose-detail-hero__image {
  grid-column: 4;
  position: relative;
  border-radius: 40px 0 0 40px;
}

.purpose-detail-hero__media {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}

.purpose-detail-hero__media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.purpose-detail-hero__achievement {
  position: absolute;
  top: 42px;
  right: 42px;
  width: 140px;
  height: 140px;
  z-index: 2;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1d1d1d;
  color: #fff;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  line-height: 1;
  text-align: center;
}
.purpose-detail-hero__achievement span { font-size: 14px; font-weight: 700; }
.purpose-detail-hero__achievement strong { margin-top: 7px; font-size: 48px; font-weight: 800; }
.purpose-detail-hero__achievement strong small { margin-left: 4px; font-size: 15px; }
.purpose-detail-hero__achievement b { margin-top: 4px; font-size: 24px; font-weight: 800; }

/* 03. Reasons
----------------------------------------------- */
.purpose-reasons {
  min-height: 750px;
  padding: 138px 24px 120px;
  background: #f3f3f1;
  color: #222;
}

.purpose-reasons h2 {
  text-align: center;
  margin: 0 0 54px;
  font-size: 26px;
  line-height: 1.55;
  letter-spacing: .03em;
}

.purpose-reasons__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;
}

.purpose-reasons article {
  position: relative;
  min-width: 0;
  min-height: 350px;
  padding: 0;
  color: #222;
}

.purpose-reasons article > b {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px;
  border-radius: 10px;
  background: #f47a2a;
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.purpose-reasons article > b::after {
  content: "";
  position: absolute;
  left: 50%;
  /* アンチエイリアスで帯との間に白線が出ないよう、1px重ねる。 */
  bottom: -11px;
  border: 12px solid transparent;
  border-top-color: #f47a2a;
  border-bottom: 0;
  transform: translateX(-50%);
}

.purpose-reasons__icon {
  display: block;
  width: 100px;
  height: 100px;
  margin: 46px auto 27px;
  object-fit: contain;
}

.purpose-reasons h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.purpose-reasons p {
  margin: 0;
  font-size: 13px;
  line-height: 2;
}

/* 04. Problems
----------------------------------------------- */
.purpose-problems {
  min-height: 610px;
  padding: 76px 0 90px;
  overflow: hidden;
  background: #fff;
}

.purpose-problems h2 {
  margin: 0 0 72px;
  text-align: center;
  color: #2f705b;
  font-size: 34px;
}

.purpose-problems__swiper {
  width: calc(100vw - max(24px, (100vw - 1040px) / 2));
  margin-right: calc(50% - 50vw);
  overflow: visible;
}

.purpose-problems__swiper .swiper-wrapper {
  align-items: stretch;
}

.purpose-problems article {
  width: 395px;
  height: auto;
  min-height: 310px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid #2f705b;
  border-radius: 18px;
  background: #fff;
}

.purpose-problems h3 {
  margin: 0;
  min-height: 106px;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #2f705b;
  color: #fff;
  font-size: 17px;
  line-height: 1.55;
}

.purpose-problems h3 span {
  position: relative;
  flex: 0 0 56px;
  padding: 7px 10px 9px;
  border: 3px solid currentColor;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 2px;
  text-align: center;
}

.purpose-problems h3 span::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -10px;
  width: 14px;
  height: 14px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  background: #2f705b;
  transform: skewY(-32deg);
}

.purpose-problems article > div {
  flex: 1;
  padding: 30px 22px 26px;
  border: 0;
  font-size: 14px;
  line-height: 1.75;
}

.purpose-problems strong {
  padding: 0;
  background: transparent;
  color: #2f705b;
  font-size: 16px;
  line-height: 1.65;
}

.purpose-problems p {
  margin: 12px 0 0;
  line-height: 1.8;
}

/* 05. Products / cases / options / estimator
----------------------------------------------- */
.purpose-products {
  min-height: 0;
  padding: 90px 24px 110px;
  background: #2f705b;
  color: #fff;
}

.purpose-products h2 {
  text-align: center;
  font-size: 30px;
}

.purpose-products > div > h3 {
  text-align: center;
  margin: 55px 0 24px;
  font-size: 18px;
}

.purpose-case-links {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 16px;
}

.purpose-case-links article {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  color: #222;
}

.purpose-case-links h4 {
  margin: 0 0 10px;
  text-align: center;
  color: #2f705b;
}

.purpose-case-links img {
  width: 100%;
  aspect-ratio: 16/6;
  object-fit: cover;
}

.purpose-case-links strong {
  display: block;
  margin-top: 12px;
}

.purpose-case-links p {
  margin: 3px 0 16px;
  font-size: 12px;
}

.purpose-case-links a {
  min-height: 44px;
  border: 2px solid #2f705b;
  border-radius: 999px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #2f705b;
  font-size: 12px;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.purpose-case-links a:hover,
.purpose-case-links a:focus-visible {
  background: #2f705b;
  color: #fff;
  transform: translateY(-2px);
}

.purpose-option-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.purpose-option-tabs button {
  min-width: 80px;
  padding: 7px 18px;
  border-radius: 999px;
  background: #fff;
  color: #222;
}

.purpose-option-tabs button[aria-selected=true] {
  background: #222;
  color: #fff;
}

.purpose-option-card {
  position: relative;
  padding: 38px 55px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  border-radius: 16px;
  background: #fff;
  color: #222;
}

.purpose-option-card > img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.purpose-option-card > button {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 54px;
  transform: translateY(-50%);
  background: #222;
  color: #fff;
}

.purpose-option-card > button:first-child {
  left: 0;
}

.purpose-option-card > button:last-child {
  right: 0;
}

.purpose-option-card h4 {
  color: #2f705b;
  font-size: 20px;
}

.purpose-option-card p {
  font-size: 13px;
  line-height: 1.9;
}

.purpose-option-card div div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.purpose-option-card span {
  padding: 4px 8px;
  background: #eee;
  font-size: 10px;
}

.purpose-option-card a {
  margin-top: 30px;
  min-height: 44px;
  border: 2px solid #2f705b;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2f705b;
  font-size: 12px;
}

.purpose-estimator {
  padding: 38px 55px;
  border-radius: 16px;
  background: #fff;
  color: #222;
}

.purpose-estimator > label {
  display: grid;
  grid-template-columns: auto 100px auto;
  align-items: center;
  gap: 14px;
}

.purpose-estimator output {
  padding: 8px;
  background: #f3f3f3;
  text-align: center;
  font-size: 22px;
  color: #2f705b;
}

.purpose-estimator input[type=range] {
  grid-column: 1/4;
  width: 45%;
}

.purpose-estimator fieldset {
  float: right;
  margin-top: -62px;
  border: 0;
}

.purpose-estimator fieldset label {
  display: inline-flex;
  min-width: 130px;
  padding: 10px 20px;
  border: 1px solid #ddd;
  justify-content: center;
}

.purpose-estimator > div {
  clear: both;
  margin-top: 35px;
  padding: 35px;
  background: #f7f7f7;
  text-align: center;
}

.purpose-estimator > div small {
  display: block;
  color: #2f705b;
  letter-spacing: .12em;
}

.purpose-estimator > div strong {
  font-size: 24px;
  color: #2f705b;
}

.purpose-estimator > div p {
  font-size: 12px;
}

.purpose-estimator > button {
  min-width: 430px;
  min-height: 54px;
  margin: 30px auto 0;
  border-radius: 999px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: #f47b27;
  color: #fff;
}

/* 06. Process
----------------------------------------------- */
.process-section {
  min-height: 1000px;
  padding: var(--section-space-top) 24px var(--section-space-bottom);
  background: #d9d9d2;
  color: #222;
}

.process-section__inner {
  max-width: var(--container-max);
  margin: auto;
}

.process-section h2 {
  margin: var(--section-title-gap) 0 var(--section-content-gap);
  font-size: var(--section-title-size);
  line-height: var(--section-title-line-height);
}

.process-item {
  margin: 10px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.process-item summary {
  min-height: 62px;
  display: grid;
  grid-template-columns: 60px 1fr 30px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.process-item summary > span {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2f705b;
  color: #fff;
  font-size: 25px;
}

.process-item summary strong {
  padding: 0 20px;
  color: #2f705b;
  font-weight: 500;
}

.process-item summary i:before {
  content: '⌄';
}

.process-item[open] summary i:before {
  content: '⌃';
}

.process-item > div p {
  margin: 0;
  padding: 0 30px 22px 80px;
  font-size: 13px;
  line-height: 1.8;
}

/* 07. Responsive
----------------------------------------------- */
@media (max-width: 767px) {
  .purpose-reasons,
  .purpose-problems,
  .purpose-products { min-height: 0; }
  .purpose-detail-hero {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    padding-block: 0;
  }

  .purpose-detail-hero__copy {
    grid-column: auto;
    grid-row: 2;
    justify-content: flex-start;
    padding: 34px 20px 80px;
    transform: none;
  }

  .purpose-detail-hero__copy > p {
    margin-bottom: 0;
    line-height: 28px;
  }

  .purpose-detail-hero__copy h1 {
    margin-top: 4px;
    font-size: clamp(30px, 8.2vw, 34px);
    line-height: 1.5;
    letter-spacing: 0;
  }

  .purpose-detail-hero__copy > div {
    gap: 10px;
    width: calc(100% - 10px);
    margin: 32px 5px 40px;
  }

  .purpose-detail-hero__copy > div span {
    min-width: 0;
    flex: 1;
    font-size: 11px;
  }

  .purpose-detail-hero__copy > .btn-cta {
    width: 100%;
    min-height: 70px;
    padding-inline: 52px;
    font-size: 16px;
    transform: none;
  }

  .purpose-detail-hero__copy > .btn-cta .btn-cta__arrow { right: 24px; }

  .purpose-detail-hero__image {
    grid-column: auto;
    grid-row: 1;
    min-height: 0;
    aspect-ratio: 410 / 260;
    border-radius: 32px 0 0 32px;
    margin-left: 20px;
    overflow: visible;
  }

  .purpose-detail-hero__media > img { object-position: center; }

  .purpose-detail-hero__achievement {
    width: 120px;
    height: 120px;
    top: auto;
    right: 10px;
    bottom: -60px;
    z-index: 2;
  }
  .purpose-detail-hero__achievement span { font-size: 12px; }
  .purpose-detail-hero__achievement strong { margin-top: 5px; font-size: 40px; }
  .purpose-detail-hero__achievement strong small { font-size: 12px; }
  .purpose-detail-hero__achievement b { margin-top: 3px; font-size: 20px; }

  .purpose-reasons__grid,.purpose-case-links,.purpose-option-card {
    grid-template-columns: 1fr;
  }

  .purpose-reasons {
    padding-top: 82px;
    padding-bottom: 80px;
    padding-inline: clamp(28px, 9.3vw, 54px);
  }

  .purpose-reasons__grid {
    gap: 55px;
  }

  .purpose-reasons h2 {
    margin-bottom: 78px;
    font-size: 20px;
    line-height: 1.8;
    text-align: left;
  }

  .purpose-reasons article {
    min-height: 0;
  }

  .purpose-reasons article > b {
    min-height: 58px;
    padding: 14px 12px;
    font-size: 15px;
  }

  .purpose-reasons__icon {
    width: 104px;
    height: 104px;
    margin: 28px auto 22px;
  }

  .purpose-reasons h3 {
    margin-bottom: 16px;
    font-size: 16px;
  }

  .purpose-reasons p {
    font-size: 14px;
    line-height: 2.05;
  }
  .purpose-problems {
    min-height: auto;
    padding-top: 58px;
    padding-bottom: 68px;
    overflow: hidden;
  }

  .purpose-problems h2 {
    margin: 0 0 24px;
    font-size: 27px;
    white-space: nowrap;
  }

  .purpose-problems__swiper {
    width: calc(100vw - 16px);
    margin-right: -16px;
  }

  .purpose-problems article {
    width: min(82vw, 340px);
    min-height: auto;
    margin: 0;
    padding: 0;
  }

  .purpose-problems h3 {
    min-height: 104px;
    padding: 20px 18px;
    font-size: 15px;
  }

  .purpose-problems article > div {
    padding: 26px 20px 24px;
    border: 0;
  }

  .purpose-products,.purpose-problems {
    padding-inline: 16px;
  }

  .purpose-products {
    min-height: 0;
    padding-top: 58px;
    padding-bottom: 87px;
  }

  .purpose-case-links article {
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .purpose-case-links img { aspect-ratio: 16 / 9; }

  .purpose-case-links a { margin-top: 24px; }

  .purpose-option-card {
    min-height: 0;
    height: auto;
    padding: 28px 34px 30px;
  }

  .purpose-estimator {
    padding: 28px 20px;
  }

  .purpose-estimator fieldset {
    float: none;
    margin: 25px 0;
  }

  .purpose-estimator > button {
    min-width: 0;
    width: 100%;
  }

  .process-item summary {
    grid-template-columns: 50px 1fr 25px;
  }

  .process-item > div p {
    padding: 0 20px 20px;
  }

  .process-section h2 {
    margin-bottom: var(--section-content-gap);
  }

  .purpose-estimator input[type=range] {
    width: 100%;
  }

}

/* Tablet portrait: the desktop columns become too narrow, so use a stable stack. */
@media (min-width: 768px) and (max-width: 1024px) {
  .purpose-detail-hero {
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 0 0 72px;
  }

  .purpose-detail-hero__image {
    order: 1;
    width: calc(100% - 48px);
    height: clamp(380px, 56vw, 520px);
    margin-left: 48px;
    border-radius: 32px 0 0 32px;
  }

  .purpose-detail-hero__copy {
    order: 2;
    width: 100%;
    padding: 54px 64px 0;
    align-items: center;
    text-align: center;
    transform: none;
  }

  .purpose-detail-hero__copy h1 {
    margin-top: 18px;
    font-size: clamp(34px, 5vw, 44px);
    line-height: 1.45;
  }

  .purpose-detail-hero__copy > div {
    width: min(100%, 520px);
    margin: 28px 0 36px;
  }

  .purpose-detail-hero__copy > div span {
    min-height: 36px;
    font-size: 13px;
  }

  .purpose-detail-hero__copy > .btn-cta {
    width: min(100%, 520px);
    transform: none;
  }

  .purpose-detail-hero__achievement {
    top: 28px;
    right: 28px;
    width: 118px;
    height: 118px;
  }
}

/* 08. Component refinements
 * Base rulesを上書きする、ページ固有の微調整。
----------------------------------------------- */
.purpose-products .purpose-detail-inner {
  max-width: 900px;
}

.purpose-products h2 {
  margin: 0 0 52px;
  letter-spacing: .04em;
}

.purpose-products > .purpose-detail-inner > h3 {
  margin-top: 68px;
  letter-spacing: .08em;
}

.purpose-case-links {
  gap: 18px;
}

.purpose-case-links article {
  padding: 16px 16px 20px;
  box-shadow: 0 8px 24px rgba(20,45,36,.09);
  transition: transform .2s ease, box-shadow .2s ease;
}

.purpose-case-links article:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(20,45,36,.15);
}

.purpose-case-links img {
  aspect-ratio: 16 / 6.5;
}

.purpose-case-links a svg {
  transition: transform .2s ease;
}

.purpose-case-links a:hover svg,
.purpose-case-links a:focus-visible svg {
  transform: translateX(3px);
}

.purpose-option-tabs {
  margin-bottom: 22px;
}

.purpose-option-tabs button {
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.purpose-option-tabs button:not([aria-selected=true]):hover {
  border-color: rgba(255,255,255,.8);
  background: transparent;
  color: #fff;
}

.purpose-option-card {
  min-height: 350px;
  padding: 42px 62px;
  align-items: center;
  box-shadow: 0 10px 28px rgba(20,45,36,.12);
}

.purpose-option-card > img {
  aspect-ratio: 4 / 3;
  background: #eee;
}

.purpose-option-card h4 {
  margin: 0 0 12px;
}

.purpose-option-card a {
  transition: background .2s ease, color .2s ease;
}

.purpose-option-card a:hover,
.purpose-option-card a:focus-visible {
  background: #2f705b;
  color: #fff;
}

.purpose-estimator {
  padding: 42px 56px 46px;
  box-shadow: 0 10px 28px rgba(20,45,36,.12);
}

.purpose-estimator input[type=range] {
  accent-color: #2f705b;
  cursor: pointer;
}

.purpose-estimator fieldset {
  padding: 0;
}

.purpose-estimator fieldset legend {
  margin-bottom: 8px;
  font-size: 13px;
}

.purpose-estimator fieldset label {
  position: relative;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.purpose-estimator fieldset input {
  position: absolute;
  opacity: 0;
}

.purpose-estimator fieldset label:has(input:checked) {
  border-color: #2f705b;
  background: #2f705b;
  color: #fff;
}

.purpose-estimator > div {
  border-radius: 4px;
}

.purpose-estimator > div strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
}

.purpose-estimator > button {
  border: 0;
  transition: transform .2s ease, filter .2s ease;
}

.purpose-estimator > button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

/* 価格シミュレーション
 * estimate/index.html の計算条件を、サイト内で安全に扱えるよう名前空間化したUI。
 * 問い合わせフォームは別コンポーネントとし、結果だけをhidden項目へ引き継ぐ。
----------------------------------------------- */
.estimate-simulator {
  --estimate-green: #2f705b;
  --estimate-orange: #f47b27;
  min-height: auto;
  padding: 48px 56px;
  border-radius: 18px;
  background: #fff;
  color: #222;
  box-shadow: 0 10px 28px rgba(20, 45, 36, .12);
}

.estimate-simulator [hidden] { display: none !important; }

.estimate-simulator__intro {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 0 30px;
  text-align: center;
}

.estimate-simulator__label {
  margin: 0 0 10px;
  color: var(--estimate-green);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}

.estimate-simulator h4 {
  margin: 0;
  color: #222;
  font-size: 28px;
  line-height: 1.45;
}

.estimate-simulator__intro > p:not(.estimate-simulator__label) {
  margin: 18px 0 0;
  color: #555;
  font-size: 14px;
  line-height: 1.9;
}

.estimate-simulator__primary {
  position: relative;
  width: min(100%, 430px);
  min-height: 56px;
  margin: 34px auto 0;
  padding: 13px 58px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--estimate-green);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.estimate-simulator__primary > svg {
  position: absolute;
  right: 26px;
  width: 18px;
  height: 18px;
  transition: transform .2s ease;
}

.estimate-simulator__primary:hover,
.estimate-simulator__primary:focus-visible {
  background: #fff;
  color: var(--estimate-green);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--estimate-green), 0 10px 24px rgba(20,45,36,.14);
}

.estimate-simulator__primary:hover > svg,
.estimate-simulator__primary:focus-visible > svg { transform: translateX(3px); }

.estimate-simulator__primary--accent {
  border-color: var(--estimate-orange);
  background: var(--estimate-orange);
}

.estimate-simulator__primary--accent:hover,
.estimate-simulator__primary--accent:focus-visible {
  color: var(--estimate-orange);
  box-shadow: 0 0 0 1px var(--estimate-orange), 0 10px 24px rgba(244,123,39,.18);
}

.estimate-simulator__questions {
  max-width: 720px;
  margin: 0 auto;
}

.estimate-simulator__progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
}

.estimate-simulator__progress > span {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e5e2;
}

.estimate-simulator__progress i {
  width: 25%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--estimate-green);
  transition: width .3s ease;
}

.estimate-simulator__progress b {
  min-width: 42px;
  color: #666;
  font-family: "Inter", sans-serif;
  font-size: 12px;
}

.estimate-simulator__question-label {
  margin: 0 0 8px;
  color: var(--estimate-green);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.estimate-simulator__options {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.estimate-simulator__option {
  min-height: 82px;
  padding: 16px 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  background: #fff;
  color: #222;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.estimate-simulator__option:hover,
.estimate-simulator__option:focus-visible {
  border-color: var(--estimate-green);
  background: #f1f7f4;
  transform: translateY(-2px);
}

.estimate-simulator__option.is-selected {
  border-color: var(--estimate-green);
  background: var(--estimate-green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 112, 91, .16);
}

.estimate-simulator__option.is-selected span { color: rgba(255, 255, 255, .78); }

.estimate-simulator__option strong { font-size: 15px; }
.estimate-simulator__option span { color: #777; font-size: 11px; }

.estimate-simulator__question-actions {
  grid-column: 1 / -1;
  margin-top: 12px;
  text-align: center;
}

.estimate-simulator__question-actions .estimate-simulator__primary--small {
  margin-top: 0;
}

.estimate-simulator__selection-error {
  margin: 0 0 10px;
  color: #c64236;
  font-size: 12px;
  font-weight: 700;
}

.estimate-simulator__back,
.estimate-simulator__redo {
  margin-top: 24px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.estimate-simulator__options.is-slider { display: block; }

.estimate-simulator__slider output {
  margin-bottom: 28px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--estimate-green);
}

.estimate-simulator__slider output strong {
  font-family: "Inter", sans-serif;
  font-size: 52px;
  line-height: 1;
}

.estimate-simulator__slider output > span { margin-left: 5px; font-size: 18px; }
.estimate-simulator__slider output small { margin-left: 14px; color: #777; font-size: 13px; }

.estimate-simulator__slider input[type=range] {
  width: 100%;
  accent-color: var(--estimate-green);
  cursor: pointer;
}

.estimate-simulator__slider > div {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: #888;
  font-size: 10px;
}

.estimate-simulator__primary--small { width: 240px; margin-top: 28px; }

.estimate-simulator__result {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  outline: none;
}

.estimate-simulator__result h4 span {
  margin-left: 6px;
  color: #777;
  font-size: 12px;
  font-weight: 400;
}

.estimate-simulator__range {
  margin: 24px 0 8px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  color: var(--estimate-green);
}

.estimate-simulator__range strong {
  font-family: "Inter", sans-serif;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1;
}

.estimate-simulator__range > span { color: #777; font-size: 20px; }
.estimate-simulator__range small { color: #444; font-size: 14px; }

.estimate-simulator__mid {
  margin: 0;
  color: #555;
  font-size: 13px;
  font-weight: 700;
}

.estimate-simulator__handoff-note {
  margin: 12px 0 0;
  color: #66706c;
  font-size: 11px;
  line-height: 1.7;
}

.estimate-simulator__summary {
  margin: 30px 0 0;
  border-top: 1px solid #e2e2df;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: left;
}

.estimate-simulator__summary > div {
  padding: 13px 14px;
  border-bottom: 1px solid #e2e2df;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
}

.estimate-simulator__summary dt,
.estimate-simulator__summary dd { margin: 0; font-size: 12px; }
.estimate-simulator__summary dt { color: #777; }
.estimate-simulator__summary dd { font-weight: 700; }

.estimate-simulator__notice {
  margin: 24px auto 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f5f5f2;
  color: #666;
  font-size: 10px;
  line-height: 1.8;
  text-align: left;
}

.estimate-simulator__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.process-section {
  padding: var(--section-space-top) 24px var(--section-space-bottom);
}

.process-section h2 {
  margin: var(--section-title-gap) 0 var(--section-content-gap);
}

.process-list {
  display: grid;
  gap: 10px;
}

.process-item {
  position: relative;
  margin: 0;
  border-radius: 10px;
  background: linear-gradient(to right, #2f705b 0 60px, #fff 60px 100%);
}

.process-item summary {
  min-height: 60px;
  grid-template-columns: 60px 1fr 34px;
}

.process-item summary::-webkit-details-marker {
  display: none;
}

.process-item summary > span {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 60px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  font-size: 23px;
}

.process-item summary strong {
  font-size: 15px;
}

.process-item summary i {
  color: #2f705b;
  font-style: normal;
  transition: transform .2s ease;
}

.process-item[open] summary i {
  transform: rotate(180deg);
}

.process-item > div {
  overflow: hidden;
}

.process-item > div p {
  padding: 0 54px 20px 80px;
  color: #444;
  line-height: 1.75;
}

/* PROCESS: 番号列と開閉本体を分離し、開いた高さにも安全に追従させる */
.process-item {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}

.process-item__number {
  position: static;
  width: auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  background: #2f705b;
  color: #fff;
  font-size: 23px;
}

.process-item > details {
  min-width: 0;
  background: #fff;
}

.process-item > details > summary {
  min-height: 60px;
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.process-item > details > summary strong {
  grid-column: 1;
  padding: 0 20px;
  color: #2f705b;
  font-size: 15px;
  font-weight: 500;
}

.process-item > details > summary i {
  grid-column: 2;
  color: #2f705b;
  font-style: normal;
  transition: transform .2s ease;
}

.process-item > details > summary i::before {
  content: '⌄';
}

.process-item > details[open] > summary i {
  transform: rotate(180deg);
}

.process-item > details > div p {
  margin: 0;
  padding: 0 54px 20px 20px;
  color: #444;
  font-size: 13px;
  line-height: 1.75;
}

.process-item > details > summary .process-item__arrow {
  grid-column: 2;
  display: block;
  width: 14px;
  height: 8px;
  transition: transform .2s ease;
  transform: rotate(0deg);
  transform-origin: center;
}

.process-item > details[open] > summary .process-item__arrow {
  transform: rotate(180deg);
}

/* Component refinements: responsive */
@media (max-width: 767px) {
  .purpose-products .purpose-detail-inner {
    max-width: none;
  }

  .purpose-products h2 {
    margin-bottom: 36px;
    font-size: 24px;
    text-align: left;
  }

  .purpose-products > .purpose-detail-inner > h3 {
    margin-top: 50px;
  }

  .purpose-option-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .purpose-option-tabs button {
    min-width: 0;
    padding-inline: 8px;
  }

  .purpose-option-card {
    min-height: 0;
    height: auto;
    padding: 28px 34px 30px;
  }

  .purpose-option-card > img {
    margin: 0;
    aspect-ratio: 4 / 3;
  }

  .purpose-option-card > div {
    margin: 0;
  }

  .purpose-option-card h4 {
    margin: 0 0 14px;
  }

  .purpose-estimator {
    padding: 28px 20px 32px;
  }

  .purpose-estimator > label {
    grid-template-columns: 1fr 82px auto;
  }

  .purpose-estimator fieldset {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .purpose-estimator fieldset legend {
    grid-column: 1 / -1;
  }

  .purpose-estimator fieldset label {
    min-width: 0;
  }

  .purpose-estimator > div strong {
    font-size: 20px;
  }

  .estimate-simulator {
    min-height: auto;
    padding: 30px 20px;
    border-radius: 14px;
  }

  .estimate-simulator__intro { padding: 24px 0; }
  .estimate-simulator h4 { font-size: 22px; }
  .estimate-simulator__intro > p:not(.estimate-simulator__label) { font-size: 13px; }
  .estimate-simulator__progress { margin-bottom: 28px; }
  .estimate-simulator__options { grid-template-columns: 1fr; gap: 9px; }
  .estimate-simulator__option { min-height: 68px; padding: 13px 16px; }
  .estimate-simulator__slider output strong { font-size: 44px; }
  .estimate-simulator__slider output small { margin-left: 10px; }
  .estimate-simulator__range { gap: 6px; }
  .estimate-simulator__range strong { font-size: clamp(28px, 9vw, 40px); }
  .estimate-simulator__summary { grid-template-columns: 1fr; }
  .estimate-simulator__summary > div { grid-template-columns: 74px 1fr; }
  .estimate-simulator__primary { padding-inline: 46px; }

  .process-section {
    min-height: 0;
    padding: var(--section-space-top) 16px var(--section-space-bottom);
  }

  .process-item summary {
    min-height: 56px;
    grid-template-columns: 50px 1fr 28px;
  }

  .process-item {
    background: linear-gradient(to right, #2f705b 0 50px, #fff 50px 100%);
  }

  .process-item summary > span {
    width: 50px;
  }

  .process-item summary strong {
    padding-inline: 14px;
    font-size: 14px;
  }

  .process-item > div p {
    padding: 2px 18px 18px;
  }

  .process-item {
    grid-template-columns: 50px minmax(0, 1fr);
    background: #fff;
  }

  .process-item__number {
    width: auto;
    min-height: 56px;
    font-size: 21px;
  }

  .process-item > details > summary {
    min-height: 56px;
    grid-template-columns: 1fr 28px;
  }

  .process-item > details > summary strong {
    padding-inline: 14px;
    font-size: 14px;
  }

  /* 最長の7番だけが末尾1語で折り返さないよう、狭幅時に余白と字幅を吸収する。 */
  .process-item:last-child > details > summary strong {
    padding-right: 4px;
    font-size: clamp(12px, 3.4vw, 14px);
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  .process-item > details > div p {
    padding: 2px 18px 18px 14px;
  }

}

/* 11. Purpose products: reference-aligned controls
----------------------------------------------- */
.purpose-case-links a {
  position: relative;
  min-height: 44px;
  padding: 8px 48px;
  gap: 0;
  border-width: 2px;
  line-height: 1.4;
}

.purpose-case-links a svg {
  position: absolute;
  top: 50%;
  right: 22px;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
}

.purpose-case-links a:hover svg,
.purpose-case-links a:focus-visible svg { transform: translate(3px, -50%); }
.purpose-option-card { container-type: inline-size; }
.purpose-option-card > button { display: block; padding: 0; font-family: Inter, sans-serif; font-size: 0; }
.purpose-option-card > button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.purpose-option-card > button:first-child::before { transform: translate(-50%, -50%) rotate(-135deg); }
.purpose-option-card > button:last-child::before { transform: translate(-50%, -50%) rotate(45deg); }

.purpose-option-card a {
  position: relative;
  min-height: 46px;
  padding: 8px 24px 8px 62px;
  border-width: 2px;
  line-height: 1.4;
}

.purpose-option-card a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 30px;
  width: 24px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url('../img/download.svg') center / contain no-repeat;
  mask: url('../img/download.svg') center / contain no-repeat;
  transform: translateY(-50%);
}

@media (max-width: 767px) {
  .purpose-case-links a { width: 100%; min-height: 46px; margin-top: 24px; padding-inline: 50px; }
  .purpose-case-links a svg { right: 20px; }
  .purpose-option-card > button {
    /* 画像上端 + 4:3画像の高さの半分。カード全体の高さには影響されない。 */
    top: calc(28px + 100cqw * .375);
    width: 35px;
    height: 64px;
  }
  .purpose-option-card > button:first-child { left: 0; }
  .purpose-option-card > button:last-child { right: 0; }
  .purpose-option-card a { width: 100%; min-height: 56px; margin-top: 34px; padding: 10px 26px 10px 58px; font-size: 13px; }
  .purpose-option-card a::before { left: 24px; width: 22px; height: 20px; }
}
