/**
 * ワンルーム投資サイト：長文記事の認知負荷を下げる表示部品。
 */

:root {
  --or-r-ink: #25323c;
  --or-r-muted: #5a6975;
  --or-r-navy: #17384f;
  --or-r-green: #2f6b5c;
  --or-r-blue-soft: #eef5f8;
  --or-r-line: #cfdae1;
  --or-r-marker: #ffe99a;
  --or-r-marker-soft: #fffaf0;
  --or-r-danger: #9f3535;
  --or-r-danger-soft: #fff3f2;
  --or-r-paper: #fff;
  --or-r-radius: 10px;
}

/* Cocoon の .main パディングは記事カード（.article）の外側に効くため、カード枠と
   本文の間に余白がなく、文字が枠に貼り付いて見えていた。タイトル・日付・本文を
   同じ位置で揃える。投稿・固定ページの両方に効かせる。 */
.entry-content,
.article .entry-title,
.article .page-title,
.article .entry-header .date-tags,
.article .post-date,
.article .post-update {
  padding-right: 28px;
  padding-left: 28px;
}

/* 子テーマの a{color:inherit} で本文リンクが黒くなり、リンクだと分からなかった。
   本文まわりのリンクは青＋下線に戻す（CTAボタンは別途 !important で上書き済み）。 */
.entry-content a,
.entry-content .source-list a,
.entry-content .related-articles a {
  color: #1558b0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: #0d3f80;
}

.entry-content p,
.entry-content li {
  color: var(--or-r-ink);
  line-height: 1.85;
}

.entry-content strong {
  font-weight: 750;
}

.entry-content mark[data-or-emphasis="yellow"] {
  padding: 0 .14em;
  border-radius: 2px;
  background: linear-gradient(transparent 53%, var(--or-r-marker) 53%) !important;
  color: inherit;
}

.entry-content span[data-or-emphasis="red"] {
  color: var(--or-r-danger) !important;
  font-weight: 750;
}

.or-tldr {
  margin: 26px 0 32px;
  padding: 19px 20px 18px;
  border: 1px solid var(--or-r-line);
  border-top: 5px solid var(--or-r-navy);
  border-radius: var(--or-r-radius);
  background: var(--or-r-blue-soft);
}

.or-tldr-label {
  margin: 0 0 10px !important;
  color: var(--or-r-navy) !important;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5 !important;
}

.or-tldr-body p {
  margin: 0 !important;
  font-size: 1.04em;
}

.entry-content h2.or-numbered-heading {
  position: relative;
  padding-left: 62px;
}

.entry-content h2.or-numbered-heading::before {
  position: absolute;
  top: 50%;
  left: 16px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 8px;
  background: var(--or-r-green);
  color: #fff;
  content: attr(data-or-step);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

/* H3・H4の番号バッジ。H2より一段小さくし、見出し階層が潰れないようにする。
   H2は背景ボックス内で縦中央、H3/H4は背景がないので行頭に揃える。 */
.entry-content h3.or-numbered-heading,
.entry-content h4.or-numbered-heading {
  position: relative;
}

.entry-content h3.or-numbered-heading {
  padding-left: 38px;
}

.entry-content h4.or-numbered-heading {
  padding-left: 33px;
}

.entry-content h3.or-numbered-heading::before,
.entry-content h4.or-numbered-heading::before {
  position: absolute;
  top: 0.08em;
  left: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--or-r-green);
  color: #fff;
  content: attr(data-or-step);
  font-weight: 800;
  line-height: 1;
}

.entry-content h3.or-numbered-heading::before {
  width: 27px;
  height: 27px;
  font-size: 13px;
}

.entry-content h4.or-numbered-heading::before {
  width: 23px;
  height: 23px;
  font-size: 12px;
}

.or-key-point {
  margin: 26px 0;
  padding: 15px 18px 16px;
  border: 1px solid #ead88b;
  border-left: 6px solid #d6b120;
  border-radius: var(--or-r-radius);
  background: var(--or-r-marker-soft);
}

.or-key-point-label,
.or-focus-link-label {
  display: inline-block;
  margin-bottom: 7px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--or-r-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}

.or-key-point p,
.or-caution p {
  margin: 0 !important;
}

.or-caution {
  margin: 26px 0;
  padding: 15px 18px 16px;
  border: 1px solid #e2b8b8;
  border-left: 6px solid var(--or-r-danger);
  border-radius: var(--or-r-radius);
  background: var(--or-r-danger-soft);
}

.or-caution-label {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--or-r-danger);
  font-size: 14px;
  font-weight: 800;
}

.or-step-card {
  position: relative;
  margin: 14px 0;
  padding: 17px 18px 17px 58px;
  border: 1px solid var(--or-r-line);
  border-left: 5px solid var(--or-r-green);
  border-radius: var(--or-r-radius);
  background: #fbfdfc;
}

.or-step-card + .or-step-card::before {
  position: absolute;
  top: -17px;
  left: 25px;
  color: var(--or-r-green);
  content: "↓";
  font-size: 18px;
  font-weight: 800;
}

.or-step-badge {
  position: absolute;
  top: 15px;
  left: 11px;
  display: grid;
  min-width: 35px;
  height: 34px;
  padding: 0 5px;
  place-items: center;
  border-radius: 8px;
  background: var(--or-r-green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.or-step-card p {
  margin: 0 !important;
}

.entry-content .or-flow-list {
  margin: 22px 0 28px !important;
  padding: 0 !important;
  counter-reset: or-flow;
  list-style: none !important;
}

.entry-content .or-flow-list > li {
  position: relative;
  margin: 0 0 12px;
  padding: 15px 16px 15px 56px;
  border: 1px solid var(--or-r-line);
  border-radius: var(--or-r-radius);
  background: #fbfdfc;
  counter-increment: or-flow;
}

.entry-content .or-flow-list > li::before {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: var(--or-r-green);
  color: #fff;
  content: counter(or-flow);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.entry-content .or-flow-list > li + li::after {
  position: absolute;
  top: -17px;
  left: 22px;
  color: var(--or-r-green);
  content: "↓";
  font-weight: 800;
}

.or-heading-reference {
  margin: -8px 0 20px !important;
  padding: 9px 12px;
  border-left: 3px solid var(--or-r-green);
  background: #f4f8f6;
  color: var(--or-r-muted) !important;
  font-size: 14px;
}

.or-heading-reference a,
.or-focus-link a {
  color: var(--or-r-navy) !important;
  font-weight: 750;
}

.or-focus-link {
  display: grid;
  gap: 8px;
  margin: 30px 0 24px;
  padding: 17px 18px;
  border: 1px solid var(--or-r-line);
  border-left: 6px solid var(--or-r-green);
  border-radius: var(--or-r-radius);
  background: #f7faf9;
}

.or-focus-link-label {
  width: max-content;
  margin: 0;
  background: var(--or-r-green);
}

.or-focus-link a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content .cta-box a,
.entry-content .cv-box > a.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 20px;
  border: 2px solid var(--or-r-navy);
  border-radius: 9px;
  background: var(--or-r-navy);
  color: #fff !important;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  text-decoration: none !important;
}

.entry-content .cta-box a:hover,
.entry-content .cv-box > a.btn:hover {
  background: #0f2b3d;
}

.entry-content .cta-box a:focus-visible,
.entry-content .cv-box > a.btn:focus-visible,
.or-focus-link a:focus-visible {
  outline: 3px solid #e6bd29;
  outline-offset: 3px;
}

.entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  /* モバイルは余白を詰める（タイトル・日付・本文をまとめて揃える） */
  .entry-content,
  .article .entry-title,
  .article .page-title,
  .article .entry-header .date-tags,
  .article .post-date,
  .article .post-update {
    padding-right: 16px;
    padding-left: 16px;
  }

  .entry-content p,
  .entry-content li {
    font-size: 16px;
    line-height: 1.82;
  }

  .or-tldr,
  .or-key-point,
  .or-caution,
  .or-focus-link {
    margin-right: 0;
    margin-left: 0;
    padding: 16px;
  }

  .or-step-card {
    padding: 16px 14px 16px 52px;
  }

  .entry-content h2.or-numbered-heading {
    padding-left: 54px;
  }

  .entry-content h2.or-numbered-heading::before {
    left: 12px;
    width: 29px;
    height: 29px;
  }

  .entry-content h3.or-numbered-heading {
    padding-left: 34px;
  }

  .entry-content h4.or-numbered-heading {
    padding-left: 30px;
  }

  .entry-content h3.or-numbered-heading::before {
    width: 25px;
    height: 25px;
  }

  .entry-content h4.or-numbered-heading::before {
    width: 22px;
    height: 22px;
  }

  .entry-content .or-flow-list > li {
    padding: 14px 13px 14px 50px;
  }

  .entry-content .cta-box a,
  .entry-content .cv-box > a.btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-content .cta-box a,
  .entry-content .cv-box > a.btn {
    transition: none;
  }
}
