/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background: #F0F4FF;
  color: #1A1A2E;
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, #0F2B6B 0%, #1B4FCC 60%, #2563EB 100%);
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(15, 43, 107, 0.4);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.logo-text { color: #fff; }
.logo-text h1 { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.logo-text span { font-size: 11px; opacity: 0.75; font-weight: 400; }

.header-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  border-radius: 24px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: background 0.2s;
  backdrop-filter: blur(10px);
}
.header-search input::placeholder { color: rgba(255,255,255,0.6); }
.header-search input:focus { background: rgba(255,255,255,0.22); }
.search-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 16px; opacity: 0.7; pointer-events: none;
}

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn-consult {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
}
.btn-consult:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); }

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, #0F2B6B 0%, #1B4FCC 100%);
  color: #fff;
  padding: 40px 24px 32px;
  text-align: center;
}
.hero h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.hero p { font-size: 14px; opacity: 0.8; margin-bottom: 24px; }
.stats-row {
  display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num { font-size: 28px; font-weight: 900; color: #60A5FA; line-height: 1; }
.stat-label { font-size: 12px; opacity: 0.7; margin-top: 2px; }

/* ===== LAYOUT ===== */
.main-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(27, 79, 204, 0.07);
  position: sticky;
  top: 88px;
}
.sidebar-title {
  font-size: 13px; font-weight: 700; color: #6B7280;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid #E5E7EB;
}
.filter-section { margin-bottom: 20px; }
.filter-section h4 {
  font-size: 13px; font-weight: 700; color: #374151;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 11px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid #E5E7EB;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
  color: #6B7280;
}
.chip:hover { border-color: #1B4FCC; color: #1B4FCC; }
.chip.active { background: #1B4FCC; color: #fff; border-color: #1B4FCC; }

.filter-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: #1B4FCC; }

.age-range { display: flex; align-items: center; gap: 8px; }
.age-input {
  width: 70px;
  padding: 8px 10px;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  color: #374151;
  outline: none;
}
.age-input:focus { border-color: #1B4FCC; }
.age-sep { color: #9CA3AF; font-size: 13px; }

.btn-reset {
  width: 100%;
  padding: 10px;
  background: #F3F4F6;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}
.btn-reset:hover { background: #E5E7EB; color: #374151; }

/* ===== CONTENT AREA ===== */
.content-area {}
.content-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.result-count { font-size: 14px; color: #6B7280; }
.result-count strong { color: #1B4FCC; font-weight: 700; }
.sort-select {
  padding: 7px 12px;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: #1B4FCC; }

/* ===== STATUS TABS ===== */
.status-tabs {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.status-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
  color: #6B7280;
  border-color: #E5E7EB;
}
.status-tab:hover { border-color: #1B4FCC; color: #1B4FCC; }
.status-tab.active { background: #1B4FCC; color: #fff; border-color: #1B4FCC; }
.status-tab .tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  margin-left: 4px;
}
.status-tab:not(.active) .tab-count { background: #F3F4F6; color: #6B7280; }

/* ===== POLICY CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.policy-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(27, 79, 204, 0.06);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}
.policy-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
}
.policy-card.cat-청년지원::before { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.policy-card.cat-창업지원::before { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
.policy-card.cat-소상공인::before { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
.policy-card.cat-중소기업::before { background: linear-gradient(90deg, #10B981, #34D399); }
.policy-card.cat-여성지원::before { background: linear-gradient(90deg, #EC4899, #F472B6); }
.policy-card.cat-농업\/귀농::before { background: linear-gradient(90deg, #6B7280, #9CA3AF); }
.policy-card.cat-취업지원::before { background: linear-gradient(90deg, #14B8A6, #2DD4BF); }
.policy-card.cat-지역특화::before { background: linear-gradient(90deg, #F97316, #FB923C); }

.policy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(27, 79, 204, 0.15);
  border-color: #BFDBFE;
}

.card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 10px;
}
.category-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  flex-shrink: 0;
}
.badge-청년지원 { background: #EFF6FF; color: #1D4ED8; }
.badge-창업지원 { background: #F5F3FF; color: #6D28D9; }
.badge-소상공인 { background: #FFFBEB; color: #B45309; }
.badge-중소기업 { background: #ECFDF5; color: #065F46; }
.badge-여성지원 { background: #FDF2F8; color: #9D174D; }
.badge-농업\/귀농 { background: #F3F4F6; color: #374151; }
.badge-취업지원 { background: #F0FDFA; color: #134E4A; }
.badge-지역특화 { background: #FFF7ED; color: #C2410C; }

.status-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  margin-left: 6px;
}
.status-모집중 { background: #ECFDF5; color: #065F46; }
.status-상시 { background: #EFF6FF; color: #1E40AF; }
.status-마감임박 { background: #FFFBEB; color: #92400E; animation: pulse-amber 1.5s infinite; }
.status-예정 { background: #F5F3FF; color: #6D28D9; }
.status-마감 { background: #F9FAFB; color: #9CA3AF; }

@keyframes pulse-amber {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.card-title {
  font-size: 15px; font-weight: 800;
  color: #1A1A2E;
  margin-bottom: 4px;
  line-height: 1.35;
}
.card-ministry {
  font-size: 12px; color: #6B7280;
  margin-bottom: 12px;
}

.card-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-bottom: 12px;
}
.info-item { display: flex; flex-direction: column; gap: 1px; }
.info-label { font-size: 10px; color: #9CA3AF; font-weight: 600; text-transform: uppercase; }
.info-value { font-size: 12px; color: #374151; font-weight: 600; }

.card-amount {
  background: #F0F4FF;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.amount-label { font-size: 11px; color: #6B7280; font-weight: 600; }
.amount-value { font-size: 13px; color: #1B4FCC; font-weight: 800; }

.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.tag {
  font-size: 11px; color: #6B7280;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  padding: 2px 8px;
  border-radius: 8px;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #F3F4F6;
}
.deadline-info { font-size: 12px; color: #6B7280; display: flex; align-items: center; gap: 4px; }
.deadline-urgent { color: #EF4444; font-weight: 700; }
.btn-detail {
  background: #1B4FCC;
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-detail:hover { background: #1E40AF; }

/* ===== NO RESULTS ===== */
.no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: #9CA3AF;
}
.no-results .icon { font-size: 48px; margin-bottom: 12px; }
.no-results h3 { font-size: 18px; font-weight: 700; color: #6B7280; margin-bottom: 6px; }
.no-results p { font-size: 14px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 43, 107, 0.6);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: #fff;
  border-radius: 20px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.94) translateY(10px);
  transition: transform 0.2s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 24px 24px 16px;
  position: sticky; top: 0;
  background: #fff;
  border-bottom: 1px solid #F3F4F6;
  z-index: 2;
}
.modal-header-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 6px;
}
.modal-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-close {
  background: #F3F4F6;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-close:hover { background: #E5E7EB; }
.modal-title { font-size: 22px; font-weight: 800; color: #1A1A2E; line-height: 1.3; }
.modal-ministry { font-size: 13px; color: #6B7280; margin-top: 4px; }

.modal-body { padding: 20px 24px 24px; }

.info-section { margin-bottom: 20px; }
.info-section-title {
  font-size: 12px; font-weight: 800; color: #6B7280;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid #F3F4F6;
}
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.detail-item {}
.detail-label { font-size: 11px; color: #9CA3AF; font-weight: 600; margin-bottom: 3px; }
.detail-value { font-size: 13px; color: #1A1A2E; font-weight: 600; }

.description-box {
  background: #F8FAFF;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
  border-left: 3px solid #1B4FCC;
}

.amount-highlight {
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  border-radius: 12px;
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.amount-icon { font-size: 28px; }
.amount-details {}
.amount-title { font-size: 11px; color: #6B7280; font-weight: 600; margin-bottom: 3px; }
.amount-big { font-size: 16px; font-weight: 800; color: #1B4FCC; }

.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-tag {
  font-size: 12px; color: #1B4FCC;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 500;
}

.modal-footer {
  padding: 16px 24px;
  background: #F8FAFF;
  border-top: 1px solid #E5E7EB;
  border-radius: 0 0 20px 20px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.btn-apply {
  flex: 1;
  background: linear-gradient(135deg, #1B4FCC, #2563EB);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  text-align: center;
  display: block;
}
.btn-apply:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(27,79,204,0.3); }
.btn-ask {
  flex: 1;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-ask:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(16,185,129,0.3); }

/* ===== CONSULT BANNER ===== */
.consult-banner {
  background: linear-gradient(135deg, #0F2B6B, #1B4FCC);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0;
  text-align: center;
}
.consult-banner h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.consult-banner p { font-size: 13px; opacity: 0.8; margin-bottom: 16px; }
.btn-consult-big {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
}
.btn-consult-big:hover { transform: translateY(-2px); }

/* ===== FOOTER ===== */
.site-footer {
  background: #1A1A2E;
  color: #9CA3AF;
  text-align: center;
  padding: 24px;
  font-size: 12px;
  margin-top: 40px;
  line-height: 1.8;
}
.site-footer strong { color: #E5E7EB; }

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  .sidebar.mobile-open { display: block; }
  .hero h2 { font-size: 20px; }
  .stats-row { gap: 20px; }
  .stat-num { font-size: 22px; }
  .logo-text span { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .modal-footer { flex-direction: column; }
  .header-search { display: none; }
}

/* ===== MOBILE FILTER BTN ===== */
.btn-mobile-filter {
  display: none;
  background: #1B4FCC;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
}
@media (max-width: 900px) { .btn-mobile-filter { display: block; } }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F3F4F6; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }


/* ui-polish-v1: retain original blue cards; make reading and actions easier. */
button, input, select { font-family: inherit; }
button, a, input, select { -webkit-tap-highlight-color: rgba(27,79,204,.15); }
:is(button, a, input, select, [tabindex]):focus-visible { outline: 3px solid #B45309; outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 300; background: #fff; color: #0F2B6B; padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.main-layout { grid-template-columns: 260px minmax(0,1fr); }
.content-area, .policy-card, .amount-details, .info-item, .detail-item { min-width: 0; }
.logo-icon { font-size: 13px; font-weight: 800; }
.logo-text span { font-size: 12px; opacity: .95; }
.header-search input { min-height: 46px; font-size: 16px; background: rgba(255,255,255,.2); }
.header-search input::placeholder { color: rgba(255,255,255,.95); }
.search-icon { font-size: 12px; opacity: 1; }
.btn-consult { min-height: 44px; background: #047857; font-size: 14px; }
.hero p, .consult-banner p { font-size: 16px; opacity: .95; }
.stat-label { font-size: 14px; opacity: .95; }
.stat-num { color: #93C5FD; }
.sidebar-title, .filter-section h4, .result-count { font-size: 15px; color: #4B5563; }
.filter-help { font-size: 14px; color: #4B5563; margin-bottom: 18px; line-height: 1.7; }
.chip, .status-tab { min-height: 44px; font-size: 14px; color: #4B5563; }
.status-tab .tab-count { font-size: 13px; }
.filter-select, .sort-select, .age-input { min-height: 44px; font-size: 16px; color: #374151; }
.age-input { width: 76px; min-width: 0; }
.btn-reset, .btn-mobile-filter, .btn-detail, .btn-filter-done { min-height: 44px; font-size: 14px; }
.btn-reset { color: #374151; }
.btn-filter-done { display: none; width: 100%; border: none; margin-top: 12px; border-radius: 10px; background: #1B4FCC; color: #fff; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.card-title { font-size: 17px; line-height: 1.55; overflow-wrap: anywhere; }
.card-ministry, .deadline-info { font-size: 13px; color: #4B5563; }
.category-badge, .status-badge { display: inline-block; margin-bottom: 4px; font-size: 12px; }
.status-마감 { color: #4B5563; }
.status-마감임박 { animation: none; }
.info-label, .detail-label, .amount-label, .amount-title { font-size: 13px; color: #4B5563; text-transform: none; }
.info-value { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.amount-value { font-size: 15px; overflow-wrap: anywhere; }
.card-amount { flex-wrap: wrap; gap: 4px 10px; }
.tag { font-size: 12px; color: #4B5563; }
.card-footer { gap: 12px; flex-wrap: wrap; }
.btn-detail { margin-left: auto; padding: 9px 14px; white-space: nowrap; }
.btn-close { width: 44px; height: 44px; }
.modal-overlay:not(.open) { display: none; visibility: hidden; backdrop-filter: none; }
.modal { max-height: 90dvh; }
.modal-title { line-height: 1.55; overflow-wrap: anywhere; }
.modal-ministry { font-size: 14px; color: #4B5563; }
.detail-value, .description-box { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.info-section-title { font-size: 15px; color: #374151; }
.amount-big { font-size: 18px; line-height: 1.7; overflow-wrap: anywhere; }
.btn-apply, .btn-ask { min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.btn-ask, .btn-consult-big { background: #047857; }
.btn-consult-big { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; text-decoration: none; color: #fff; }
.site-footer { font-size: 14px; color: #D1D5DB; }
.no-results { color: #4B5563; }
.no-results .btn-reset { margin-top: 20px; max-width: 260px; }
#supportResults, #supportFilters { scroll-margin-top: 92px; }
@media (max-width: 900px) {
  .main-layout { grid-template-columns: minmax(0,1fr); }
  .header-inner { gap: 14px; }
  .sidebar.mobile-open .btn-filter-done { display: block; }
  .cards-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,320px),1fr)); }
}
@media (max-width: 600px) {
  .site-header { padding: 12px 16px; }
  .header-inner { height: auto; flex-wrap: wrap; gap: 12px; }
  .header-actions { margin-left: auto; }
  .header-search { display: block; flex: 1 0 100%; order: 3; max-width: none; }
  .header-search input { padding-right: 48px; }
  .hero { padding: 28px 16px; }
  .hero h2 { font-size: 21px; line-height: 1.55; }
  .hero p { font-size: 15px; }
  .stats-row { gap: 24px; }
  .stat-label { font-size: 13px; }
  .main-layout { padding: 20px 12px; }
  .status-tabs { gap: 8px; }
  .status-tab { padding: 8px 12px; }
  .policy-card { padding: 18px; }
  .card-info-grid { gap: 10px; }
  .modal-overlay { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); }
  .modal-header { padding: 16px; position: relative; }
  .modal-title { font-size: 20px; }
  .modal-body { padding: 18px 16px; }
  .modal-footer { padding: 16px; }
  .detail-grid { grid-template-columns: minmax(0,1fr); }
  #supportResults, #supportFilters { scroll-margin-top: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.guide-main { width: min(840px,100%); margin: 0 auto; padding: 24px 16px; scroll-margin-top: 90px; }
.guide-section { margin-bottom: 18px; padding: 24px; border-radius: 16px; background: #fff; box-shadow: 0 2px 12px rgba(27,79,204,.06); }
.guide-section h2 { color: #0F2B6B; font-size: 21px; margin-bottom: 14px; line-height: 1.5; }
.guide-section p, .guide-section li, .guide-definitions { font-size: 17px; line-height: 1.85; color: #374151; }
.guide-section p + p { margin-top: 12px; }
.guide-section ul { padding-left: 22px; }
.guide-section li + li { margin-top: 10px; }
.guide-definitions { margin-top: 16px; }
.guide-definitions dt { font-weight: 800; color: #1B4FCC; margin-top: 12px; }
.guide-definitions dd { margin: 4px 0 0; }
.guide-back { margin-top: 24px; }
@media(max-width:600px) { .guide-section { padding: 20px 18px; } .guide-section h2 { font-size: 20px; } }


/* document-summary-v1: a compact addition within the retained blue layout. */
.card-document-line { display:flex; gap:8px; align-items:baseline; margin:8px 0 12px; font-size:12px; line-height:1.55; color:#475569; }
.card-document-line .info-label { flex-shrink:0; }
.card-document-line > span:last-child { overflow-wrap:anywhere; }
.document-list { margin:8px 0 16px; padding-left:20px; color:#334155; font-size:14px; line-height:1.75; }
.document-list li + li { margin-top:5px; }
.document-note,.document-notes { font-size:13px; color:#64748b; line-height:1.7; }
.document-notes p { margin:6px 0; }
.document-source { display:inline-flex; align-items:center; min-height:44px; color:#1d4ed8; font-weight:600; font-size:14px; text-decoration:underline; text-underline-offset:3px; }
.document-source:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }

/* qa-mobile-v1: retain the existing layout; make counts and the final exit readable. */
.status-tab:not(.active) .tab-count { color: #4B5563; }
.status-tab.active .tab-count { background: transparent; color: #fff; }
.btn-modal-close {
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid #1B4FCC;
  border-radius: 12px;
  background: #fff;
  color: #1B4FCC;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
}
.btn-modal-close:hover { background: #EFF6FF; }

/* Preserve the previous filter-heading appearance after semantic heading changes. */
.filter-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: #4B5563;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link { max-width: calc(100vw - 32px); }
.skip-link:not(:focus) {
  top: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (min-width: 601px) {
  .header-inner { height: auto; min-height: 68px; }
}

@media (forced-colors: active) {
  .site-header { background: Canvas; color: CanvasText; border-bottom: 1px solid CanvasText; }
  .site-header .logo-text { color: CanvasText; }
  .site-header .logo-icon { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  .site-header .header-search input { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  .site-header .header-search input::placeholder { color: CanvasText; opacity: 1; }
  .site-header .btn-consult { background: Canvas; color: LinkText; border: 1px solid LinkText; }
  .chip[aria-pressed="true"], .status-tab[aria-pressed="true"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }
}

/* Keep oversized desktop filters reachable through normal document scrolling. */
@media (min-width: 901px) {
  #supportFilters.filter-too-tall { position: static; }
}


/* District filtering uses the existing sidebar on both desktop and mobile. */
.district-label { display:block; margin:14px 0 8px; font-size:14px; font-weight:600; color:#374151; }
.region-help { margin:10px 0 0; font-size:13px; line-height:1.6; color:#4B5563; }
.region-count-note { display:block; margin-top:4px; font-size:13px; font-weight:400; color:#4B5563; }
.region-result-note { margin:0 0 20px; padding:12px 14px; border:1px solid #D7E3F7; border-radius:8px; background:#F1F6FF; color:#374151; font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
#districtSection[hidden], #regionResultNote[hidden] { display:none; }
