/*
 * サイトのデザイン — content（本文 .post_content の土台。読み込みは lib/nettoge/design/inc/assets.php、全ページ）
 *
 * 本文は記事・固定ページのほか、404・ブログパーツにも出るので、全ページで読む。
 * 部品（表・アコーディオン・タブ・ステップ・ETB・比較・シリーズなど）の形は各部品の CSS。ここは本文の地の部分:
 *
 *  1 文字組み             2 ブロックの間隔（H2 の節）      3 段落・文中の画像・強調
 *  4 リンク               5 リスト                         6 図・画像・回り込み
 *  7 引用・水平線・コード  8 マーカー                      9 見出し
 * 10 目次（本文の中）    11 メモ（アイコン付きの段落）     12 囲み・ブログカード
 *
 * 値は build/css/tokens-nettoge.css の --ntg2-*。セレクタは #body_wrap .post_content から始める。
 * 2026-09-23: 旧 typography-nettoge.css・headings-nettoge.css・h2-section-nettoge.css にあった本文の規則をここへ移した。
 * 部品はそれらの規則の上で作られているので、効き方（詳細度）もなるべく同じ強さにしている（強さを変えた所は理由を書く）。
 */

/* ==========================================================================
   1 文字組み
   ========================================================================== */

#body_wrap .post_content {
  --swl-block-margin: 1.7em;
  --swl-h2-margin--x: 0px;
  color: var(--ntg2-text);
  font-size: var(--ntg2-font-size);
  letter-spacing: 0.02em;
  line-height: var(--ntg2-line-height);
  /* 長い URL や英単語で横にはみ出さない。行頭・行末の禁則は厳しめ */
  hyphens: none;
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ==========================================================================
   2 ブロックの間隔
   本文の直下のブロックは SWELL の .post_content > * が下に --swl-block-margin を空ける。
   H2 の節（h2-section-wrap.php の .ntg-h2-section）で包むとブロックが本文の直下でなくなるので、節の中にも同じ間隔を当てる。
   詳細度は SWELL と同じ弱さ（0,1,0）にして、部品が自分で決めた余白を消さない。
   節・入れ物の最初の子の上の余白は SWELL が 0 にする（見出しの下の余白で空ける）
   ========================================================================== */

#body_wrap .post_content .ntg-h2-section {
  margin: 0 0 var(--swl-block-margin, 2em);
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

:where(#body_wrap .post_content) .ntg-h2-section > * {
  clear: both;
  margin-bottom: var(--swl-block-margin, 2em);
}

:where(#body_wrap .post_content) .ntg-h2-section > :last-child {
  margin-bottom: 0;
}

/* 本文の直下は回り込み（.tright / .alignright など）を切らない（SWELL は clear: both） */
:where(#body_wrap) .post_content > * {
  clear: none;
}

/* ==========================================================================
   3 段落・文中の画像・強調
   ========================================================================== */

/* 部品の中の段落も上は 0・下は 1.15em（部品はこの間隔の上で作られている）。本文と節の直下の段落はブロックの間隔 */
#body_wrap .post_content p {
  margin-top: 0;
  margin-bottom: 1.15em;
  line-height: inherit;
  text-indent: 0;
}

#body_wrap .post_content > p,
#body_wrap .post_content .ntg-h2-section > p {
  margin-bottom: var(--swl-block-margin, 2em);
}

/* 文中のアイコン画像（style で幅を指定した <img>。アイテム・アクションのアイコンなど）は行の中で上下中央に */
#body_wrap .post_content p img[style*="width:"] {
  display: inline-block;
  vertical-align: middle;
  margin-inline: 0.4em;
}

#body_wrap .post_content small {
  font-size: 0.84em;
}

#body_wrap .post_content strong {
  font-weight: 700;
}

/* font-weight は触らない（<strong><em> の太字を消さない） */
#body_wrap .post_content em {
  font-style: italic;
}

/* 英語の原文の引用（段落のクラス nettoge-en-quote） */
#body_wrap .post_content :where(.nettoge-en-quote) {
  font-family: var(--font-serif);
  font-size: 0.92em;
  font-style: italic;
  letter-spacing: 0.01em;
  font-feature-settings: normal;
}

/* ==========================================================================
   4 リンク
   文中のリンク = クラスの無い a（訪問済みの印 .is-visited だけ付いた物も。visited-links.js が付ける）。
   ボタン・カード・目次・リンクリストなど、クラスを持つリンクは各部品の見た目
   ========================================================================== */

#body_wrap .post_content a:where(:not([class]), [class="is-visited"]) {
  color: var(--ntg2-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

#body_wrap .post_content a:where(:not([class]), [class="is-visited"]):is(:hover, :focus-visible) {
  text-decoration-thickness: 2px;
}

/* 見たリンクは紫（普通のリンクと同じ。クリック直後は visited-links.js の .is-visited、再読み込み後はブラウザの :visited） */
#body_wrap .post_content a[class="is-visited"] {
  color: var(--ntg2-link-visited);
}

#body_wrap .post_content a:where(:not([class])):visited {
  color: var(--ntg2-link-visited);
}

/* 外のサイトへのリンクには印（画像のリンクには付けない） */
#body_wrap .post_content a:where(:not([class]), [class="is-visited"]):where([href^="http://" i], [href^="https://" i], [href^="//"]):where(:not([href*="//nettoge.com/" i], [href$="//nettoge.com" i], [href*="//www.nettoge.com/" i], [href$="//www.nettoge.com" i], :has(img, picture, svg)))::after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-inline-start: 0.24em;
  vertical-align: -0.15em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42L17.59 5H14V3ZM5 5h6v2H5v12h12v-6h2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42L17.59 5H14V3ZM5 5h6v2H5v12h12v-6h2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* リンクリスト（SWELL の loos/link-list）のボタン型は下線を出さない */
#body_wrap .post_content .swell-block-linkList.is-style-button .swell-block-linkList__link:is(:hover, :focus-visible) {
  text-decoration: none;
}

/* ==========================================================================
   5 リスト
   本文のリスト = クラスの無い ul/ol と、ブロックの普通のリスト（.wp-block-list で is-style-* の無い物）。
   部品のリスト（比較の行・シリーズの目次・タブなど）はクラスを持つので、ここの印や余白は当たらない
   ========================================================================== */

#body_wrap .post_content :is(ul, ol):where(:not([class]), .wp-block-list:not([class*="is-style-"])) {
  margin-top: 0.15em;
  margin-bottom: 1.45em;
  padding-left: var(--swl-list-padding--left);
}

#body_wrap .post_content > :is(ul, ol),
#body_wrap .post_content .ntg-h2-section > :is(ul, ol) {
  margin-bottom: var(--swl-block-margin, 2em);
}

#body_wrap .post_content ul:where(:not([class]), .wp-block-list:not([class*="is-style-"])) {
  list-style: disc outside;
}

#body_wrap .post_content ol:where(:not([class]), .wp-block-list:not([class*="is-style-"])):not([type]) {
  list-style: decimal outside;
  counter-reset: none;
}

/* 入れ子: ul は ○ → ■、ol は a. → i. */
#body_wrap .post_content :is(ul, ol) :is(ul, ol):where(:not([class]), .wp-block-list:not([class*="is-style-"])) {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 1.3em;
}

#body_wrap .post_content :is(ul, ol) ul:where(:not([class]), .wp-block-list:not([class*="is-style-"])) {
  list-style-type: circle;
}

#body_wrap .post_content :is(ul, ol) ul ul:where(:not([class]), .wp-block-list:not([class*="is-style-"])) {
  list-style-type: square;
}

#body_wrap .post_content :is(ul, ol) ol:where(:not([class]), .wp-block-list:not([class*="is-style-"])):not([type]) {
  list-style-type: lower-alpha;
}

#body_wrap .post_content :is(ul, ol) ol ol:where(:not([class]), .wp-block-list:not([class*="is-style-"])):not([type]) {
  list-style-type: lower-roman;
}

/* 項目（SWELL のリストスタイル付きも。部品のリストの項目には当てない） */
#body_wrap .post_content :is(ul, ol):where(:not([class]), .wp-block-list) > li {
  margin-bottom: 0.65em;
  line-height: 1.8;
}

#body_wrap .post_content :is(ul, ol):where(:not([class]), .wp-block-list:not([class*="is-style-"])) > li {
  padding-left: 0;
}

#body_wrap .post_content :is(ul, ol):where(:not([class]), .wp-block-list:not([class*="is-style-"])) > li::before {
  content: none;
}

#body_wrap .post_content :is(ul, ol) > li > p {
  margin: 0.2em 0;
  font-size: inherit;
  line-height: inherit;
}

/* 印の色（青緑）と番号（数字をそろえる） */
#body_wrap .post_content ul:where(:not([class]), .wp-block-list:not([class*="is-style-"])) > li::marker {
  color: var(--ntg2-teal);
}

#body_wrap .post_content ol:where(:not([class]), .wp-block-list:not([class*="is-style-"])) > li::marker {
  color: var(--ntg2-muted);
  font-variant-numeric: tabular-nums;
}

/* 番号付きリストの「インデックス」スタイル（is-style-index）: 左に番号の列（1 / 1-1 …）と細い縦線 */
#body_wrap .post_content ol.is-style-index:not(.p-toc__list) {
  counter-reset: toc;
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}

#body_wrap .post_content ol.is-style-index:not(.p-toc__list) ol {
  counter-reset: toc;
  margin: 0.45em 0 0;
  padding-left: 1.15em;
  list-style: none;
}

#body_wrap .post_content ol.is-style-index:not(.p-toc__list) > li,
#body_wrap .post_content ol.is-style-index:not(.p-toc__list) ol > li {
  position: relative;
  margin: 0.55em 0;
  padding-left: 3.9em;
  counter-increment: toc;
  line-height: inherit;
}

#body_wrap .post_content ol.is-style-index:not(.p-toc__list) > li::before,
#body_wrap .post_content ol.is-style-index:not(.p-toc__list) ol > li::before {
  content: counters(toc, "-");
  position: absolute;
  top: 0.05em;
  left: 0;
  display: block;
  box-sizing: border-box;
  width: 3.15em;
  padding: 0.05em 0.58em 0.05em 0;
  background: none;
  border-right: 1px solid var(--ntg2-line-2);
  color: var(--ntg2-muted);
  counter-increment: none;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

#body_wrap .post_content ol.is-style-index:not(.p-toc__list) > li > :is(ol, ul),
#body_wrap .post_content ol.is-style-index:not(.p-toc__list) ol > li > :is(ol, ul) {
  margin-top: 0.45em;
}

#body_wrap .post_content ol.is-style-index:not(.p-toc__list) ul {
  padding-left: 1.25em;
  list-style: disc;
}

/* 丸数字（is-style-num_circle）: 枠だけの丸。入れ子の ul は小さな黒丸 */
#body_wrap .post_content ol.is-style-num_circle > li::before,
#body_wrap .post_content ol.is-style-num_circle ol > li::before {
  background-color: var(--ntg2-surface);
  box-shadow: 0 0 0 1px currentColor;
  color: currentColor;
  opacity: 1;
}

#body_wrap .post_content ol.is-style-num_circle ul {
  margin-top: 0.5em;
  margin-bottom: 0.35em;
}

#body_wrap .post_content ol.is-style-num_circle ul > li {
  padding-left: 1.25em !important;
}

/* SWELL は空の丸を scale(.15) で描き、--color_list_num が空だと印が消えるので、文字色の点にする */
#body_wrap .post_content ol.is-style-num_circle ul > li::before {
  content: "" !important;
  top: 0.7em;
  left: 0.15em;
  display: block !important;
  width: 6px;
  height: 6px;
  padding: 0;
  background-color: var(--ntg2-text) !important;
  border-radius: 50%;
  box-shadow: none;
  color: var(--ntg2-text) !important;
  counter-increment: none;
  line-height: 0;
  opacity: 0.7;
  transform: none;
}

@media (max-width: 768px) {
  #body_wrap .post_content ol.is-style-index:not(.p-toc__list) > li,
  #body_wrap .post_content ol.is-style-index:not(.p-toc__list) ol > li {
    padding-left: 3.45em;
  }

  #body_wrap .post_content ol.is-style-index:not(.p-toc__list) > li::before,
  #body_wrap .post_content ol.is-style-index:not(.p-toc__list) ol > li::before {
    width: 2.75em;
  }
}

/* ==========================================================================
   6 図・画像・回り込み
   ========================================================================== */

/* 図（画像・表・埋め込み・コード）は上下 1.6em。部品の中の図も同じ（ギャラリーの中の画像は除く） */
#body_wrap .post_content figure:where(:not(.wp-block-gallery > figure)) {
  margin-top: 1.6em;
  margin-bottom: 1.6em;
}

#body_wrap .post_content img {
  max-width: 100%;
  height: auto;
}

#body_wrap .post_content figcaption,
#body_wrap .post_content .wp-element-caption {
  margin-top: 8px;
  color: var(--ntg2-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* 右・左への回り込み（wiki から移した記事の .tright / .tleft）。.mw-clear で回り込みを切る */
#body_wrap .post_content .tright {
  float: right;
  width: 320px;
  max-width: 50%;
  margin: 0 0 1rem 1rem;
}

#body_wrap .post_content .tleft {
  float: left;
  width: 320px;
  max-width: 50%;
  margin: 0 1rem 1rem 0;
}

#body_wrap .post_content .mw-clear {
  clear: both;
}

@media (max-width: 768px) {
  #body_wrap .post_content :is(.tright, .tleft) {
    display: block;
    float: none;
    width: auto;
    max-width: 100%;
    margin: 0 0 1rem;
  }
}

/* ==========================================================================
   7 引用・水平線・コード
   ========================================================================== */

#body_wrap .post_content :is(blockquote, .wp-block-quote) {
  margin-right: 0;
  margin-left: 0;
  padding: 14px 20px;
  background: var(--ntg2-paper);
  border: 0;
  border-left: 3px solid var(--ntg2-line-2);
  border-radius: 0;
  box-shadow: none;
  color: var(--ntg2-sub);
  font-size: 15px;
  font-style: normal;
}

#body_wrap .post_content :is(blockquote, .wp-block-quote)::before,
#body_wrap .post_content :is(blockquote, .wp-block-quote)::after {
  content: none;
}

#body_wrap .post_content :is(blockquote, .wp-block-quote) > :not(:last-child) {
  margin: 0 0 0.5em;
}

#body_wrap .post_content :is(blockquote, .wp-block-quote) > :last-child {
  margin-bottom: 0;
}

#body_wrap .post_content :is(blockquote, .wp-block-quote) cite {
  display: block;
  margin-top: 0.6em;
  color: var(--ntg2-muted);
  font-size: 12px;
  font-style: normal;
}

#body_wrap .post_content hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--ntg2-line-2);
}

/* 文中のコード・キー */
#body_wrap .post_content :not(pre) > code,
#body_wrap .post_content kbd {
  padding: 0.1em 0.35em;
  background: var(--ntg2-paper);
  border: 1px solid var(--ntg2-line);
  border-radius: var(--ntg2-radius-sm);
  color: var(--ntg2-text);
  font-family: var(--font-mono);
  font-size: 90%;
  letter-spacing: 0;
  line-height: inherit;
}

/* コードの箱（背景・枠）は wp-blocks-nettoge.css の .nettoge-codeblock。ここは文字の組み方だけ */
#body_wrap .post_content pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0;
  line-height: 1.6;
  tab-size: 2;
  -moz-tab-size: 2;
}

#body_wrap .post_content pre code {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: inherit;
}

/* ==========================================================================
   8 マーカー（SWELL の .swl-marker。色は swell_custom の --color_mark_*）
   ========================================================================== */

#body_wrap .post_content .swl-marker {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ダークではマーカーの地が明るい色のままなので、文字は本文の色にそろえる */
html[data-nettoge-theme="dark"] #body_wrap .post_content .swl-marker {
  color: var(--color_text) !important;
}

/* ==========================================================================
   9 見出し
   記事の見出し = 本文の中の h2〜h6。ただし部品の見出し（SWELL のブロック・FAQ・一覧の題・ハブの一覧・
   検証の箱・セクション題・Nexus のカード）は除く。ETB の詳細の中の見出しは記事の見出しと同じ。
   詳細度は SWELL と同じ弱さ（0,1,1）。部品が自分の見出しの形を持っていればそちらが勝つ（羊皮紙の H4 の上線など）
   ========================================================================== */

:where(#body_wrap) .post_content h2:where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading)) {
  margin: 2.6em 0 1em;
  padding: 2px 0 2px 14px;
  background: none;
  border: 0;
  border-left: var(--ntg2-h2-bar) solid var(--ntg2-accent);
  border-radius: 0;
  box-shadow: none;
  color: var(--ntg2-text);
  font-size: var(--ntg2-h2-size);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.5;
  text-shadow: none;
}

:where(#body_wrap) .post_content h3:where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading)) {
  margin: 2.2em 0 0.9em;
  padding: 0 0 6px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ntg2-line);
  border-radius: 0;
  box-shadow: none;
  color: var(--ntg2-text);
  font-size: var(--ntg2-h3-size);
  font-weight: 700;
  line-height: 1.55;
  text-shadow: none;
}

:where(#body_wrap) .post_content h4:where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading)) {
  margin: 1.9em 0 0.7em;
  padding: 0 0 0 10px;
  background: none;
  border: 0;
  border-left: 3px solid var(--ntg2-line-2);
  border-radius: 0;
  box-shadow: none;
  color: var(--ntg2-text);
  font-size: var(--ntg2-h4-size);
  font-weight: 700;
  line-height: 1.55;
  text-shadow: none;
}

:where(#body_wrap) .post_content h5:where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading)) {
  margin: 1.8em 0 0.6em;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ntg2-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

:where(#body_wrap) .post_content h6:where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading)) {
  margin: 1.4em 0 0.5em;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ntg2-sub);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

/* SWELL の見出しの飾り（::before / ::after）は使わない */
:where(#body_wrap) .post_content :is(h2, h3, h4, h5, h6):where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading))::before,
:where(#body_wrap) .post_content :is(h2, h3, h4, h5, h6):where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading))::after {
  content: none;
}

/* 見出しが続くとき（節で包まれない所）: 下の見出しの上を詰める */
:where(#body_wrap) .post_content :where(h2) + h3:where(:not([class*="swell-block-"], .nmc-heading)) {
  margin-top: 1.35em;
}

:where(#body_wrap) .post_content :where(h3) + h4:where(:not([class*="swell-block-"], .nmc-heading)) {
  margin-top: 0.85em;
}

:where(#body_wrap) .post_content :where(h4) + h5:where(:not([class*="swell-block-"], .nmc-heading)) {
  margin-top: 0.8em;
}

/* セクション題（SWELL の is-style-section_ttl）: 帯や線を付けず、中央ぞろえの題（左右の指定は尊重） */
#body_wrap .post_content h2.is-style-section_ttl {
  position: relative;
  display: block;
  margin: 1.5em 0 1em;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--ntg2-text);
  font-size: calc(var(--ntg2-h2-size) - 1px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.45;
  text-align: center;
  text-shadow: none;
}

#body_wrap .post_content h2.is-style-section_ttl.has-text-align-left {
  text-align: left;
}

#body_wrap .post_content h2.is-style-section_ttl.has-text-align-right {
  text-align: right;
}

#body_wrap .post_content h2.is-style-section_ttl small {
  display: block;
  padding-top: 0.25em;
  color: var(--ntg2-muted);
  font-size: 0.6em;
  font-weight: 600;
}

/* 部品の中の見出しは、記事の見出しの形を当てない（部品の文字をそのまま使う）:
   FAQ・ステップ・記事一覧の中、details の summary、アコーディオン・FAQ・ステップの題、Nexus のカード（題 .nmc-heading を除く）。
   details・アコーディオンの本文の中の見出しは記事の見出しのまま */
:where(#body_wrap) .post_content :is(.swell-block-faq, .swell-block-step, .p-postList) :is(h2, h3, h4, h5, h6):not(.p-postList__title, .faq_q),
:where(#body_wrap) .post_content .wp-block-details > summary :is(h2, h3, h4, h5, h6),
:where(#body_wrap) .post_content :is(.swell-block-accordion__title, .nettoge-block-accordion__title, .faq_q, .swell-block-step__title) :is(h2, h3, h4, h5, h6),
:where(#body_wrap) .post_content .nexus-card.nmc :is(h1, h2, h3, h4, h5, h6):not(.nmc-heading) {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  line-height: inherit;
  text-shadow: none;
}

/* 羊皮紙・フォーカスの囲み・SWELL の囲み（ボーダー 5）の中の見出し: 線と帯を外す（羊皮紙の H4 の上線は parchment-nettoge.css） */
:where(#body_wrap) .post_content :is(.is-style-parchment, .is-style-focus-box, .has-border.-border05) :is(h1, h2, h3, h4, h5, h6) {
  background: none;
  border-left: 0;
  border-bottom: 0;
  box-shadow: none;
  color: inherit;
  text-shadow: none;
}

:where(#body_wrap) .post_content :is(.is-style-focus-box, .has-border.-border05) :is(h2, h3, h4) {
  padding-right: 0;
  padding-left: 0;
  border: 0;
}

:where(#body_wrap) .post_content :is(.is-style-focus-box, .has-border.-border05) h2 {
  padding-top: 0;
  padding-bottom: 0;
}

/* ==========================================================================
   10 目次（本文の中。SWELL の .p-toc）
   ========================================================================== */

#body_wrap #main_content .p-toc {
  width: auto;
  max-width: none;
  margin: 2.4em 0;
  padding: 18px 22px 12px;
  background: var(--ntg2-paper);
  border: 0;
  border-radius: var(--ntg2-radius);
  box-shadow: none;
}

#body_wrap #main_content .p-toc .p-toc__ttl {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--ntg2-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

#body_wrap #main_content .p-toc .p-toc__ttl::before {
  margin: 0;
  color: var(--ntg2-teal);
}

#body_wrap #main_content .p-toc .p-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ntg2-toc;
}

#body_wrap #main_content .p-toc .p-toc__list > li {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ntg2-line);
  counter-increment: ntg2-toc;
}

#body_wrap #main_content .p-toc .p-toc__list > li:first-child {
  border-top: 0;
}

#body_wrap #main_content .p-toc .p-toc__list li::before,
#body_wrap #main_content .p-toc .p-toc__list li::after {
  content: none;
}

#body_wrap #main_content .p-toc .p-toc__list > li > .p-toc__link {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  color: var(--ntg2-text);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
}

#body_wrap #main_content .p-toc .p-toc__list > li > .p-toc__link::before {
  content: counter(ntg2-toc, decimal-leading-zero);
  flex: none;
  padding-top: 1px;
  color: var(--ntg2-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#body_wrap #main_content .p-toc .p-toc__link:hover {
  color: var(--ntg2-teal);
  opacity: 1;
}

#body_wrap #main_content .p-toc .p-toc__childList {
  margin: -4px 0 6px;
  padding: 0 0 0 30px;
  list-style: none;
}

/* H3: 小さめの弱い字にして、頭に短い横線（ただの字下げにしない） */
#body_wrap #main_content .p-toc .p-toc__childList .p-toc__link {
  position: relative;
  display: block;
  padding: 3px 0 3px 14px;
  color: var(--ntg2-sub);
  font-size: 13px;
  text-decoration: none;
}

#body_wrap #main_content .p-toc .p-toc__childList .p-toc__link::before {
  content: "";
  position: absolute;
  top: calc(3px + 0.8em);
  left: 0;
  width: 7px;
  height: 1px;
  background: var(--ntg2-line-2);
}

#body_wrap #main_content .p-toc .p-toc__expandBtn {
  background: var(--ntg2-surface);
  border: 1px solid var(--ntg2-line-2);
  box-shadow: none;
  color: var(--ntg2-text);
}

#body_wrap #main_content .p-toc.is-omitted:not([data-omit="nest"])::before {
  background: linear-gradient(rgba(var(--ntg2-paper-rgb), 0), var(--ntg2-paper));
  opacity: 1;
}

#body_wrap #main_content .p-toc.is-omitted:not([data-omit="nest"])::after {
  background: var(--ntg2-paper);
  opacity: 1;
}

/* 「もっと見る／閉じる」の動き（toc-expand-fallback.js が .p-toc__list の max-height を動かす。
   アコーディオンの is-style-teaser-inline と同じ .25s）。動いている間は省いた項目も出し、下のぼかしを消す */
#body_wrap #main_content .p-toc > .p-toc__list {
  transition: max-height 0.25s ease;
}

#body_wrap #main_content .p-toc.is-omitted.is-toc-animating:not([data-omit="nest"]) [data-omit="1"] {
  display: block;
}

#body_wrap #main_content .p-toc.is-omitted:not([data-omit="nest"])::before,
#body_wrap #main_content .p-toc.is-omitted:not([data-omit="nest"])::after {
  transition: opacity 0.25s ease;
}

#body_wrap #main_content .p-toc.is-omitted.is-toc-animating:not([data-omit="nest"])::before,
#body_wrap #main_content .p-toc.is-omitted.is-toc-animating:not([data-omit="nest"])::after {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  #body_wrap #main_content .p-toc > .p-toc__list,
  #body_wrap #main_content .p-toc.is-omitted:not([data-omit="nest"])::before,
  #body_wrap #main_content .p-toc.is-omitted:not([data-omit="nest"])::after {
    transition: none;
  }
}

/* ==========================================================================
   11 メモ（段落のスタイル「アイコン: ペン」= 最終確認などのメモ）: 紙色の面に青緑のチェック
   ========================================================================== */

#body_wrap .post_content .is-style-icon_pen {
  --color_icon_pen: transparent;
  --color_icon_pen_bg: var(--ntg2-paper);
  --text-callout-box: var(--ntg2-sub);
  padding: 12px 16px 12px 44px;
  border: 0;
  border-radius: var(--ntg2-radius);
  color: var(--ntg2-sub);
  font-size: 14px;
  line-height: 1.75;
}

#body_wrap .post_content .is-style-icon_pen::before {
  content: "\e923";
  top: 14px;
  left: 16px;
  color: var(--ntg2-teal);
  font-size: 15px;
  line-height: 1.75;
  transform: none;
}

#body_wrap .post_content .is-style-icon_pen::after {
  content: none;
}

/* ==========================================================================
   12 囲み・ブログカード
   ========================================================================== */

/* SWELL の「ボーダー」設定: 太線・二重線・点線をやめ、細い線と角丸にそろえる */
#body_wrap .post_content {
  --border01: 1px solid var(--ntg2-line-2);
  --border02: 1px solid var(--ntg2-line-2);
  --border03: 1px solid var(--ntg2-line-2);
  --border04: 1px solid var(--ntg2-line-2);
}

#body_wrap .post_content .has-border {
  border-radius: var(--ntg2-radius);
}

/* ブログカード（blogcard-nettoge.css。色は tokens-nettoge.css の --nettoge-retro-blogcard-* が --ntg2-* を指す。形だけここでカードにそろえる） */
#body_wrap .post_content .p-blogCard--nettoge {
  overflow: hidden;
  border-radius: var(--ntg2-radius);
}

#body_wrap .post_content .p-blogCard--nettoge:hover {
  border-color: var(--ntg2-teal);
  box-shadow: none;
}

/* ==========================================================================
   スマホ
   ========================================================================== */

@media (max-width: 599px) {
  #body_wrap .post_content {
    font-size: var(--ntg2-font-size-sp);
  }

  :where(#body_wrap) .post_content h2:where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading)) {
    font-size: var(--ntg2-h2-size-sp);
  }

  :where(#body_wrap) .post_content h3:where(:not([class*="swell-block-"], .faq_q, .p-postList__title, .c-nettogeHubList__heading, .c-nettogeVerification__title, .is-style-section_ttl, .nmc-heading)) {
    font-size: var(--ntg2-h3-size-sp);
  }

  #body_wrap #main_content .p-toc {
    padding: 14px 16px 8px;
  }
}
