/* =========================================================================
   GDOCK 第3層｜cat-library.css — ライブラリー（お知らせ・導入事例・コラム）
   置き場所：wp-content/themes/swell_gdock/assets/css/cat-library.css
   読み込み：functions.php の gdock_enqueue_cat_library()（2026-10-26 追加）
             親カテゴリ library と、その子（news / cases / columns）の投稿だけに効く。
   スコープ：.post_content の内側のみ

   SWELLの見出しはインライン<style>で後から来る。詳細度で上回り、
   打ち消すプロパティは background / padding / border 系を全部書く（実装メモ§2）。
   見た目は cat-solution.css の見出しに揃える（オレンジの短い罫）。
   ========================================================================= */

.post_content{
  --lib-ink: var(--ink, #14151a);
  --lib-sub: var(--ink-2, #4a4b55);
  --lib-line: var(--line, #e6e2dc);
  --lib-bg: var(--mist, #f6f4f1);
  --lib-or: var(--accent, #ff6a13);
  --lib-grad: var(--grad, linear-gradient(135deg,#ff5a1f,#ffab2e));
  --lib-r: var(--r-card, 8px);
  --lib-r-chip: var(--r-chip, 2px);
}

/* -------------------------------------------------------------------------
   1. SWELL 見出しデザインの打ち消し（h2 / h3 / h4）
   ------------------------------------------------------------------------- */
.post_content h2.wp-block-heading,
.post_content h3.wp-block-heading,
.post_content h4.wp-block-heading{
  background: none;
  background-image: none;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--lib-ink);
  text-shadow: none;
  position: relative;
}
.post_content h2.wp-block-heading::before, .post_content h2.wp-block-heading::after,
.post_content h3.wp-block-heading::before, .post_content h3.wp-block-heading::after,
.post_content h4.wp-block-heading::before, .post_content h4.wp-block-heading::after{
  content: none;
  display: none;
  position: static;
  width: auto; height: auto;
  top: auto; left: auto; right: auto; bottom: auto;
  border: none;
  background: none;
}

/* h2 — オレンジの短い罫 */
.post_content h2.wp-block-heading{
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .01em;
  margin: 3.2em 0 1em;
  padding-top: 22px;
  scroll-margin-top: 90px;
}
.post_content h2.wp-block-heading::before{
  content: "";
  display: block;
  position: absolute;
  top: 0; left: 0;
  width: 38px; height: 3px;
  border-radius: var(--lib-r-chip);
  background: var(--lib-grad);
}

/* h3 — 左にオレンジの細い縦罫 */
.post_content h3.wp-block-heading{
  font-size: clamp(18px, 2.2vw, 21px);
  font-weight: 700;
  line-height: 1.6;
  margin: 2.4em 0 .8em;
  padding-left: 14px;
  scroll-margin-top: 90px;
}
.post_content h3.wp-block-heading::before{
  content: "";
  display: block;
  position: absolute;
  left: 0; top: .3em; bottom: .3em;
  width: 3px; height: auto;
  border-radius: var(--lib-r-chip);
  background: var(--lib-grad);
}

/* h4 */
.post_content h4.wp-block-heading{
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  margin: 2em 0 .6em;
}

/* -------------------------------------------------------------------------
   2. 引用（wp:quote）— 記事からの引用・お客様の声に使う
   ------------------------------------------------------------------------- */
.post_content .wp-block-quote{
  background: var(--lib-bg);
  background-image: none;
  border: none;
  border-left: 3px solid var(--lib-or);
  border-radius: var(--lib-r);
  box-shadow: none;
  padding: 20px 24px;
  margin: 1.6em 0;
  position: relative;
}
.post_content .wp-block-quote::before,
.post_content .wp-block-quote::after{ content: none; display: none }
.post_content .wp-block-quote p{
  font-size: 15.5px;
  line-height: 2;
  color: var(--lib-ink);
  margin: 0 0 .8em;
}
.post_content .wp-block-quote p:last-of-type{ margin-bottom: 0 }
.post_content .wp-block-quote cite{
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-style: normal;
  color: var(--lib-sub);
}

/* -------------------------------------------------------------------------
   3. SWELL 標準目次 — 黒い帯をやめる（cat-story.css / cat-solution.css と同じ）
   ------------------------------------------------------------------------- */
.post_content .p-toc,
.p-toc:not(.-modal){
  max-width:var(--readw,700px);
  margin-inline:auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r-card,4px);
  box-shadow:none;
  padding:26px 28px;
}
.p-toc:not(.-modal) .p-toc__ttl{
  display:block;
  background:none;
  color:var(--accent);
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.26em;
  text-transform:uppercase;
  text-align:left;
  padding:0 0 14px;
  border:none;
  border-bottom:1px solid var(--line);
  margin-bottom:16px;
}
.p-toc:not(.-modal) .p-toc__ttl::before,
.p-toc:not(.-modal) .p-toc__ttl::after{content:none;display:none}
.p-toc:not(.-modal) a{
  color:var(--ink-2);
  font-size:14.5px;
  line-height:1.9;
}
.p-toc:not(.-modal) a:hover{color:var(--accent)}
