/* ══════════════════════════════════════════
   Column (Blog) — list & article pages
   Uses tokens from main.css (warm orange system)
   ══════════════════════════════════════════ */

/* ── Shared hero ── */
.col-hero {
  padding: 140px 0 40px;
  text-align: center;
  background: var(--color-bg-subtle, #fffbf8);
  border-bottom: 1px solid var(--color-border, #ede5df);
}
.col-hero__chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-primary, #e8461e);
  margin-bottom: 12px;
}
.col-hero__title {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text, #1a202c);
  line-height: 1.3;
  margin: 0 0 14px;
}
.col-hero__lead {
  font-size: 1rem;
  color: var(--color-text-secondary, #4a5568);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto;
}

/* ── List page ── */
.col-list {
  padding: 56px 0 96px;
}
.col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) {
  .col-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .col-grid { grid-template-columns: 1fr; }
}

.col-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #ede5df);
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.col-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.07));
  border-color: #e3d3c8;
}
.col-card__thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: var(--gradient-orange-soft, linear-gradient(135deg, #fda000, #fd7900));
  display: block;
}
.col-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .04em;
}
.col-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.col-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.col-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--color-primary, #e8461e);
  background: var(--color-primary-light, rgba(232,70,30,.06));
  padding: 4px 10px;
  border-radius: 999px;
}
.col-date {
  font-size: 0.75rem;
  color: var(--color-text-muted, #a0aec0);
}
.col-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text, #1a202c);
  margin: 0 0 10px;
}
.col-card__excerpt {
  font-size: 0.86rem;
  color: var(--color-text-secondary, #4a5568);
  line-height: 1.7;
  margin: 0 0 16px;
}
.col-card__more {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary, #e8461e);
}

.col-empty {
  text-align: center;
  color: var(--color-text-muted, #a0aec0);
  padding: 60px 0;
  font-size: .95rem;
}

/* ── Article page ── */
.article-hero {
  padding: 128px 0 8px;
  background: var(--color-bg-subtle, #fffbf8);
}
.article-hero__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.article-hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.article-hero__title {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--color-text, #1a202c);
  margin: 0 0 18px;
}
.article-hero__byline {
  font-size: 0.82rem;
  color: var(--color-text-muted, #a0aec0);
}
.article-cover {
  max-width: 900px;
  margin: 32px auto 0;
  padding: 0 24px;
}
.article-cover img {
  width: 100%;
  border-radius: var(--radius-lg, 20px);
  display: block;
}

.article-body {
  padding: 48px 0 40px;
}
.article-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--color-text-secondary, #4a5568);
}
.article-content > *:first-child { margin-top: 0; }
.article-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text, #1a202c);
  line-height: 1.5;
  margin: 52px 0 18px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border, #ede5df);
}
.article-content h2:first-of-type { border-top: none; padding-top: 0; }
.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text, #1a202c);
  line-height: 1.6;
  margin: 36px 0 14px;
}
.article-content p { margin: 0 0 22px; }
.article-content a {
  color: var(--color-primary, #e8461e);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-content ul,
.article-content ol {
  margin: 0 0 24px;
  padding-left: 1.4em;
}
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--color-text, #1a202c); font-weight: 700; }
.article-content img {
  max-width: 100%;
  border-radius: var(--radius-md, 14px);
  margin: 8px 0 24px;
}
.article-content blockquote {
  margin: 0 0 24px;
  padding: 16px 22px;
  border-left: 4px solid var(--color-primary, #e8461e);
  background: var(--color-bg-alt, #fff7f2);
  border-radius: 0 var(--radius-md, 14px) var(--radius-md, 14px) 0;
  color: var(--color-text-secondary, #4a5568);
}
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86em;
  background: var(--color-accent-light, rgba(45,55,72,.06));
  padding: 2px 6px;
  border-radius: 6px;
}
.article-content pre {
  background: var(--color-accent-dark, #1a202c);
  color: #f7fafc;
  padding: 18px 20px;
  border-radius: var(--radius-md, 14px);
  overflow-x: auto;
  margin: 0 0 24px;
  font-size: 0.85rem;
  line-height: 1.7;
}
.article-content pre code { background: none; padding: 0; color: inherit; }
.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 0 24px;
  font-size: 0.92rem;
  background: #fff;
  border: 1px solid var(--color-border, #ede5df);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(80, 30, 0, .06);
}
.article-content th,
.article-content td {
  border-bottom: 1px solid var(--color-border, #ede5df);
  padding: 11px 14px;
  text-align: left;
  background: #fff;
}
.article-content tr:last-child td { border-bottom: none; }
.article-content th { background: #f6ede7; font-weight: 700; color: var(--color-text, #1a202c); }
.article-content hr {
  border: none;
  border-top: 1px solid var(--color-border, #ede5df);
  margin: 40px 0;
}

/* ── Article footer nav / CTA ── */
.article-back {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0 0;
}
/* 関連記事の下に続く「一覧に戻る」はカードの左端に合わせる */
.article-related + .article-back { padding-top: 20px; }
.article-back a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary, #e8461e);
  text-decoration: none;
}
/* 記事末尾の問い合わせCTA。HippoCheckブログの .b-ctabox(テキスト+ボタン左/キャラ右の横並び)
   と同じデザイン。色はGENSHI Voiceのオレンジ。文言は build-column が
   frontmatter(cta_heading/cta_text/cta_button/cta_href)から記事ごとに差し込む。 */
.article-cta {
  background: var(--gradient-orange, linear-gradient(135deg, #fda000, #f26b1d 50%, #e8461e));
  color: #fff;
  padding: 48px clamp(24px, 5vw, 56px);
  border-radius: var(--radius-xl, 28px);
  max-width: 900px;
  margin: 56px auto 0;
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 40px);
  text-align: left;
  overflow: hidden;
}
.article-cta .txt { flex: 1; }
.article-cta h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
}
.article-cta p {
  font-size: 0.95rem;
  opacity: .95;
  margin: 0 0 24px;
  line-height: 1.8;
}
.article-cta .btn {
  background: #fff;
  color: var(--color-primary, #e8461e);
  font-weight: 800;
  padding: 14px 34px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-block;
}
.article-cta .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.article-cta__mascot {
  width: clamp(110px, 15vw, 150px);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 14px 30px rgba(80, 30, 0, .35));
  animation: ctaMascotFloat 3.2s ease-in-out infinite;
  transform-origin: center bottom;
  will-change: transform;
}
@keyframes ctaMascotFloat {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-12px) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .article-cta__mascot { animation: none; }
}
@media (max-width: 640px) {
  .article-cta { flex-direction: column; text-align: center; }
  .article-cta__mascot { order: -1; width: 120px; }
}

/* ── 記事末尾「合わせて読みたい」（関連記事3本） ──
   一覧の .col-card を横3列の小型カードにしたもの。build-column が
   タイトル/説明文の語の重なり・カテゴリ・記事間リンクから自動で選ぶ
   （frontmatter の related で指定した記事を優先できる）。 */
.article-related {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 36px;
  border-top: 1px solid var(--color-border, #ede5df);
}
.article-related__heading {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text, #1a202c);
  margin: 0 0 16px;
}
.article-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.rel-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #ede5df);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rel-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.07));
  border-color: #e3d3c8;
}
.rel-card__thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: var(--gradient-orange-soft, linear-gradient(135deg, #fda000, #fd7900));
  display: block;
}
.rel-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .04em;
}
.rel-card__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.rel-card .col-tag { font-size: .62rem; padding: 3px 8px; align-self: flex-start; }
.rel-card__title {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--color-text, #1a202c);
  margin: 0;
}
.rel-card .col-date { margin-top: auto; font-size: .68rem; }
/* 3列のまま入る限界まで詰めて、それ以下はサムネ左・テキスト右の1列に切り替える */
@media (max-width: 560px) {
  .article-related__grid { grid-template-columns: 1fr; gap: 14px; }
  .rel-card { flex-direction: row; align-items: stretch; }
  .rel-card__thumb { width: 132px; flex-shrink: 0; aspect-ratio: 4 / 3; }
  .rel-card__thumb--placeholder { font-size: .72rem; text-align: center; padding: 0 6px; }
}

/* ══════════════════════════════════════════
   Article rich components
   (lead / TOC / keybox / mascot memo / summary / sources)
   本文中に生HTMLで使う装飾パーツ。記事デザインをコラムに統一する。
   ══════════════════════════════════════════ */

/* リード文 */
.article-content .lead {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.9;
  color: var(--color-text, #1a202c);
  margin: 0 0 24px;
}

/* 見出しの通し番号（01, 02 …） */
.article-content h2 .hx {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-primary, #e8461e);
  margin-right: 8px;
  vertical-align: 2px;
}

/* 箇条書きをオレンジのドットに統一 */
.article-content ul {
  list-style: none;
  padding-left: 0;
}
.article-content ul li {
  position: relative;
  padding-left: 26px;
}
.article-content ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary, #e8461e);
}

/* 番号付きリスト（ol.blist）はピル番号に */
.article-content ol.blist {
  list-style: none;
  padding-left: 0;
  counter-reset: bl;
}
.article-content ol.blist li {
  counter-increment: bl;
  position: relative;
  padding-left: 32px;
}
.article-content ol.blist li::before {
  content: counter(bl);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 21px;
  height: 21px;
  background: #fdece0;
  color: var(--color-primary-dark, #b84c10);
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 目次 */
.article-content .toc {
  background: var(--color-bg-subtle, #fffbf8);
  border: 1px solid var(--color-border, #ede5df);
  border-radius: var(--radius-lg, 20px);
  padding: 22px 26px;
  margin: 32px 0;
}
.article-content .toc .tt {
  font-weight: 800;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--color-text, #1a202c);
}
.article-content .toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: toc;
}
.article-content .toc li {
  counter-increment: toc;
  position: relative;
  padding-left: 30px;
  margin: 9px 0;
  font-size: 0.9rem;
}
.article-content .toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--color-primary, #e8461e);
  font-weight: 800;
  font-size: 0.78rem;
}
.article-content .toc a {
  color: var(--color-text-secondary, #4a5568);
  text-decoration: none;
  font-weight: 600;
}
.article-content .toc a:hover { color: var(--color-primary, #e8461e); }

/* キーボックス（Flow / Check など） */
.article-content .keybox {
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #ede5df);
  border-radius: var(--radius-lg, 20px);
  padding: 22px 24px;
  box-shadow: var(--shadow-md, 0 6px 20px rgba(20, 30, 50, .05));
  margin: 24px 0;
}
.article-content .keybox .kt {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-primary, #e8461e);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.article-content .keybox h3 { margin: 8px 0 0; font-size: 1.05rem; }
.article-content .keybox ul { margin: 12px 0 0; }

/* ヒポ君メモ（マスコット付きポイント枠） */
.article-content .genshi-memo {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  background: linear-gradient(120deg, #fdece0, #eef4ff);
  border: 1px solid #f8ddc9;
  border-radius: var(--radius-lg, 20px);
  padding: 17px 20px;
  margin: 28px 0;
}
.article-content .genshi-memo img {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  border: 1.5px solid #fbe0cf;
  box-shadow: 0 4px 12px rgba(232, 100, 26, .16);
}
.article-content .genshi-memo .nm {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-primary-dark, #b84c10);
  letter-spacing: .06em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}
.article-content .genshi-memo .nm::before {
  content: '';
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--color-primary, #e8461e);
  box-shadow: 0 0 0 3px #fdece0;
  display: inline-block;
}
.article-content .genshi-memo p {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text, #1a202c);
  margin: 0;
  line-height: 1.8;
}

/* まとめ枠 */
.article-content .summary {
  background: #fdece0;
  border-radius: var(--radius-lg, 20px);
  padding: 22px 26px;
  margin: 10px 0 0;
}
.article-content .summary p { margin: 0; }

/* 補足ノート */
.article-content .note {
  background: var(--color-bg-subtle, #fffbf8);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 0.8rem;
  color: var(--color-text-muted, #8a93a3);
  margin: 24px 0;
  line-height: 1.8;
}

/* 出典 */
.article-content .sources {
  font-size: 0.75rem;
  color: var(--color-text-muted, #a0aec0);
  border-top: 1px solid var(--color-border, #ede5df);
  padding-top: 16px;
  margin-top: 48px;
  line-height: 1.7;
}
