/* 記事（投稿）のページを fs-create.net の記事（fsc-blog.css の .fsb-*）と同じ形にする（CH-1099・inc/post-layout.php が記事のページだけ読む）。
   色は functions の青（fs-create.net の緑のところ）。本文のコードの色付け・ボックスなどは Cocoon のまま。 */

/* ---- 地と 2 列 ---- */
body.fcc-post,
body.fcc-post #container,
body.fcc-post .content {
  background: #F3F4F1;
}
.fcc-post .content-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  /* 幅はヘッダーの .fcc-inner と同じ（1200px の中に左右 24px・担当者さん 11/8「ほかのページより横幅が広い」） */
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 40px var(--fcc-gutter, 24px) 80px;
}
.fcc-post #main.main {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.fcc-post #sidebar.fcc-side {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

/* ---- パンくず・札・日付・タイトル ---- */
.fcc-crumbs {
  margin: 0 0 18px;
  font-size: 13px;
  color: #5A6672;
}
.fcc-crumbs a {
  color: #5A6672;
  text-decoration: none;
}
.fcc-crumbs a:hover {
  color: #135E96;
  text-decoration: underline;
}
.fcc-post .article-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.fcc-post .article-header > .fcc-post-meta {
  order: -1;
}
.fcc-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #5A6672;
}
.fcc-post-meta__tag {
  padding: 4px 12px;
  border-radius: 999px;
  background: #E5EFF8;
  color: #135E96;
  font-weight: 700;
  text-decoration: none;
}
.fcc-post-meta__tag:hover {
  background: #D3E4F3;
}
.fcc-post-meta__date,
.fcc-post-meta__updated time {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.fcc-post .article h1.entry-title {
  margin: 0;
  padding: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.45;
  font-weight: 900;
  color: #14202B;
  background: none;
  border: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.fcc-post .eye-catch-wrap img,
.fcc-post .eye-catch img {
  border-radius: 18px;
}

/* 上の SNS のボタンと Cocoon のパンくずは出さない（fs-create.net と同じ。下の SNS のボタンは残す） */
.fcc-post .sns-share.ss-top,
.fcc-post .breadcrumb {
  display: none;
}

/* ---- 本文の上の枠（広告の本・概要説明）を白いカードに ---- */
.fcc-post .ats-container {
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #DDE1DC;
  border-radius: 18px;
}
.fcc-post .fcc-summary {
  border-radius: 18px;
}

/* ---- 目次（Table of Contents Plus）を「この記事の内容」の枠に ---- */
.fcc-post .entry-content #toc_container {
  display: block;
  width: auto !important;
  margin: 0 0 32px;
  padding: 24px 28px !important;
  background: #fff !important;
  border: 1px solid #DDE1DC !important;
  border-radius: 18px;
  font-size: 15px;
}
.fcc-post .entry-content #toc_container .toc_title {
  margin: 0 0 8px;
  text-align: left;
  font-size: 0;
}
.fcc-post .entry-content #toc_container .toc_title::before {
  content: 'この記事の内容';
  font-size: 15px;
  font-weight: 700;
  color: #14202B;
}
.fcc-post .entry-content #toc_container .toc_toggle {
  font-size: 13px;
}
.fcc-post .entry-content #toc_container ul.toc_list {
  margin: 0;
  padding: 0 0 0 4px;
}
.fcc-post .entry-content #toc_container ul.toc_list li {
  margin: 4px 0;
}
.fcc-post .entry-content #toc_container a {
  color: #14202B;
}
.fcc-post .entry-content #toc_container a:hover {
  color: #135E96;
}

/* ---- 本文の見出し（上に太い線・fs-create.net と同じ） ---- */
.fcc-post .entry-content h2,
.fcc-post .entry-content h3 {
  margin: 40px 0 20px;
  padding: 12px 0 0;
  font-weight: 900;
  line-height: 1.5;
  color: #14202B;
  background: none;
  border: 0;
  border-top: 2px solid #14202B;
  border-radius: 0;
  scroll-margin-top: 16px;
}
.fcc-post .entry-content h2 {
  font-size: 24px;
}
.fcc-post .entry-content h3 {
  font-size: 21px;
}
.fcc-post .entry-content h2::before,
.fcc-post .entry-content h2::after,
.fcc-post .entry-content h3::before,
.fcc-post .entry-content h3::after {
  content: none;
}
.fcc-post .entry-content h4 {
  margin: 28px 0 14px;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  background: none;
  border: 0;
}

/* ---- 横の列のカード ---- */
.fcc-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fcc-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: #fff;
  border: 1px solid #DDE1DC;
  border-radius: 18px;
}
.fcc-box--blue {
  background: #E5EFF8;
  border-color: #E5EFF8;
}
.fcc-box__title {
  margin: 0;
  font-weight: 700;
  color: #14202B;
}
.fcc-box__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #3A4754;
}
.fcc-box__link {
  font-size: 14px;
  font-weight: 700;
  color: #135E96;
}
.fcc-side-cats,
.fcc-side-popular {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.fcc-side-cats li + li {
  border-top: 1px dashed #DDE1DC;
}
.fcc-side-cats a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  color: #14202B;
  text-decoration: none;
}
.fcc-side-cats__n {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #5A6672;
}
.fcc-side-popular {
  gap: 14px;
}
.fcc-side-popular a {
  font-size: 14px;
  line-height: 1.6;
  color: #14202B;
  text-decoration: none;
}
.fcc-side-cats a:hover,
.fcc-side-popular a:hover {
  color: #135E96;
}

/* ---- 幅が狭いとき：横の列は本文の下へ ---- */
@media (max-width: 960px) {
  .fcc-post .content-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-top: 24px;
    padding-bottom: 48px;
  }
}
@media (max-width: 600px) {
  .fcc-post .content-in {
    padding-left: 16px;
    padding-right: 16px;
  }
  .fcc-post .entry-content #toc_container {
    padding: 18px 18px;
  }
  .fcc-post .entry-content h2 {
    font-size: 21px;
  }
  .fcc-post .entry-content h3 {
    font-size: 19px;
  }
}

/* 本文の表：長いコード（%{DOCUMENT_ROOT}/… など）で説明の列がつぶれないよう、セルの中で折り返す（pinako の確認 CH-1398 の 1・記事 817） */
.fcc-post .entry-content table th,
.fcc-post .entry-content table td {
  overflow-wrap: anywhere;
  word-break: normal;
}
.fcc-post .entry-content table code {
  overflow-wrap: anywhere;
  white-space: normal;
}

/* 本文の表を見やすく（担当者さん 11/8「表が見にくい」・CH-1405）。
   Cocoon の薄いしま模様と薄い線をやめて、見出しの行は紺の地に白い字・線ははっきり・1 列目は少し濃い地に太字 */
.fcc-post .entry-content table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #C5CED8;
  background: #fff;
  font-size: 15px;
  line-height: 1.7;
}
.fcc-post .entry-content table th,
.fcc-post .entry-content table td {
  padding: 10px 14px;
  border: 1px solid #C5CED8;
  background: #fff;
  color: #1B2A3F;
  text-align: left;
  vertical-align: top;
}
.fcc-post .entry-content table tr:nth-child(2n+1) td,
.fcc-post .entry-content table tr:nth-child(2n) td {
  background: #fff;
}
.fcc-post .entry-content table thead th,
.fcc-post .entry-content table thead td,
.fcc-post .entry-content table tr:first-child th {
  background: #1D2D44;
  border-color: #1D2D44;
  color: #fff;
  font-weight: 700;
  text-align: left;
}
.fcc-post .entry-content table tbody td:first-child,
.fcc-post .entry-content table tbody th {
  background: #EEF3F8;
  font-weight: 700;
}
.fcc-post .entry-content table thead th code,
.fcc-post .entry-content table tr:first-child th code {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
/* 表のブロックの枠（figure）：スマホで列が多いときは横に送れるように */
.fcc-post .entry-content .wp-block-table {
  overflow-x: auto;
  margin-left: 0;
  margin-right: 0;
}
@media (max-width: 600px) {
  .fcc-post .entry-content table {
    font-size: 14px;
  }
  /* セルの字は Cocoon の小さい字（約 11px）にならないよう、ここで決める（pinako の確認 CH-1410 の 3） */
  .fcc-post .entry-content table th,
  .fcc-post .entry-content table td {
    padding: 8px 10px;
    font-size: 14px;
  }
  .fcc-post .entry-content table code {
    font-size: 13px;
  }
}

/* 記事の下の関連記事（template-parts/fcc-related.php・一覧と同じカード・CH-1405）。本文の列の幅で 3 つ並ぶよう、カードの最小の幅を一覧より狭く */
.fcc-post .fcc-related {
  margin: 48px 0 0;
}
.fcc-post .fcc-related__title {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 22px;
  font-weight: 900;
  color: #14202B;
}
.fcc-post .fcc-cards--related {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin: 0;
}
.fcc-post .fcc-cards--related .fcc-card__title {
  font-size: 15px;
}
@media (max-width: 600px) {
  .fcc-post .fcc-cards--related {
    grid-template-columns: minmax(0, 1fr);
  }
  /* スマホは 1 列で長くなるので 4 件まで */
  .fcc-post .fcc-cards--related > .fcc-card:nth-child(n+5) {
    display: none;
  }
}

/* 制作プラグインの記事の上の「WordPress.org で公開中」の枠（inc/fcc-plugins.php の fcc_plugin_wporg_box()・担当者さん 11/8・CH-1405） */
.fcc-post .entry-content .fcc-wporg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 0 32px;
  padding: 20px 24px;
  border: 2px solid #2271B1;
  border-radius: 16px;
  background: #EEF5FB;
}
.fcc-post .entry-content .fcc-wporg__text {
  flex: 1 1 280px;
  min-width: 0;
}
.fcc-post .entry-content .fcc-wporg__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 900;
  color: #135E96;
}
.fcc-post .entry-content .fcc-wporg__badge svg {
  flex: none;
}
.fcc-post .entry-content .fcc-wporg__sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #3A4754;
}
.fcc-post .entry-content a.fcc-wporg__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 24px;
  border-radius: 999px;
  background: #2271B1;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  text-align: center;
}
.fcc-post .entry-content a.fcc-wporg__btn:hover {
  background: #135E96;
  color: #fff;
}
@media (max-width: 600px) {
  .fcc-post .entry-content .fcc-wporg {
    padding: 16px;
  }
  .fcc-post .entry-content a.fcc-wporg__btn {
    width: 100%;
  }
}
