/* ==========================================================================
   臺南市智慧城市推動成果 (2024-2026) - 核心樣式表
   設計風格：現代政府數位治理專業儀表板 (Snow Edition / Carbon Edition)
   遵循：零 AI 贅詞、純實用高密度資訊 (Signal-over-Noise)、無紫色光暈
   ========================================================================== */

:root {
  /* Snow Edition (Light Theme) - 60-30-10 Civic Palette */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-elevated: #ffffff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --civic-primary: #1d4ed8;
  --civic-primary-hover: #1e40af;
  --civic-primary-light: rgba(29, 78, 216, 0.08);
  --civic-primary-border: rgba(29, 78, 216, 0.2);
  
  --tainan-crimson: #b91c1c;
  --tainan-crimson-light: rgba(185, 28, 28, 0.08);
  
  --color-success: #059669;
  --color-success-light: rgba(5, 150, 105, 0.1);
  --color-warning: #d97706;
  --color-warning-light: rgba(217, 119, 6, 0.1);
  --color-danger: #dc2626;
  --color-danger-light: rgba(220, 38, 38, 0.1);
  --color-info: #0284c7;
  --color-info-light: rgba(2, 132, 199, 0.1);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  
  --ease-silk: cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 72px;
}

/* Carbon Edition (Dark Theme) */
html.carbon {
  --bg-app: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #1a2234;
  --bg-elevated: #1e293b;
  --border-subtle: #273549;
  --border-strong: #334155;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --civic-primary: #38bdf8;
  --civic-primary-hover: #7dd3fc;
  --civic-primary-light: rgba(56, 189, 248, 0.12);
  --civic-primary-border: rgba(56, 189, 248, 0.3);
  
  --tainan-crimson: #ef4444;
  --tainan-crimson-light: rgba(239, 68, 68, 0.12);
  
  --color-success: #10b981;
  --color-success-light: rgba(16, 185, 129, 0.15);
  --color-warning: #f59e0b;
  --color-warning-light: rgba(245, 158, 11, 0.15);
  --color-danger: #f87171;
  --color-danger-light: rgba(248, 113, 113, 0.15);
  --color-info: #38bdf8;
  --color-info-light: rgba(56, 189, 248, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  background-color: var(--bg-app);
}

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s var(--ease-silk), color 0.25s var(--ease-silk);
}

/* Anti-FOUC */
[v-cloak], .fouc-guard {
  display: none !important;
}

a {
  color: var(--civic-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

code, pre {
  font-family: 'JetBrains Mono', monospace;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Navigation (Sticky with safe offset)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--civic-primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.125rem;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  background: var(--tainan-crimson-light);
  color: var(--tainan-crimson);
  border-radius: var(--radius-pill);
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.nav-link-btn:hover,
.nav-link-btn.active {
  color: var(--civic-primary);
  background: var(--civic-primary-light);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.theme-icon-carbon { display: none; }
html.carbon .theme-icon-snow { display: none; }
html.carbon .theme-icon-carbon { display: block; }

.mobile-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Hero & Executive Summary Section
   ========================================================================== */

.hero-section {
  padding: 3rem 0 2rem;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-app) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.meta-pill.verified {
  background: var(--color-success-light);
  color: var(--color-success);
  border-color: rgba(5, 150, 105, 0.2);
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
}

.hero-title .highlight {
  color: var(--civic-primary);
}

.hero-description {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 860px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* KPI Highlights Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-silk), box-shadow 0.2s var(--ease-silk);
}

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

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}

.kpi-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon {
  font-size: 1.25rem;
}

.kpi-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.375rem;
}

.kpi-subtext {
  font-size: 0.78125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   Honors & Awards Carousel / Grid
   ========================================================================== */

.section-block {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-group {
  max-width: 720px;
}

.section-eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--civic-primary);
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.section-heading {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-subheading {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.award-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s var(--ease-silk);
}

.award-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-warning);
}

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

.award-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.award-year {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-warning-light);
  color: var(--color-warning);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.award-agency {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.award-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.award-project {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Filter & Search Control Panel (The Interactive Core)
   ========================================================================== */

.filter-panel {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.filter-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 520px;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 2.5rem 0 2.5rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--civic-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--civic-primary-light);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 4px;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-btn-group {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.view-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.view-mode-btn.active {
  background: var(--bg-surface);
  color: var(--civic-primary);
  box-shadow: var(--shadow-sm);
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 38px;
  padding: 0 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.export-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Category Tabs */
.category-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.category-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.category-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.category-tab-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.category-tab-btn.active {
  background: var(--civic-primary);
  color: #ffffff;
  border-color: var(--civic-primary);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.category-tab-btn .tab-count {
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.08);
}

.category-tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Filter Chips (Secondary) */
.filter-chips-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.chip-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--civic-primary-light);
  border-color: var(--civic-primary-border);
  color: var(--civic-primary);
}

.year-select {
  height: 30px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Results Status Bar */
.results-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.results-count-strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ==========================================================================
   View 1: Card Grid View
   ========================================================================== */

.initiative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.initiative-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.375rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-silk), box-shadow 0.2s var(--ease-silk), border-color 0.2s ease;
  position: relative;
  cursor: pointer;
}

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

.initiative-card.is-award {
  border-top: 3px solid var(--color-warning);
}

.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.card-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.card-date-badge {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-muted);
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.625rem;
}

.card-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.tag-pill.rdec {
  background: var(--civic-primary-light);
  color: var(--civic-primary);
  border-color: var(--civic-primary-border);
}

.tag-pill.award {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.tag-pill.danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78125rem;
}

.card-source-type {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.card-detail-action {
  color: var(--civic-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ==========================================================================
   View 2: Timeline View
   ========================================================================== */

.timeline-view-wrapper {
  position: relative;
  max-width: 900px;
  margin: 1.5rem auto 3rem;
  padding-left: 2.5rem;
}

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

.timeline-node {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--civic-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg-app);
}

.timeline-content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-content-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* ==========================================================================
   View 3: Domain Deep-Dive View
   ========================================================================== */

.domain-dive-section {
  margin-bottom: 3rem;
}

.domain-block-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.domain-block-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.domain-info-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.domain-icon-large {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.domain-name-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.domain-summary-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.domain-items-list {
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  divide-y: 1px solid var(--border-subtle);
}

.domain-item-row {
  padding: 1rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.domain-item-row:hover {
  background-color: var(--bg-subtle);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   View 4: Table View
   ========================================================================== */

.table-view-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

.data-table tr:hover td {
  background: var(--bg-subtle);
  cursor: pointer;
}

/* ==========================================================================
   Governance Transparency Hub Section
   ========================================================================== */

.governance-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 3.5rem 0;
}

.governance-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.gov-panel {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.gov-panel-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gov-panel-content {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.gov-timeline-list {
  list-style: none;
  margin-top: 0.75rem;
}

.gov-timeline-item {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.gov-timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--civic-primary);
}

.gov-timeline-item.warning::before {
  background: var(--color-danger);
}

/* ==========================================================================
   Detail Modal Drawer (Drawer + Backdrop)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s var(--ease-silk);
}

.modal-backdrop.active .modal-sheet {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-detail-row {
  margin-bottom: 1.25rem;
}

.modal-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.modal-description-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.75;
  margin: 1rem 0;
}

.modal-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--civic-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.modal-source-btn:hover {
  background: var(--civic-primary-hover);
  text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  margin: 2rem 0;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .governance-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: inline-flex;
  }
  
  .initiative-grid,
  .awards-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-row-top {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box-wrapper {
    max-width: 100%;
  }
  
  .view-controls {
    justify-content: space-between;
  }
  
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
