/**
 * 建設DXナビ 比較記事テンプレート
 * main_article_template.html のデザインを WordPress 用にスコープ化
 */
.kdx-article {
  --kdx-navy: #0C447C;
  --kdx-navy-light: #185FA5;
  --kdx-paper: #FAFAF7;
  --kdx-amber: #EF9F27;
  --kdx-amber-bg: #FAEEDA;
  --kdx-amber-text: #854F0B;
  --kdx-border: #E4E2DA;
  --kdx-text: #2C2C2A;
  --kdx-text-sub: #5F5E5A;
  --kdx-green-bg: #EAF3DE;
  --kdx-green-text: #3B6D11;

  font-family: 'Noto Sans JP', sans-serif;
  color: var(--kdx-text);
  background: var(--kdx-paper);
  line-height: 1.8;
  font-size: 16px;
  margin: 0 -16px;
  padding: 0 16px 32px;
}

.kdx-article .kdx-heading {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 500;
}

.kdx-article .kdx-mono {
  font-family: 'JetBrains Mono', monospace;
}

.kdx-article .kdx-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* サイトミニナビ */
.kdx-article .kdx-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--kdx-border);
}

.kdx-article .kdx-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.kdx-article .kdx-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--kdx-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.kdx-article .kdx-logo-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--kdx-navy);
}

.kdx-article .kdx-breadcrumb {
  font-size: 12px;
  color: #9A988F;
}

.kdx-article .kdx-breadcrumb a {
  color: #9A988F;
  text-decoration: none;
}

.kdx-article .kdx-breadcrumb a:hover {
  text-decoration: underline;
}

/* ヘッダーカード（図面風） */
.kdx-article .kdx-header-card {
  background: #fff;
  border: 1px solid var(--kdx-border);
  border-radius: 12px;
  padding: 28px 24px;
  margin-bottom: 24px;
}

.kdx-article .kdx-tag {
  display: inline-block;
  background: var(--kdx-amber-bg);
  color: var(--kdx-amber-text);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', monospace;
}

.kdx-article .kdx-h1 {
  font-size: 26px;
  line-height: 1.55;
  margin: 14px 0 12px;
  color: var(--kdx-text);
}

.kdx-article .kdx-lead {
  font-size: 15px;
  color: var(--kdx-text-sub);
  margin-bottom: 20px;
}

/* 図面の表題欄風メタ情報 */
.kdx-article .kdx-meta-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--kdx-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.kdx-article .kdx-meta-item {
  padding: 10px 12px;
  border-right: 1px solid var(--kdx-border);
}

.kdx-article .kdx-meta-item:last-child {
  border-right: none;
}

.kdx-article .kdx-meta-label {
  font-size: 11px;
  color: #9A988F;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.kdx-article .kdx-meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--kdx-text);
}

.kdx-article .kdx-meta-value.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* 結論サマリーボックス */
.kdx-article .kdx-summary-box {
  background: #F4F8FC;
  border-left: 3px solid var(--kdx-navy-light);
  padding: 16px 20px;
}

.kdx-article .kdx-summary-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--kdx-navy-light);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.kdx-article .kdx-summary-box ul {
  list-style: none;
  font-size: 14px;
  line-height: 2;
  color: var(--kdx-text);
  margin: 0;
  padding: 0;
}

/* セクション共通 */
.kdx-article .kdx-section {
  background: #fff;
  border: 1px solid var(--kdx-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.kdx-article .kdx-section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  background: #F0EFEA;
  color: var(--kdx-text-sub);
}

.kdx-article .kdx-section h2 {
  font-size: 18px;
  margin: 4px 0 14px;
  color: var(--kdx-text);
}

/* ランキングTOP3 */
.kdx-article .kdx-ranking-section {
  border: 2px solid #B5D4F4;
}

.kdx-article .kdx-ranking-section .kdx-section-label {
  background: #E6F1FB;
  color: var(--kdx-navy-light);
}

.kdx-article .kdx-ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.kdx-article .kdx-rank-card {
  border: 1px solid var(--kdx-border);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

.kdx-article .kdx-rank-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #9A988F;
  margin-bottom: 4px;
}

.kdx-article .kdx-rank-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.kdx-article .kdx-rank-price {
  font-size: 12px;
  color: var(--kdx-text-sub);
}

.kdx-article .kdx-ranking-note {
  font-size: 11px;
  color: #9A988F;
  margin-top: 10px;
  margin-bottom: 0;
}

/* CTA */
.kdx-article .kdx-cta {
  background: var(--kdx-green-bg);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: var(--kdx-green-text);
  transition: opacity 0.15s ease;
}

.kdx-article .kdx-cta:hover {
  opacity: 0.85;
  color: var(--kdx-green-text);
}

.kdx-article .kdx-cta-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.kdx-article .kdx-cta-desc {
  font-size: 12px;
  opacity: 0.85;
}

.kdx-article .kdx-cta-arrow {
  font-size: 20px;
  flex-shrink: 0;
}

/* 比較表 */
.kdx-article .kdx-table-wrap {
  overflow-x: auto;
}

.kdx-article .kdx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}

.kdx-article .kdx-table th,
.kdx-article .kdx-table td {
  border: 1px solid var(--kdx-border);
  padding: 10px;
  text-align: center;
}

.kdx-article .kdx-table th {
  background: #F0EFEA;
  font-weight: 500;
  font-size: 12px;
}

.kdx-article .kdx-table td:first-child,
.kdx-article .kdx-table th:first-child {
  text-align: left;
  font-weight: 500;
}

.kdx-article .kdx-circle {
  color: #3B6D11;
  font-size: 16px;
}

.kdx-article .kdx-triangle {
  color: var(--kdx-amber-text);
  font-size: 14px;
}

.kdx-article .kdx-dash {
  color: #C8C6BC;
}

.kdx-article .kdx-mono-cell {
  font-family: 'JetBrains Mono', monospace;
}

.kdx-article .kdx-table-note {
  font-size: 11px;
  color: #9A988F;
  margin-top: 10px;
  margin-bottom: 0;
}

/* 製品紹介カード */
.kdx-article .kdx-product-card {
  border: 1px solid var(--kdx-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.kdx-article .kdx-product-card:last-child {
  margin-bottom: 0;
}

.kdx-article .kdx-product-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kdx-article .kdx-product-rank-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: var(--kdx-amber-bg);
  color: var(--kdx-amber-text);
  padding: 2px 8px;
  border-radius: 4px;
}

.kdx-article .kdx-product-row {
  font-size: 13px;
  color: var(--kdx-text-sub);
  margin-bottom: 4px;
  line-height: 1.7;
}

.kdx-article .kdx-product-row strong {
  color: var(--kdx-text);
  font-weight: 500;
}

.kdx-article .kdx-product-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #9A988F;
  margin-top: 6px;
}

.kdx-article .kdx-more-note {
  text-align: center;
  font-size: 12px;
  color: #9A988F;
  padding: 12px 0 0;
  margin-bottom: 0;
}

/* エディタ追記コンテンツ */
.kdx-article .kdx-entry-content {
  margin-top: 16px;
}

.kdx-article .kdx-entry-content > *:first-child {
  margin-top: 0;
}

/* Cocoon デフォルト表示の抑制 */
.page-template-page-template-kdx-article .entry-header,
.page-template-page-template-kdx-article .article-header,
.page-template-page-template-kdx-article .date-tags,
.page-template-page-template-kdx-article .eye-catch-wrap,
.single-kdx-article .entry-header,
.single-kdx-article .article-header,
.single-kdx-article .date-tags,
.single-kdx-article .eye-catch-wrap {
  display: none !important;
}

.page-template-page-template-kdx-article .entry-content,
.single-kdx-article .entry-content {
  margin-top: 0;
  padding-top: 0;
}

@media (max-width: 600px) {
  .kdx-article .kdx-meta-table {
    grid-template-columns: repeat(2, 1fr);
  }

  .kdx-article .kdx-meta-item:nth-child(2) {
    border-right: none;
  }

  .kdx-article .kdx-meta-item:nth-child(3),
  .kdx-article .kdx-meta-item:nth-child(4) {
    border-top: 1px solid var(--kdx-border);
  }

  .kdx-article .kdx-ranking-grid {
    grid-template-columns: 1fr;
  }

  .kdx-article .kdx-h1 {
    font-size: 22px;
  }

  .kdx-article .kdx-topnav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
