/* ===== 共通スタイル（デザインA：金融機関・信頼型） ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rent: #2f6fb0;
  --buy: #2f8f6b;
  --accent: #b8924a;       /* ゴールド（アクセント） */
  --accent-d: #9c7838;
  --accent-l: #d4af6a;
  --navy: #0a2540;
  --navy2: #13386b;
  --gold-bg: #f7f1e6;      /* ゴールドの淡い背景 */
  --bg: #fbfcfd;
  --card: #ffffff;
  --border: #dde4ec;
  --text: #1a2a3a;
  --muted: #5c6b7a;
}

body {
  font-family: 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.8;
}

/* 見出しは明朝体で格調を出す */
.serif, .page-header h1, .card-title, .article-body h2, .article-body h3,
.cta-box h3, .summary-box h4 {
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}

/* ===== グローバルナビ ===== */
.global-nav {
  background: var(--navy);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  border-bottom: 3px solid var(--accent);
}
.global-nav .logo {
  color: white;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding: 18px 20px 18px 0;
  border-right: 1px solid #1e3a5f;
  margin-right: 4px;
  text-decoration: none;
}
.global-nav a {
  color: #b9c6d6;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 18px 14px;
  white-space: nowrap;
  transition: color 0.15s;
}
.global-nav a:hover, .global-nav a.active { color: var(--accent-l); }
.global-nav a.active { border-bottom: 2px solid var(--accent); }

/* ===== ヘッダー ===== */
.page-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy2) 100%);
  color: white;
  padding: 52px 24px;
  text-align: center;
  position: relative;
}
.page-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-l), var(--accent));
}
.page-header h1 { font-size: clamp(1.4rem, 4vw, 2.1rem); font-weight: 700; line-height: 1.5; letter-spacing: 0.02em; }
.page-header p { margin-top: 12px; color: #bccadb; font-size: 0.9rem; }

/* ===== レイアウト ===== */
.container { max-width: 900px; margin: 0 auto; padding: 32px 16px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 32px 16px; }

/* ===== カード ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(10,37,64,0.06);
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge {
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: 'Hiragino Sans','Yu Gothic',sans-serif;
}

/* ===== フォーム ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input[type="number"], select, input[type="range"] {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,146,74,0.15); }
.unit { position: relative; }
.unit input { padding-right: 44px; }
.unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.8rem; color: var(--muted); pointer-events: none; }

/* ===== ボタン ===== */
.btn {
  display: block; width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-l));
  color: #1a1305; border: none; border-radius: 4px;
  font-size: 1rem; font-weight: 800; cursor: pointer;
  letter-spacing: 0.03em;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); }

/* ===== 統計カード ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 20px; text-align: center; }
.stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.5rem; font-weight: 800; margin: 6px 0 2px; color: var(--navy); }
.stat-sub { font-size: 0.75rem; color: var(--muted); }
.stat-card.blue .stat-value { color: var(--rent); }
.stat-card.green .stat-value { color: var(--buy); }
.stat-card.purple .stat-value { color: var(--accent-d); }
.stat-card.orange .stat-value { color: #c08328; }

/* ===== チャート ===== */
.chart-wrap { position: relative; height: 320px; margin-bottom: 8px; }

/* ===== テーブル ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th { background: var(--bg); padding: 10px 14px; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); font-size: 0.78rem; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .total td { font-weight: 700; background: var(--bg); }

/* ===== 記事スタイル ===== */
.article-body { max-width: 720px; margin: 0 auto; }
.article-body h2 { font-size: 1.35rem; font-weight: 700; margin: 40px 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.article-body h3 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 12px; color: var(--navy); }
.article-body p { margin-bottom: 16px; font-size: 0.95rem; color: #374151; }
.article-body ul, .article-body ol { margin: 12px 0 16px 20px; }
.article-body li { font-size: 0.93rem; margin-bottom: 8px; color: #374151; }
.article-body strong { color: var(--text); }

.article-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.article-tag { background: var(--gold-bg); color: var(--accent-d); padding: 3px 10px; border-radius: 3px; font-size: 0.75rem; font-weight: 600; border: 1px solid #ece1cc; }

.callout { border-left: 4px solid var(--accent); background: var(--gold-bg); padding: 16px 20px; border-radius: 0 6px 6px 0; margin: 20px 0; }
.callout.green { border-color: var(--buy); background: #eef7f2; }
.callout.blue { border-color: var(--rent); background: #eef4fa; }
.callout.orange { border-color: #c08328; background: #fbf6ec; }
.callout p { margin: 0; font-size: 0.9rem; }
.callout strong { display: block; margin-bottom: 4px; }

.summary-box { background: var(--gold-bg); border: 1px solid #ece1cc; border-radius: 8px; padding: 20px 24px; margin: 24px 0; }
.summary-box h4 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }

.result-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.88rem; }
.result-table th { background: var(--navy); color: white; padding: 10px 16px; text-align: left; }
.result-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.result-table tr:nth-child(even) td { background: #f7f9fb; }
.result-table .highlight td { background: var(--gold-bg); font-weight: 700; }

/* ===== 記事一覧カード ===== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.article-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--text); transition: transform 0.15s, box-shadow 0.15s; display: block; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(10,37,64,0.12); }
.article-card-img { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.article-card-body { padding: 20px; }
.article-card-tag { font-size: 0.72rem; font-weight: 600; color: var(--accent-d); background: var(--gold-bg); padding: 2px 8px; border-radius: 3px; display: inline-block; margin-bottom: 8px; border: 1px solid #ece1cc; }
.article-card-title { font-size: 0.95rem; font-weight: 700; line-height: 1.5; margin-bottom: 8px; }
.article-card-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }

/* ===== フッター ===== */
.site-footer { background: var(--navy); color: #9fb0c4; text-align: center; padding: 36px 16px; font-size: 0.8rem; margin-top: 64px; border-top: 3px solid var(--accent); }
.site-footer a { color: var(--accent-l); text-decoration: none; }
.disclaimer-box { font-size: 0.75rem; color: var(--muted); line-height: 1.7; padding: 16px; background: var(--bg); border-radius: 6px; border: 1px solid var(--border); }

/* ===== CTA ===== */
.cta-box { background: linear-gradient(180deg, var(--navy), var(--navy2)); color: white; border-radius: 10px; padding: 36px; text-align: center; margin: 32px 0; position: relative; overflow: hidden; }
.cta-box::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-l), var(--accent)); }
.cta-box h3 { font-size: 1.3rem; margin-bottom: 8px; }
.cta-box p { color: #bccadb; font-size: 0.9rem; margin-bottom: 20px; }
.cta-btn { display: inline-block; padding: 13px 34px; background: linear-gradient(135deg, var(--accent), var(--accent-l)); color: #1a1305; border-radius: 4px; text-decoration: none; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.03em; transition: opacity 0.15s; }
.cta-btn:hover { opacity: 0.9; }

/* ===== 読了プログレスバー ===== */
.read-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: transparent; z-index: 200; pointer-events: none; }
.read-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-l)); transition: width 0.1s linear; }

/* ===== 記事内目次 ===== */
.toc { background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 6px; padding: 18px 22px; margin: 24px 0; }
.toc-title { font-family:'Hiragino Mincho ProN','Yu Mincho',serif; font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; display:flex; align-items:center; gap:6px; }
.toc-title::before { content:"📑"; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { font-size: 0.86rem; margin-bottom: 6px; color: var(--muted); }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent-d); text-decoration: underline; }
.article-body h2 { scroll-margin-top: 70px; }

/* ===== 広告枠（プレースホルダー） ===== */
.ad-slot { display: flex; align-items: center; justify-content: center; min-height: 100px; margin: 28px 0; background: repeating-linear-gradient(45deg,#f7f9fb,#f7f9fb 10px,#f1f5f9 10px,#f1f5f9 20px); border: 1px dashed #c7d0db; border-radius: 8px; color: #9aa7b5; }
.ad-slot-label { font-size: 0.72rem; letter-spacing: 0.18em; font-weight: 700; }
.ad-slot.wide { min-height: 90px; }
.ad-slot.rect { min-height: 250px; }
