/* =========================
   Knowhow: Clean CSS (完全版)
   方針:
   - 目次(TOC)は常にマーカー無し（.jp-toc__list）
   - 本文リストは「安定版」1本化（UL=disc outside / OL=decimal outside）
   - ■マーカーはホワイトリスト（ul.kh-bullet のみ）
   ========================= */

/* ===== ノウハウ一覧（最小・安定） ===== */

.kh-archive { --kh-gap: 20px; }

/* 3→2→1 カラム */
.kh-archive .kh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--kh-gap);
}
@media (max-width: 900px) { .kh-archive .kh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .kh-archive .kh-grid { grid-template-columns: 1fr; } }

.kh-archive .kh-card__placeholder { background: #f2f2f2; }

.kh-archive .kh-card__body { padding: 14px; }
.kh-archive .kh-card__title { margin: 0 0 6px; font-size: 1.2rem; line-height: 1.35; }
.kh-archive .kh-card__title a { text-decoration: none; }
.kh-archive .kh-card__title a:hover { text-decoration: underline; }
.kh-archive .kh-card__date { display:block; color:#6a6a6a; font-size:.85rem; margin-bottom:8px; }
.kh-archive .kh-card__excerpt { color:#555; font-size:.92rem; line-height:1.6; }

/* ページネーション（WP標準） */
.kh-archive .kh-pagination .page-numbers {
  display:inline-block; padding:.35em .6em; border:1px solid #ddd;
  margin-right:6px; border-radius:6px; text-decoration:none;
}
.kh-archive .kh-pagination .page-numbers.current {
  background:#222; color:#fff; border-color:#222;
}

/* フォーカス（A11y） */
.kh-archive a:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }

/* 印刷は1カラム */
@media print { .kh-archive .kh-grid { grid-template-columns: 1fr; } }

/* ===== ノウハウ詳細（ベース） ===== */
.kh-single { max-width: 1040px; margin: 0 auto; padding: 0 8px 48px; }
.kh-single__header { margin: 18px 0 14px; }
.kh-single__title { margin: 0 0 6px; font-size: clamp(1.4rem, 2.3vw, 2rem); line-height: 1.25; }
.kh-single__meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:#6b7280; font-size:.9rem; }
.kh-single__chips { list-style:none; display:flex; gap:6px; padding:0; margin:0; }
.kh-chip { font-size:.75rem; background:#eef2ff; color:#244; padding:.2em .55em; border-radius:999px; }
.kh-single__thumb { margin: 12px 0 18px; }
.kh-single__thumb img { width:100%; height:auto; display:block; border-radius:8px; }

.kh-dlbox { margin: 24px 0; padding: 16px; border:1px solid #e5eaf2; border-radius:8px; background:#fafcff; }
.kh-dlbox__title { margin:0 0 .4em; font-size:1.1rem; }
.kh-dlbox__lead { margin:.2em 0 1em; color:#374151; }

.kh-btn { display:inline-block; padding:.6em 1.1em; border:1px solid #0b57d0; border-radius:6px; text-decoration:none; }
.kh-btn--primary { background:#0b57d0; color:#fff; border-color:#0b57d0; }

.kh-single__content { line-height:1.9; }
.kh-single__content img { max-width:100%; height:auto; }

.kh-single__nav { margin-top: 28px; }
.kh-link-back { text-underline-offset: 2px; }
.kh-link-back:hover { text-decoration: underline; }

/* 印刷最適化（画像縁切れ防止） */
@media print {
  .kh-single { padding: 0; }
  .kh-single__thumb img { border-radius: 0; }
}

/* ===== ノウハウ一覧：ヒーロー（JP News 風） ===== */
.kh-archive .kh-hero{
  margin: 6px 0 16px;
  padding: 14px 14px 10px;
  background: #f5f8ff;
  border: 1px solid #e6ecff;
  border-radius: 12px;
}
.kh-archive .kh-hero__header{ display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.kh-archive .kh-hero__badge{
  display:inline-block; font-size:.78rem; line-height:1;
  padding:.45em .65em; background:#0b57d0; color:#fff; border-radius:999px;
}
.kh-archive .kh-hero__title{
  margin:0; font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  line-height:1.2; font-weight:700;
}
.kh-archive .kh-hero__lead{ margin:.2rem 0 0; color:#4a5568; font-size:.92rem; }

/* 余白調整：ヒーローの下に少しスペース */
.kh-archive .kh-grid{ margin-top: 10px; }

/* 使い回しボタン（任意） */
.kh-archive .kh-btn{ display:inline-block; padding:.5em .9em; border:1px solid #0b57d0; border-radius:999px; text-decoration:none; font-size:.9rem; }
.kh-archive .kh-btn--ghost{ background:#fff; color:#0b57d0; }

/* ===== ノウハウ詳細：タイポ/間隔 ===== */
.kh-article { max-width: 1040px; margin: 0 auto 48px; padding: 0 8px; }
.kh-hero--sm { padding: 12px 14px; }

.kh-content { line-height: 1.9; font-size: 1rem; color: #222; }
.kh-content h2 { margin: 3em 0 .6em; font-size: 1.35rem; }
.kh-content h3 { margin: 1.2em 0 .5em; font-size: 1.1rem; }
.kh-content p { margin: .8em 0; }
.kh-lead { font-size: 1.05rem; color:#374151; margin: .4em 0 1.2em; }

/* 見出し・リードの整形 */
.kh-content h2 {
  font-size: 1.4rem;
  margin: 3rem 0 0.8rem;
  border-left: 4px solid #0b57d0;
  padding-left: 10px;
  font-weight: 600;
  color: #111;
}
.kh-content h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 .6rem;
  color: #222;
}
.kh-lead {
  font-size: 1.05rem;
  color: #374151;
  margin: 0 0 1.6rem;
  line-height: 1.8;
}
.kh-dllead {
  margin: 2.4rem 0 2rem;
  padding: 1.2rem;
  background: #f6f8ff;
  border: 1px solid #e3e9f7;
  border-radius: 8px;
  color: #333;
  line-height: 1.7;
}
.kh-dllead strong { display: block; font-weight: 600; margin-bottom: .4rem; }

/* single: ヒーロー差別化 */
.kh-hero--single { background:#fff; border:0; padding:6px 0 0; }
.kh-hero__eyebrow{ display:inline-block; font-size:.78rem; letter-spacing:.03em; color:#0b57d0; background:#eef3ff; border:1px solid #dfe8ff; padding:.35em .6em; border-radius:999px; }
.kh-hero__title   { margin:.5rem 0 .4rem; font-size: clamp(1.4rem, 2.8vw, 2rem); font-weight:800; letter-spacing:.01em; }
.kh-hero__dek     { margin:.2rem 0 1.1rem; color:#374151; }

/* TL;DR（要点ボックス） */
.kh-tldr{ border:1px solid #e5eaf2; background:#f7faff; border-radius:10px; padding:12px 14px; }
.kh-tldr__title{ font-weight:700; margin:0 0 .4rem; }
.kh-tldr__list{ margin:0; padding-left:1.1rem; }

/* Knowhow: DL Box（記事末/ACF制御） */
.kh-dlbox{
  --dl-bg:#FFF7F0;   /* 背景色 */
  --dl-bd:#FFE0C7;   /* 枠線色 */
  --dl-ac:#FF8A00;   /* アクセント */

  margin:28px 0 40px; padding:20px 18px; border-radius:12px;
  border:1px solid var(--dl-bd); background: var(--dl-bg);
}
.kh-dlbox__title{
  margin:0 0 .55rem; font-weight:600; font-size:1.12rem; letter-spacing:.02em;
  text-align:center; position:relative; display:inline-block; left:50%; transform:translateX(-50%);
}
.kh-dlbox__title::before,
.kh-dlbox__title::after{
  content:""; display:inline-block; width:1.6em; height:2px; background: var(--dl-ac);
  vertical-align:middle; margin:0 .6em .28em;
}
.kh-dlbox__lead{ text-align:center; color:#333; margin:.35rem 0 1.1rem; line-height:1.7; }
.kh-dlbox__actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.kh-dlbox__note{ text-align:center; color:#555; font-size:.9rem; margin:.9rem 0 0; }

.kh-btn{ display:inline-block; border-radius:999px; padding:.78em 1.3em; text-decoration:none; font-weight:700; }
.kh-btn--solid{ background: var(--dl-ac); color:#fff; border:2px solid var(--dl-ac); }
.kh-btn--solid:hover{ filter:brightness(0.95); }
.kh-btn--outline{ background:#fff; color: var(--dl-ac); border:2px solid var(--dl-ac); }
.kh-btn--outline:hover{ background:#FFF3E6; }

/* Knowhow: 本文タイポ（軽量整形） */
.single-knowhow .kh-content{ font-size:1rem; line-height:1.4; color:#222; word-break:normal; }
.single-knowhow .kh-content p{ margin:1em 0; }
.single-knowhow .kh-content h3{ margin:1.3rem 0 .6rem; font-size:1.15rem; font-weight:700; color:#0b2f6f; }
.single-knowhow .kh-content li+li{ margin-top:.25em; }
.single-knowhow .kh-content blockquote{
  margin:1.2rem 0; padding:.9rem 1rem; border-left:4px solid #0b57d0;
  background:#f5f8ff; border-radius:4px; color:#0b2f6f;
}
.single-knowhow .kh-content figure{ margin:1.2rem 0; text-align:center; }
.single-knowhow .kh-content figcaption{ font-size:.9rem; color:#6b7280; margin-top:.35rem; }
.single-knowhow .kh-content table{
  width:100%; border-collapse:collapse; margin:1rem 0; border:1px solid #e5eaf2; font-size:.95rem;
}
.single-knowhow .kh-content th,
.single-knowhow .kh-content td{ border:1px solid #e5eaf2; padding:.6rem .7rem; vertical-align:top; }
.single-knowhow .kh-content th{ background:#f7f9ff; text-align:left; }
.single-knowhow .kh-content code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  background:#f3f4f6; border:1px solid #e5e7eb; border-radius:4px; padding:.15em .35em; font-size:.93em;
}
.kh-lead{ font-size:1.05rem; color:#374151; margin:0 0 1.4rem; line-height:1.8; }

/* カテゴリラベル */
.single-knowhow .entry-header .kh-label {
  display: inline-block; font-size: 0.85rem; font-weight: 700; color: #0b57d0;
  border: 1.5px solid #0b57d0; border-radius: 20px; padding: 0.25em 0.8em;
  margin-bottom: 0.8rem; background: #f8fbff; letter-spacing: 0.02em;
}

/* ヒーロー周り */
.single-knowhow .kh-hero{ margin:0 0 1.2rem; }
.single-knowhow .kh-hero__header{ margin:0 0 .5rem; }

.single-knowhow .kh-hero__badge{
  display:inline-block; font-size:.85rem; font-weight:700; color:#0b57d0;
  border:1.5px solid #0b57d0; border-radius:9999px; padding:.28em .85em;
  background:#f8fbff; letter-spacing:.02em;
}

.single-knowhow .kh-hero__title{ margin:.4rem 0 0; font-weight:650; }
.single-knowhow .kh-meta{ display:flex; flex-wrap:wrap; gap:.6rem 1rem; align-items:center; }
.single-knowhow .kh-meta__date{ color:#374151; font-weight:400; }
.single-knowhow .kh-chiplist{ display:flex; flex-wrap:wrap; gap:.4rem; margin:0; padding:0; list-style:none; }

/* モバイル微調整 */
@media (max-width: 600px){
  .single-knowhow .kh-hero__title{ font-size:clamp(1.45rem,4.5vw,1.9rem); }
}

/* アイキャッチ */
.single-knowhow .kh-eyecatch{
  margin: 0.8rem 0 1.4rem; text-align:center;
}
.single-knowhow .kh-eyecatch img {
  width: 100% !important; height: auto !important;
  aspect-ratio: 16 / 5 !important; object-fit: cover;
  border-radius: 8px; display: block; margin: 0 auto;
}

/* アーカイブ：カード類 */
.kh-archive .kh-card{ background:#fff; border:1px solid #e6e6e6; border-radius:8px; overflow:hidden; }
.kh-archive .kh-card__thumb{ margin:0; }
.kh-archive .kh-card__thumb img{
  display:block; width:100%; height:auto; aspect-ratio:16/9;
  object-fit:cover; object-position:left center;
}
.kh-archive .kh-card__thumb::before{ content:none !important; }

.kh-hero-media{ margin:16px 0 24px; border-radius:10px; overflow:hidden; aspect-ratio:16/5; background:#f3f4f6; }
.kh-hero-media img{ width:100%; height:100%; object-fit:cover; display:block; }

/* ===== 目次（JPニュースと同デザイン） ===== */
.single-knowhow .jp-toc{ background:#f6f7f9; border:1px solid #E6E9EF; border-radius:14px; padding:16px; margin:24px 0; }
.single-knowhow .jp-toc__title{ font-weight:650; font-size:1.3rem; margin:0 0 12px; }
.single-knowhow .jp-toc__list{ list-style:none; margin:0; padding:12px 8px; border-top:1px solid #D0D5DD; }
.single-knowhow .jp-toc__item a{ display:flex; align-items:center; gap:8px; padding:2px 4px; text-decoration:none; color:#111827; }
.single-knowhow .jp-toc__item a:hover{ background:#F2F6FF; }
.single-knowhow .jp-toc__item--sub a{ padding-left:18px; color:#344054; }
.single-knowhow .jp-toc__label{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:78%; }
.single-knowhow .jp-toc__fill{ flex:1 1 auto; height:0; border-bottom:1px dotted #CBD5E1; margin:0 6px; }
@media (max-width:768px){ .single-knowhow .jp-toc__label{ max-width:90%; } }

/* ===== 本文リスト（安定版：これ“だけ”残す） ===== */

/* UL：丸（グレー） */
.single-knowhow .kh-content ul{
  list-style: disc outside;
  margin: 0.6rem 0 1.2rem 1.4em; /* 左インデント */
  padding: 0;
}
.single-knowhow .kh-content ul li{
  margin: 0.5rem 0;
  line-height: 1.9;
  padding-left: .25em; /* ●と本文の“間” */
}
.single-knowhow .kh-content ul li::marker{
  color: #6b7280;
  font-size: .9em;
  font-weight: 700;
}

/* OL：番号（濃いグレー） */
.single-knowhow .kh-content ol{
  list-style: decimal outside;
  margin: 0.6rem 0 1.2rem 1.8em; /* 左インデント多め */
  padding: 0;
}
.single-knowhow .kh-content ol li{
  margin: .55rem 0;
  line-height: 1.9;
  padding-left: .3em; /* 番号と本文の“間” */
}
.single-knowhow .kh-content ol li::marker{
  color: #374151;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ===== ■マーカー（必要なULだけ：ホワイトリスト） ===== */
/* HTML側で <ul class="kh-bullet"> に付ける */
.single-knowhow .kh-content ul.kh-bullet{
  list-style: none;
  margin: 0.6rem 0 1.2rem 0; /* 左インデントは自前 */
  padding: 0;
}
.single-knowhow .kh-content ul.kh-bullet > li{
  position: relative;
  padding-left: 1.5em;
}
.single-knowhow .kh-content ul.kh-bullet > li::before{
  content: "■";
  position: absolute;
  left: 10px;
  top: 0.35em;
  color: #0057db;
  font-size: 0.6em;
  font-weight: 600;
  line-height: 1;
}

/* ===== TOCは常に無印（最後に置く＝最強） ===== */
.single-knowhow .kh-content .jp-toc__list,
.single-knowhow .kh-content .jp-toc__list ul,
.single-knowhow .kh-content .jp-toc__list ol{
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}
.single-knowhow .kh-content .jp-toc__list li::before,
.single-knowhow .kh-content .jp-toc__list a::before{
  content: none !important;
  display: none !important;
}
.single-knowhow .kh-content .jp-toc__list li::marker{
  content: "" !important;
  color: transparent !important;
}

/* チップを横並びにして折り返す */
.kh-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;           /* チップ間の余白 */
  margin: 6px 0 10px; /* お好みで */
}

/* brが挿入されていても表示しない */
.kh-chips br{ display: none; }

/* 見た目を安定させる（任意） */
.kh-chip{
  display: inline-flex;
  align-items: center;
  padding: .22em .55em;
  font-size: 1rem;
  background: #eef2ff;
  color: #244;
  border-radius: 999px;
  white-space: nowrap; /* 1つのチップ内で改行させない */
}

.jp-btn-area {
  text-align: center;
  margin: 1.5rem 0;
}

.jp-btn-primary {
  display: inline-block;
  background: #0078c9;
  color: #fff;
  padding: 14px 36px;
  border-radius: 24px; /* ← 角丸を強めに */
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 120, 201, 0.25);
}

.jp-btn-primary:hover {
  background-color: #005ea8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 120, 201, 0.35);
}

.jp-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 120, 201, 0.2);
}

/* === Knowhow タグ === */
.p-tags{display:flex;flex-wrap:wrap;gap:.5rem;margin:.5rem 0}
.tag{display:inline-flex;align-items:center;font-size:.85rem;line-height:1;border-radius:9999px;padding:.35rem .65rem;white-space:nowrap}
.tag--intent{background:#1267ff;color:#fff;font-weight:500}
.tag--theme{border:1px solid #cfd6e4;color:#24324a;background:#fff}


.kh-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}
@media (max-width: 900px){ .kh-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width: 600px){ .kh-grid{ grid-template-columns:1fr; } }

.kh-pager ul{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  align-items:center;
  list-style:none;
  margin: 24px 0 48px;
  padding:0;
}

.kh-pager li{
  margin:0;
}

.kh-pager a.page-numbers,
.kh-pager span.page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  min-height:44px;
  padding:10px 14px;
  font-size:16px;
  border:1px solid #ddd;
  border-radius:6px;
  text-decoration:none;
  line-height:1;
  box-sizing:border-box;
}

.kh-pager span.page-numbers.current{
  background:#0a5bd8;
  border-color:#0a5bd8;
  color:#fff;
}

.kh-pager .page-numbers.dots{
  min-width:auto;
  min-height:auto;
  border:0;
  padding:10px 6px;
}

.kh-pager a.next.page-numbers{
  border-color:#0a5bd8;
  color:#0a5bd8;
  font-weight:700;
  padding:10px 16px;
}

.kh-pager a.next.page-numbers:hover{
  background:#f5f8ff;
  border-color:#0a5bd8;
  color:#0a5bd8;
}

.kh-pager a.prev.page-numbers{
  border-color:#0a5bd8;
  color:#0a5bd8;
  font-weight:700;
  padding:10px 16px;
}

.kh-pager a.prev.page-numbers:hover{
  background:#f5f8ff;
  border-color:#0a5bd8;
  color:#0a5bd8;
}

.highlight{
  /* 文字の後ろにマーカーを引く */
  background: linear-gradient(transparent 62%, #fff3a0 62%);
  padding: 0 .12em;
  border-radius: .12em;
  /* 1行でも複数行でも自然に見える */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 濃い背景やリンク内でも読めるように */
a .highlight{
  text-decoration: none;
}


.knowhow-search {
  display: flex;
  gap: 12px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}

.knowhow-search__keyword {
  flex: 1 1 320px;
}

.knowhow-search__keyword input,
.knowhow-search__group select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}

.knowhow-search__group {
  flex: 0 0 220px;
}

.knowhow-search__button button {
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 8px;
  background: #1f5fa8;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .knowhow-search {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 20px;
    justify-content: flex-start;
    align-items: stretch;
    height: auto;
    min-height: 0;
  }

  .knowhow-search__keyword,
  .knowhow-search__group,
  .knowhow-search__button {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    min-height: 0;
  }

  .knowhow-search__keyword input,
  .knowhow-search__group select,
  .knowhow-search__button button {
    width: 100%;
    height: 46px;
    margin: 0;
  }

  .knowhow-search__button button {
    display: block;
  }
}