/* =============================================
   顧問制度.com - articles.css
   digital-ai-hojokin.jp と同一フォーマットの記事レイアウト
   ============================================= */

/* === 記事レイアウト専用CSS変数 === */
:root {
  --accent-primary:     #00abeb;
  --accent-primary-rgb: 0,171,235;
  --accent-secondary:   #059669;
  --accent-warning:     #d97706;
  --accent-danger:      #dc2626;
  --accent-hover:       #0090cc;
  --bg-primary:         #ffffff;
  --bg-secondary:       #f8fafc;
  --bg-surface:         #f1f5f9;
  --bg-hover:           #e2e8f0;
  --text-primary:       #0f172a;
  --text-secondary:     #475569;
  --text-muted:         #94a3b8;
  --text-inverse:       #ffffff;
  --accent-article-border: #e2e8f0;
  --border-radius:      8px;
  --header-h:           58px;
  --sub-header-h:       41px;
  --header-total:       calc(var(--header-h) + var(--sub-header-h));
  --transition:         0.2s ease;
}

/* 記事ページ用 container override */
body.article-page .container {
  max-width: 1140px !important;
  margin: 0 auto;
  padding: 0 20px;
}

/* 記事ページではリセット・リスト装飾を有効化（Bootstrap reset の打ち消し） */
body.article-page .article-body ul { list-style: disc; padding-left: 28px; }
body.article-page .article-body ol { list-style: decimal; padding-left: 28px; }
body.article-page .article-body li { margin-bottom: 8px; }

/* アイコン用 */
.icon-sm { width: 14px; height: 14px; }

/* =============================================
   ボタン（記事ページ専用）
   ============================================= */
body.article-page .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md, 12px);
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
body.article-page .btn svg { width: 16px !important; height: 16px !important; }
body.article-page .btn-primary {
  background: var(--accent-primary);
  color: #fff;
}
body.article-page .btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), .3);
}
body.article-page .btn-success {
  background: var(--accent-secondary);
  color: #fff;
}
body.article-page .btn-success:hover {
  background: #047857;
  color: #fff;
}
body.article-page .btn-outline {
  background: transparent;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
}
body.article-page .btn-outline:hover {
  background: var(--accent-primary);
  color: #fff;
}

/* =============================================
   パンくずリスト（記事ページ専用）
   ============================================= */
body.article-page .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding: 12px 0;
  background: transparent;
  margin: 0;
}
body.article-page .breadcrumb a { color: var(--text-secondary); text-decoration: none; }
body.article-page .breadcrumb a:hover { color: var(--accent-primary); }
body.article-page .breadcrumb span {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
}

/* =============================================
   ミニCTA
   ============================================= */
.cta-mini {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid rgba(var(--accent-primary-rgb), .12);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 0 0 24px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.cta-mini-body { flex: 1; }
.cta-mini-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.cta-mini-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}
.cta-mini .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .cta-mini { flex-direction: column; text-align: center; padding: 20px; }
}

/* =============================================
   下部CTA（記事末尾）
   ============================================= */
.cta-section { margin: 64px 0 0; }
.cta-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid rgba(var(--accent-primary-rgb), .15);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
}
.cta-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.cta-card-desc {
  font-size: .95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.cta-card-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .cta-card { padding: 32px 20px; }
  .cta-card-buttons { flex-direction: column; }
  .cta-card-buttons .btn { width: 100%; justify-content: center; }
}

/* =============================================
   補助金ナビ共通 - articles.css
   記事一覧・記事ページ専用スタイル
   ============================================= */

/* =============================================
   記事一覧
   ============================================= */
.articles-page { padding: 0 0 80px; }

/* カテゴリタブ */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.category-tab {
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.category-tab:hover,
.category-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

/* 記事グリッド */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 記事カード */
.article-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.article-card-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  overflow: hidden;
  position: relative;
}
.article-card-thumb .article-card-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
}
[data-theme="dark"] .article-card-thumb {
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb),.15), rgba(var(--accent-primary-rgb),.05));
}
.article-card-thumb i { width: 40px; height: 40px; }
.article-card-thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; }
.article-card-body {
  padding: 15px 17px 0px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.article-card-cat {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb),.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.article-card-date {
  font-size: .75rem;
  color: var(--text-muted);
}
.article-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card:hover .article-card-title {
  color: var(--accent-primary);
}
.article-card-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.article-card-footer {
  padding: 6px 17px 12px;
  border-top: 0px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.article-card-readmore {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 記事一覧SP */
@media (max-width: 640px) {
  .page-header:has(+ .articles-page) {
    padding: 0 0 0px;
    margin-bottom: 0px;
    text-align: center;
    border-bottom: 0;
  }
  .category-tabs {
    position: sticky;
    top: 99px;
    z-index: 99;
    background: var(--bg-primary);
    padding: 8px 12px;
    margin: 0 -10px 12px;
    width: calc(100% + 20px);
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
  }
  .category-tab {
    padding: 5px 12px;
    font-size: .75rem;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }
  .category-tab svg {
    width: 11px !important;
    height: 11px !important;
  }
  .articles-page { padding-top: 0; }
  .articles-grid { grid-template-columns: 1fr; gap: 12px; }
  .article-card { flex-direction: row; }
  .article-card-thumb { aspect-ratio: 16/9; width: 120px; min-width: 120px; flex-shrink: 0; align-self: center; }
  .article-card-thumb img { object-fit: cover; width: 100%; height: 100%; }
  .article-card-thumb .article-card-cat { display: none; }
  .article-card-body { padding: 6px 12px; min-width: 0; overflow: hidden; }
  .article-card-title { font-size: .77rem; -webkit-line-clamp: 2; margin-bottom: 4px; }
  .article-card-desc {
    display: flex;
    align-items: baseline;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: hidden;
    font-size: .75rem;
    margin-bottom: 0;
    flex: unset;
    max-height: 1.4em;
    line-height: 1.4;
    color: var(--text-muted);
  }
  .article-card-desc::after {
    content: '…詳しく読む';
    color: var(--text-muted);
    font-weight: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: .75rem;
  }
  .article-card-desc.desc-2lines {
    max-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .article-card-desc.desc-2lines::after {
    display: none;
  }
  .article-card-footer { display: none; }
  .article-card-meta { margin-bottom: 4px; }
}

/* =============================================
   個別記事ページ
   ============================================= */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  padding: 0 0 80px;
  align-items: start;
}
.article-layout > * {
  min-width: 0;
}
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
}

/* 記事ヘッダー */
.article-header { margin-bottom: 24px; }
.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  font-size: .8rem;
  font-weight: 700;
  background: rgba(var(--accent-primary-rgb),.08);
  color: var(--accent-primary);
}
.article-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .article-title { margin-bottom: 10px; }
  .article-meta { gap: 10px 8px; padding-bottom: 18px; }
  .article-body p { font-size: .9rem; line-height: 1.5rem; }
  .article-body h2 { font-size: 1.3rem; padding: 9px 15px; line-height: 1.9rem; }
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.article-updated {
  background: rgba(5,150,105,.08);
  color: var(--accent-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* 記事本文 */
.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-primary);
  overflow-x: hidden;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  scroll-margin-top: calc(var(--header-total, 105px) + 20px);
}
[data-theme="dark"] .article-body h2 {
  background: var(--bg-surface);
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-primary);
  scroll-margin-top: calc(var(--header-total, 105px) + 20px);
}
.article-body h3:has(+ .subsidy-card) {
  margin: 32px 0 0;
  padding-bottom: 0;
  border-bottom: none;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol {
  margin: 16px 0;
  padding-left: 28px;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 8px; line-height: 1.7; }
.article-body strong { font-weight: 700; color: var(--text-primary); }
.article-body em { font-style: italic; }
.article-body a { color: var(--accent-primary); text-decoration: underline; }
.article-body a:hover { color: var(--accent-hover); }
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  font-size: .95rem;
  color: var(--text-secondary);
}
.article-body .table-wrap,
.subsidy-table-wrap,
.comparison-table-wrap {
  overflow-x: auto;
  margin: 24px 0 24px 0;
  -webkit-overflow-scrolling: touch;
}
.article-body table,
.subsidy-table,
.comparison-table-wrap table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: .9rem;
}
.article-body th,
.subsidy-table th {
  background: var(--accent-primary);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}
.article-body td,
.subsidy-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}
.article-body tr:nth-child(even) td,
.subsidy-table tr:nth-child(even) td {
  background: var(--bg-secondary);
}

/* ハイライトボックス */
.highlight-box {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin: 24px 0;
}
.highlight-box.info {
  background: #eff6ff;
  color: var(--accent-hover);
}
[data-theme="dark"] .highlight-box.info {
  background: rgba(var(--accent-primary-rgb),.1);
  color: #93c5fd;
}
.highlight-box.success {
  background: #f0fdf4;
  color: #166534;
}
.highlight-box.warning {
  background: #fffbeb;
  color: #92400e;
}
.highlight-box-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.highlight-box-title svg { width: 19px; height: 19px; flex-shrink: 0; }

/* 補助金スペックカード */
.subsidy-card {
  background: var(--bg-primary);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 17px 24px 19px 24px;
  margin: 10px 0 20px 0;
}
.subsidy-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 4px;
  font-size: 1.2rem;
}
.subsidy-card-header svg { width: 19px; height: 19px; flex-shrink: 0; }
.subsidy-card-body p { margin-bottom: 0; }
.subsidy-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.subsidy-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.subsidy-spec-item {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.subsidy-spec-item:last-child { border-bottom: none; }
.subsidy-spec-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.subsidy-spec-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
  overflow-wrap: break-word;
}
.subsidy-spec-unit {
  font-size: .8rem;
  color: var(--text-secondary);
  font-weight: 400;
}
@media (max-width: 480px) {
  .subsidy-specs { grid-template-columns: 1fr; }
}

/* プランカード横並び */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.plan-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
}
.plan-card--featured {
  border-color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb),.03);
}
.plan-card-name {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.plan-card-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}
.plan-card-price small {
  font-size: .65em;
  font-weight: 400;
  color: var(--text-secondary);
}
.plan-card-desc {
  font-size: .8rem;
  color: var(--text-secondary);
}
.plan-card-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb),.1);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.plan-ai-note {
  margin-top: 12px;
  padding: 10px 16px;
  background: rgba(var(--accent-primary-rgb),.05);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-ai-note i { color: var(--accent-primary); flex-shrink: 0; }
@media (max-width: 480px) {
  .plan-grid { grid-template-columns: 1fr; }
}

/* シミュレーションテーブル */
.sim-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: .85rem;
  line-height: 1.4;
}
.sim-table th {
  background: var(--surface-secondary);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-muted);
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}
.sim-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.sim-table tr:last-child td { border-bottom: none; }
.sim-table .sim-product { font-weight: 600; color: var(--text-primary); }
.sim-table .sim-before { color: var(--text-secondary); }
.sim-table .sim-after {
  font-weight: 700;
  color: var(--accent-primary);
}
@media (max-width: 480px) {
  .sim-table { font-size: .75rem; }
  .sim-table th, .sim-table td { padding: 5px 4px; }
}

/* ステップフロー（縦タイムライン） */
.step-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 16px 0;
  padding-left: 4px;
}
.step-flow-item {
  display: flex;
  gap: 20px;
  align-items: stretch;
  position: relative;
}
.step-flow-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 28px;
}
.step-flow-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.step-flow-line {
  flex: 1;
  width: 2px;
  background: var(--border-color);
}
.step-flow-item:last-child .step-flow-line { display: none; }
.step-flow-body {
  flex: 1;
  min-width: 0;
  padding: 2px 0 20px;
}
.step-flow-item:last-child .step-flow-body { padding-bottom: 0; }
.step-flow-title {
  font-weight: 700;
  font-size: .88rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.step-flow-desc {
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.step-flow-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb),.1);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  text-decoration: none;
  transition: all var(--transition);
}
a.step-flow-badge:hover {
  background: rgba(var(--accent-primary-rgb),.2);
  color: var(--accent-hover);
}

/* =============================================
   FAQ
   ============================================= */
.faq-section { margin: 48px 0; }
.faq-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: background var(--transition);
  gap: 12px;
  text-align: left;
  font-family: inherit;
  line-height: 1.5;
}
.faq-question:hover { background: var(--bg-secondary); }
.faq-question.open { background: var(--bg-primary); }
.faq-q-text { display: flex; align-items: baseline; gap: 10px; flex: 1; min-width: 0; }
.faq-q-badge {
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
}
.faq-q-badge::after {
  content: '.';
}
.faq-a-badge {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-right: 10px;
}
.faq-a-badge::after {
  content: '.';
}
.faq-chevron { transition: transform .2s ease; flex-shrink: 0; }
.faq-question.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-answer-inner {
  padding: 14px 20px 14px;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}
.faq-filter-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.faq-filter-badge {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.faq-filter-badge:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.faq-filter-badge.is-active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }
.faq-category-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-primary);
  color: var(--text-primary);
}
.faq-cat-hidden { display: none; }
.faq-bottom-links {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}
.faq-bottom-links h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.faq-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.faq-bottom-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
}
.faq-bottom-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
}
.faq-bottom-card i,
.faq-bottom-card svg { flex-shrink: 0; color: var(--accent-primary); margin-top: 2px; }
.faq-bottom-card span { font-weight: 600; font-size: .95rem; }
.faq-bottom-card p { font-size: .8rem; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }
.faq-bottom-cta { background: var(--bg-secondary); }
@media (max-width: 768px) {
  .faq-bottom-grid { grid-template-columns: 1fr; }
}

/* =============================================
   サイドバー（CTA + TOC）
   ============================================= */
.article-sidebar {
  position: sticky;
  top: calc(var(--header-total, 105px) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 1024px) {
  .article-sidebar { display: none; }
}

/* サイドバー内cta-mini（縦レイアウト） */
.article-sidebar .cta-mini {
  flex-direction: column;
  text-align: center;
  padding: 20px;
  margin: 0;
  gap: 0;
}
.article-sidebar .cta-mini-body { margin: 13px 0 10px 0; }
.article-sidebar .cta-mini-avatars { justify-content: center; }
.article-sidebar .cta-mini-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4rem;
}
.article-sidebar .cta-mini-desc {
  font-size: .8rem;
  line-height: 1.2rem;
  letter-spacing: 0.03rem;
}
.article-sidebar .cta-mini .btn { width: 100%; justify-content: center; }

/* 目次（TOC） */
.article-toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  max-height: calc(100vh - var(--header-total, 105px) - 120px);
  overflow-y: auto;
}
.toc-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc-list { list-style: none; }
.toc-item a {
  display: block;
  padding: 5px 8px;
  font-size: .85rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.toc-item a:hover,
.toc-item a.active {
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb),.05);
}
.toc-item-h3 a {
  padding-left: 20px;
  font-size: .8rem;
  line-height: 1.2rem;
}

/* SP用TOC FABボタン */
.toc-fab {
  display: none;
  position: fixed;
  bottom: 13px;
  right: 10px;
  transition: bottom .3s ease;
  z-index: 49;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  width: 55px;
  padding: 6px 0px 9px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.toc-fab svg { width: 20px; height: 20px; }
.toc-fab-label { font-size: 10px; font-weight: 700; line-height: 1; }
@media (max-width: 1024px) {
  .toc-fab { display: flex; }
}

/* TOCドロワーオーバーレイ */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(0,0,0,.45);
}
.drawer-overlay.open { display: block; }

/* SP TOCドロワー */
.toc-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--bg-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px;
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s ease;
  box-shadow: var(--shadow-xl);
}
.toc-drawer.open { transform: translateY(0); }

/* =============================================
   関連記事
   ============================================= */
.related-articles { margin: 48px 0; }
.related-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; }
}
/* 記事本文内の related-grid リセット（.article-body の干渉防止） */
.article-body .related-grid { margin: 24px 0; }
.article-body a.related-card {
  text-decoration: none;
  color: inherit;
}
.article-body a.related-card:hover {
  color: inherit;
}
.article-body .related-card p {
  margin-bottom: 0;
}
.article-body .related-card .related-card-title {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.4;
}
.article-body .related-card .related-card-cat {
  font-size: .75rem;
  margin-top: 4px;
}

.related-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: all var(--transition);
}
.related-card:hover {
  border-color: var(--accent-primary);
}
.related-card-thumb {
  flex-shrink: 0;
  width: 130px;
  height: 73px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  overflow: hidden;
}
.related-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-card:has(.related-card-thumb img) {
  padding-left: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.related-card:has(.related-card-thumb img) .related-card-thumb {
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  aspect-ratio: 16 / 9;
  height: auto;
}
.related-card:has(.related-card-thumb img) .related-card-body {
  align-self: center;
  padding: 11px 0;
}
.related-card-body { flex: 1; }
.related-card-title {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card:hover .related-card-title { color: var(--accent-primary); }
.related-card-cat {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* related-card-iconをrelated-card-thumbと同じスタイルに */
.related-card-icon {
  flex-shrink: 0;
  width: 130px;
  height: 73px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}
.related-card-icon svg { width: 28px; height: 28px; }
.related-card:has(.related-card-icon) {
  padding-left: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.related-card:has(.related-card-icon) .related-card-icon {
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}
.related-card:has(.related-card-icon) .related-card-body {
  align-self: center;
  padding: 11px 0;
  display: flex;
  flex-direction: column;
}
.related-card:has(.related-card-icon) .related-card-cat { order: 2; }
.related-card:has(.related-card-icon) .related-card-title { order: 1; }

/* 親regionへのリンクカード（city-tpl用） */
.related-card--parent {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: var(--accent-success, #16a34a);
}
.related-card--parent .related-card-thumb {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: var(--accent-success, #16a34a);
}
.related-card--parent .related-card-cat {
  color: var(--accent-success, #16a34a);
  font-weight: 600;
}

/* 市町村ガイドセクション（region-tpl用） */
.city-guides-section .related-card-thumb {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  color: #0369a1;
}
.city-guides-section .related-card-cat {
  color: #0369a1;
}

/* =============================================
   記事一覧CTA
   ============================================= */
.articles-cta-section {
  margin-top: 40px;
  padding: 0;
}
.articles-cta-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}
.articles-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(var(--accent-primary-rgb), .1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.articles-cta-icon svg,
.articles-cta-icon i {
  width: 22px;
  height: 22px;
}
.articles-cta-body {
  flex: 1;
}
.articles-cta-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.articles-cta-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  margin: 0;
}
.articles-cta-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.articles-cta-actions .btn {
  font-size: .85rem;
  padding: 10px 18px;
}
.articles-related-links {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  justify-content: flex-end;
}
.articles-related-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.articles-related-link:hover {
  color: var(--accent-primary);
}
.articles-related-link svg,
.articles-related-link i {
  width: 14px;
  height: 14px;
}
@media (max-width: 768px) {
  .articles-cta-box {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
    gap: 12px;
  }
  .articles-cta-actions {
    width: 100%;
    flex-direction: column;
  }
  .articles-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .articles-related-links {
    justify-content: center;
  }
}

/* ============================================================
   既存記事互換スタイル（.content-section / .info-box / .case-study / .comparison-table 等）
   ============================================================ */
body.article-page .article-body .content-section {
  margin-bottom: 48px;
}
body.article-page .article-body .content-section:first-child {
  margin-top: 0;
}
body.article-page .article-body .content-section h2 {
  margin-top: 0;
}
body.article-page .article-body .lead {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-primary);
  margin-bottom: 20px;
}

body.article-page .article-body .info-box,
body.article-page .article-body .case-study,
body.article-page .article-body .case-example,
body.article-page .article-body .reason-box,
body.article-page .article-body .merit-box,
body.article-page .article-body .risk-box,
body.article-page .article-body .criteria-box,
body.article-page .article-body .step-box,
body.article-page .article-body .summary-box,
body.article-page .article-body .warning-box,
body.article-page .article-body .point-box {
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border-primary, #e2e8f0);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}
body.article-page .article-body .info-box > strong:first-child,
body.article-page .article-body .info-box > b:first-child {
  display: block;
  color: var(--accent-primary);
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: 700;
}
body.article-page .article-body .info-box h4,
body.article-page .article-body .case-study h4,
body.article-page .article-body .case-example h4,
body.article-page .article-body .reason-box h4,
body.article-page .article-body .merit-box h4,
body.article-page .article-body .risk-box h4,
body.article-page .article-body .criteria-box h4,
body.article-page .article-body .step-box h4,
body.article-page .article-body .summary-box h4,
body.article-page .article-body .warning-box h4,
body.article-page .article-body .point-box h4 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--accent-primary);
  font-weight: 700;
}
body.article-page .article-body .info-box ul,
body.article-page .article-body .case-study ul,
body.article-page .article-body .reason-box ul,
body.article-page .article-body .merit-box ul,
body.article-page .article-body .step-box ul,
body.article-page .article-body .criteria-box ul,
body.article-page .article-body .summary-box ul,
body.article-page .article-body .point-box ul {
  margin: 8px 0 0;
  padding-left: 22px;
}
body.article-page .article-body .info-box p:last-child,
body.article-page .article-body .case-study p:last-child,
body.article-page .article-body .reason-box p:last-child,
body.article-page .article-body .merit-box p:last-child,
body.article-page .article-body .risk-box p:last-child,
body.article-page .article-body .criteria-box p:last-child,
body.article-page .article-body .step-box p:last-child,
body.article-page .article-body .summary-box p:last-child,
body.article-page .article-body .warning-box p:last-child,
body.article-page .article-body .point-box p:last-child {
  margin-bottom: 0;
}
body.article-page .article-body .merit-box,
body.article-page .article-body .case-example {
  background: #ecfdf5;
  border-color: #bbf7d0;
}
body.article-page .article-body .merit-box h4,
body.article-page .article-body .case-example h4 {
  color: #047857;
}
body.article-page .article-body .risk-box,
body.article-page .article-body .warning-box {
  background: #fef2f2;
  border-color: #fecaca;
}
body.article-page .article-body .risk-box h4,
body.article-page .article-body .warning-box h4 {
  color: #b91c1c;
}
body.article-page .article-body .summary-box {
  background: #fffbeb;
  border-color: #fde68a;
}
body.article-page .article-body .summary-box h4 {
  color: #b45309;
}
body.article-page .article-body .point-box {
  background: #eff6ff;
  border-color: #bfdbfe;
}
body.article-page .article-body .point-box h4 {
  color: #1d4ed8;
}

body.article-page .article-body .comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-primary, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  margin: 24px 0;
  font-size: 15px;
}
body.article-page .article-body .comparison-table thead th {
  background: var(--accent-primary);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  border: 0;
}
body.article-page .article-body .comparison-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--border-primary, #e2e8f0);
  vertical-align: top;
}
body.article-page .article-body .comparison-table tbody tr:nth-child(even) td {
  background: var(--bg-secondary, #f8fafc);
}
body.article-page .article-body .comparison-table tbody tr:hover td {
  background: #eff6ff;
}
@media (max-width: 768px) {
  body.article-page .article-body .comparison-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

body.article-page .article-body .article-card {
  border: 1px solid var(--border-primary, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
body.article-page .article-body .article-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
body.article-page .article-body .article-card-header { padding: 12px 16px 0; }
body.article-page .article-body .article-badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  background: var(--accent-primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
}
body.article-page .article-body .article-card-body { padding: 10px 16px; flex: 1; }
body.article-page .article-body .article-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 6px 0 8px;
  color: var(--text-primary);
}
body.article-page .article-body .article-card-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.65;
}
body.article-page .article-body .article-card-footer { padding: 10px 16px 14px; }
body.article-page .article-body .article-card-link {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
body.article-page .article-body .article-card-link:hover { text-decoration: underline; }

body.article-page .article-body .author-box,
body.article-page .article-body .disclaimer-box {
  background: #f8fafc;
  border: 1px solid var(--border-primary, #e2e8f0);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-secondary);
}
body.article-page .article-body .author-box strong,
body.article-page .article-body .disclaimer-box strong {
  color: var(--text-primary);
}

body.article-page .article-body .cta-box {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover, #0284c7) 100%);
  color: #fff;
  padding: 28px 24px;
  border-radius: 12px;
  text-align: center;
  margin: 28px 0;
}
body.article-page .article-body .cta-box .cta-title,
body.article-page .article-body .cta-box h3 {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}
body.article-page .article-body .cta-box .cta-description,
body.article-page .article-body .cta-box p {
  color: #fff;
  margin: 0 0 16px;
}
body.article-page .article-body .cta-box .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--accent-primary);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
body.article-page .article-body .cta-box .btn-cta:hover { background: #f1f5f9; }
body.article-page .article-body .cta-box .cta-note {
  font-size: 12px;
  color: rgba(255,255,255,.85);
  margin: 12px 0 0;
}
body.article-page .article-body .cta-box .cta-note a {
  color: #fff;
  text-decoration: underline;
}
