/*
   CSWB Portal demonstration, design system and core stylesheet
   Designed with a "Soft Structuralism" aesthetic
   Type: system font stacks only, so the demo loads with no network requests
   Palette: Slate Neutrals, Muted Deep Teal, Bright Jade
*/

:root {
  /* Type stacks. No webfonts, nothing fetched from a third party. */
  --font-head: ui-sans-serif, "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Color Tokens */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  
  --white: #ffffff;
  
  /* Semantic Colors */
  --bg-page: var(--white);
  --bg-section: var(--slate-50);
  --text-main: var(--slate-900);
  --text-muted: var(--slate-500);
  --border-subtle: var(--slate-200);
  /* Interactive accent. teal-700 clears WCAG AA both ways: white on it 5.47:1,
     it on white 5.47:1. teal-600 was 3.74:1 and failed on the Call buttons. */
  --accent: var(--teal-700);
  --accent-hover: var(--teal-800);
  
  /* System Values */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.02), 0 2px 6px rgba(15, 23, 42, 0.015);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-elastic: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* Typography base */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--teal-800);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--text-main);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  background: var(--slate-900);
  color: var(--white);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
  color: var(--white);
}

/* Global Grid Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Banner */
.demo-banner {
  background: var(--slate-900);
  color: var(--slate-300);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-banner-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-banner i {
  color: var(--teal-200);
  font-size: 1rem;
  flex-shrink: 0;
}

.site-header {
  background: var(--white);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.logo-area {
  display: flex;
  flex-direction: column;
}

.header-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
  font-family: var(--font-head);
}

.site-title {
  font-size: 2.2rem;
  color: var(--text-main);
  line-height: 1.1;
  font-weight: 700;
}

.text-accent {
  color: var(--accent);
}

/* Breadcrumb */
.breadcrumb {
  background: var(--slate-50);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  font-size: 0.85rem;
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-500);
  font-weight: 500;
}

.breadcrumb-link {
  color: var(--slate-500);
  text-decoration: none;
}

.breadcrumb-link:hover {
  color: var(--text-main);
}

.breadcrumb-sep {
  font-size: 0.75rem;
  color: var(--slate-400);
}

#breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
}

/* Floating Sticky Tab Bar */
.tabs-container {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.tab-nav {
  display: flex;
  gap: 6px;
  background: var(--slate-100);
  padding: 5px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
  width: max-content;
  max-width: 100%;
}

.tab-link {
  border: none;
  background: transparent;
  padding: 10px 22px;
  border-radius: 26px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--slate-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.tab-link:hover {
  color: var(--text-main);
}

.tab-link[aria-selected="true"] {
  background: var(--white);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.tab-link i {
  font-size: 1.1rem;
}

/* Layout section base */
.view {
  padding: 3.5rem 0 5rem 0;
  scroll-margin-top: 100px;
}

.view-header {
  margin-bottom: 2.5rem;
}

.view-heading {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.view-intro {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 48rem;
  font-weight: 500;
}

/* Search Box Container */
.search-wrap {
  margin-bottom: 2rem;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 720px;
}

.search-input {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  padding: 16px 20px 16px 54px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--text-main);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05), 0 0 0 4px rgba(15, 23, 42, 0.04);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  font-size: 1.3rem;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.search-input:focus + .search-icon {
  color: var(--text-main);
}

/* Filters & Chips Group */
.filters-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--slate-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--slate-400);
  color: var(--text-main);
  transform: translateY(-1px);
}

.filter-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.filter-chip-indigenous {
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip-indigenous[aria-pressed="true"] {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: var(--white);
}

.filter-chip i {
  font-size: 0.95rem;
}

/* Results Count meta */
.results-meta {
  margin: 1.5rem 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.result-count {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-600);
}

/* Service Results Cards */
.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

/* Concentric Bezel Double Card Structure */
.result-card {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUpCard 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUpCard {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.result-card-inner {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm), var(--shadow-inset);
  position: relative;
  overflow: hidden;
}

.result-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--slate-900);
  line-height: 1.2;
}

.result-desc {
  color: var(--slate-600);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.desc-full {
  white-space: pre-line;
}

.expand-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.4em;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--transition-smooth);
}

.expand-btn:hover {
  color: var(--teal-800);
}

.result-address,
.result-eligibility {
  font-size: 0.9rem;
  color: var(--slate-600);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.result-address i,
.result-eligibility i {
  color: var(--slate-400);
  font-size: 1.1rem;
  margin-top: 2px;
}

.result-eligibility strong {
  color: var(--slate-800);
  font-weight: 600;
}

/* Category Tags */
.need-tags {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.need-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-600);
  background: var(--slate-100);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px 10px;
  font-family: var(--font-body);
}

.need-tag-indigenous {
  color: var(--teal-700);
  background: var(--teal-50);
  border-color: var(--teal-100);
}

/* Direct Action Buttons */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--slate-100);
}

/* Nested Island buttons styling */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-call-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--teal-700);
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-call-secondary:hover {
  background: var(--teal-100);
  border-color: var(--teal-200);
  transform: translateY(-1px);
}

.btn-call-secondary:active {
  transform: translateY(1px);
}

.btn-website,
.btn-email,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-700);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-website:hover,
.btn-email:hover,
.btn-secondary:hover {
  border-color: var(--slate-400);
  color: var(--text-main);
  background: var(--slate-50);
  transform: translateY(-1px);
}

.btn-website:active,
.btn-email:active,
.btn-secondary:active {
  transform: translateY(1px);
}

.result-note {
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-top: 1rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--slate-50);
  border: 2px dashed var(--slate-200);
  border-radius: var(--radius-lg);
  max-width: 540px;
  margin: 3rem auto;
}

.empty-state-icon {
  font-size: 2.5rem;
  color: var(--slate-400);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Tab 2: Plan Progress dashboard styles */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.stat-card-inner {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-md);
  padding: 20px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}

.stat-number {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Priority Area Cards grid */
.priority-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.priority-card {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.priority-card-inner {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}

.priority-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--teal-800);
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  width: max-content;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.priority-name {
  font-size: 1.2rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.priority-goal {
  font-size: 0.95rem;
  color: var(--slate-600);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.priority-footer {
  margin-top: auto;
  border-top: 1px solid var(--slate-100);
  padding-top: 1rem;
}

.priority-actions {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 0.5rem;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: var(--slate-100);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-800), var(--teal-600));
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700);
  white-space: nowrap;
}

.source-info-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 3rem;
}

.source-line {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-line i {
  font-size: 1.1rem;
  color: var(--slate-400);
}

.plan-link {
  font-size: 0.95rem;
}

/* Tab 3: About the Plan styles */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.about-para {
  font-size: 1.05rem;
  color: var(--slate-700);
  line-height: 1.7;
}

.about-subheading {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-subheading i {
  color: var(--accent);
  font-size: 1.4rem;
}

/* Beautiful Timeline styling */
.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  padding-left: 2rem;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--slate-200);
}

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

.timeline-list li:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--slate-400);
}

.timeline-dot-active {
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--teal-200);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.timeline-content-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-date {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--slate-600);
}

/* Contact Coordinator Section */
.contact-section {
  margin-bottom: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.contact-card {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 6px;
  max-width: 480px;
}

.contact-card-inner {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}

.contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--slate-500);
  flex-shrink: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
  margin: 0;
}

.contact-title {
  font-size: 0.9rem;
  color: var(--slate-500);
  font-weight: 500;
  margin: 0 0 1rem 0;
}

.contact-actions {
  display: flex;
}

/* Disclaimer text */
.about-disclaimer {
  font-size: 0.8rem;
  color: var(--slate-500);
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

.about-disclaimer p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.about-disclaimer i {
  font-size: 1.05rem;
  color: var(--slate-400);
}

/* Footer styling */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-400);
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  font-weight: 500;
}

.site-footer a {
  color: var(--teal-200);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Noscript notice */
.noscript-notice {
  margin: 2rem auto;
  padding: 1.25rem;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: var(--radius-md);
  color: #92400e;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.noscript-notice i {
  font-size: 1.4rem;
  color: #d97706;
}

.noscript-notice a {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
}

/* The three tab pills need 386px of content. Below roughly 560px that overflows the
   container, and body{overflow-x:hidden} would silently clip "About The Plan" off
   the right edge. Let the strip wrap instead so every tab stays reachable. */
@media (max-width: 560px) {
  .tab-nav {
    width: 100%;
    flex-wrap: wrap;
    border-radius: var(--radius-md);
  }

  .tab-link {
    flex: 1 1 auto;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}

/* Media Queries & Responsive Grid collapse overrides */
@media (min-width: 768px) {
  .site-header {
    padding: 3rem 0;
  }
  
  .site-title {
    font-size: 2.8rem;
  }
  
  .view-heading {
    font-size: 2.4rem;
  }
  
  .tab-link {
    font-size: 1rem;
    padding: 12px 26px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  
  .priority-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .about-content {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
  }
  
  .results-list {
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .priority-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Accessibility Reduced Motion Rule */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .result-card {
    opacity: 1;
    transform: none;
  }
}
