/*
 * Shared treatment-flow presentation for HANDA and Otemachi.
 * WordPress owns the wording and step order; this file owns geometry only.
 */
body.wp-singular :is(.entry-content, .main) .flow_01 {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 46px 56px;
  align-items: start;
  width: min(880px, 100%);
  max-width: 100%;
  margin-inline: auto;
  padding: 0;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 20px 22px 24px;
  background: var(--surface-soft, #f8fbfd);
  border-radius: 6px;
  box-shadow: none;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(360px, 100%);
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner > div {
  display: flex;
  flex: 0 0 150px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 150px;
  max-width: 100%;
  height: 150px;
  margin: 0 auto 18px;
  padding: 0 7px;
  border-radius: 50%;
  background: #9dbfd9;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner .num2 {
  background: #cbdeec;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner .num3 {
  background: #ddd;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner .num4 {
  background: #9e9e9e;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner .num5 {
  background: #fff;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner .num6 {
  background: #f4eba3;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner > div h3 {
  display: block;
  width: 100%;
  min-height: 58px;
  min-width: 0;
  height: auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--text-strong, #15345f) !important;
  font-size: clamp(18px, 1.65vw, 21px) !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere;
  line-break: strict;
  word-break: break-all;
  text-align: center;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner > div p {
  margin: 0 !important;
  background: transparent;
  color: var(--text-strong, #15345f) !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-align: center;
}

body.wp-singular :is(.entry-content, .main) .flow_01 .inner > p {
  width: 100%;
  min-height: 0;
  height: auto !important;
  margin: 0 !important;
  overflow: visible;
  color: #444 !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.9 !important;
  letter-spacing: 0 !important;
}

@media (max-width: 760px) {
  body.wp-singular :is(.entry-content, .main) .flow_01 {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  body.wp-singular :is(.entry-content, .main) .flow_01 .inner {
    width: 100%;
    padding: 22px 18px 24px;
    border-radius: 8px;
    background: #fff;
  }

  body.wp-singular :is(.entry-content, .main) .flow_01 .inner:last-child:nth-child(odd) {
    grid-column: auto;
    width: 100%;
  }

  body.wp-singular :is(.entry-content, .main) .flow_01 .inner > div {
    border: 1px solid rgba(15, 92, 143, 0.16);
  }

  body.wp-singular :is(.entry-content, .main) .flow_01 .inner > div h3 {
    font-size: 18px !important;
  }

  body.wp-singular :is(.entry-content, .main) .flow_01 .inner > p {
    font-size: 14px !important;
    line-height: 1.9 !important;
    text-align: left;
  }
}

@media (max-width: 639px) {
  body.wp-singular :is(.entry-content, .main) .flow_01 {
    gap: 30px;
  }
}

/*
 * Legacy horizontal treatment stages (C0-C4 and related step bands).
 * The markup is WordPress-owned; this shared contract is the sole visual owner.
 */
body.hamille-internal-page-frame--service {
  --service-stage-ink: #15345f;
  --service-stage-copy: #333;
  --service-stage-rule: #35a1e2;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  flex-flow: row wrap;
  justify-content: center;
  width: 75%;
  max-width: 75%;
  margin: 0 auto;
  padding: 0;
  color: var(--service-stage-copy);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: calc(50% - 30px);
  max-width: calc(50% - 30px);
  height: auto;
  margin: 0 30px 0 0;
  padding: 20px 0;
  border-radius: 12px;
  background: #9dbfd9;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.num2 {
  background: #cbdeec;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.num3 {
  background: #eee;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.num4 {
  background: #f4eba3;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.num5 {
  background: #9e9e9e;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt > h3:not(.has-background):not([style*="background"]) {
  box-sizing: border-box;
  width: fit-content;
  max-width: calc(100% - 12px);
  height: auto;
  margin: 0 !important;
  padding: 0 0 10px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--service-stage-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--service-stage-ink) !important;
  font-size: 36px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center;
  text-shadow: none !important;
  overflow-wrap: anywhere;
  line-break: strict;
  word-break: normal;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.txt > h3:not(.has-background):not([style*="background"]),
body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.rows > h3:not(.has-background):not([style*="background"]) {
  font-size: 20px !important;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.rows > h3:not(.has-background):not([style*="background"]) {
  line-height: 1.6 !important;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > p {
  box-sizing: border-box;
  width: 50%;
  max-width: 50%;
  height: auto !important;
  margin: 0 !important;
  padding: 0;
  color: var(--service-stage-copy) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 2 !important;
  letter-spacing: 0 !important;
}

body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner + .fa-arrow-down {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin: 20px auto;
  color: #999;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 840px) {
  body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt,
  body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > p {
    width: 100%;
    max-width: 100%;
  }

  body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt {
    margin: 0 0 20px;
  }
}

@media (max-width: 639px) {
  body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt > h3:not(.has-background):not([style*="background"]),
  body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.txt > h3:not(.has-background):not([style*="background"]),
  body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > .type_tlt.rows > h3:not(.has-background):not([style*="background"]) {
    max-width: 100%;
    font-size: 16px !important;
  }

  body.hamille-internal-page-frame--service :is(#secondary, .main) .type_inner > p {
    font-size: 14px !important;
    line-height: 2 !important;
  }
}
