.oandaone {
  --accent-color: #03d37e;
  padding-bottom: 0;
  line-height: 1.5;

  img {
    height: auto;
  }
}

.oandaone-heading {
  position: relative;
  margin: 0 0 24px;
  padding-bottom: 12px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;

  &::before {
    content: "";
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
  }

  @media (width >= 1024px) {
    margin-bottom: 40px;
    font-size: 40px;

    &::before {
      width: 80px;
    }
  }
}

.oandaone-visual {
  position: relative;
  height: 470px;
  margin-bottom: 68px;
  background: linear-gradient(180deg, #004e7f -50%, #11254b 100%);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;

  @media (width >= 768px) {
    height: 620px;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.8;
  }

  @media (width >= 1024px) {
    height: 680px;
  }
}

.oandaone-visual__inner {
  padding: 32px 32px 230px;
  background: url(/image/oanda-one/visual.avif) top 240px left 40px / 295px 338px no-repeat;

  @media (width >= 768px) {
    height: 100%;
    padding: 92px 32px 0;
    background: url(/image/oanda-one/visual.avif) right 20px top 140px / 400px calc(400px * 1.145) no-repeat;
  }

  @media (width >= 1024px) {
    padding: 92px 0 0;
    background: url(/image/oanda-one/visual.avif) right 40px / 524px 600px no-repeat;
  }
}

.oandaone-visual__title {
  margin: 0 0 16px;
  color: var(--accent-color);
  font-size: 13px;
  font-weight: bold;
  line-height: 1.4;

  @media (width >= 768px) {
    font-size: 28px;
  }
}

.oandaone-visual__subtitle {
  margin: 0 0 24px;
  font-size: 28px;
  font-weight: bold;
  line-height: 1.3;

  @media (width >= 768px) {
    font-size: 40px;
  }
}

.oandaone-visual__link {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  height: 68px;
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  line-height: 1;

  @media (width >= 768px) {
    position: static;
    justify-content: flex-start;
    align-items: flex-start;
    height: auto;
    margin-top: 56px;
    padding: 0;
    background: transparent;
  }

  a {
    display: block;
  }

  img {
    width: auto;
    max-height: 100%;
  }
}

.oandaone-visual__notice {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;

  @media (width >= 768px) {
    margin-top: 16px;
  }

  + .oandaone-visual__manual {
    --manual-margin-top: 4px;

    @media (width >= 768px) {
      --manual-margin-top: 12px;
    }
  }
}

.oandaone-visual__manual {
  --manual-margin-top: 16px;
  --manual-margin-bottom: 0;
  margin: var(--manual-margin-top) 0 var(--manual-margin-bottom);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.85;

  @media (width >= 768px) {
    --manual-margin-top: 24px;
    --manual-margin-bottom: 0;
  }

  @media (width >= 1024px) {
    --manual-margin-top: 24px;
    --manual-margin-bottom: 0;
  }

  a {
    color: #fff;
    white-space: nowrap;

    &::after {
      content: "";
      display: inline-block;
      width: 0.75em;
      height: 0.75em;
      margin-left: 0.75em;
      vertical-align: baseline;
      background: currentColor;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='10' viewBox='0 0 7 10'%3E %3Cpolygon points='1.188 0 .021 1.167 3.855 5 .021 8.833 1.188 10 6.188 5'/%3E %3C/svg%3E") center / contain no-repeat;
    }
  }
}

.oandaone-section {
  padding: 32px 0 40px;

  @media (width >= 1024px) {
    padding: 80px 0 120px;
  }
}

.oandaone-section--gray {
  background: #f3f8fa;
}

.oandaone-section--navy {
  background: #11254b;
  color: #fff;
}

.oandaone-cards {
  list-style: none;
  counter-reset: step 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 0;
  padding: 0;

  @media (width >= 1024px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.oandaone-card {
  counter-increment: step 1;
  display: grid;
  grid-auto-rows: auto;
  gap: 16px;
  padding: 8px 24px 32px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.2);

  &::before {
    content: "0" counter(step);
    color: var(--accent-color);
    font-size: 32px;
    font-weight: bold;
    line-height: 1.8;
    text-align: center;
  }

  @media (width >= 1024px) {
    gap: 24px;
    padding: 24px 40px;

    &::before {
      font-size: 40px;
    }
  }
}

.oandaone-card__title {
  margin: 0;
  padding: 0;
  font-size: 1.8rem;
  font-weight: bold;

  @media (width >= 1024px) {
    min-height: calc(3em * 1.5);
    font-size: 2.4rem;
  }
}

.oandaone-card__text {
  margin: 0;
  font-size: 1.4rem;

  @media (width >= 1024px) {
    font-size: 1.6rem;
  }
}

.oandaone-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin: 0;
  padding: 0;

  @media (width >= 1024px) {
    flex-direction: column;
    gap: 72px;
  }
}

.oandaone-feature {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;

  @media (width >= 1024px) {
    flex-direction: row;
    align-items: center;
    gap: 64px;

    &:nth-child(odd) {
      flex-direction: row-reverse;
    }
  }
}

.oandaone-feature__title {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.2;

  @media (width >= 1024px) {
    margin: 0;
    font-size: 36px;

    span {
      display: block;
    }
  }
}

.oandaone-feature__text {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.8;

  @media (width >= 1024px) {
    font-size: 1.6rem;
  }
}

.oandaone-recommends {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin: 0;
  padding: 0;
}

.oandaone-recommend {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 24px 32px;
  border-radius: 16px;
  background: #f3f8fa;

  @media (width >= 1024px) {
    flex-direction: row;
    gap: 64px;
    padding: 80px 72px;
  }
}

.oandaone-recommend__title {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.2;

  @media (width >= 1024px) {
    font-size: 36px;
  }

  span {
    display: block;
    white-space: nowrap;
  }
}

.oandaone-recommend__text {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.8;
}

.oandaone-flows {
  list-style: none;
  counter-reset: step 0;
  display: grid;
  grid-auto-rows: auto;
  grid-auto-columns: 1fr;
  gap: 32px;
  margin: 0;
  padding: 0;

  @media (width >= 1024px) {
    grid-template-columns: repeat(4, 1fr);
  }
}

.oandaone-flow {
  counter-increment: step 1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  gap: 24px;
  padding: 32px 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;

  &:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 16px;
    height: 12px;
    background: #d9d9d9;
    clip-path: polygon(0 0, 100% 0%, 50% 100%);
    transform: translate(-50%, 12px);

    @media (width >= 1024px) {
      top: 50%;
      left: 100%;
      width: 12px;
      height: 16px;
      clip-path: polygon(0 0, 0% 100%, 100% 50%);
      transform: translate(12px, -50%);
    }
  }
}

.oandaone-flow__title {
  margin: 0 -10px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;

  @media (width >= 1024px) {
    min-height: calc(3em * 1.2 + 46px);
    font-size: 20px;
  }

  span {
    display: block;
  }

  &::before {
    content: "Step" counter(step);
    display: block;
    margin-bottom: 16px;
    color: var(--accent-color);
    font-size: 20px;
    font-weight: bold;
    line-height: 1.5;
    text-align: center;
  }
}

.oandaone-flow__image {
  justify-self: center;
}

.oandaone-flow__text {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.8;
}

.oandaone-faq {
  --accordion-icon-top: 35px;
  --accordion-icon-right: 5px;

  @media (width >= 1024px) {
    --accordion-icon-top: 35px;
    --accordion-icon-right: 40px;
  }
}

.oandaone-faq__item {
  &:not(:first-child) {
    border-top: 1px solid #e0e0e0;
  }
}

.oandaone-faq__question {
  display: flex;
  align-items: center;
  padding: 16px 40px 16px 0;
  font-size: 1.6rem;
  font-weight: bold;
  line-height: 1.2;

  @media (width >= 1024px) {
    display: block;
    padding: 24px 40px;
    font-size: 1.8rem;
  }

  @media (hover: hover) {
    &:hover {
      color: var(--accent-color);
    }
  }

  span {
    margin-right: 16px;
  }
}

.oandaone-faq__answer {
  & p {
    margin: 0;
    padding: 8px 0 16px;
    white-space: pre-line;

    @media (width >= 1024px) {
      padding: 12px 40px 24px;
    }
  }
}

.faq {
  --accordion-icon-size: 14px;
  --accordion-icon-stroke: 2px;
  --accordion-icon-color: var(--accent-color);
  user-select: none;
  interpolate-size: allow-keywords;

  details {
    position: relative;
    cursor: pointer;
  }

  summary::-webkit-details-marker {
    display: none;
  }

  summary::marker {
    content: "";
    width: 24px;
    height: 24px;
  }

  summary::before,
  summary::after {
    content: "";
    position: absolute;
    top: var(--accordion-icon-top);
    right: var(--accordion-icon-right);
    width: var(--accordion-icon-size);
    height: var(--accordion-icon-stroke);
    background: var(--accordion-icon-color);
    transform-origin: center;
    transition: rotate 0.3s ease;
  }

  summary::after {
    rotate: -90deg;
  }

  details[open] summary::after {
    rotate: 0deg;
  }

  details[open] summary::before {
    rotate: 180deg;
  }

  details::details-content {
    overflow: clip;
    height: 0;
    transition:
      height 400ms ease,
      content-visibility 400ms ease allow-discrete;
  }

  details[open]::details-content {
    height: auto;
  }
}
