/* ===========================================================
   テレダスジャーナル 共通スタイル
   ブランド：#CC0C0C / #00BCD4 / #F9F7F2 / #FFE04B / #1A1A1A / Noto Sans JP
   カテゴリごとの色は microCMS の accentColor から --accent で流し込む
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #CC0C0C;
  --red-dark: #A80A0A;
  --red-light: #FBE7E7;
  --cyan: #00BCD4;
  --cyan-dark: #0E7490;
  --cyan-light: #E0F7FA;
  --beige: #F9F7F2;
  --beige-dark: #EDE9E0;
  --yellow: #FFE04B;
  --dark: #1A1A1A;
  --gray: #6B6B6B;
  --gray-light: #9A9490;
  --line: #E6E2DA;
  --white: #FFFFFF;
  --radius: 10px;
  --radius-lg: 16px;

  --measure: 720px;   /* 本文の読みやすい幅 */
  --wide: 1080px;     /* 一覧などの最大幅 */

  /* カテゴリページ・記事ページで上書きされる */
  --accent: #CC0C0C;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Noto Sans CJK JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  background: var(--white);
  color: var(--dark);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ─────────── ヘッダー ─────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: var(--wide); margin: 0 auto;
  padding: 0 32px; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; flex: 0 0 auto; color: var(--dark); }
.brand .brand-logo { height: 44px; width: auto; display: block; }
.gnav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.gnav a { font-size: 13px; font-weight: 700; color: var(--gray); transition: color .15s; }
.gnav a:hover { color: var(--dark); }
.gnav a.is-current { color: var(--dark); }
.header-cta {
  background: var(--red); color: var(--white);
  font-size: 13px; font-weight: 700;
  padding: 9px 20px; border-radius: 100px;
  transition: background .2s;
  white-space: nowrap;
}
.header-cta:hover { background: var(--red-dark); }

/* ─────────── 汎用 ─────────── */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 32px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: var(--cyan-dark); text-transform: uppercase;
}
.eyebrow::before { content:''; width: 18px; height: 2px; background: var(--cyan-dark); border-radius: 2px; }

/* カテゴリチップ。色は accentColor をインラインstyleで流し込む */
.cat-chip {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 4px 11px; border-radius: 100px;
  background: var(--cyan-light); color: var(--cyan-dark);
  white-space: nowrap;
}

.date { font-size: 12px; color: var(--gray-light); font-variant-numeric: tabular-nums; }

/* ─────────── ページヘッド ─────────── */
.page-head {
  background: var(--beige);
  border-bottom: 1px solid var(--beige-dark);
  padding: 56px 0 48px;
}
.page-head h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900; line-height: 1.35; letter-spacing: -0.01em;
  margin: 14px 0 12px;
}
.page-head p { color: var(--gray); font-size: 15px; max-width: 660px; }

/* カテゴリページの解説文（200〜400字）。まとめページとして機能させるための本文 */
.page-head.is-category h1 { max-width: 820px; }
.cat-intro {
  margin-top: 18px;
  max-width: 760px;
  border-left: 4px solid var(--accent);
  padding-left: 18px;
}
.cat-intro p {
  font-size: 14.5px; line-height: 1.95; color: #4A4A4A;
  max-width: none; text-align: justify;
  word-break: normal; overflow-wrap: anywhere;
}

/* ─────────── カテゴリタブ ─────────── */
.cat-nav {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky; top: 72px; z-index: 90;
}
.cat-nav-inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 32px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: 0 0 auto;
  font-size: 13px; font-weight: 700; color: var(--gray);
  padding: 15px 13px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.cat-nav a:hover { color: var(--dark); }
.cat-nav a.is-current { color: var(--red); border-bottom-color: var(--red); }

/* ─────────── 注目記事 ─────────── */
.featured { padding: 48px 0 8px; }
.featured-card {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 40px; align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.featured-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,.07); transform: translateY(-2px); }
.featured-thumb { aspect-ratio: 40/21; background: var(--beige-dark); overflow: hidden; }
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 8px 40px 8px 0; }
.featured-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.featured-body h2 {
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 900; line-height: 1.45; letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.featured-body p { font-size: 14px; color: var(--gray); line-height: 1.85; }

/* ─────────── 記事グリッド ─────────── */
.list-section { padding: 44px 0 72px; }
.list-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.list-head h2 { font-size: 17px; font-weight: 900; letter-spacing: .02em; }
.list-head .count { font-size: 12px; color: var(--gray-light); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 26px;
}
.card { display: flex; flex-direction: column; }
.card-thumb {
  aspect-ratio: 40/21;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--beige-dark);
  margin-bottom: 14px;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.card h3 {
  font-size: 15.5px; font-weight: 700; line-height: 1.6;
  margin-bottom: 8px;
  transition: color .15s;
}
.card:hover h3 { color: var(--red); }
.card p { font-size: 13px; color: var(--gray); line-height: 1.8; }

/* ─────────── ページネーション ─────────── */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 56px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--gray);
  padding: 0 10px;
}
.pager a:hover { border-color: var(--dark); color: var(--dark); }
.pager .is-current { background: var(--dark); border-color: var(--dark); color: var(--white); }
.pager .is-gap { border: none; }

/* ─────────── 記事詳細 ─────────── */
.breadcrumb { padding: 20px 0 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; font-size: 12px; color: var(--gray-light); }
.breadcrumb li::after { content: '/'; margin-left: 8px; color: var(--line); }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a:hover { color: var(--dark); }

.article { max-width: var(--measure); margin: 0 auto; padding: 0 32px; }
.article-head { padding: 26px 0 30px; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.article-head h1 {
  font-size: clamp(24px, 3.4vw, 35px);
  font-weight: 900; line-height: 1.45; letter-spacing: -0.015em;
  margin-bottom: 18px;
}
.article-lead { font-size: 15px; color: var(--gray); line-height: 1.95; }
.article-author {
  display: flex; align-items: center; gap: 11px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; flex: 0 0 auto;
  overflow: hidden;
}
.article-author .name { font-size: 13px; font-weight: 700; }
.article-author .role { font-size: 11.5px; color: var(--gray-light); }

.hero-figure { max-width: 960px; margin: 0 auto 8px; padding: 0 32px; }
.hero-figure img {
  width: 100%; aspect-ratio: 40/21; object-fit: cover;
  border-radius: var(--radius-lg); background: var(--beige-dark);
}

/* 目次 */
.toc {
  background: var(--beige);
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 36px 0 8px;
}
.toc-title { font-size: 12px; font-weight: 900; letter-spacing: .1em; color: var(--gray); margin-bottom: 12px; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 8px; font-size: 13.5px; line-height: 1.7; }
.toc li:last-child { margin-bottom: 0; }
.toc li::before {
  content: counter(toc) '.';
  color: var(--accent); font-weight: 900; margin-right: 8px;
}
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc li ol { margin: 8px 0 0 20px; counter-reset: toc2; }
.toc li ol li { counter-increment: toc2; font-size: 13px; }
.toc li ol li::before { content: '–'; color: var(--gray-light); }

/* 本文 */
.prose { padding: 8px 0 48px; font-size: 16.5px; line-height: 2.05; }
.prose > * + * { margin-top: 1.5em; }
.prose h2 {
  font-size: 22px; font-weight: 900; line-height: 1.5;
  margin-top: 2.6em; margin-bottom: .9em;
  padding-left: 14px; border-left: 4px solid var(--accent);
  letter-spacing: -0.01em;
}
.prose h3 {
  font-size: 18px; font-weight: 900; line-height: 1.6;
  margin-top: 2.1em; margin-bottom: .7em;
}
.prose p { text-align: justify; word-break: normal; overflow-wrap: anywhere; }
.prose strong { font-weight: 900; background: linear-gradient(transparent 62%, #FFE04B99 62%); }
.prose a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .5em; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--accent); font-weight: 900; }
.prose figure { margin: 2.2em 0; }
.prose figure img { border-radius: var(--radius); }
.prose figcaption { font-size: 12.5px; color: var(--gray-light); margin-top: 10px; text-align: center; }
.prose blockquote {
  border-left: 3px solid var(--line);
  padding: 4px 0 4px 20px;
  color: var(--gray);
  font-size: 15px;
}
.callout {
  background: var(--beige); border: 1px solid var(--beige-dark);
  border-radius: var(--radius); padding: 22px 26px;
  font-size: 15px; line-height: 1.9;
}
.callout .callout-title { font-size: 13px; font-weight: 900; color: var(--accent); margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose thead th {
  background: var(--dark); color: var(--white);
  font-weight: 700; text-align: left; padding: 11px 14px;
  white-space: nowrap;
}
.prose tbody td { border-bottom: 1px solid var(--line); padding: 11px 14px; }
.prose tbody tr:nth-child(even) { background: #FBFAF7; }
.table-scroll { overflow-x: auto; }

/* 記事下CTA */
.article-cta {
  background: var(--red); color: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 40px 36px;
  text-align: center;
  margin: 8px 0 56px;
}
.article-cta h2 { font-size: 21px; font-weight: 900; line-height: 1.5; margin-bottom: 10px; }
.article-cta p { font-size: 14px; color: rgba(255,255,255,.9); line-height: 1.85; margin-bottom: 24px; }
.article-cta a {
  display: inline-block; background: var(--white); color: var(--red);
  font-size: 15px; font-weight: 700; padding: 14px 38px; border-radius: 100px;
  box-shadow: 0 4px 18px rgba(0,0,0,.16);
  transition: transform .15s;
}
.article-cta a:hover { transform: translateY(-2px); }

/* 関連記事 */
.related { background: var(--beige); border-top: 1px solid var(--beige-dark); padding: 56px 0 72px; }
.related h2 { font-size: 17px; font-weight: 900; margin-bottom: 24px; letter-spacing: .02em; }
.related .grid { gap: 26px 24px; }
.related .card-thumb { background: var(--white); }

/* タグ */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 8px; }
.tag {
  font-size: 12px; font-weight: 700; color: var(--gray);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 6px 14px; transition: border-color .15s, color .15s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────── フッター ─────────── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.55); padding: 48px 0 32px; font-size: 12.5px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand .brand { color: var(--white); }
.footer-brand .brand .brand-logo { height: 52px; }
.footer-brand p { margin-top: 16px; max-width: 340px; line-height: 1.9; }
.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-nav h3 { font-size: 11px; font-weight: 900; letter-spacing: .1em; color: rgba(255,255,255,.4); margin-bottom: 12px; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 9px; }
.footer-nav a { color: rgba(255,255,255,.7); }
.footer-nav a:hover { color: var(--white); }
.footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: rgba(255,255,255,.6); text-decoration: underline; }

/* ─────────── レスポンシブ ─────────── */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-card { grid-template-columns: 1fr; gap: 0; }
  .featured-body { padding: 26px 28px 30px; }
}
@media (max-width: 720px) {
  .site-header-inner { padding: 0 18px; height: 64px; }
  .brand .brand-logo { height: 36px; }
  .gnav { display: none; }
  .wrap, .cat-nav-inner { padding: 0 18px; }
  .article, .hero-figure { padding: 0 18px; }
  .cat-nav { top: 64px; }
  .page-head { padding: 36px 0 32px; }
  .cat-intro { padding-left: 14px; margin-top: 14px; }
  .cat-intro p { font-size: 14px; line-height: 1.9; }
  .featured { padding: 28px 0 0; }
  .list-section { padding: 32px 0 52px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .prose { font-size: 16px; line-height: 1.95; }
  .prose h2 { font-size: 20px; }
  .article-cta { padding: 30px 22px; border-radius: var(--radius); }
  .article-cta h2 { font-size: 19px; }
  .footer-nav { gap: 32px; }
  .footer-brand .brand .brand-logo { height: 44px; }
}

/* 目次から見出しへ飛んだとき、追従ヘッダーに隠れないようにする */
.prose h2, .prose h3 { scroll-margin-top: 96px; }
@media (max-width: 720px) {
  .prose h2, .prose h3 { scroll-margin-top: 82px; }
}
