/* ============================================================
   고양시 제12선거구 현안 연구소 — Design System
   ============================================================ */

:root {
  /* 국민의힘 VI 기반 색상 체계 */
  --c-bg: #f8f9fb;
  --c-surface: #ffffff;
  --c-surface-alt: #f5f6f9;
  --c-border: #e2e6ed;
  --c-border-light: #eef1f6;
  --c-text-primary: #112C56;
  --c-text-secondary: #3d4f6f;
  --c-text-muted: #7e8da6;
  /* 주조색: PPP Red #E61E2B */
  --c-accent: #E61E2B;
  --c-accent-light: #f14350;
  --c-accent-surface: #fef2f2;
  --c-accent-border: #fecaca;
  /* 보조색: PPP Cyan #00B5E2 */
  --c-secondary: #00B5E2;
  --c-secondary-light: #BDE4F8;
  --c-secondary-surface: #f0f9ff;
  --c-secondary-border: #b3e5fc;
  /* 보조색: PPP Navy #004C7E / Dark Navy #112C56 */
  --c-navy: #004C7E;
  --c-navy-dark: #112C56;
  /* 기능색 */
  --c-danger: #E61E2B;
  --c-success: #059669;
  --c-warning: #d97706;
  --c-info: #00B5E2;
  --font-sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Noto Serif KR', Georgia, serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text-primary);
  line-height: 1.7;
  font-size: 15px;
  min-height: 100vh;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c8cdd5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0a8b4; }

/* ---- Layout Shell ---- */
.shell {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 280px;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--c-border-light);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-text-primary);
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--c-accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.5px;
  /* 국민의힘 VI — 정육면체 블록 모티프 (각진 형태) */
  clip-path: polygon(10% 0%, 100% 0%, 100% 90%, 90% 100%, 0% 100%, 0% 10%);
}

.sidebar-brand-text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: var(--c-text-muted);
  font-weight: 400;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.sidebar-nav-group {
  margin-bottom: 8px;
}

.sidebar-nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--c-text-muted);
  padding: 8px 12px 6px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  color: var(--c-text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
  line-height: 1.4;
}

.sidebar-nav-item:hover {
  background: var(--c-surface-alt);
  color: var(--c-text-primary);
}

.sidebar-nav-item.active {
  background: var(--c-accent-surface);
  color: var(--c-accent);
  border-color: var(--c-accent-border);
  font-weight: 600;
  border-left: 3px solid var(--c-accent);
}

.sidebar-nav-item-num {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--c-surface-alt);
  color: var(--c-text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}

.sidebar-nav-item.active .sidebar-nav-item-num {
  background: var(--c-accent);
  color: #fff;
  border-radius: 4px;
}

.sidebar-nav-item-label {
  flex: 1;
  min-width: 0;
}

.sidebar-nav-item-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}

/* 국민의힘 VI 보조색 기반 태그 색상 */
.tag-edu { background: #fef2f2; color: #E61E2B; }
.tag-admin { background: #f0f9ff; color: #004C7E; }
.tag-econ { background: #d1fae5; color: #065f46; }
.tag-env { background: #fef3c7; color: #92400e; }
.tag-transport { background: #e0f2fe; color: #00B5E2; }
.tag-verify { background: #f1f5f9; color: #112C56; }

/* sidebar-footer removed */

/* ---- Main Content ---- */
.main {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  max-width: calc(100vw - 280px);
}

.main-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0 48px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.main-header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-header-breadcrumb {
  font-size: 12px;
  color: var(--c-text-muted);
}

.main-header-breadcrumb span {
  color: var(--c-text-secondary);
  font-weight: 500;
}

.main-body {
  padding: 40px 48px 80px;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ---- Mobile Toggle ---- */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}

/* ---- Landing / Overview ---- */
.landing-hero {
  margin-bottom: 48px;
  overflow-wrap: break-word;
  word-break: keep-all;
  max-width: 100%;
}

.landing-hero h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: var(--c-text-primary);
}

.landing-hero p {
  font-size: 15px;
  color: var(--c-text-secondary);
  max-width: 820px;
  line-height: 1.8;
}

.landing-hero .label-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #fef2f2;
  color: #E61E2B;
  border: 1px solid #fecaca;
  margin-bottom: 16px;
}

/* ---- Cards Grid ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 20px;
  margin-top: 32px;
  width: 100%;
}

.agenda-card {
  background: var(--c-surface);
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  box-shadow: 0 1px 4px rgba(30,41,59,0.07);
}

.agenda-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-accent-light) 100%);
  opacity: 0.3;
  transition: opacity var(--transition);
}

.agenda-card:hover {
  border-color: var(--c-accent-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.agenda-card:hover::before {
  opacity: 1;
}

.agenda-card-num {
  font-size: 48px;
  font-weight: 900;
  color: var(--c-border);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -3px;
  transition: color var(--transition);
}

.agenda-card:hover .agenda-card-num {
  color: var(--c-accent);
}

.agenda-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.agenda-card-desc {
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

.agenda-card-tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
}

/* ---- Section Report ---- */
.report-section {
  margin-bottom: 56px;
}

.report-section:last-child {
  margin-bottom: 0;
}

.report-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--c-accent);
}

.report-header .label-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--c-accent-surface);
  color: var(--c-accent);
  border: 1px solid var(--c-accent-border);
  margin-bottom: 16px;
}

.report-header h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.5px;
  color: var(--c-text-primary);
}

.report-header p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.8;
  max-width: 720px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  margin-bottom: 24px;
  padding: 6px 0;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--c-accent);
}

/* ---- Content Typography ---- */
.prose {
  font-size: 15px;
  line-height: 1.85;
  color: var(--c-text-secondary);
}

.prose h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin: 48px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border-light);
}

.prose h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin: 36px 0 14px;
}

.prose h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin: 28px 0 10px;
}

.prose p {
  margin-bottom: 16px;
}

.prose strong {
  color: var(--c-text-primary);
  font-weight: 600;
}

.prose ul, .prose ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.prose li {
  margin-bottom: 6px;
}

.prose blockquote {
  border-left: 3px solid var(--c-accent);
  padding: 16px 20px;
  background: var(--c-accent-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
  font-size: 14px;
}

.prose blockquote p {
  margin-bottom: 0;
}

/* ---- Data Table ---- */
.data-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--c-surface-alt);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-primary);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border-light);
  color: var(--c-text-secondary);
  vertical-align: top;
  line-height: 1.6;
}

/* 반응형 테이블: 작은 화면에서 칸 짤림 방지 */
@media (max-width: 768px) {
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 12px;
  }
  .data-table th {
    white-space: normal;
    min-width: 50px;
  }
  .data-table td {
    min-width: 60px;
    word-break: keep-all;
  }
  .data-table-wrap {
    -webkit-overflow-scrolling: touch;
  }

}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--c-surface-alt);
}

/* ---- Stat Cards ---- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

/* 스탯 카드 반응형 */
@media (max-width: 640px) {
  .stat-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card {
    padding: 14px;
  }
  .stat-card-value {
    font-size: 22px;
  }
}

.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.stat-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--c-text-primary);
  letter-spacing: -1px;
  line-height: 1.2;
}

.stat-card-value small {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: 0;
}

.stat-card-note {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 4px;
}

/* ---- Chart Container ---- */
.chart-wrap {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 28px 0;
}

.chart-wrap-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin-bottom: 4px;
}

.chart-wrap-sub {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-bottom: 20px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 320px;
}

/* ---- Insight Box ---- */
.insight-box {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-text-secondary);
}

.insight-box strong {
  color: var(--c-text-primary);
}

.insight-box.insight-warn {
  border-left: 3px solid var(--c-warning);
  background: #fffbeb;
}

.insight-box.insight-danger {
  border-left: 3px solid var(--c-danger);
  background: #fef2f2;
}

.insight-box.insight-info {
  border-left: 3px solid var(--c-info);
  background: #ecfeff;
}

.insight-box.insight-success {
  border-left: 3px solid var(--c-success);
  background: #ecfdf5;
}

/* ---- Map ---- */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
  margin: 28px 0;
}

.map-container {
  width: 100%;
  height: 440px;
  background: var(--c-surface-alt);
}

.map-legend {
  display: flex;
  gap: 20px;
  padding: 14px 20px;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border-light);
  font-size: 12px;
  color: var(--c-text-secondary);
  flex-wrap: wrap;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Accordion ---- */
.accordion {
  margin: 28px 0;
}

.accordion-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text-primary);
  font-family: var(--font-sans);
  transition: background var(--transition);
}

.accordion-trigger:hover {
  background: var(--c-surface-alt);
}

.accordion-trigger-icon {
  margin-left: auto;
  font-size: 18px;
  color: var(--c-text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.accordion-item.open .accordion-trigger-icon {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-item.open .accordion-body {
  max-height: 3000px;
}

.accordion-body-inner {
  padding: 0 22px 22px;
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.8;
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 28px;
  margin: 24px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--c-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-accent);
  border: 2px solid var(--c-surface);
  box-shadow: 0 0 0 2px var(--c-accent-border);
}

.timeline-item-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.timeline-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-primary);
  margin-bottom: 4px;
}

.timeline-item-desc {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.6;
}

/* ---- Pill Tags (국민의힘 VI 보조색) ---- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
}

.pill-blue { background: #e0f2fe; color: #004C7E; }
.pill-red { background: #fef2f2; color: #E61E2B; }
.pill-green { background: #d1fae5; color: #065f46; }
.pill-amber { background: #fef3c7; color: #92400e; }
.pill-gray { background: #f1f5f9; color: #112C56; }

/* ---- Footer (국민의힘 VI) ---- */
.main-footer {
  padding: 32px 48px;
  border-top: 3px solid var(--c-accent);
  font-size: 12px;
  color: var(--c-text-muted);
  text-align: center;
  line-height: 1.6;
  background: var(--c-surface);
}

/* ---- Party Badge ---- */
.party-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--c-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.party-badge-cyan {
  background: var(--c-secondary);
}

/* ---- R1: Timeline Roadmap ---- */
.timeline-roadmap {
  position: relative;
  padding-left: 36px;
  margin: 28px 0;
}
.timeline-roadmap::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--c-accent), var(--c-secondary));
  border-radius: 2px;
}
.timeline-year-block {
  position: relative;
  margin-bottom: 32px;
}
.timeline-year-block:last-child {
  margin-bottom: 0;
}
.timeline-year-label {
  position: absolute;
  left: -36px;
  width: 28px;
  height: 28px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 0 0 4px var(--c-bg), 0 0 0 5px var(--c-accent);
  z-index: 1;
}
.timeline-year-items {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-border-light);
  font-size: 14px;
  line-height: 1.5;
}
.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.timeline-item:first-child {
  padding-top: 0;
}
.timeline-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}
.timeline-text {
  color: var(--c-text-primary);
  font-weight: 500;
}

/* ---- R2: Network Canvas ---- */
.network-canvas-wrap {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  display: flex;
  justify-content: center;
}
.network-canvas-wrap canvas {
  max-width: 100%;
  height: auto;
}

/* ---- R3: Matrix Canvas ---- */
.matrix-canvas-wrap {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  display: flex;
  justify-content: center;
}
.matrix-canvas-wrap canvas {
  max-width: 100%;
  height: auto;
}

/* ---- R4: Glossary ---- */
.glossary-list {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}
.glossary-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.glossary-item:hover {
  border-color: var(--c-accent-border);
  box-shadow: var(--shadow-md);
}
.glossary-term {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin-bottom: 4px;
}
.glossary-en {
  font-size: 12px;
  color: var(--c-text-muted);
  font-weight: 500;
  margin-bottom: 10px;
  font-style: italic;
}
.glossary-desc {
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}
.glossary-related {
  font-size: 12px;
  color: var(--c-accent);
  font-weight: 600;
  padding-top: 8px;
  border-top: 1px solid var(--c-border-light);
}

/* ---- E1: Pledge Tracker ---- */
.pledge-summary {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.pledge-summary-gauge { text-align: center; flex-shrink: 0; }
.pledge-gauge-circle {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: conic-gradient(var(--c-accent) calc(var(--pct) * 1%), var(--c-border-light) 0);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.pledge-gauge-circle::before {
  content: '';
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--c-surface);
  position: absolute;
}
.pledge-gauge-circle span {
  position: relative; z-index: 1;
  font-size: 22px; font-weight: 800; color: var(--c-accent);
}
.pledge-gauge-label { font-size: 12px; color: var(--c-text-muted); margin-top: 6px; font-weight: 600; }
.pledge-summary-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.pledge-stat { text-align: center; }
.pledge-stat-num { font-size: 28px; font-weight: 800; color: var(--c-text-primary); }
.pledge-stat-label { font-size: 11px; color: var(--c-text-muted); font-weight: 600; }

.pledge-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 16px 0;
}
.pledge-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  cursor: pointer;
  font-size: 12px; font-weight: 600;
  color: var(--c-text-secondary);
  transition: all var(--transition);
}
.pledge-filter-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.pledge-filter-btn.active {
  background: var(--fc, var(--c-accent));
  color: #fff; border-color: transparent;
}

.pledge-list { display: grid; gap: 16px; margin: 16px 0; }
.pledge-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.pledge-card:hover { box-shadow: var(--shadow-md); }
.pledge-card-header { display: flex; gap: 8px; margin-bottom: 10px; }
.pledge-cat-badge, .pledge-status-badge {
  padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 700; color: #fff;
}
.pledge-card-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--c-text-primary); }
.pledge-card-detail { font-size: 13px; color: var(--c-text-secondary); line-height: 1.6; margin-bottom: 12px; }
.pledge-progress {
  height: 8px; background: var(--c-border-light); border-radius: 4px;
  position: relative; overflow: hidden; margin-bottom: 8px;
}
.pledge-progress-bar {
  height: 100%; border-radius: 4px;
  transition: width 0.6s ease;
}
.pledge-progress-text {
  position: absolute; right: 0; top: -18px;
  font-size: 11px; font-weight: 700; color: var(--c-text-muted);
}
.pledge-card-footer { font-size: 11px; color: var(--c-text-muted); font-weight: 500; }

/* ---- E2: Countdown ---- */
.countdown-hero {
  background: linear-gradient(135deg, #112C56 0%, #004C7E 50%, #112C56 100%);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  margin: 24px 0;
  color: #fff;
}
.countdown-label { font-size: 14px; font-weight: 600; letter-spacing: 2px; opacity: 0.8; margin-bottom: 12px; }
.countdown-timer { display: flex; justify-content: center; gap: 8px; margin: 16px 0; }
.countdown-unit {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  min-width: 72px;
}
.countdown-unit span { display: block; font-size: 42px; font-weight: 900; letter-spacing: -2px; line-height: 1; }
.countdown-unit small { font-size: 11px; opacity: 0.7; font-weight: 600; }
.countdown-sep { font-size: 36px; font-weight: 300; opacity: 0.4; line-height: 72px; }
.countdown-date { font-size: 14px; opacity: 0.7; margin-top: 8px; }

.countdown-timeline { margin: 24px 0; }
.countdown-timeline h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--c-text-primary); }
.countdown-events { display: flex; flex-direction: column; gap: 0; }
.countdown-event {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  border-left: 3px solid var(--c-border);
  transition: all var(--transition);
}
.countdown-event.past { opacity: 0.5; border-left-color: var(--c-border); }
.countdown-event.today { border-left-color: var(--c-accent); background: var(--c-accent-surface); border-radius: var(--radius-sm); font-weight: 600; }
.countdown-event.future { border-left-color: var(--c-secondary); }
.countdown-event-icon { font-size: 20px; flex-shrink: 0; }
.countdown-event-body { flex: 1; }
.countdown-event-date { font-size: 13px; color: var(--c-text-muted); font-weight: 600; }
.countdown-d-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  background: var(--c-accent); color: #fff; font-size: 10px; font-weight: 700; margin-left: 6px;
}
.countdown-event.future .countdown-d-badge { background: var(--c-secondary); }
.countdown-event.past .countdown-d-badge { background: var(--c-text-muted); }
.countdown-event-label { font-size: 14px; color: var(--c-text-primary); }

/* ---- R5: Issue Map ---- */
.issuemap-controls {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 20px 0 8px;
  box-shadow: var(--shadow-sm);
}
.issuemap-filter-group { margin-bottom: 12px; }
.issuemap-filter-group:last-child { margin-bottom: 0; }
.issuemap-filter-group label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--c-text-muted); margin-bottom: 6px; letter-spacing: 0.5px;
}
.issuemap-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.issuemap-toggle {
  padding: 5px 12px; border-radius: 16px;
  border: 1px solid var(--c-border); background: var(--c-surface);
  cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--c-text-secondary); transition: all var(--transition);
}
.issuemap-toggle:hover { border-color: var(--c-accent); color: var(--c-accent); }
.issuemap-toggle.active {
  background: var(--tc, var(--c-accent));
  color: #fff; border-color: transparent;
}
.issuemap-legend {
  background: var(--c-surface-alt);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 8px 0 20px;
}
.issuemap-legend h3 { font-size: 12px; font-weight: 700; margin-bottom: 8px; color: var(--c-text-muted); }
.issuemap-legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--c-text-secondary); margin-bottom: 4px; }
.issuemap-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.issuemap-legend-circle { width: 16px; height: 16px; border-radius: 50%; border: 2px dashed #94a3b8; flex-shrink: 0; }
.issuemap-legend-line { width: 20px; height: 0; border-top: 2px dashed #94a3b8; flex-shrink: 0; }

/* Leaflet custom labels */
.dong-label { background: transparent !important; border: none !important; box-shadow: none !important; font-size: 13px !important; font-weight: 700 !important; color: var(--c-text-muted) !important; }
.issue-num-label { background: transparent !important; border: none !important; box-shadow: none !important; font-size: 10px !important; font-weight: 800 !important; color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.4) !important; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .mobile-toggle {
    display: flex;
  }
  .mobile-overlay.active {
    display: block;
  }
  .main {
    margin-left: 0;
    max-width: 100vw;
  }
  .main-header {
    padding: 0 64px 0 20px;
  }
  .main-body {
    padding: 28px 20px 64px;
  }
  .main-footer {
    padding: 24px 20px;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  }
}

@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .agenda-card {
    padding: 20px;
  }
  .agenda-card-num {
    font-size: 36px;
  }
  .agenda-card-title {
    font-size: 15px;
  }
  .agenda-card-desc {
    font-size: 12px;
  }
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .landing-hero h1 {
    font-size: 24px;
  }
  .report-header h1 {
    font-size: 22px;
  }
  .chart-container {
    height: 260px;
  }
}

/* ---- Leaflet overrides ---- */
.leaflet-top, .leaflet-bottom {
  z-index: 40 !important;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: var(--font-sans);
}

.leaflet-popup-content {
  margin: 14px 16px !important;
  font-size: 13px;
  line-height: 1.6;
}

/* ---- Factcheck ---- */
.factcheck-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 12px;
}

.factcheck-item-verdict {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.verdict-true { background: #d1fae5; color: #065f46; }
.verdict-corrected { background: #fef3c7; color: #92400e; }

.factcheck-item-claim {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-primary);
  margin-bottom: 6px;
}

.factcheck-item-detail {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.7;
}

/* Policy issue card */
.issue-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 20px 0;
  border-left: 4px solid #E61E2B;
}

.issue-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin-bottom: 10px;
}

.issue-card p {
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.7;
}

/* DRT comparison table */
.drt-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.drt-card-city {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin-bottom: 4px;
}

.drt-card-stat {
  font-size: 24px;
  font-weight: 800;
  color: #E61E2B;
  letter-spacing: -1px;
}

.drt-card-unit {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* Station line */
.station-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 24px 0;
}

.station-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-border-light);
}

.station-item:last-child {
  border-bottom: none;
}

.station-num {
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E61E2B;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  padding: 0 4px;
}

.station-info-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin-bottom: 2px;
}

.station-info-facility {
  font-size: 12px;
  color: var(--c-accent-light);
  font-weight: 500;
  margin-bottom: 4px;
}

.station-info-desc {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.6;
}

/* ---- Factcheck Inline Box (in-context verification) ---- */
.factcheck-inline {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
  padding: 0;
  margin: 32px 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(5,150,105,0.06);
}

.factcheck-inline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #004C7E 0%, #112C56 100%);
  color: #fff;
}

.factcheck-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.factcheck-inline-badge::before {
  content: '\2713';
  font-weight: 900;
}

.factcheck-inline-title {
  font-size: 14px;
  font-weight: 600;
}

.factcheck-inline-body {
  padding: 20px 24px;
}

.factcheck-inline-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #d1fae5;
  align-items: flex-start;
}

.factcheck-inline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.factcheck-inline-item:first-child {
  padding-top: 0;
}

.factcheck-inline-verdict {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.factcheck-inline-content {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.7;
  flex: 1;
}

.factcheck-inline-content strong {
  color: var(--c-text-primary);
  font-weight: 600;
}

.factcheck-inline-source {
  margin-top: 6px;
  font-size: 11px;
  color: var(--c-text-muted);
  font-style: italic;
  padding-left: 10px;
  border-left: 2px solid #bbf7d0;
}

@media (max-width: 768px) {
  .factcheck-inline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 18px;
  }
  .factcheck-inline-body {
    padding: 16px 18px;
  }
  .factcheck-inline-item {
    flex-direction: column;
    gap: 6px;
  }
  .factcheck-inline-verdict {
    align-self: flex-start;
  }
}

/* ---- Additional Tag Colors (국민의힘 VI 보조색 기반) ---- */
.tag-welfare { background: #fef2f2; color: #E61E2B; }
.tag-safety { background: #fef2f2; color: #c91723; }
.tag-housing { background: #fef3c7; color: #92400e; }
.tag-digital { background: #e0f2fe; color: #004C7E; }
.tag-biz { background: #d1fae5; color: #065f46; }
.tag-culture { background: #f0f9ff; color: #00B5E2; }
.tag-comm { background: #ccfbf1; color: #0f766e; }
.tag-health { background: #fce7f3; color: #be185d; }
.tag-park { background: #dcfce7; color: #166534; }
.tag-industry { background: #e0f2fe; color: #112C56; }

/* ---- View Toggle Bar ---- */
.view-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--c-accent);
}
.view-toggle-bar .label-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--c-accent-surface);
  color: var(--c-accent);
  border: 1px solid var(--c-accent-border);
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--c-surface-alt);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--c-border);
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.view-toggle-btn:hover {
  color: var(--c-text-secondary);
  background: var(--c-surface);
}

.view-toggle-btn.active {
  background: var(--c-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.view-toggle-btn.active:first-child {
  background: var(--c-accent);
}

.view-toggle-btn.active:last-child {
  background: var(--c-navy);
}

.view-toggle-btn small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
}

.view-toggle-icon {
  font-size: 14px;
}

/* ---- Overview Card (카드뉴스 포맷) ---- */
.overview-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  margin: 24px 0;
  position: relative;
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #E61E2B 0%, #f14350 100%);
}

.overview-card-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text-primary);
  margin-bottom: 20px;
  line-height: 1.4;
}

.overview-card-bignum {
  font-size: 56px;
  font-weight: 900;
  color: #E61E2B;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 8px;
}

.overview-card-bignum small {
  font-size: 18px;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: 0;
  margin-left: 4px;
}

.overview-card-summary {
  font-size: 15px;
  line-height: 1.85;
  color: var(--c-text-secondary);
  margin: 20px 0;
  max-width: 720px;
}

.overview-card-quote {
  background: var(--c-accent-surface);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 24px 0;
}

.overview-card-quote-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-accent);
  margin-bottom: 6px;
}

.overview-card-quote-text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text-primary);
  line-height: 1.7;
  font-style: italic;
}

.overview-card-cta {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-accent);
  margin: 20px 0 16px;
  padding: 12px 20px;
  background: var(--c-accent-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-accent-border);
  display: inline-block;
}

.overview-card-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hashtag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--c-surface-alt);
  color: var(--c-accent-light);
  border: 1px solid var(--c-border);
  transition: all var(--transition);
}

.hashtag:hover {
  background: var(--c-accent-surface);
  border-color: var(--c-accent-border);
}

/* ---- Action Plan ---- */
.action-plan {
  margin: 20px 0 32px;
}

.action-plan-phase {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-border-light);
  align-items: flex-start;
}

.action-plan-phase:last-child {
  border-bottom: none;
}

.action-plan-phase-label {
  flex-shrink: 0;
  width: 100px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-accent);
  background: var(--c-accent-surface);
  padding: 4px 10px;
  border-radius: 4px;
  text-align: center;
  border: 1px solid var(--c-accent-border);
}

.action-plan-phase-content {
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.7;
}

/* ---- Big Picture / Story Flow (국민의힘 VI 적용 — 톤다운) ---- */
.landing-bigpicture {
  background: linear-gradient(135deg, #1e3a5f 0%, #2a4a6b 40%, #1a5276 70%, #1b6b7a 100%);
  border-radius: var(--radius-xl);
  padding: 36px;
  margin: 32px 0 40px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(30,58,95,0.16), 0 2px 8px rgba(30,58,95,0.08);
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

/* 국민의힘 VI 대각선 컷 모티프 (톤다운) */
.landing-bigpicture::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: rgba(230,30,43,0.10);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
  pointer-events: none;
}

.landing-bigpicture h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
}

.bigpicture-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.bigpicture-step {
  flex: 1;
  min-width: 160px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
}

.bigpicture-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E61E2B;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  margin: 0 auto 10px;
}

.bigpicture-step-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.bigpicture-step-items {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

.bigpicture-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .view-toggle-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .overview-card {
    padding: 28px 16px;
  }
  .overview-card-title {
    font-size: 20px;
  }
  .overview-card-bignum {
    font-size: 40px;
  }
  .overview-card-summary {
    font-size: 14px;
  }
  .overview-card-quote {
    padding: 12px 14px;
  }
  .overview-card-cta {
    font-size: 14px;
    padding: 10px 14px;
  }
  .overview-card-hashtags {
    gap: 6px;
  }
  .hashtag {
    font-size: 11px;
    padding: 3px 8px;
  }
  .action-plan-phase {
    flex-direction: column;
    gap: 8px;
  }
  .action-plan-phase-label {
    width: auto;
    display: inline-flex;
  }
  .bigpicture-flow {
    flex-direction: column;
  }
  .bigpicture-arrow {
    transform: rotate(90deg);
  }
  .bigpicture-step {
    min-width: auto;
    width: 100%;
  }
  .landing-bigpicture {
    padding: 24px 18px;
  }
  .landing-bigpicture h2 {
    font-size: 18px;
    line-height: 1.5;
    font-weight: 800;
  }
  /* 팩트체크 반응형 */
  .factcheck-inline-body {
    padding: 14px 16px;
  }
  .factcheck-item {
    padding: 14px 16px;
  }
  .factcheck-item-claim {
    font-size: 13px;
  }
  .factcheck-item-detail {
    font-size: 12px;
  }
  /* R1 Timeline 반응형 */
  .timeline-roadmap {
    padding-left: 40px;
  }
  .timeline-roadmap::before {
    left: 16px;
  }
  .timeline-year-label {
    left: -40px;
    width: 32px;
    height: 32px;
    font-size: 11px;
    box-shadow: 0 0 0 3px var(--c-bg), 0 0 0 4px var(--c-accent);
  }
  .timeline-year-items {
    padding: 12px 14px;
    margin-left: 4px;
  }
  .timeline-item {
    font-size: 13px;
    gap: 8px;
  }
  .timeline-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
  /* R2/R3 Canvas 반응형 */
  .network-canvas-wrap,
  .matrix-canvas-wrap {
    padding: 12px;
  }
  .network-canvas-wrap canvas,
  .matrix-canvas-wrap canvas {
    max-width: 100%;
  }
  /* R4 Glossary 반응형 */
  .glossary-item {
    padding: 16px 14px;
  }
  .glossary-term {
    font-size: 14px;
  }
  .glossary-desc {
    font-size: 13px;
  }
  /* E1 Pledge 반응형 */
  .pledge-summary {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }
  .pledge-summary-stats {
    gap: 16px;
  }
  .pledge-card {
    padding: 16px;
  }
  .pledge-card-title {
    font-size: 14px;
  }
  /* E2 Countdown 반응형 */
  .countdown-hero {
    padding: 32px 16px;
  }
  .countdown-unit {
    min-width: 56px;
    padding: 12px 8px;
  }
  .countdown-unit span {
    font-size: 28px;
  }
  .countdown-sep {
    font-size: 24px;
    line-height: 56px;
  }
  /* R5 Map 반응형 */
  .issuemap-controls {
    padding: 14px 16px;
  }
  .issuemap-toggle {
    font-size: 11px;
    padding: 4px 10px;
  }
  #issueMapContainer {
    height: 400px !important;
  }
  /* Dashboard tabs 반응형 */
  .dash-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }
  .dash-tab {
    font-size: 13px;
    padding: 8px 14px;
  }
  /* Inline glossary 반응형 */
  .glossary-inline {
    padding: 0;
  }
  .glossary-inline-body {
    padding: 12px 14px;
  }
  .glossary-inline-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  /* 랜딩 위젯 모바일 1열 + 내부 최적화 */
  .landing-widgets {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .landing-countdown-widget,
  .landing-pledge-widget {
    padding: 20px 16px !important;
  }
  .landing-countdown-widget .landing-cd-timer {
    flex-wrap: wrap;
  }
  .landing-countdown-widget .landing-cd-timer > div {
    min-width: 44px !important;
    padding: 6px 8px !important;
  }
  .landing-countdown-widget .landing-cd-timer > div > span {
    font-size: 20px !important;
  }
  /* 푸터: 모바일 크기 조정 */
  .main-footer {
    padding: 20px 16px !important;
  }
  .main-footer img {
    height: 36px !important;
    margin-bottom: 8px !important;
  }
  .main-footer-text {
    font-size: 10px;
  }
  /* 캔버스 반응형 */
  .matrix-canvas-wrap,
  .network-canvas-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .matrix-canvas-wrap canvas,
  .network-canvas-wrap canvas {
    max-width: 100%;
    height: auto !important;
  }
}

/* ========================================
   Inline Glossary (R4 통합)
   ======================================== */
.glossary-inline {
  margin: 24px 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  overflow: hidden;
  background: var(--c-surface);
}
.glossary-inline-header {
  padding: 10px 20px;
  background: linear-gradient(135deg, #1e293b, #334155);
  border-bottom: 1px solid var(--c-border);
}
.glossary-inline-badge {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}
.glossary-inline-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.glossary-inline-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  background: var(--c-bg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--c-accent);
}
.glossary-inline-term {
  font-weight: 700;
  font-size: 13px;
  color: var(--c-accent);
  white-space: nowrap;
  min-width: 80px;
}
.glossary-inline-en {
  font-size: 11px;
  color: var(--c-text-muted);
  white-space: nowrap;
}
.glossary-inline-desc {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.6;
  flex: 1;
}

/* ========================================
   Dashboard Tabs (R3 통합 대시보드)
   ======================================== */
.dash-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0 0;
  border-bottom: 2px solid var(--c-border);
  padding-bottom: 0;
}
.dash-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  font-family: var(--font-sans);
}
.dash-tab:hover {
  color: var(--c-text-primary);
  background: rgba(0,0,0,0.02);
}
.dash-tab.active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}
.dash-panel {
  margin-top: 16px;
}

/* ============================================================
   체크리스트 — 후보자 등록 서류
   ============================================================ */
.checklist-wrap {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.checklist-header {
  text-align: center;
  margin-bottom: 24px;
}
.checklist-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.checklist-header p {
  color: var(--c-muted);
  font-size: 0.9rem;
}

/* Progress */
.checklist-progress {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.checklist-progress-bar {
  flex: 1;
  height: 10px;
  background: var(--c-border);
  border-radius: 5px;
  overflow: hidden;
}
.checklist-progress-fill {
  height: 100%;
  background: var(--c-accent);
  border-radius: 5px;
  transition: width 0.4s ease, background 0.4s ease;
}
.checklist-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--c-text);
}

/* Group */
.checklist-group {
  margin-bottom: 20px;
}
.checklist-group-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  padding: 10px 14px;
  background: var(--c-surface-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--c-accent);
}

/* Item */
.checklist-item {
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  background: var(--c-surface);
  transition: all 0.2s;
}
.checklist-item:hover {
  border-color: var(--c-accent);
  box-shadow: 0 2px 8px rgba(230,30,43,0.06);
}
.checklist-item.checked {
  background: #f0fdf4;
  border-color: #86efac;
}
.checklist-item-na {
  opacity: 0.55;
}
.checklist-item-na.checked {
  background: var(--c-surface-alt);
  border-color: var(--c-border);
}

/* Label */
.checklist-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
}
.checklist-cb {
  display: none;
}
.checklist-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--c-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-top: 1px;
}
.checklist-cb:checked + .checklist-check {
  background: #22c55e;
  border-color: #22c55e;
}
.checklist-cb:checked + .checklist-check::after {
  content: '\2713';
  color: white;
  font-size: 14px;
  font-weight: 700;
}
.checklist-cb:disabled + .checklist-check {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.checklist-num {
  font-weight: 700;
  color: var(--c-accent);
  min-width: 24px;
  flex-shrink: 0;
}
.checklist-text {
  flex: 1;
}

/* Badges */
.checklist-badge-required {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  background: var(--c-accent);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.checklist-badge-na {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Form icon */
.checklist-form-icon {
  cursor: pointer;
  margin-left: 6px;
  font-size: 1.1rem;
  vertical-align: middle;
  transition: transform 0.15s;
}
.checklist-form-icon:hover {
  transform: scale(1.25);
}

/* Note */
.checklist-note {
  margin: 4px 0 0 56px;
  font-size: 0.82rem;
  color: var(--c-muted);
  line-height: 1.4;
}

/* Timestamp */
.checklist-time {
  margin: 2px 0 0 56px;
  font-size: 0.75rem;
  color: #22c55e;
  font-family: 'Noto Sans KR', monospace;
}

/* Action buttons */
.checklist-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0 16px;
}
.checklist-btn {
  padding: 10px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
}
.checklist-btn-confirm {
  background: var(--c-accent);
  color: white;
}
.checklist-btn-confirm:hover {
  background: #c41824;
}
.checklist-btn-reset {
  background: var(--c-surface-alt);
  color: var(--c-muted);
  border: 1px solid var(--c-border);
}
.checklist-btn-reset:hover {
  background: #fee2e2;
  color: var(--c-accent);
}

/* Form preview popup — floats next to icon */
.checklist-form-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  z-index: 9000;
  display: none;
  align-items: flex-start;
  /* Invisible padding around preview so mouse bridge works */
  padding: 8px;
}
.checklist-form-preview-inner {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  overflow-y: auto;
  max-height: 80vh;
  width: 100%;
}
.checklist-form-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--c-accent);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 8px;
}
.checklist-form-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checklist-form-close-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
  line-height: 1;
}
.checklist-form-close-btn:hover {
  background: rgba(255,255,255,0.35);
}
.checklist-form-preview-inner img {
  width: 100%;
  height: auto;
  display: block;
}
.checklist-form-preview-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px;
  background: var(--c-surface-alt);
  font-size: 0.85rem;
  font-weight: 600;
}
.checklist-form-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  background: var(--c-surface);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.checklist-form-nav-btn:hover {
  background: var(--c-accent);
  color: white;
  border-color: var(--c-accent);
}

/* Mobile: full modal overlay */
@media (max-width: 768px) {
  .checklist-form-preview,
  .checklist-form-preview.mobile-modal {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    transform: none;
    z-index: 9999;
  }
  .checklist-form-preview[style*="display: flex"] {
    display: flex !important;
  }
  .checklist-form-preview-inner {
    width: min(92vw, 400px);
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
    margin: auto;
  }
  .checklist-form-preview-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  .checklist-form-close-btn {
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
  }
  .checklist-form-preview-nav {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 10px;
  }
  .checklist-form-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .checklist-note {
    margin-left: 36px;
  }
  .checklist-time {
    margin-left: 36px;
  }
}
