/* ===========================
   景気ウォッチャー調査レポート
   スタイルシート (明るいUI)
   =========================== */

:root {
  --primary: #1565C0;
  --primary-light: #E3F2FD;
  --primary-dark: #0D47A1;
  --accent: #E65100;
  --accent-light: #FFF3E0;
  --success: #2E7D32;
  --success-light: #E8F5E9;
  --warning: #F57F17;
  --warning-light: #FFFDE7;
  --neutral: #546E7A;
  --text-primary: #1A237E;
  --text-secondary: #37474F;
  --text-muted: #78909C;
  --bg-main: #F8FAFF;
  --bg-white: #FFFFFF;
  --bg-section: #F0F4FF;
  --border: #CFD8DC;
  --border-light: #E8EAF6;
  --shadow-sm: 0 2px 8px rgba(21,101,192,0.08);
  --shadow-md: 0 4px 20px rgba(21,101,192,0.12);
  --shadow-lg: 0 8px 40px rgba(21,101,192,0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
}

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, #1565C0 0%, #0D47A1 50%, #1A237E 100%);
  color: white;
  padding: 48px 0 40px;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.header-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.site-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.header-subtitle {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 20px;
}

.header-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.9;
}

.meta-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

/* ===== KPI BANNER ===== */
.kpi-banner {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 24px 0;
  box-shadow: var(--shadow-sm);
}

.kpi-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.kpi-card {
  text-align: center;
  padding: 20px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s;
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
}

.kpi-card.kpi-primary { background: var(--primary-light); border-color: #BBDEFB; }
.kpi-card.kpi-accent  { background: var(--accent-light);  border-color: #FFE0B2; }
.kpi-card.kpi-success { background: var(--success-light); border-color: #C8E6C9; }
.kpi-card.kpi-warning { background: var(--warning-light); border-color: #FFF9C4; }

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-card.kpi-primary .kpi-value { color: var(--primary); }
.kpi-card.kpi-accent  .kpi-value { color: var(--accent); }
.kpi-card.kpi-success .kpi-value { color: var(--success); }
.kpi-card.kpi-warning .kpi-value { color: var(--warning); }

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-change {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}
.kpi-change.up   { background: #E8F5E9; color: #2E7D32; }
.kpi-change.down { background: #FFEBEE; color: #C62828; }
.kpi-change.flat { background: #ECEFF1; color: #546E7A; }

/* ===== NAV ===== */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-link {
  display: block;
  padding: 14px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ===== MAIN LAYOUT ===== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ===== SECTIONS ===== */
.report-section {
  margin-bottom: 60px;
  scroll-margin-top: 60px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
}

.section-title-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}
.section-title-block p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 16px 20px;
  background: var(--bg-section);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
}
.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.card-body {
  padding: 20px;
}

/* ===== CHART CONTAINERS ===== */
.chart-wrap {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.chart-title-bar {
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #F8FAFF 100%);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chart-title-bar h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
}
.chart-badge {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--primary);
  color: white;
  border-radius: 12px;
}

.chart-img-wrap {
  padding: 16px;
  background: white;
  text-align: center;
}
.chart-img-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chart-img-wrap img:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 20px rgba(21,101,192,0.18);
}

.chart-caption {
  padding: 12px 20px;
  background: #FAFAFA;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== INLINE CHARTS (Chart.js) ===== */
.chartjs-wrap {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.chartjs-canvas-wrap {
  padding: 20px;
  position: relative;
  height: 320px;
  cursor: zoom-in;
}

/* ===== TWO-COLUMN ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ===== TABLES ===== */
.data-table-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead tr {
  background: var(--primary);
  color: white;
}
.data-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.data-table tbody tr:nth-child(even) { background: var(--bg-section); }
.data-table tbody tr:hover { background: var(--primary-light); }
.data-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-light);
}
.td-num { text-align: right; font-family: 'Consolas', monospace; }
.td-up   { color: var(--success); font-weight: 600; }
.td-down { color: #C62828; font-weight: 600; }
.td-flat { color: var(--neutral); }

/* ===== INSIGHT BOXES ===== */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.insight-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.insight-icon {
  font-size: 28px;
  margin-bottom: 10px;
}
.insight-card h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.insight-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== CALLOUT ===== */
.callout {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.callout-info  { background: var(--primary-light); border-left: 4px solid var(--primary); }
.callout-warn  { background: var(--warning-light); border-left: 4px solid var(--warning); }
.callout-ok    { background: var(--success-light); border-left: 4px solid var(--success); }
.callout-alert { background: #FFEBEE; border-left: 4px solid #C62828; }
.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.callout p { font-size: 13.5px; color: var(--text-secondary); }
.callout strong { color: var(--text-primary); }

/* ===== EVENTS TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 28px;
  margin-bottom: 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-date {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}
.timeline-content {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.timeline-content h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.timeline-content p  { font-size: 12.5px; color: var(--text-secondary); }

/* ===== RISK TABLE ===== */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.risk-card {
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border-light);
}
.risk-card.risk-up   { background: var(--success-light); }
.risk-card.risk-down { background: #FFEBEE; }
.risk-card.risk-flat { background: var(--warning-light); }
.risk-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.risk-card p  { font-size: 12px; color: var(--text-secondary); }
.risk-dir { font-size: 18px; float: right; }

/* ===== SOURCE REFS ===== */
.source-ref {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.source-ref a {
  color: var(--primary);
  text-decoration: none;
}
.source-ref a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
.report-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 32px 0;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-title { font-weight: 700; font-size: 14px; color: white; margin-bottom: 4px; }
.footer-text  { font-size: 12px; }
.footer-credit {
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 16px;
  margin-top: 8px;
  font-size: 12px;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CHART MODAL ===== */
.chart-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.chart-modal.open {
  display: flex;
}
.chart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 50, 0.75);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}
.chart-modal-content {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 90vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.4);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.chart-modal-content img {
  max-width: 100%;
  max-height: calc(90vh - 64px);
  border-radius: 8px;
  display: block;
}
.chart-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.chart-modal-close:hover {
  background: var(--primary-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .site-header h1 { font-size: 1.6rem; }
  .kpi-value { font-size: 1.8rem; }
  .two-col { grid-template-columns: 1fr; }
  .section-title-block h2 { font-size: 1.2rem; }
}
