/* ==========================================================================
   Jammu & Kashmir — Official Information Portal
   Design System: Government Portal Aesthetic
   Typography: Inter (body) + Playfair Display (headings)
   ========================================================================== */

/* ─── Google Fonts ─────────────────────────────────────────────────────── */
/* @import removed: fonts are loaded via <link> tags in HTML <head> to avoid render-blocking waterfall */

/* ─── Design Tokens ────────────────────────────────────────────────────── */
:root {
  /* Official J&K Digital Platform Palette (Restrained Deep Red & Warm Stone) */
  --navy:          #801321; /* Primary Deep J&K Red */
  --navy-light:    #961627; /* Interactive Hover Red */
  --navy-mid:      #670f1a; /* Rich Burgundy */
  --red-subtle:    rgba(128, 19, 33, 0.08); /* Subtle Red Tint */
  --green:         #15803d;
  --saffron:       #d97706;
  --saffron-light: #fef3c7;
  --gold:          #b45309;
  --font-serif:    'Playfair Display', Georgia, serif;
  --delay:         0s;

  /* Neutral Stone Scale */
  --white:      #ffffff;
  --off-white:  #fbf9f5;
  --gray-50:    #f8f6f0;
  --gray-100:   #f1efea;
  --gray-200:   #e2d9cc;
  --gray-300:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #334155;
  --gray-700:   #1e293b;
  --gray-800:   #0f172a;
  --gray-900:   #020617;

  /* Semantic Colors */
  --bg-body:       var(--gray-50);
  --bg-card:       var(--white);
  --bg-card-hover: #fcfbfa;
  --bg-header:     var(--navy);
  --bg-footer:     var(--navy);
  --text-body:     #0f172a;
  --text-muted:    #1e293b;
  --text-head:     #000000;
  --border:        var(--gray-200);
  --border-strong: var(--gray-300);
  --accent:        var(--navy);
  --link:          var(--navy);
  --badge-bg:      #f8f6f0;
  --badge-text:    var(--navy);
  --badge-border:  rgba(128, 19, 33, 0.18);

  /* Typography Stack */
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:     'Plus Jakarta Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Type Scale */
  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-md:    1.0625rem;
  --fs-lg:    1.125rem;
  --fs-xl:    1.25rem;
  --fs-2xl:   1.5rem;
  --fs-3xl:   1.875rem;
  --fs-4xl:   2.25rem;
  --fs-5xl:   3rem;

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Layout */
  --container-max: 1280px;
  --content-max:   900px;

  /* Elevation */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.15);

  /* Borders */
  --radius-sm: 4px;
  --radius:    6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:  cubic-bezier(0.55, 0, 1, 0.45);
  --dur-fast: 150ms;
  --dur-mid:  250ms;
  --dur-slow: 400ms;

  /* Z-Index Scale */
  --z-sticky:  200;
  --z-dropdown: 300;
  --z-fixed:   500;
  --z-modal:   10000;
  --z-toast:   10100;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box !important; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 75px;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  background: var(--bg-body);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
}

img, svg, video, canvas, iframe { max-width: 100%; height: auto; }
img, svg { display: block; }

p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, figcaption, span, a, div, section, article, main, header, footer, aside, nav {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* ─── Global High-Contrast Readability ───────────────────────────────────── */
body, .container-wrap, .content-wrapper, .card, .bento-card, .info-card, .calc-card, .certificate-card, .result-box, .tab-content, .dist-panel, .district-modal {
  color: #0f172a;
}
p, li, td, label, .desc, .stat-value, .stat-label {
  color: #0f172a;
}
.text-muted, .desc-muted, .sub-text, .date-tag, .badge-label {
  color: #1e293b;
}

.ticker, .ticker__inner, .ticker__inner > div, .portal-quick-strip {
  min-width: 0 !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

/* ─── Universal Responsive Tables (Zero Horizontal Mesh Guarantee) ─────── */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

@media (max-width: 768px) {
  table:not(.no-mobile-scroll) {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

@media (max-width: 1024px) {
  .site-nav__search-form,
  form.site-nav__search-form,
  .site-nav form {
    display: none !important;
  }
  .mobile-search-btn {
    display: flex !important;
  }
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
  overflow-wrap: break-word;
  word-break: break-word;
}
a:hover { color: var(--saffron); text-decoration: underline; }

/* ─── Global Button & Touch Controls ───────────────────────────────────── */
button, .btn, .tab-btn, .option-btn, .quiz-opt-btn, input[type="button"], input[type="submit"], input[type="reset"] {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  user-select: none;
  -webkit-user-select: none;
}
button:disabled, .btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  pointer-events: none;
}

/* ─── Skip Link ─────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -60px;
  background: var(--navy);
  color: var(--white);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--dur-mid);
}
.skip-link:focus { top: var(--sp-4); color: var(--white); text-decoration: none; }

/* ─── Government Top Bar (Official J&K Royal Palette) ───────────────────── */
.gov-bar {
  background: #520b14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 0;
  color: #f8fafc;
  font-size: 11px;
  letter-spacing: 0.02em;
  max-width: 100vw;
  overflow-x: clip;
}
.gov-bar__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 100%;
}
.gov-bar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 100%;
}
.gov-bar__emblem {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fde68a;
}
.gov-bar__emblem svg { width: 18px; height: 22px; }
.gov-bar__title { font-weight: 800; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: #fde68a; line-height: 1.2; }
.gov-bar__subtitle { font-size: 9.5px; color: rgba(255, 255, 255, 0.8); line-height: 1.2; }
.gov-bar__divider { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.2); margin: 0 2px; }
.gov-bar__links { display: flex; align-items: center; gap: 12px; }
.gov-bar__links a {
  color: #e2e8f0;
  font-size: 11px;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}
.gov-bar__links a:hover { color: #fde68a; text-decoration: underline; }
.gov-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 11px;
  color: #f8fafc;
}
.a11y-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.a11y-toolbar__btn {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.a11y-toolbar__btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
.saved-vault-btn {
  background: #c87a1e;
  color: #ffffff !important;
  border: 1px solid #d4af37;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.saved-vault-btn:hover {
  background: #e5a93c;
  color: #520b14 !important;
}

/* ─── Portal Live Status Strip ─────────────────────────────────────────── */
.portal-quick-strip {
  background: #fdfbf7;
  color: #0f172a;
  padding: 6px 16px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e2d9cc;
  overflow-x: auto;
  white-space: nowrap;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  box-sizing: border-box;
}
.portal-quick-strip::-webkit-scrollbar {
  display: none;
}
.portal-quick-strip__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.portal-quick-strip__inner::-webkit-scrollbar {
  display: none;
}
.strip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid #e2d9cc;
  font-size: 11px;
  color: #0f172a;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  text-decoration: none;
  line-height: 1.3;
}
.strip-pill strong {
  color: #0f172a !important;
  font-weight: 700;
}
.strip-pill--alert {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626 !important;
  font-weight: 700;
  margin-left: auto;
}
.strip-pill--alert strong, .strip-pill--alert span {
  color: #dc2626 !important;
}

/* ─── Primary Navigation (Official J&K Royal Red & Gold) ─────────────────── */
.site-nav {
  background: #801321;
  background: linear-gradient(180deg, #8c1424 0%, #801321 100%);
  border-bottom: 2.5px solid #c87a1e;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(128, 19, 33, 0.28);
}
.site-nav__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

/* Brand */
.site-nav__brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  min-width: 200px !important;
}
.site-nav__brand:hover { text-decoration: none; }
.site-nav__brand-img, .site-nav__brand svg { max-width: 36px !important; max-height: 24px !important; flex-shrink: 0 !important; }
.site-nav__brand-text {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.site-nav__brand-name {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  white-space: nowrap !important;
  display: block !important;
}
.site-nav__brand-sub {
  font-size: 8.5px !important;
  font-weight: 800 !important;
  color: #fde68a !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  white-space: nowrap !important;
  display: block !important;
}

/* Menu */
.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex: 1;
  margin: 0;
  padding: 0;
}
.site-nav__item { position: relative; }
.site-nav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  transition: all var(--dur-fast);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  border-radius: 4px;
}
.site-nav__link:hover {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  border-bottom-color: #fde68a;
}
.site-nav__link.active {
  color: #fde68a;
  border-bottom-color: #fde68a;
  font-weight: 700;
}
.site-nav__link svg {
  width: 10px;
  height: 10px;
  opacity: 0.85;
  color: #ffffff;
  transition: transform var(--dur-fast);
}
.site-nav__item:hover .site-nav__link svg { transform: rotate(180deg); }

/* Dropdown */
.site-nav__dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 230px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #801321;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur-mid), transform var(--dur-mid), visibility var(--dur-mid);
  list-style: none;
  padding: 6px 0;
  z-index: 300;
}
.site-nav__item:hover .site-nav__dropdown,
.site-nav__item:focus-within .site-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.site-nav__dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a !important;
  border-left: 3px solid transparent;
  transition: all var(--dur-fast);
  text-decoration: none;
}
.site-nav__dropdown a:hover {
  background: #fdf2f2;
  color: #801321 !important;
  font-weight: 800;
  border-left-color: #801321;
  text-decoration: none;
}
.site-nav__dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}

/* Search */
.site-nav__search-form {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}
.site-nav__search-input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 12px;
  font-family: var(--font-body);
  color: #0f172a;
  background: #ffffff;
  width: 190px;
  transition: border-color var(--dur-fast), width var(--dur-mid);
  outline: none;
}
.site-nav__search-input:focus {
  outline: none;
  border-color: #fde68a;
  background: #ffffff;
  width: 230px;
}
.site-nav__search-btn {
  height: 36px;
  padding: 0 14px;
  background: #c87a1e;
  color: #ffffff;
  border: 1px solid #c87a1e;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background var(--dur-fast);
  font-family: var(--font-body);
}
.site-nav__search-btn:hover { background: #b45309; }

/* Hamburger Controls */
.site-nav__mobile-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.mobile-search-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  border-radius: 6px;
  width: 38px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s ease;
}
.mobile-search-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}
.site-nav__toggle {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  margin-left: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s ease;
}
.site-nav__toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}
.site-nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ─── Announcement Ticker ───────────────────────────────────────────────── */
.ticker {
  background: #fdfbf7;
  color: #0f172a;
  border-bottom: 1px solid #e2d9cc;
  font-size: var(--fs-xs);
  padding: 5px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker__inner {
  display: flex;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 10px;
  overflow: hidden;
}
.ticker__label {
  background: #c87a1e;
  color: #ffffff;
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 10;
}
.ticker__text {
  color: #0f172a;
  font-size: 0.825rem;
  font-weight: 500;
  white-space: nowrap;
}
.ticker code {
  background: rgba(0,0,0,0.06);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ─── Page Breadcrumb ───────────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) 0;
}
.breadcrumb-bar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  font-size: var(--fs-sm);
  flex-wrap: wrap;
}
.breadcrumb-list li { display: flex; align-items: center; gap: var(--sp-2); }
.breadcrumb-list a { color: var(--link); font-weight: 500; }
.breadcrumb-list a:hover { color: var(--saffron); }
.breadcrumb-list .sep { color: var(--gray-400); font-size: 12px; }
.breadcrumb-list .current { color: #0f172a; }

/* ─── Layout Container ──────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.container--narrow {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ─── Page Layout (main + optional sidebar) ─────────────────────────────── */
.page-layout {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-6);
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-8);
  align-items: start;
}
.page-layout--full {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-6);
}
.page-content { min-width: 0; }
.page-sidebar { display: flex; flex-direction: column; gap: var(--sp-6); }

/* ─── Page Hero ─────────────────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #ffffff 0%, #fbf9f5 50%, #f4efe6 100%);
  color: #0f172a;
  padding: var(--sp-12) 0;
  border-bottom: 3px solid var(--saffron);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 1;
}
.page-hero__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  position: relative;
  z-index: 1;
}
.page-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--sp-1) var(--sp-3);
  border-radius: 100px;
  margin-bottom: var(--sp-4);
}
.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 700;
  color: #801321;
  line-height: 1.2;
  margin-bottom: var(--sp-4);
  letter-spacing: -0.02em;
}
.page-hero__subtitle {
  font-size: var(--fs-lg);
  color: #1e293b;
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: var(--sp-6);
}
.page-hero__meta {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.page-hero__meta-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: #475569;
}
.page-hero__meta-item strong { color: #0f172a; }

/* ─── Home Hero ─────────────────────────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, #ffffff 0%, #faf8f5 50%, #f5efe6 100%);
  padding: 3.5rem 1.5rem;
  color: #0f172a;
  border: 1px solid #e5dcca;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.home-hero__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-10);
  align-items: center;
  position: relative;
  z-index: 1;
}
.home-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: var(--sp-4);
}
.home-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #801321;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}
.home-hero__title span { color: #854d0e; }
.home-hero__desc {
  font-size: var(--fs-lg);
  color: #1e293b;
  max-width: 580px;
  line-height: 1.65;
  margin-bottom: var(--sp-8);
}
.home-hero__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.home-hero__visual {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.home-hero__stat-box {
  background: #ffffff;
  border: 1px solid #e5dcca;
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-6);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  min-width: 180px;
}
.home-hero__stat-box .val {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: #801321;
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.home-hero__stat-box .label {
  font-size: var(--fs-xs);
  color: #475569;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Quick Stats Bar ───────────────────────────────────────────────────── */
.quick-stats {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.quick-stats__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.quick-stats__item {
  padding: var(--sp-5) var(--sp-6);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.quick-stats__item:last-child { border-right: none; }
.quick-stats__icon {
  width: 40px; height: 40px;
  background: var(--gray-50);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--saffron);
  font-size: 18px;
  flex-shrink: 0;
}
.quick-stats__num {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.quick-stats__lbl { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* ─── Section Headings ──────────────────────────────────────────────────── */
.section-header {
  margin-bottom: var(--sp-8);
}
.section-header--center { text-align: center; }
.section-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--saffron);
  margin-bottom: var(--sp-2);
  display: block;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-3);
}
.section-desc {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
}
.section-header--center .section-desc { margin: 0 auto; }

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-mid), transform var(--dur-mid), border-color var(--dur-mid);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--gray-300);
}

.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  text-decoration: none;
  transition: all var(--dur-mid);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-mid) var(--ease-out);
}
.topic-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--saffron);
  text-decoration: none;
  color: inherit;
}
.topic-card:hover::before { transform: scaleX(1); }

.topic-card__icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid var(--border);
}
.topic-card__category {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--saffron);
}
.topic-card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}
.topic-card__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}
.topic-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy);
  margin-top: var(--sp-2);
}
.topic-card__link svg { width: 14px; height: 14px; transition: transform var(--dur-fast); }
.topic-card:hover .topic-card__link svg { transform: translateX(3px); }

/* Grid layouts */
.cards-grid { display: grid; gap: var(--sp-5); }
.cards-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid--auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ─── Stat Cards ────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  text-align: center;
  box-shadow: var(--shadow-xs);
}
.stat-card__value {
  font-family: var(--font-heading);
  font-size: var(--fs-4xl);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.stat-card__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-2);
}
.stat-card__note { font-size: var(--fs-xs); color: var(--gray-400); }
.stat-card--accent { border-top: 3px solid var(--saffron); }
.stat-card--navy { background: var(--navy); color: var(--white); }
.stat-card--navy .stat-card__value { color: var(--white); }
.stat-card--navy .stat-card__label { color: rgba(255,255,255,0.7); }

/* ─── Info Box / Sidebar Cards ──────────────────────────────────────────── */
.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.info-box__header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.info-box__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.info-box__icon { color: var(--saffron); font-size: 16px; }
.info-box__body { padding: var(--sp-5); }
.info-box__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: var(--fs-sm);
}
.info-box__row:last-child { border-bottom: none; }
.info-box__row-label { color: #0f172a; font-weight: 500; }
.info-box__row-value { color: var(--navy); font-weight: 600; text-align: right; }

/* ─── Content Sections ──────────────────────────────────────────────────── */
.content-section { margin-bottom: var(--sp-10); }
.content-section h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--border);
  letter-spacing: -0.01em;
}
.content-section h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--navy);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}
.content-section h4 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--gray-700);
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
}
.content-section p {
  font-size: var(--fs-base);
  color: var(--gray-700);
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}
.content-section ul, .content-section ol {
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.content-section li {
  font-size: var(--fs-base);
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: var(--sp-2);
}
.content-section strong { color: var(--navy); }

/* Wiki Extract boxes */
.wiki-extract {
  background: var(--gray-50);
  border-left: 4px solid var(--saffron);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-4) 0 var(--sp-6);
}
.wiki-extract p { margin-bottom: var(--sp-3); }
.wiki-extract p:last-child { margin-bottom: 0; }

/* Pull Quote */
.pull-quote {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  margin: var(--sp-8) 0;
  position: relative;
}
.pull-quote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: var(--sp-6);
  font-family: var(--font-heading);
  font-size: 6rem;
  color: var(--saffron);
  line-height: 1;
  opacity: 0.4;
}
.pull-quote p {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-style: italic;
  color: rgba(255,255,255,0.95);
  line-height: 1.7;
  margin-bottom: var(--sp-3);
  position: relative;
  z-index: 1;
}
.pull-quote cite {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.65);
  font-style: normal;
  display: block;
}

/* ─── Data Tables ───────────────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; margin: var(--sp-4) 0; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.data-table thead {
  background: var(--navy);
  color: var(--white);
}
.data-table thead th {
  padding: var(--sp-3) var(--sp-5);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast);
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody td {
  padding: var(--sp-3) var(--sp-5);
  color: var(--gray-700);
  vertical-align: top;
  line-height: 1.5;
}
.data-table tbody td:first-child { font-weight: 600; color: var(--navy); }
.data-table.striped tbody tr:nth-child(even) { background: var(--gray-50); }

/* ─── Timeline ──────────────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: var(--sp-10); }
.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--saffron), var(--navy));
}
.timeline-event { position: relative; margin-bottom: var(--sp-8); }
.timeline-event::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-10) + 4px);
  top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--saffron);
  box-shadow: 0 0 0 3px rgba(232,96,28,0.15);
}
.timeline-event--major::before { background: var(--saffron); border-color: var(--navy); }
.timeline-event__year {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--saffron);
  margin-bottom: var(--sp-1);
}
.timeline-event__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}
.timeline-event__body {
  font-size: var(--fs-sm);
  color: #0f172a;
  line-height: 1.65;
}
.timeline-event__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--link);
  margin-top: var(--sp-2);
}

/* ─── Accordion (FAQ) ───────────────────────────────────────────────────── */
.accordion { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-btn {
  width: 100%;
  background: none;
  border: none;
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--navy);
  transition: background var(--dur-fast);
  line-height: 1.4;
}
.accordion-btn:hover { background: var(--gray-50); }
.accordion-btn svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--saffron);
  transition: transform var(--dur-mid);
}
.accordion-item.open .accordion-btn { background: var(--gray-50); }
.accordion-item.open .accordion-btn svg { transform: rotate(45deg); }
.accordion-body {
  padding: 0 var(--sp-6) var(--sp-6);
  font-size: var(--fs-base);
  color: #0f172a;
  line-height: 1.7;
  display: none;
  background: var(--gray-50);
}
.accordion-item.open .accordion-body { display: block; }

/* ─── Resource Cards ────────────────────────────────────────────────────── */
.resource-card {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--dur-mid);
  box-shadow: var(--shadow-xs);
}
.resource-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
  transform: translateX(3px);
}
.resource-card__icon {
  width: 44px; height: 44px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.resource-card__body { flex: 1; min-width: 0; }
.resource-card__title { font-size: var(--fs-sm); font-weight: 700; color: var(--navy); margin-bottom: var(--sp-1); }
.resource-card__desc { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; margin-bottom: var(--sp-2); }
.resource-card__link { font-size: var(--fs-xs); color: var(--link); font-weight: 600; }

/* ─── Gallery ───────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}
.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all var(--dur-mid);
}
.gallery-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.gallery-item figcaption {
  padding: var(--sp-4);
}
.gallery-item h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}
.gallery-item p {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.5;
}
.gallery-item p a { font-weight: 600; color: var(--link); }

/* ─── References ────────────────────────────────────────────────────────── */
.references {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin-top: var(--sp-10);
}
.references h3 {
  font-size: var(--fs-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f172a;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.references ol {
  padding-left: var(--sp-5);
}
.references li {
  font-size: var(--fs-sm);
  color: #0f172a;
  line-height: 1.6;
  margin-bottom: var(--sp-2);
}
.references li a { color: var(--link); font-weight: 500; }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
  line-height: 1.2;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover { background: var(--navy-mid); border-color: var(--navy-mid); color: var(--white); text-decoration: none; }
.btn-accent {
  background: var(--saffron);
  color: var(--white);
  border-color: var(--saffron);
}
.btn-accent:hover { background: var(--saffron-light); border-color: var(--saffron-light); color: var(--white); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); color: var(--white); text-decoration: none; }
.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); }
.btn-lg { padding: var(--sp-4) var(--sp-8); font-size: var(--fs-base); }
/* Legacy Bootstrap compatibility */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: var(--saffron);
  color: var(--white);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.btn-cta:hover { background: var(--saffron-light); color: var(--white); text-decoration: none; }

/* ─── Badges / Tags ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid transparent;
}
.badge-navy { background: rgba(10,35,66,0.08); color: var(--navy); border-color: rgba(10,35,66,0.15); }
.badge-saffron { background: rgba(232,96,28,0.1); color: var(--saffron); border-color: rgba(232,96,28,0.2); }
.badge-green { background: rgba(26,107,58,0.08); color: var(--green); border-color: rgba(26,107,58,0.2); }
.badge-gray { background: var(--gray-100); color: #0f172a; border-color: var(--gray-200); }

/* ─── Alert Banner ──────────────────────────────────────────────────────── */
.alert-bar {
  background: linear-gradient(90deg, var(--navy-mid), var(--navy));
  color: var(--white);
  padding: var(--sp-3) 0;
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
}
.alert-bar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.alert-bar code {
  background: rgba(255,255,255,0.12);
  padding: 1px 6px;
  border-radius: 3px;
  color: #7dd3fc;
}

/* ─── Search Results ────────────────────────────────────────────────────── */
#scraped-output { margin-top: var(--sp-6); }
#scraped-output section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-xs);
}
#scraped-output h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  color: var(--navy);
  margin-bottom: var(--sp-2);
}
#scraped-output p { color: #0f172a; line-height: 1.65; }

/* ─── Ticker / Announcement Bar ─────────────────────────────────────────── */
.ticker {
  background: var(--navy-light);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  padding: var(--sp-2) 0;
}
.ticker__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-xs);
}
.ticker__label {
  background: var(--saffron);
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255,255,255,0.75);
}

/* ─── Timeline Event Link ───────────────────────────────────────────────── */
.timeline-event__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--link);
  margin-top: var(--sp-2);
  text-decoration: none;
}
.timeline-event__link:hover { color: var(--saffron); text-decoration: underline; }

/* ─── Nav Dropdown Divider ──────────────────────────────────────────────── */
.site-nav__dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-2) 0;
  pointer-events: none;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  margin-top: var(--sp-16);
  border-top: 3px solid var(--saffron);
}
.footer-top {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6) var(--sp-8);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-8);
}
.footer-brand__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.footer-brand__name {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--white);
}
.footer-brand__sub { font-size: var(--fs-xs); color: rgba(255,255,255,0.5); }
.footer-brand__desc {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: rgba(255,255,255,0.65);
  max-width: 320px;
  margin-bottom: var(--sp-5);
}
.footer-col h4 {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--sp-4);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.65);
  transition: color var(--dur-fast);
  text-decoration: none;
}
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
}
.footer-bottom code { font-family: var(--font-mono); background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 3px; color: rgba(255,255,255,0.6); }

/* ─── Utility Classes ───────────────────────────────────────────────────── */
.muted { color: var(--text-muted) !important; }
.text-navy { color: var(--navy) !important; }
.text-saffron { color: var(--saffron) !important; }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-center { text-align: center; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.py-8 { padding-top: var(--sp-8); padding-bottom: var(--sp-8); }
.py-10 { padding-top: var(--sp-10); padding-bottom: var(--sp-10); }
.bg-white { background: var(--white) !important; }
.bg-gray { background: var(--gray-50) !important; }

/* ─── Focus Styles ──────────────────────────────────────────────────────── */
:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: 3px solid rgba(232,96,28,0.5);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.focus-visible-polyfill {
  outline: 3px solid rgba(232,96,28,0.5);
  outline-offset: 3px;
}

/* ─── Comprehensive Multi-Device Responsive & Mess-Free Typography System ──────────────────────── */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100%;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

/* Prevent Flexbox & Grid min-width auto overflow bug */
div, section, article, aside, main, header, footer, nav, form {
  min-width: 0;
}

/* Responsive Media Handling */
img, svg, video, iframe, embed, object, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Fluid Typography for Headings & Clean Text Rhythm */
h1, .hero-banner__title, .home-hero__title, .page-hero__title, .hero-h1, .cinematic-hero__title {
  font-size: clamp(1.75rem, 5vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h2, .section-title, .portal-section h2, .content-section h2 {
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h3, .card h3, .key-fact-val, .bento-card__title, .exam-prep-card__title {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p, li, blockquote, figcaption {
  text-wrap: pretty;
  overflow-wrap: break-word;
  word-break: break-word;
}

.content-section p, .article-content p {
  max-width: 72ch;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

/* Universal Fluid Container Sizing */
.container, .container-wrap, .page-layout, .main-container {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Fluid Responsive Tables & Wrappers */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.table-responsive, .table-container, .table-wrap, .data-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0 1.75rem;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
}

.table-responsive table, .table-container table, .table-wrap table, .data-table-wrap table {
  margin: 0;
}

/* Form Controls & Inputs */
input, select, textarea, button {
  max-width: 100%;
  box-sizing: border-box;
}

/* Large Displays / Laptops (<= 1200px) */
@media (max-width: 1200px) {
  .container { max-width: 1140px; }
  .cards-grid--4 { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet & Medium Screens (<= 1024px) */
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.25rem;
  }
  .page-sidebar {
    order: 2;
    margin-top: 1rem;
    margin-bottom: 2rem;
  }
  .cards-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .cards-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .gov-bar__links { display: none; }
  .gov-bar__divider { display: none; }
  
  .site-nav__menu {
    display: none;
  }
  .site-nav__menu.open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #801321 !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid #c87a1e;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    padding: 0.5rem 0;
    z-index: 999;
    max-height: calc(100vh - 75px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav__menu.open .site-nav__link {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 46px;
  }
  .site-nav__menu.open .site-nav__link:hover {
    color: #fde68a !important;
    background: rgba(255, 255, 255, 0.08);
  }
  .site-nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0.35rem 0 0.5rem 1.25rem;
    display: none;
    background: #670f1a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .site-nav__item.open .site-nav__dropdown {
    display: block !important;
  }
  .site-nav__item.open .site-nav__dropdown a {
    color: #f1f5f9 !important;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    min-height: 42px;
    display: flex;
    align-items: center;
    border-left: 2px solid transparent;
  }
  .site-nav__item.open .site-nav__dropdown a:hover {
    color: #fde68a !important;
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #c87a1e;
  }
  .site-nav__toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px;
    cursor: pointer;
    margin-left: auto;
    gap: 4.5px;
    flex-direction: column;
    transition: background 0.15s ease;
  }
  .site-nav__toggle:hover {
    background: rgba(255, 255, 255, 0.25) !important;
  }
  .site-nav__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff !important;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .site-nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .site-nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .site-nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .site-nav__search-form {
    display: none !important;
  }
  .mobile-search-btn {
    display: flex !important;
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  /* Government Bar */
  .gov-bar {
    padding: 5px 0;
  }
  .gov-bar__inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
    padding: 0 14px;
    flex-wrap: nowrap !important;
  }
  .gov-bar__left {
    gap: 8px;
  }
  .gov-bar__emblem svg {
    width: 16px;
    height: 20px;
  }
  .gov-bar__title {
    font-size: 9.5px !important;
    letter-spacing: 0.04em;
  }
  .gov-bar__subtitle {
    font-size: 8.5px !important;
  }
  .gov-bar__date {
    display: none !important;
  }
  .gov-bar__right {
    gap: 6px;
  }
  .saved-vault-btn {
    padding: 2px 8px !important;
    font-size: 10px !important;
  }
  .a11y-toolbar__btn {
    padding: 2px 6px !important;
    font-size: 9.5px !important;
  }

  /* Quick Status Strip */
  .portal-quick-strip {
    padding: 5px 12px;
    font-size: 10.5px;
    gap: 8px;
  }
  .portal-quick-strip__inner {
    gap: 8px;
  }
  .strip-pill {
    padding: 3px 9px;
    font-size: 10.5px;
    gap: 5px;
  }

  /* Hero Sections */
  .cinematic-hero {
    padding: 2.25rem 1rem 2rem !important;
  }
  .cinematic-hero__badge {
    font-size: 0.72rem;
    padding: 4px 12px;
    margin-bottom: 1rem;
  }
  .cinematic-hero__subtitle {
    font-size: 1.05rem;
    margin-bottom: 1rem;
  }
  .cinematic-hero__desc {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }
  .cinematic-hero__actions {
    gap: 8px;
  }
  .hero-action-pill {
    width: 100%;
    justify-content: center;
    padding: 9px 16px;
    font-size: 0.86rem;
    min-height: 44px;
  }

  .home-hero, .page-hero, .hero-banner {
    padding: 2rem 1rem !important;
    border-radius: 12px;
    margin-bottom: 1.75rem;
  }
  .home-hero__title, .page-hero__title, .hero-banner__title {
    font-size: clamp(1.5rem, 5.5vw, 2.2rem) !important;
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }
  .home-hero__desc, .page-hero__subtitle, .hero-banner__desc {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }
  .home-hero__inner { grid-template-columns: 1fr; gap: 1.25rem; }
  .home-hero__visual { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  .home-hero__stat-box { min-width: unset; padding: 0.75rem; }

  /* Cards and Bento Grids */
  .cards-grid--3, .cards-grid--4, .cards-grid--2 {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .bento-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .bento-card--span-7, .bento-card--span-5, .bento-card--span-4, .bento-card--span-8, .bento-card--span-6 {
    grid-column: span 1 !important;
  }
  .bento-card {
    padding: 1.25rem !important;
  }
  .bento-card__title {
    font-size: 1.2rem !important;
  }
  .bento-card__desc {
    font-size: 0.88rem !important;
    line-height: 1.55;
    margin-bottom: 1rem;
  }

  /* Map & District Intelligence */
  .jk-map-section {
    padding: 1.5rem 1rem !important;
    border-radius: 12px;
    margin: 1.75rem 0;
  }
  .jk-map-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }
  .jk-map-visual-box {
    padding: 0.85rem !important;
  }
  .jk-district-live-panel {
    padding: 1.25rem !important;
  }
  .dist-panel-title {
    font-size: 1.5rem !important;
  }
  .dist-panel-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .dist-stat-item {
    padding: 6px 10px;
  }
  .dist-stat-val {
    font-size: 0.88rem;
  }
  .dist-panel-footer {
    flex-direction: column !important;
    gap: 8px;
  }
  .dist-modal-open-btn, .dist-explore-btn {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-height: 46px;
  }

  /* Exams & Modules Spotlight */
  .exams-spotlight-section {
    padding: 1.5rem 1rem !important;
    border-radius: 12px;
    margin: 1.75rem 0;
  }
  .exam-target-pills {
    gap: 6px;
    margin-bottom: 1.25rem;
  }
  .exam-target-pill {
    padding: 5px 12px;
    font-size: 0.78rem;
  }
  .exams-modules-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .exam-prep-card {
    padding: 1.25rem;
  }

  /* Section Spacing & Headers */
  .section-header {
    margin-bottom: 1.25rem;
  }
  .section-badge {
    font-size: 0.72rem;
    padding: 3px 10px;
    margin-bottom: 0.5rem;
  }
  .section-title {
    font-size: clamp(1.3rem, 4.5vw, 1.75rem) !important;
    margin-bottom: 0.5rem;
  }
  .section-subtitle {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  /* Tables */
  .data-table th, .data-table td {
    padding: 0.65rem 0.85rem !important;
    font-size: 0.82rem !important;
  }

  /* Content & Cards */
  .card, .info-box, .topic-card {
    padding: 1.25rem !important;
  }
  .container, .container-wrap, .page-layout {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
    padding: 2rem 14px 1.5rem !important;
  }
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }
  .footer-col--emergency {
    grid-column: span 1 !important;
  }
  .emergency-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    padding: 1.25rem 14px !important;
  }
}

/* Small Phones (<= 480px) */
@media (max-width: 480px) {
  .site-nav__inner {
    padding: 0 12px;
  }
  .site-nav__brand {
    min-width: 0 !important;
  }
  .site-nav__brand-name {
    font-size: 1.05rem !important;
  }
  .site-nav__brand-sub {
    font-size: 8px !important;
  }
  .home-hero__visual {
    grid-template-columns: 1fr;
  }
  .container, .page-layout, .container-wrap {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .card, .content-block, .info-box, .topic-card {
    padding: 1.1rem 0.95rem !important;
    border-radius: 10px;
  }
  .btn, button, input[type="submit"] {
    min-height: 44px;
  }
  .district-selector-pill {
    padding: 5px 10px;
    font-size: 0.76rem;
  }
}

/* ─── Print Stylesheet ──────────────────────────────────────────────────── */
@media print {
  /* Hide interactive / decorative elements */
  .gov-bar, .site-nav, .ticker, .breadcrumb-bar, .portal-quick-strip,
  .home-hero__actions, .scroll-top-btn, .research-modal-overlay,
  .site-footer, #site-footer, .share-pill-container, .floating-test-btn,
  .study-notepad-drawer, .study-notepad-toggle, #engine-global-toast,
  .page-sidebar, aside, .btn, button, .quick-tags,
  .gallery-card:not(:first-child) { display: none !important; }

  /* Reset backgrounds and colours for ink-efficiency */
  body { background: white !important; color: #000 !important; font-size: 11pt; }
  .page-hero {
    background: none !important;
    border: 2px solid #000 !important;
    padding: 1rem !important;
    color: #000 !important;
  }
  .page-hero__title,
  .page-hero__subtitle,
  .page-hero__badge,
  .page-hero__meta-item,
  .page-hero__meta-item strong { color: #000 !important; background: none !important; border: none !important; }

  /* Content */
  .page-layout { display: block !important; }
  .page-content { max-width: 100% !important; }
  .content-section h2 { border-bottom: 1px solid #000 !important; }
  .wiki-extract { border-left: 3px solid #aaa !important; background: #f5f5f5 !important; }
  .pull-quote { background: #f0f0f0 !important; color: #000 !important; }
  .pull-quote p { color: #000 !important; }
  .data-table thead { background: #000 !important; }
  .data-table thead th { color: white !important; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #0f172a; }
  a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }

  /* Print header */
  .site-nav { position: static !important; box-shadow: none !important; border-bottom: 2px solid #000 !important; }
  .site-nav__menu, .site-nav__search-form, .site-nav__toggle { display: none !important; }
  .site-nav__brand-name { color: #000 !important; }
  .site-nav__brand-sub { color: #0f172a !important; }

  /* Page breaks */
  .content-section { break-inside: avoid; }
  .references { break-before: page; }
}

/* ==========================================================================
   JAMMU & KASHMIR LATEST NEWS SECTION & TICKER STYLES
   ========================================================================== */
.news-section-wrapper {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f6 100%);
  border: 2px solid #801321;
  border-top: 6px solid #e11d48;
  border-radius: 24px;
  padding: 2.25rem 2rem;
  box-shadow: 0 16px 40px rgba(128, 19, 33, 0.08);
  margin-bottom: 3rem;
}

/* Breaking News Red Bento Ticker */
.news-ticker-bar {
  background: #801321;
  color: #faf6f0;
  border-left: 5px solid #ff4d79;
  border-radius: 14px;
  overflow: hidden;
  padding: 0.75rem 1rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 16px rgba(128, 19, 33, 0.25);
}

.news-ticker-label {
  background: #e11d48;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.4);
}

.news-ticker-window {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.news-ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-slide 50s linear infinite;
}

.news-ticker-bar:hover .news-ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.news-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0 0.5rem;
  transition: opacity 0.2s;
}

.news-ticker-item:hover {
  opacity: 0.85;
}

.news-ticker-item .ticker-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.ticker-badge.badge-politics { background: rgba(225, 29, 72, 0.25); color: #fecdd3; border: 1px solid rgba(225, 29, 72, 0.4); }
.ticker-badge.badge-development { background: rgba(42, 111, 84, 0.25); color: #52b788; border: 1px solid rgba(42, 111, 84, 0.4); }
.ticker-badge.badge-calamity { background: rgba(192, 57, 43, 0.25); color: #fca5a5; border: 1px solid rgba(192, 57, 43, 0.4); }

.ticker-headline {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

.ticker-source {
  font-size: 0.75rem;
  color: #fecdd3;
}

.ticker-separator {
  color: #ff4d79;
  margin: 0 1rem;
  font-size: 0.8rem;
}

/* News Header & Controls */
.news-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.news-title-area h2 {
  font-family: var(--font-heading);
  color: #801321;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0.25rem 0 0.35rem;
}

.news-subtext {
  color: #0f172a;
  font-size: 0.95rem;
  margin: 0;
}

.news-sync-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.news-last-updated {
  font-size: 0.8rem;
  color: #801321;
  background: #fff0f2;
  border: 1px solid #fecdd3;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
}

.btn-refresh-feed {
  background: #801321;
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(128,19,33,0.2);
  transition: background 0.2s;
}

.btn-refresh-feed:hover {
  background: #e11d48;
}

/* Controls Bar: Search & Category Tabs */
.news-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.news-search-box {
  position: relative;
  width: 100%;
}

.news-search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  font-size: 0.95rem;
  border: 2px solid #801321;
  border-radius: 14px;
  outline: none;
  background: #ffffff;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(128, 19, 33, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.news-search-input:focus {
  border-color: #e11d48;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.2);
}

.news-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #801321;
}

.news-filter-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tab-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.news-filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #fecdd3;
  background: #fff0f2;
  color: #801321;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.news-filter-btn:hover, .news-filter-btn.active {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
  box-shadow: 0 4px 12px rgba(128, 19, 33, 0.3);
}

.news-filter-btn.active .count-pill {
  background: #ffffff;
  color: #801321;
}

.count-pill {
  background: #fecdd3;
  color: #801321;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 12px;
}

.view-toggle-group {
  display: flex;
  gap: 4px;
  background: #fff0f2;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid #fecdd3;
}

.btn-view-toggle {
  background: transparent;
  border: none;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #801321;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-view-toggle.active {
  background: #801321;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(128,19,33,0.3);
}

/* ─── RED BENTO GRID SYSTEM ─── */
.news-card-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.25rem !important;
  align-items: stretch !important;
}

/* Hero Lead Bento Card (1st News Item) */
.news-card-grid .news-card:nth-child(1) {
  grid-column: span 2 !important;
  grid-row: span 2 !important;
  background: linear-gradient(145deg, #2d0b10 0%, #150306 100%) !important;
  color: #ffffff !important;
  border: 2px solid #e11d48 !important;
  border-top: 6px solid #ff4d79 !important;
  box-shadow: 0 15px 35px rgba(225, 29, 72, 0.25) !important;
  padding: 1.75rem !important;
  border-radius: 20px !important;
  display: flex !important;
  flex-direction: column !important;
}

.news-card-grid .news-card:nth-child(1) .news-headline {
  color: #ffffff !important;
  font-size: 1.55rem !important;
  line-height: 1.3 !important;
  margin-bottom: 0.75rem !important;
  font-weight: 800 !important;
}

.news-card-grid .news-card:nth-child(1) .news-summary {
  color: #cbd5e1 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin-bottom: 1.25rem !important;
}

.news-card-grid .news-card:nth-child(1) .news-date,
.news-card-grid .news-card:nth-child(1) .news-source-tag {
  color: #fecdd3 !important;
}

.news-card-grid .news-card:nth-child(1) .btn-news-read {
  background: #e11d48 !important;
  color: #ffffff !important;
  border: 1px solid #ff4d79 !important;
  font-weight: 700 !important;
  padding: 0.6rem 1.25rem !important;
  font-size: 0.88rem !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4) !important;
}

/* Feature Spotlight Bento Card (2nd News Item) */
.news-card-grid .news-card:nth-child(2) {
  grid-column: span 1 !important;
  grid-row: span 2 !important;
  background: linear-gradient(135deg, #ffffff 0%, #fff0f2 100%) !important;
  border: 2px solid #801321 !important;
  border-top: 5px solid #801321 !important;
  box-shadow: 0 10px 24px rgba(128, 19, 33, 0.1) !important;
  border-radius: 20px !important;
  padding: 1.5rem !important;
  display: flex !important;
  flex-direction: column !important;
}

.news-card-grid .news-card:nth-child(2) .news-headline {
  color: #801321 !important;
  font-size: 1.25rem !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

/* Standard Bento Cards (3rd, 4th, 5th, etc.) */
.news-card-grid .news-card {
  background: #ffffff;
  border: 1px solid #fecdd3;
  border-top: 4px solid #801321;
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(128, 19, 33, 0.05);
  transition: all 0.25s ease;
}

.news-card-grid .news-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 28px rgba(128, 19, 33, 0.18) !important;
  border-color: #e11d48 !important;
}

.news-card .news-headline {
  color: #801321;
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0.4rem 0 0.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.news-card .news-headline:hover {
  color: #e11d48;
}

.news-card .news-summary {
  font-size: 0.85rem;
  color: #0f172a;
  line-height: 1.45;
  margin: 0 0 0.85rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .btn-news-read {
  background: #801321;
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.news-card .btn-news-read:hover {
  background: #e11d48;
}

/* Responsive Media Queries for Bento Grid */
@media (max-width: 1024px) {
  .news-card-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .news-card-grid .news-card:nth-child(1),
  .news-card-grid .news-card:nth-child(2) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

@media (max-width: 600px) {
  .news-card-grid {
    grid-template-columns: 1fr !important;
  }
}

/* News List Mode */
.news-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.news-card.card-politics { border-top: 4px solid #d96b1e; }
.news-card.card-development { border-top: 4px solid #2a6f54; }
.news-card.card-calamity { border-top: 4px solid #c0392b; }

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.news-cat-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-politics { background: #fdf0e6; color: #b85412; border: 1px solid #f4cba8; }
.tag-development { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.tag-calamity { background: #fdeded; color: #b71c1c; border: 1px solid #ef9a9a; }

.badge-breaking {
  background: #c0392b;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
  animation: pulse-breaking 2s infinite;
}

@keyframes pulse-breaking {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.news-date {
  font-size: 0.75rem;
  color: #0f172a;
  font-weight: 500;
  white-space: nowrap;
}

.news-headline {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.65rem;
  cursor: pointer;
  transition: color 0.2s;
}

.news-headline:hover {
  color: #b42a2c;
}

.news-summary {
  color: var(--gray-700);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--gray-200);
  margin-top: auto;
  gap: 0.5rem;
}

.news-source-tag {
  font-size: 0.78rem;
  color: #0f172a;
  font-weight: 600;
}

.news-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-news-read {
  background: var(--gray-100);
  color: var(--navy);
  border: 1px solid var(--gray-300);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-news-read:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.btn-news-link {
  color: #0f172a;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s;
}

.btn-news-link:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* Empty State */
.news-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  grid-column: 1 / -1;
}

.news-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.news-empty-state h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.btn-news-reset {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1rem;
}

/* Interactive News Modal Overlay */
.news-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(18, 17, 16, 0.75);
  
  
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.news-modal-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 750px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border: 1px solid var(--gray-300);
  display: flex;
  flex-direction: column;
}

.news-modal-header {
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
}

.btn-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--gray-100);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-modal-close:hover {
  background: var(--navy);
  color: #ffffff;
}

.news-modal-title {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0.5rem;
  padding-right: 2rem;
}

.news-modal-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #0f172a;
}

.news-modal-body {
  padding: 1.75rem 2rem;
  line-height: 1.7;
  color: var(--gray-800);
  font-size: 1rem;
}

.modal-summary-box {
  background: var(--gray-50);
  border-left: 4px solid var(--navy);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.modal-full-details h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.news-modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.btn-modal-source {
  background: var(--navy);
  color: #ffffff;
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-modal-source:hover {
  background: var(--navy-mid);
}

/* Responsive adjust */
@media (max-width: 768px) {
  .news-section-wrapper {
    padding: 1.25rem;
  }
  .news-header-top {
    flex-direction: column;
  }
  .news-card-grid {
    grid-template-columns: 1fr;
  }
  .news-modal-container {
    max-height: 94vh;
  }
}

/* ==========================================================================
   20-DISTRICT WEATHER & DISASTER MONITOR STYLES
   ========================================================================== */
.weather-section-wrapper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.weather-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.weather-title-area h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.6rem;
  margin: 0.2rem 0;
}

.weather-div-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.weather-div-btn {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}

.weather-div-btn:hover, .weather-div-btn.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

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

.weather-district-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.weather-district-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.weather-district-card.weather-alert-red { border-left: 5px solid #c0392b; background: #fffdfd; }
.weather-district-card.weather-alert-orange { border-left: 5px solid #e67e22; background: #fffdfa; }
.weather-district-card.weather-alert-yellow { border-left: 5px solid #f39c12; background: #fffffa; }
.weather-district-card.weather-alert-green { border-left: 5px solid #27ae60; }

.weather-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.weather-district-name {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.weather-div-badge {
  font-size: 0.72rem;
  color: #0f172a;
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

.weather-temp-badge {
  background: var(--navy);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.weather-cond-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
  color: var(--gray-800);
  font-weight: 500;
}

.weather-gauge-box {
  background: var(--gray-100);
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
}

.weather-alert-box {
  font-size: 0.78rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  line-height: 1.4;
  margin-top: auto;
}

.alert-bg-red { background: #fdeded; color: #721c24; border: 1px solid #f5c6cb; }
.alert-bg-orange { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-bg-yellow { background: #fffdf0; color: #856404; border: 1px solid #ffe8a1; }
.alert-bg-green { background: #e8f5e9; color: #155724; border: 1px solid #c3e6cb; }

/* Audio Pronunciation Button */
.btn-audio-pronounce {
  background: var(--gray-100);
  color: var(--navy);
  border: 1px solid var(--gray-300);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-audio-pronounce:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.nav-link {
  color: var(--gray-800);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--gray-100);
  color: var(--navy);
}

/* ==========================================================================
   NH-44 HIGHWAY TRACKER & GI AUTHENTICATOR WIDGET STYLES
   ========================================================================== */
.nh44-tracker-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.nh44-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.nh44-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: #921a28;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nh44-header h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.5rem;
  margin: 0.2rem 0;
}

.nh44-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.nh44-tcu-info {
  background: var(--gray-100);
  border-left: 4px solid var(--navy);
  padding: 0.6rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  color: var(--gray-800);
}

.nh44-sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.nh44-sector-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nh44-sector-card.sec-clear { border-left: 4px solid #27ae60; }
.nh44-sector-card.sec-advisory { border-left: 4px solid #f39c12; background: #fffffa; }
.nh44-sector-card.sec-alert { border-left: 4px solid #c0392b; background: #fffdfd; }

.sec-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
}

.sec-dist {
  font-size: 0.78rem;
  background: var(--gray-200);
  color: var(--gray-800);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}

.sec-note {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.4;
  margin: 0;
}

/* GI Authenticator */
.gi-auth-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.gi-auth-input-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.gi-auth-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
}

.btn-gi-verify {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.gi-success-card {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: #1b5e20;
}

.gi-badge-verified {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.gi-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

.gi-details-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(27, 94, 32, 0.15);
}

.gi-unknown-card {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: #856404;
}

/* Quiz Engine */
.quiz-engine-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.quiz-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--saffron);
  margin-bottom: 1rem;
}

.quiz-question-text {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.quiz-opt-btn-new {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s;
}

.quiz-opt-btn-new:hover:not(:disabled) {
  background: var(--gray-100);
  border-color: var(--navy);
  color: var(--navy);
}

.opt-letter {
  font-weight: 800;
  color: var(--saffron);
}

.fb-correct {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  padding: 1rem;
  border-radius: var(--radius-sm);
  color: #1b5e20;
}

.fb-incorrect {
  background: #fdeded;
  border: 1px solid #ef9a9a;
  padding: 1rem;
  border-radius: var(--radius-sm);
  color: #b71c1c;
}

.btn-quiz-next {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.75rem;
}

.quiz-final-card {
  text-align: center;
  padding: 2rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
}

/* News Bookmarking & Sub-category Pills */
.btn-bookmark {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray-400);
  transition: transform 0.2s, color 0.2s;
  padding: 0 4px;
}

.btn-bookmark:hover, .btn-bookmark.is-active {
  color: var(--saffron);
  transform: scale(1.15);
}

.news-subcat-pill {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--gray-300);
}

/* Circuit Planner & Culinary Glossary Styles */
.circuit-planner-box {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2.25rem 0 1.5rem;
  box-shadow: none;
  margin-bottom: 2.5rem;
}

.circuit-btn-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.circuit-btn {
  padding: 0.55rem 1.1rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #4A0A12;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.circuit-btn:hover {
  background: #f8fafc;
  border-color: #1e293b;
}

.circuit-btn.active {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
  box-shadow: 0 4px 12px rgba(128, 19, 33, 0.25);
}

.circuit-result-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #801321;
  padding: 1.75rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.circuit-result-card h3 {
  font-family: var(--font-heading);
  color: #801321;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.circuit-detail-row {
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 0.65rem;
  color: #334155;
}

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

.culinary-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.cul-name {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.15rem;
  margin: 0;
}

.cul-cat-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--gray-100);
  color: var(--saffron);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.65rem;
}

.cul-desc {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.5;
  margin: 0;
}

/* Flashcard Vault Styles */
.flashcard-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.fc-wrapper {
  max-width: 650px;
  margin: 1.25rem auto 0 auto;
}

.fc-card {
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 2rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 31, 63, 0.08);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.fc-card:hover {
  transform: translateY(-4px);
  border-color: var(--saffron);
}

.fc-card.flipped {
  background: var(--gray-50);
  border-color: var(--saffron);
}

.fc-topic-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--saffron);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.fc-card h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.fc-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.fc-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
}

.btn-fc-nav {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}

.fc-counter {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-700);
}

/* District Compare Matrix Styles */
.district-compare-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.compare-selectors-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.compare-select {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
}

.btn-execute-compare {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.compare-table-box {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.compare-table th, .compare-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  font-size: 0.9rem;
  text-align: left;
}

.compare-table th {
  background: var(--navy);
  color: #ffffff;
  font-family: var(--font-heading);
}

.compare-table tbody tr:nth-child(even) {
  background: var(--gray-100);
}

/* Phrasebook Tutor Styles */
.phrasebook-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.phrasebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.phrase-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.phrase-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--saffron);
  background: var(--gray-100);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.phrase-kashmiri {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.2rem;
  margin: 0.4rem 0;
}

.phrase-meaning {
  font-size: 0.88rem;
  color: var(--gray-700);
  margin: 0;
}

/* Enhanced Phrasebook Styles */
.phrasebook-controls-bar {
  margin-bottom: 1.5rem;
}

.pb-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.pb-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}

.pb-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pb-filter-btn {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--text-body);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pb-filter-btn.active, .pb-filter-btn:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.phrase-card-enhanced {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.phrase-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--gray-200);
}

.phrase-eng-title {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.05rem;
}

.phrase-cat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--saffron);
  background: var(--gray-100);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.phrase-lang-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  gap: 0.75rem;
}

.row-kashmiri { background: #fdf8f4; border-left: 3px solid #d96b1e; }
.row-dogri { background: #f4f8fd; border-left: 3px solid #1d4ed8; }

.lang-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lang-text {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-top: 0.15rem;
}

.btn-audio-speak {
  border: 1px solid #670f1a;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  background: #801321;
  color: #ffffff;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-audio-speak:hover {
  background: #670f1a;
  transform: translateY(-1px);
}

.audio-kashmiri,
.audio-dogri { background: #801321; color: #ffffff; }

/* 20-District Cute Food Explorer Styles */
.food-explorer-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.food-controls-bar {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.food-div-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.food-div-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.food-div-btn.active, .food-div-btn:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.food-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.food-card-cute {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.food-card-cute:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.food-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.food-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.food-card-cute:hover .food-img {
  transform: scale(1.06);
}

.food-type-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(24, 18, 27, 0.85);
  color: #d4af37;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  
  
}

.food-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.food-dist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.food-dist-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--navy);
}

.food-div-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.food-dish-title {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.2rem;
  margin: 0.2rem 0 0.5rem 0;
}

.food-desc {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex: 1;
}

.food-tip-box {
  background: var(--gray-100);
  border-left: 3px solid var(--saffron);
  padding: 0.5rem 0.75rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.8rem;
  color: var(--gray-800);
}

/* Botanical & Floral Bloom Explorer Styles */
.floral-explorer-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.floral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.floral-card-cute {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.floral-card-cute:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.floral-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.floral-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.floral-card-cute:hover .floral-img {
  transform: scale(1.06);
}

.floral-season-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(24, 18, 27, 0.85);
  color: #d4af37;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  
  
}

.floral-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.floral-loc-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--saffron);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.floral-title {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.25rem;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.floral-fact-box {
  background: #fdf8f4;
  border-left: 3px solid #d96b1e;
  padding: 0.6rem 0.85rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.85rem;
  color: var(--gray-800);
  margin-bottom: 0.65rem;
  line-height: 1.45;
}

.floral-research-box {
  background: #f4f8fd;
  border-left: 3px solid #1d4ed8;
  padding: 0.6rem 0.85rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.82rem;
  color: var(--gray-800);
  line-height: 1.45;
  flex: 1;
}

/* Srinagar & Jammu Art & Craft Guild Explorer Styles */
.craft-explorer-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.craft-controls-bar {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.craft-region-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.craft-region-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.craft-region-btn.active, .craft-region-btn:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.craft-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.craft-card-creative {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.craft-card-creative:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.craft-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.craft-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.craft-card-creative:hover .craft-img {
  transform: scale(1.06);
}

.craft-gi-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(24, 18, 27, 0.85);
  color: #d4af37;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  
  
}

.craft-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.craft-reg-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.craft-reg-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--navy);
}

.craft-badge-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.craft-name-title {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.25rem;
  margin: 0.2rem 0 0.5rem 0;
}

.craft-desc {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex: 1;
}

.craft-mastery-box {
  background: var(--gray-100);
  border-left: 3px solid var(--saffron);
  padding: 0.5rem 0.75rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.82rem;
  color: var(--gray-800);
}

/* Kashmir History Research Vault Styles */
.history-research-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

.history-research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.history-research-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.history-research-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.09);
}

.history-research-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
}

.history-forum-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  background: #f0f4f9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.history-period-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--saffron);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INTERACTIVE RESEARCH ENGINE MODAL & CITATION TOAST STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
.research-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(15, 10, 20, 0.75);
  
  
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.research-modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 820px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: modal-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.research-modal-header {
  padding: 1.25rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.research-search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--gray-50);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 0.6rem 1rem;
  transition: border-color 0.2s;
}

.research-search-bar:focus-within {
  border-color: var(--saffron);
  background: var(--bg-card);
}

.research-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--text-body);
  outline: none;
  font-family: var(--font-body);
}

.research-modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}
.research-modal-close:hover { color: var(--navy); }

.research-filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-top: 0.85rem;
  margin-bottom: -0.25rem;
}

.research-filter-chips .chip {
  background: var(--gray-100);
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.research-filter-chips .chip.active,
.research-filter-chips .chip:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--saffron);
}

.research-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.research-initial-prompt {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}
.research-initial-prompt .hint-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-body);
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.quick-tag {
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.quick-tag:hover {
  transform: translateY(-2px);
  background: var(--saffron);
  color: #1a1000;
}

.results-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.research-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.research-result-card:hover {
  border-color: var(--saffron);
  box-shadow: var(--shadow-md);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.badge-history { background: #e0f2fe; color: #0369a1; }
.badge-crafts { background: #fef3c7; color: #92400e; }
.badge-districts { background: #dcfce7; color: #166534; }
.badge-etymology { background: #f3e8ff; color: #6b21a8; }
.badge-news { background: #fee2e2; color: #991b1b; }

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

.result-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.result-title a { color: var(--navy); text-decoration: none; }
.result-title a:hover { color: var(--saffron); }

.result-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.result-snippet {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.search-highlight {
  background: #fde047;
  color: #000000;
  padding: 0.05rem 0.2rem;
  border-radius: 2px;
  font-weight: 600;
}

.card-actions-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.btn-read-more {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  margin-right: auto;
}
.btn-read-more:hover { color: var(--saffron); text-decoration: underline; }

.btn-cite {
  background: var(--gray-100);
  color: var(--text-body);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-cite:hover { background: var(--saffron); color: #1a1000; }

.research-modal-footer {
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-note kbd {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: monospace;
}

.btn-export-data {
  background: var(--white);
  border: 1px solid var(--border-strong);
  color: var(--text-body);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 0.4rem;
}
.btn-export-data:hover { background: var(--navy); color: #ffffff; }

/* Toast Notification */
.jk-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--navy);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-left: 4px solid var(--saffron);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 100000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.jk-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* District Comparison Matrix */
.district-comparison-matrix {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.matrix-header h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.matrix-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.selectors-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.select-group {
  flex: 1;
  min-width: 220px;
}
.select-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-body);
}

.compare-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-body);
  color: var(--text-body);
  font-size: 0.88rem;
}

.comparison-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.compare-district-card {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.compare-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.compare-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.badge-kashmir { background: #e0f2fe; color: #0369a1; }
.badge-jammu { background: #fef3c7; color: #92400e; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.compare-table td {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.compare-table tr:last-child td { border-bottom: none; }


.history-topic-title {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 1.15rem;
  margin: 0.2rem 0 0.5rem 0;
  line-height: 1.35;
}

.history-finding-body {
  font-size: 0.86rem;
  color: var(--gray-700);
  line-height: 1.55;
  margin-bottom: 0.75rem;
  flex: 1;
}

.history-quote-box {
  background: #fdf8f4;
  border-left: 3px solid var(--saffron);
  padding: 0.5rem 0.75rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.82rem;
  color: var(--gray-800);
}

/* ==========================================================================
   End of Jammu & Kashmir Official Portal Stylesheet
   ========================================================================== */

/* ==========================================================================
   PHASE 2: EXTRACTED UTILITY CLASSES
   ========================================================================== */
/* ─── Royal Crimson & Warm Wax Ivory Hero Banner ─── */
.hero-banner {
  background: #801321;
  color: #ffffff;
  padding: 3.5rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #d4af37;
}
.hero-banner__ambient-glow {
  display: none;
}
.hero-banner::before {
  display: none;
}
.hero-banner__inner {
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  background: #fdfbf7;
  border: 2px solid #e5dcca;
  border-radius: 16px;
  padding: 2.75rem 2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.hero-banner__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 1.2rem;
  background: #fefce8;
  border: 1px solid #d4af37;
  border-radius: 30px;
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #801321;
  margin-bottom: 1.25rem;
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
}
.hero-banner__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: #801321;
  margin-bottom: 1.15rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.title-accent {
  color: #c57e10;
  -webkit-text-fill-color: initial;
  background: none;
}
.hero-banner__desc {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #334155;
  margin-bottom: 2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
  font-weight: 400;
}
.hero-banner__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.btn-hero-primary {
  background: #801321;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid #670f1a;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 12px rgba(128, 19, 33, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  background: #670f1a;
  color: #ffffff !important;
  text-decoration: none;
}

.btn-hero-secondary {
  background: #ffffff;
  color: #801321 !important;
  border: 1.5px solid #801321;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-hero-secondary:hover {
  background: #801321;
  color: #ffffff !important;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Quick Topic Pills */
.hero-quick-topics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid #e2d9cc;
}
.quick-topic-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.2rem;
}
.quick-topic-pill {
  background: #f3eee6;
  color: #4A0A12;
  border: 1px solid #dcd3c5;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.quick-topic-pill:hover {
  background: #801321;
  border-color: #801321;
  color: #ffffff;
  transform: translateY(-1px);
  text-decoration: none;
}

.floating-test-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  background: #801321;
  color: #ffffff;
  border: 1px solid #d4af37;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 30px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}
.floating-test-btn:hover {
  transform: translateY(-2px);
  background: #670f1a;
  color: #ffffff;
  text-decoration: none;
}
@media (max-width: 900px) {
  .floating-test-btn { display: none !important; }
}

/* ─── Glass Metrics Dashboard (Key Facts Bar) ─── */
.key-facts-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin: -1.75rem auto 2.5rem;
  max-width: var(--container-max);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  position: relative;
  z-index: 5;
}
.key-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1.5rem;
  text-align: center;
}
.key-fact-box {
  padding: 0.75rem 1rem;
  border-right: 1px dashed var(--border);
}
.key-fact-box:last-child { border-right: none; }
@media (max-width: 768px) {
  .key-fact-box { border-right: none; border-bottom: 1px dashed var(--border); padding-bottom: 1rem; }
  .key-fact-box:last-child { border-bottom: none; }
}
.key-fact__value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  font-family: var(--font-heading);
  line-height: 1.2;
}
.key-fact__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ─── Unified High-End Open Section Layouts ─── */
.content-block,
.section-block,
.content-box {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2.25rem 0 1.5rem;
  box-shadow: none;
  margin-bottom: 2.5rem;
  position: relative;
}

.content-block:hover,
.section-block:hover {
  box-shadow: none;
  border-color: transparent;
}

/* Variant Accents */
.content-block--heritage,
.section-block--heritage,
.content-block--peace,
.section-block--peace,
.content-block--geo,
.section-block--geo {
  background: transparent;
  background-image: none;
  border-top: none;
}

/* Dark Mode Overrides for Section Containers */


/* Section Block Headers */
.content-block__header,
.section-header {
  margin-bottom: 2rem;
  text-align: center;
}

.content-block__badge,
.section-eyebrow,
.section-eyebrow-tag {
  font-size: 0.775rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.95rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fdfbf7;
  color: #801321;
  border: 1.5px solid #d4af37;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.content-block__badge--green,
.content-block__badge--amber {
  color: #801321;
  background: #fdfbf7;
  border-color: #d4af37;
}

.content-block__title,
.section-title {
  font-family: var(--font-heading);
  color: #801321;
  font-size: clamp(1.75rem, 3.8vw, 2.3rem);
  margin: 0.4rem 0 0.5rem;
  font-weight: 700;
  line-height: 1.25;
}



.content-block__desc,
.section-desc {
  font-size: 1.05rem;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.68;
  color: #0f172a;
}



@media (max-width: 768px) {
  .content-block,
  .section-block {
    padding: 1.75rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 2rem;
  }
}

/* ─── Cohesive Cards & Aspect Ratios ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.card--green-top,
.card--navy-top {
  border-top: 3px solid #801321 !important;
}
.card--saffron-top {
  border-top: 3px solid #d4af37 !important;
}
/* Card accent borders defined at end of file */
.card h3 { font-family: var(--font-heading); color: var(--navy); font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 700; }
.card p { font-size: 0.925rem; color: #0f172a; line-height: 1.65; flex: 1; }

.main-container { max-width: var(--container-max); margin: var(--sp-12) auto; padding: 0 var(--sp-6); }

/* .nav-highlight-btn: redefined in polish section below */
.nav-test-btn { background: #9E2A2B; color: var(--white) !important; font-weight: 800; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); border: 1px solid var(--gold); }

.a11y-toolbar { display: flex; align-items: center; gap: 0.25rem; background: rgba(255,255,255,0.15); padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); }
.a11y-toolbar__btn { background: transparent; border: none; color: var(--white); font-weight: 700; cursor: pointer; padding: 0 0.2rem; }
.a11y-toolbar__btn--sm { font-size: var(--fs-xs); }
.a11y-toolbar__btn--lg { font-size: var(--fs-sm); }
.a11y-toolbar__sep { opacity: 0.4; font-size: 0.7rem; }

.saved-vault-btn { background: var(--saffron); color: #1a1000; border: none; padding: 0.2rem 0.6rem; border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: 700; cursor: pointer; transition: background var(--dur-fast); }
.saved-vault-btn:hover { background: var(--saffron-light); }

/* ─── Modern Accessible Live Ticker & Announcement Bar ─── */
.live-ticker-bar {
  background: #fcfaf7;
  color: #4A0A12;
  border-top: 2px solid #801321;
  border-bottom: 2px solid #e5dcca;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.live-ticker-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.live-ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #801321;
  color: #ffffff;
  border: 1px solid #670f1a;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(128, 19, 33, 0.2);
}
.live-ticker-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  min-height: 28px;
  display: flex;
  align-items: center;
}
.ticker-slide {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  animation: fadeInSlide 0.35s ease;
}
@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ticker-chip {
  background: #fef08a;
  color: #851422;
  border: 1px solid #eab308;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-text {
  color: #4A0A12;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}
.live-ticker-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ticker-btn {
  background: #ffffff;
  color: #4A0A12;
  border: 1px solid #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ticker-btn:hover {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
}
.ticker-counter {
  font-size: 0.75rem;
  color: #0f172a;
  font-weight: 700;
  margin-left: 4px;
  min-width: 32px;
  text-align: center;
}
@media (max-width: 640px) {
  .live-ticker-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .live-ticker-content {
    order: 3;
    width: 100%;
  }
  .ticker-text {
    white-space: normal;
    font-size: 0.8rem;
  }
}

main, [role="main"] { min-height: 60vh; }
[id] { scroll-margin-top: 4.5rem; }

@media (max-width: 768px) {
  /* Mobile Typography & Line Height Improvements */
  body {
    font-size: 1rem;
    line-height: 1.75;
  }
  p {
    font-size: 0.975rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
  }
  h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); line-height: 1.2; }
  h2 { font-size: clamp(1.4rem, 5vw, 1.8rem); line-height: 1.25; margin-top: 1.5rem; }
  h3 { font-size: clamp(1.15rem, 4vw, 1.35rem); line-height: 1.3; }

  /* ─── Stacked Responsive Mobile Data Tables ─── */
  .data-table-wrap, .compare-table-box, .table-responsive {
    overflow-x: visible !important;
    border: none !important;
    margin: 1.25rem 0 !important;
  }

  table.data-table, 
  table.compare-table, 
  table.gi-details-table, 
  table.responsive-table {
    display: block !important;
    width: 100% !important;
    border: none !important;
  }

  table.data-table thead, 
  table.compare-table thead, 
  table.gi-details-table thead {
    display: none !important; /* Hide wide table headers on mobile */
  }

  table.data-table tbody, 
  table.compare-table tbody, 
  table.gi-details-table tbody {
    display: block !important;
    width: 100% !important;
  }

  table.data-table tbody tr, 
  table.compare-table tbody tr, 
  table.gi-details-table tr {
    display: block !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    margin-bottom: 1.25rem !important;
    box-shadow: var(--shadow-sm) !important;
  }

  table.data-table tbody td, 
  table.compare-table tbody td, 
  table.gi-details-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.6rem 0 !important;
    border-bottom: 1px dashed var(--border) !important;
    font-size: 0.9rem !important;
    text-align: right !important;
    word-break: break-word !important;
  }

  table.data-table tbody td:last-child, 
  table.compare-table tbody td:last-child, 
  table.gi-details-table td:last-child {
    border-bottom: none !important;
  }

  table.data-table tbody td:first-child, 
  table.compare-table tbody td:first-child {
    font-weight: 700 !important;
    color: var(--navy) !important;
    border-bottom: 1.5px solid var(--border) !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 0.4rem !important;
    font-size: 1rem !important;
    justify-content: flex-start !important;
  }

  .phrasebook-grid, .food-cards-grid, .craft-gallery-grid, .floral-grid,
  .history-research-grid, .nh44-sectors-grid, .culinary-grid,
  .district-weather-grid, .comparison-results-grid { grid-template-columns: 1fr; }
  .hero-banner { padding: var(--sp-10) var(--sp-4); }
  .hero-banner__actions { flex-direction: column; align-items: center; }
  .key-facts-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
  .content-block { padding: var(--sp-5); }
  .floating-test-btn { bottom: 12px; left: 12px; padding: var(--sp-2) var(--sp-4); font-size: 11px; }
  .gi-auth-input-group { flex-direction: column; }
  .compare-selectors-group, .selectors-row { flex-direction: column; }
  .cards-grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .key-facts-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .cards-grid--auto, .gallery-grid { grid-template-columns: 1fr; }
  .quick-stats__inner { grid-template-columns: 1fr; }
  .ticker__inner { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .dynamic-marquee-track, .news-ticker-track { animation: none !important; }
}
@media print { .floating-test-btn { display: none !important; } }

/* ==========================================================================
   PAGE-SPECIFIC COMPONENTS (migrated from inline <style> blocks)
   ========================================================================== */

/* ─── Flags / Vexillology Page ──────────────────────────────────────────── */
.flag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.flag-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.flag-visual {
  height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  font-weight: bold;
  color: white;
  font-size: 0.85rem;
}
.flag-info {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.flag-desc {
  font-size: var(--fs-sm);
  color: #0f172a;
  line-height: 1.55;
}
.flag-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
}

/* ─── Generic Section Spacing ───────────────────────────────────────────── */
.section--spaced { margin-bottom: 3.5rem; }
.page-layout--contained { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem; }

/* ─── Modern Interactive Site Footer ─── */
.site-footer-container {
  background: #fdfbf7;
  color: #0f172a;
  padding: 3.5rem 1.5rem 1.5rem;
  border-top: 3px solid var(--saffron);
  margin-top: 4rem;
  font-size: 0.9rem;
}
.footer-inner {
  max-width: 1350px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.4fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-col--emergency {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-col--emergency {
    grid-column: span 1;
  }
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.footer-brand-logo {
  width: 42px;
  height: 42px;
  background: #fefce8;
  color: #801321;
  border: 2px solid #d4af37;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: serif;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.footer-brand-title {
  color: #801321;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin: 0;
  font-weight: 700;
}
.footer-brand-tag {
  font-size: 0.725rem;
  color: #854d0e;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-brand-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 1.25rem;
}
.footer-theme-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.footer-theme-btn:hover {
  background: #fefce8;
  border-color: #d4af37;
  color: #801321;
}

.footer-col-title {
  color: #801321;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.emergency-live-pulse {
  width: 8px;
  height: 8px;
  background: #dc2626;
  border-radius: 50%;
  box-shadow: 0 0 8px #dc2626;
  animation: pulse-dot 1.8s infinite;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
}
.footer-nav-list a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-nav-list a:hover {
  color: #801321;
  text-decoration: underline;
}

/* Emergency Helpline Cards */
.emergency-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}
.emergency-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.emergency-card:hover {
  border-color: #d4af37;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.emergency-card__name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
  line-height: 1.25;
}
.emergency-card__sub {
  font-size: 0.725rem;
  color: #64748b;
  margin-top: 2px;
}
.emergency-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.emergency-call-btn {
  background: #dcfce7;
  color: #15803d !important;
  border: 1px solid #bbf7d0;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.775rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.emergency-call-btn:hover {
  background: #15803d;
  color: #ffffff !important;
  text-decoration: none;
}
.emergency-copy-btn {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.emergency-copy-btn:hover {
  background: #e2e8f0;
}

.footer-bottom-bar {
  max-width: 1350px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #e5dcca;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.775rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PERFECT 16:9 CARD MEDIA & ASPECT RATIO STANDARD
   ═══════════════════════════════════════════════════════════════════════════ */
.card-media-wrap,
.gallery-card-img-wrap,
.food-img-wrap,
.craft-img-wrap,
.floral-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: var(--gray-100);
}

.card img,
.gallery-card img,
.food-img,
.craft-img,
.floral-img,
.flag-card img,
.media-card img {
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  display: block;
  border-radius: 12px 12px 0 0;
  background: var(--gray-100);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Standalone Card Images */
.card-standalone img,
.img-contained {
  border-radius: 12px !important;
}

/* Hover Scale Micro-animations across all Card Grids */
.card:hover img,
.gallery-card:hover img,
.food-card-cute:hover .food-img,
.craft-card-creative:hover .craft-img,
.floral-card-cute:hover .floral-img,
.flag-card:hover img {
  transform: scale(1.05);
}

/* Dark mode skeleton placeholder background */


@media (max-width: 480px) {
  .card img,
  .gallery-card img,
  .food-img-wrap,
  .craft-img-wrap {
    aspect-ratio: 16 / 9 !important;
    border-radius: 10px 10px 0 0;
  }
}

/* ==========================================================================
   DESIGN POLISH: UTILITY CLASSES & CONSISTENCY FIXES
   ========================================================================== */

/* ─── Section Eyebrow Tag ─── */
.section-eyebrow-tag {
  font-size: 0.775rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.95rem;
  border-radius: 20px;
  display: inline-flex !important;
  width: fit-content !important;
  max-width: max-content !important;
  align-items: center;
  gap: 6px;
  background: #fdfbf7;
  color: #801321;
  border: 1.5px solid #d4af37;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ─── Widget Section Box (replaces inline-styled wrapper sections) ─── */
.widget-section-box {
  background: linear-gradient(135deg, #ffffff 0%, #fff9fa 100%);
  border: 1px solid #fecdd3;
  border-top: 5px solid #801321;
  border-radius: 20px;
  padding: 2.25rem 2rem;
  box-shadow: 0 10px 30px rgba(128, 19, 33, 0.06);
  margin-bottom: var(--sp-10);
}

/* ─── Portal Card (replaces inline-styled subject link cards) ─── */
.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out);
}
.portal-card:hover {
  border-color: var(--saffron);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}
.portal-card__icon {
  font-size: 2rem;
  margin-bottom: var(--sp-3);
  display: block;
}
.portal-card h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.portal-card p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0;
  line-height: 1.6;
}




/* ─── Card Action Button (replaces inline-styled card CTA links) ─── */
.btn-card-action {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: var(--sp-3);
  background: var(--navy);
  color: var(--white) !important;
  font-weight: 700;
  font-size: var(--fs-sm);
  border-radius: var(--radius);
  text-decoration: none;
  margin-top: var(--sp-4);
  transition: background var(--dur-fast) var(--ease-out);
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
}
.btn-card-action:hover {
  background: var(--navy-mid);
  color: var(--white) !important;
  text-decoration: none;
}

/* ─── Full-Width Search Input (replaces inline-styled search) ─── */
.search-input-full {
  width: 100%;
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--fs-base);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  outline: none;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg-card);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.search-input-full:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(146, 26, 40, 0.1);
  background: var(--white);
}


/* ─── Filter Button Group ─── */
.filter-btn-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.75rem;
}
.filter-btn-styled {
  padding: 0.45rem 1rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #4A0A12;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.filter-btn-styled:hover {
  background: #f8fafc;
  border-color: #1e293b;
}
.filter-btn-styled.active {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
  box-shadow: 0 4px 12px rgba(128, 19, 33, 0.25);
}



/* ─── Results Container (3-Column Royal Crimson Vault Grid) ─── */
.results-container {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.15rem !important;
  align-items: stretch !important;
}

@media (max-width: 992px) {
  .results-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 580px) {
  .results-container {
    grid-template-columns: 1fr !important;
  }
}

.resource-vault-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 28px rgba(128, 19, 33, 0.18) !important;
  border-color: #e11d48 !important;
}

.filter-btn-group {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
  margin-bottom: 1.5rem !important;
}

.filter-btn-styled {
  background: #fff0f2 !important;
  color: #801321 !important;
  border: 1px solid #fecdd3 !important;
  border-radius: 20px !important;
  padding: 6px 16px !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.filter-btn-styled:hover,
.filter-btn-styled.active {
  background: #801321 !important;
  color: #ffffff !important;
  border-color: #801321 !important;
  box-shadow: 0 4px 12px rgba(128, 19, 33, 0.3) !important;
}

/* ─── Section Inner Spacing ─── */
.section-header-group {
  margin-bottom: var(--sp-6);
}

/* ─── Loading Placeholder ─── */
.loading-placeholder {
  color: var(--text-muted);
  padding: var(--sp-6);
  text-align: center;
  font-style: italic;
}

/* ─── Divider ─── */
.content-divider {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-6);
}

/* ─── Consistent Card Accent Borders ─── */
.card--saffron-top { border-top: 3px solid var(--saffron) !important; }
.card--navy-top { border-top: 3px solid var(--navy) !important; }
.card--green-top { border-top: 3px solid var(--green) !important; }

/* ─── Nav Highlight & Test Button Polish ─── */
.nav-highlight-btn {
  background: #d4af37;
  color: #1a1000 !important;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 0.75rem;
  transition: background var(--dur-fast), transform var(--dur-fast);
  border: none;
  line-height: 1.2;
}
.nav-highlight-btn:hover {
  background: #e5a93c;
  transform: translateY(-1px);
  text-decoration: none;
  color: #1a1000 !important;
}

.nav-test-btn {
  background: var(--navy);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 0.75rem;
  transition: background var(--dur-fast), transform var(--dur-fast);
  border: none;
  line-height: 1.2;
}
.nav-test-btn:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
  text-decoration: none;
  color: #ffffff !important;
}

/* ─── Dark Mode for New Utility Classes ─── */





/* ─── Floating Quick Search Trigger Button ─── */
#floating-search-trigger { display: none !important; }
#floating-search-trigger:hover {
  transform: translateY(-3px) scale(1.03);
  background: #801321;
  box-shadow: 0 12px 28px rgba(128, 19, 33, 0.45);
  border-color: #d4af37;
}
#floating-search-trigger kbd {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.725rem;
  font-family: inherit;
}
@media (max-width: 640px) {
  #floating-search-trigger span,
  #floating-search-trigger kbd {
    display: none;
  }
  #floating-search-trigger { display: none !important; }
}

/* ─── Modal Filter Chips ─── */
.research-filter-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.modal-filter-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 0.35rem 0.8rem;
  border-radius: 18px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-filter-chip:hover {
  background: #f1f5f9;
  color: #801321;
}
.modal-filter-chip.active {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
  box-shadow: 0 2px 8px rgba(128, 19, 33, 0.25);
}




/* ─── Quick Search Tags ─── */
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}
.quick-tag {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #801321;
  padding: 0.35rem 0.85rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.quick-tag:hover {
  background: #801321;
  color: #ffffff;
  transform: translateY(-1px);
}
mark.search-highlight {
  background: #fef08a;
  color: #854d0e;
  padding: 0.05rem 0.2rem;
  border-radius: 3px;
  font-weight: 600;
}



/* ─── Marquee Animation for Daily Latest Ticker ────────────────────────── */
@keyframes marquee-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}
.ticker:hover .ticker__text {
  animation-play-state: paused !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UNIVERSAL MULTI-DEVICE RESPONSIVE & COMPACT SPACING SYSTEM
   Optimizes vertical real estate, grid gaps, typography, and card padding.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Enforce Strict Zero-Horizontal-Scroll Bounds */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

@keyframes marquee-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* 1. Global Container & Section Compactness */
main {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.main-container, .container, section:not(.hero-banner):not(.full-width-section):not(.live-ticker-bar):not(.key-facts-bar), article {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-banner, .live-ticker-bar, .key-facts-bar, .gov-bar, .site-nav {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.hero-banner {
  padding: 2.25rem 1.5rem !important;
}

.container {
  margin-top: 1.5rem !important;
  margin-bottom: 2.5rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* 2. Hero Banners & Header Padding Optimization */
.hero, .synth-hero-banner, .mono-hero-banner, .aurora-hero-banner {
  padding: 2rem 1.5rem !important;
  margin-bottom: 1.5rem !important;
  border-radius: 20px !important;
}

/* 3. Card Compactness & Reduced Whitespace */
.card, .synth-card, .mono-card, .scroll-iso-card, .handcrafted-card, .bento-card, .liquid-card, .retro-card, .skeuo-card {
  padding: 1.5rem 1.75rem !important;
  margin-bottom: 1.5rem !important;
  border-radius: 20px !important;
}

/* 4. Typography Scale Compacting */
h1, .hero-title, .synth-hero-title, .privacy-h1, .mono-title {
  font-size: clamp(1.6rem, 3.8vw, 2.5rem) !important;
  line-height: 1.2 !important;
  margin-bottom: 0.85rem !important;
}

h2, .synth-card-title, .privacy-h2 {
  font-size: clamp(1.25rem, 2.8vw, 1.6rem) !important;
  margin-bottom: 0.85rem !important;
  padding-bottom: 0.5rem !important;
}

h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem) !important;
  margin-bottom: 0.5rem !important;
}

p, .privacy-p, .synth-hero-desc {
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  margin-bottom: 0.85rem !important;
}

/* 5. Grid Auto-Fit & Gap Optimization */
.grid, .synth-weather-grid, .synth-winter-grid, .bento-grid, .bento-12-grid, .neo-grid, .skeuo-grid, .retro-grid, .y2k-grid {
  gap: 1rem !important;
}

.synth-widget-blue, .synth-widget-amber, .synth-winter-card, .iso-shield-box {
  padding: 1.25rem 1.5rem !important;
  border-radius: 18px !important;
}

.interactive-toc-container {
  margin: 1rem 0 1.25rem 0 !important;
  padding: 1rem 1.25rem !important;
}

/* 6. Multi-Device Mobile & Tablet Responsiveness */
@media (max-width: 1024px) {
  main.container, .container {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }
  .hero, .hero-banner, .synth-hero-banner, .mono-hero-banner {
    padding: 1.5rem 1.25rem !important;
  }
  .card, .synth-card, .mono-card, .scroll-iso-card, .bento-card {
    padding: 1.25rem 1.35rem !important;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 0.92rem !important;
  }
  .hero, .hero-banner, .synth-hero-banner, .mono-hero-banner, .scroll-iso-card {
    padding: 1.25rem 1rem !important;
    margin-bottom: 1.25rem !important;
    border-radius: 16px !important;
  }
  .synth-nav, .hero-buttons, .btn-group {
    flex-direction: column !important;
    width: 100% !important;
  }
  .btn-synth-pink, .btn-synth-cyan, .btn-primary, .btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.75rem 1rem !important;
  }
  .synth-temp-num {
    font-size: 2.8rem !important;
  }
  .iso-perspective-stage {
    margin: 1.5rem auto 2.5rem !important;
    padding: 0 0.5rem !important;
  }
}

/* Universal Media & Image Fluid Responsiveness */
img, svg, video, iframe, embed, object {
  max-width: 100% !important;
  height: auto !important;
}

/* Universal Table Horizontal Scroll Safety */
table {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Universal Form & Search Input Responsiveness */
input, select, textarea, button {
  max-width: 100% !important;
}

.site-nav__search-form {
  max-width: 100% !important;
}

/* Floating Test Button Mobile Repositioning */
@media (max-width: 768px) {
  .floating-test-btn {
    bottom: 16px !important;
    right: 16px !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
    border-radius: 24px !important;
  }
}

@media (max-width: 480px) {
  main.container, .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  .card, .synth-card, .mono-card, .scroll-iso-card, .handcrafted-card, .bento-card {
    padding: 1rem !important;
    border-radius: 12px !important;
  }
  h1, .hero-title, .synth-hero-title, .privacy-h1 {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem) !important;
  }
}

/* Multi-Device Pillars Grid */
.pillars-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1rem !important;
  align-items: stretch !important;
}

@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .pillars-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Related Portal Links Matrix */
.related-portal-links-matrix {
  background: #f8fafc;
  border-top: 3px solid #d4af37;
  padding: 2.5rem 1.25rem;
  margin-top: 2.5rem;
}

.matrix-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  color: #801321;
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(180px, 100%, 240px), 1fr));
  gap: 0.85rem;
}

.matrix-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.matrix-link-item:hover {
  background: #fefce8;
  color: #801321 !important;
  border-color: #d4af37;
  transform: translateY(-2px);
}

/* Universal Visited Link Text Contrast Fix */
.portal-link-item,
.portal-link-item:link,
.portal-link-item:visited,
.portal-link-item span {
  text-decoration: none !important;
}

/* High Contrast Keyboard Focus Rings */
:focus-visible {
  outline: 2px solid #801321 !important;
  outline-offset: 3px !important;
}

/* ============================================================ */
/* ROYAL CHINAR RED & WARM SAFFRON GOLD HOME PAGE COMPONENTS    */
/* ============================================================ */

.portal-section {
  background: var(--white, #ffffff);
  border: 1px solid var(--border, #e2d9cc);
  border-radius: var(--radius-lg, 12px);
  padding: 2rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-badge {
  display: inline-block;
  background: #fefce8;
  border: 1px solid #d4af37;
  color: #801321;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #801321;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: #5a5850;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* Key Facts Grid */
.key-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.key-fact-card {
  background: #fdfbf7;
  border: 1px solid #e5dcca;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.key-fact-card:hover {
  transform: translateY(-3px);
  border-color: #d4af37;
}

.key-fact-val {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #801321;
  margin-bottom: 0.25rem;
}

.key-fact-label {
  font-size: 0.85rem;
  color: #0f172a;
  font-weight: 500;
}

/* Regional Comparator Tabs */
.tab-btn-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .tab-btn-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .tab-btn-group::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

.tab-btn {
  background: #fefce8;
  border: 1px solid #d4af37;
  color: #801321;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn.active,
.tab-btn:hover {
  background: #801321;
  color: #ffffff !important;
  border-color: #801321;
  box-shadow: 0 4px 12px rgba(128, 19, 33, 0.25);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.cards-grid .card {
  background: #fdfbf7;
  border: 1px solid #e5dcca;
  border-radius: 10px;
  padding: 1.35rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cards-grid .card:hover {
  transform: translateY(-4px);
  border-color: #d4af37;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cards-grid .card h3 {
  font-family: var(--font-heading, 'Playfair Display', serif);
  color: #801321;
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.cards-grid .card p {
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.6;
  margin: 0;
}

/* Quiz Terminal */
.quiz-terminal-card {
  background: #fdfbf7;
  border: 1.5px solid #e5dcca;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.quiz-question {
  font-family: var(--font-heading, 'Playfair Display', serif);
  color: #801321;
  font-size: 1.2rem;
  margin: 0;
}

.quiz-score-badge {
  background: #fefce8;
  border: 1px solid #d4af37;
  color: #801321;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

.quiz-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.quiz-opt-btn {
  background: #ffffff;
  border: 1px solid #e2d9cc;
  color: #334155;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-opt-btn:hover:not(:disabled) {
  background: #fefce8;
  border-color: #d4af37;
  color: #801321;
  transform: translateX(4px);
}

.quiz-feedback-box {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: 1rem;
}

/* Weather & Disaster Grid */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* Contextual Links Matrix */
.related-portal-links-matrix {
  background: #801321;
  border-top: 4px solid #d4af37;
  padding: 3rem 1.5rem;
  margin-top: 3rem;
  color: #ffffff;
}

.matrix-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  color: #fefce8;
  font-size: 1.35rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.85rem;
}

.matrix-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.matrix-link-item:hover {
  background: #fefce8;
  color: #801321 !important;
  border-color: #d4af37;
  transform: translateY(-2px);
}

/* ─── Site Navigation Dark Theme Overrides ──────────────────────────────── */








/* ─── ENFORCED UNIVERSAL HIGH-CONTRAST DARK TEXT SYSTEM ──────────────────── */
body {
  color: #0f172a !important;
}

body p,
body li,
body td,
body th,
body label,
body select,
body textarea,
body .card p,
body .content-block p,
body .info-box p,
body .section-desc,
body .section-subtitle,
body .quiz-question,
body .weather-district-name,
body .weather-gauge-box,
body .weather-alert-box,
body .card p,
body .key-fact-label {
  color: #0f172a;
}

body strong,
body b {
  color: #020617 !important;
  font-weight: 700;
}

body h1:not(.hero-banner__title),
body h2:not(.hero-banner__title),
body h3,
body h4,
body h5,
body h6 {
  color: #0f172a;
}

body .text-muted,
body .card-sub,
body .section-subtitle {
  color: #1e293b !important;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UNIVERSAL ALL-DEVICE RESPONSIVENESS, TOUCH SENSITIVITY & VIEWPORT FIT v3.0
   ═══════════════════════════════════════════════════════════════════════════ */

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  touch-action: manipulation;
}

*, *::before, *::after {
  box-sizing: inherit;
  -webkit-tap-highlight-color: rgba(128, 19, 33, 0.08);
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ─── Touch Action, Tap Targets & Instant Touch Sensitivity ───────────────── */
button, a, input, select, textarea, [role="button"],
.option-btn, .quiz-opt-btn, .quiz-opt-btn-new, .modal-filter-chip, .filter-btn-styled,
.quick-tag, .btn-audio-pronounce, .btn-audio-speak, .btn-fc-nav, .fc-card,
.circuit-btn, .df-div-btn, .food-div-btn, .craft-region-btn, .btn-news-reset,
.tab-btn, .site-nav__toggle, .mobile-search-btn, .scroll-top-btn, .saved-vault-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(128, 19, 33, 0.08);
}

.fc-card {
  touch-action: pan-y;
}

/* Instant micro-feedback on touch/click */
button:active, .btn:active, .tab-btn:active, .option-btn:active, .quiz-opt-btn:active, .card-action-btn:active {
  transform: scale(0.98);
  transition: transform 0.05s ease-out;
}

/* ─── Audio Speaking Active Indicator ──────────────────────────────────── */
.speaking-active {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.5) !important;
  animation: pulse-audio-speak 1.2s infinite alternate ease-in-out;
}

@keyframes pulse-audio-speak {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

/* ─── Research Engine Modal & Saved Vault Styles ────────────────────────── */
.research-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 20, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.research-modal-container {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  width: 100%;
  max-width: 840px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: research-modal-enter 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes research-modal-enter {
  from { opacity: 0; transform: translateY(-14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.research-modal-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
}

.research-search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.research-search-bar:focus-within {
  border-color: #801321;
  background: #ffffff;
}

.research-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  color: #0f172a;
  font-family: var(--font-body, system-ui, sans-serif);
}

.research-clear-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.research-close-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.35rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.research-close-btn:hover {
  background: #e2e8f0;
}

.research-filter-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  scrollbar-width: none;
}

.research-filter-bar::-webkit-scrollbar { display: none; }

.modal-filter-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modal-filter-chip.active, .modal-filter-chip:hover {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
}

.research-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.research-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748b;
}

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

.research-empty-state h3 {
  color: #801321;
  margin: 0 0 0.5rem;
  font-family: var(--font-heading, serif);
  font-size: 1.2rem;
}

.research-empty-state p {
  font-size: 0.88rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.55;
  color: #475569;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.quick-tag {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.quick-tag:hover {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
  transform: translateY(-1px);
}

.results-meta-bar {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.research-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.research-card:hover {
  border-color: #d4af37;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.research-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.research-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.badge-exams { background: #fef3c7; color: #92400e; }
.badge-history { background: #fee2e2; color: #991b1b; }
.badge-crafts { background: #fdf4ff; color: #86198f; }
.badge-districts { background: #dcfce7; color: #166534; }
.badge-etymology { background: #f3e8ff; color: #6b21a8; }
.badge-pages { background: #e0f2fe; color: #0369a1; }
.badge-general { background: #f1f5f9; color: #334155; }

.research-card-title {
  margin: 0.15rem 0 0.25rem;
  font-size: 1.05rem;
  color: #801321;
  font-family: var(--font-heading, serif);
  font-weight: 700;
}

.research-card-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.research-card-body {
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.55;
  margin: 0;
}

.card-action-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.card-action-btn:hover {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
}

.card-save-btn.saved-active {
  background: #fef08a !important;
  color: #854d0e !important;
  border-color: #eab308 !important;
}

.research-modal-footer {
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-hint {
  font-size: 0.78rem;
  color: #64748b;
}

.footer-actions {
  display: flex;
  gap: 0.5rem;
}

.footer-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.footer-btn:hover {
  background: #0f172a;
  color: #ffffff;
}

/* ─── Lightbox Styles ──────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox.open {
  display: flex !important;
}

.lightbox__close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox__nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lightbox__nav-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox__nav-prev { left: max(16px, env(safe-area-inset-left, 16px)); }
.lightbox__nav-next { right: max(16px, env(safe-area-inset-right, 16px)); }

.lightbox__content-box {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.lightbox__img {
  max-width: 85vw;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.lightbox__caption-title {
  color: #ffffff;
  font-family: var(--font-heading, serif);
  font-size: 1.05rem;
  display: block;
}

.lightbox__caption-desc {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  max-width: 600px;
  margin: 0.2rem auto 0;
  line-height: 1.45;
}

.lightbox__counter-badge {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
}

/* ─── Flashcards 3D Performance & Touch Styling ────────────────────────── */
.fc-card {
  perspective: 1000px;
  -webkit-perspective: 1000px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.fc-card .fc-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ─── Mobile Viewport Responsiveness Breakpoints ───────────────────────── */
@media (max-width: 992px) {
  .site-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
  }
  .site-nav__menu {
    display: none;
  }
  .site-nav__menu.open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 3px solid #801321;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0;
    margin: 0;
  }
  .site-nav__item {
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
  }
  .site-nav__link {
    padding: 0.85rem 1.25rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    width: 100%;
    box-sizing: border-box;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-height: 48px;
  }
  .site-nav__dropdown {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0.5rem 0.5rem 0.5rem 1rem !important;
    display: none;
    background: #450a11 !important;
    border-left: 3px solid #c87a1e !important;
    border-radius: 8px !important;
    margin: 4px 10px 10px 10px !important;
  }
  .site-nav__item.open .site-nav__dropdown {
    display: flex !important;
    flex-direction: column !important;
  }
  .site-nav__dropdown li {
    width: 100%;
    list-style: none;
  }
  .site-nav__dropdown a {
    padding: 0.75rem 1rem !important;
    font-size: 0.94rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    min-height: 44px;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .site-nav__dropdown a:hover,
  .site-nav__dropdown a:active {
    background: rgba(200, 122, 30, 0.3) !important;
    color: #fde68a !important;
    padding-left: 1.25rem !important;
  }
  .site-nav__toggle {
    display: flex !important;
  }
  .mobile-search-btn {
    display: flex !important;
  }
  .site-nav__search-form {
    display: none !important;
  }

  .page-layout, .container-layout {
    grid-template-columns: 1fr !important;
  }
  .page-sidebar {
    margin-top: 2rem !important;
    order: 2 !important;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 60px !important;
  }
  [id] {
    scroll-margin-top: 60px !important;
  }

  /* Fluid Content & Layout Padding */
  .container, main.container, .container-wrap, main {
    padding-left: 12px !important;
    padding-right: 12px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* Universal Grid Collapse & Auto-Placement for All Mobile Layouts */
  .cards-grid, .cards-grid--2, .cards-grid--3, .cards-grid--4, .cards-grid--auto,
  .bento-grid, .bento-12-grid, .grid-3, .grid-4, .grid-2, .grid,
  .board-grid-cards, .calm-study-hero-grid, .dept-grid, .directory-grid,
  .district-grid, .district-weather-grid, .domain-3d-grid, .exam-grid,
  .flag-grid, .flywheel-grid, .food-grid, .form-grid, .format-grid,
  .gallery-grid-real, .hubs-aurora-grid, .job-exams-grid, .kas-grid,
  .layer-grid, .living-hero-grid, .matrix-grid, .mentor-controls-grid,
  .news-card-grid, .news-grid, .options-grid, .prod-grid, .quiz-options-grid,
  .ssc-grid, .synth-weather-grid, .synth-winter-grid,
  .tech-grid, .ticker-grid, .tl-grid, .tri-pillar-bar, .weather-grid,
  .districts-grid, .district-cards-grid, .emergency-cards-grid, .neo-grid,
  .skeuo-grid, .wiki-meta-grid,
  div[style*="display: grid"]:not(.key-facts-grid):not(.quick-stats):not(.stat-pill-grid),
  div[style*="display:grid"]:not(.key-facts-grid):not(.quick-stats):not(.stat-pill-grid),
  section[style*="display: grid"], section[style*="display:grid"],
  ul[style*="display: grid"], ul[style*="display:grid"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Reset all child grid-column and grid-row spans on mobile */
  .bento-col-4, .bento-col-6, .bento-col-8, .bento-col-12,
  [class*="bento-col-"],
  [style*="grid-column: span"], [style*="grid-column:span"],
  [style*="grid-column: 1 / -1"], [style*="grid-column:1 / -1"], [style*="grid-column: 1/-1"],
  [style*="grid-column: 1 / 3"], [style*="grid-column: 1/3"] {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Key Facts, Stats Pills & Mini Cards: 2 Columns on Mobile */
  .key-facts-grid, .quick-stats, .stat-pill-grid, .home-hero-stats-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .key-fact-card, .stat-pill {
    padding: 0.85rem 0.65rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .key-fact-val {
    font-size: 1.15rem !important;
  }
  .key-fact-label {
    font-size: 0.78rem !important;
  }

  /* Hero Banners Layout & Actions */
  .hero-banner, .home-hero, .page-hero, .synth-hero-banner, .mono-hero-banner {
    padding: 1.5rem 0.85rem !important;
    margin-bottom: 1.25rem !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-banner__inner {
    padding: 1.5rem 1rem !important;
    border-radius: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-banner__badge {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.75rem !important;
    margin-bottom: 0.85rem !important;
    white-space: normal !important;
    text-align: center;
  }
  .hero-banner__actions, .home-hero__actions, .btn-group, .hero-buttons, .synth-nav {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.65rem !important;
    margin-bottom: 1rem !important;
  }
  .btn-hero-primary, .btn-hero-secondary, .btn-primary, .btn-secondary,
  .btn-synth-pink, .btn-synth-cyan {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 0.88rem !important;
    padding: 0.75rem 1rem !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Quiz Terminal Card & Interactive Options */
  .quiz-terminal-card {
    padding: 1.25rem 1rem !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .quiz-question {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
  }
  .quiz-options-grid {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
    width: 100% !important;
  }
  .quiz-opt-btn, .quiz-opt-btn-new, .opt-btn {
    width: 100% !important;
    text-align: left !important;
    padding: 0.75rem 0.85rem !important;
    font-size: 0.88rem !important;
    min-height: 46px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  /* Quick Stats 2-Column on Mobile */
  .quick-stats, .home-hero__visual, .home-hero-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Typography Scaling */
  h1, .hero-title, .synth-hero-title, .home-hero__title, .page-hero__title, .hero-banner__title {
    font-size: clamp(1.4rem, 5.5vw, 2rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 0.75rem !important;
  }

  h2, .section-title {
    font-size: clamp(1.2rem, 4.2vw, 1.5rem) !important;
    line-height: 1.3 !important;
  }

  p, .hero-banner__desc, .home-hero__desc, .page-hero__subtitle {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
  }

  /* Buttons & Touch Optimization */
  button, .btn, .tab-btn, .option-btn, .quiz-opt-btn, input[type="submit"] {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Tab Navigation on Mobile */
  .tab-btn-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .tab-btn {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 130px !important;
    font-size: 0.82rem !important;
    padding: 0.6rem 0.75rem !important;
    text-align: center !important;
  }

  /* Table Horizontal Safety & Fluid Wrapping */
  .data-table-wrap, .table-responsive, .overflow-x-auto, .table-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 1rem 0 !important;
    box-sizing: border-box !important;
  }
  table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
  }
  table th, table td {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    min-width: 110px !important;
    font-size: 0.85rem !important;
    padding: 0.65rem 0.5rem !important;
  }

  /* Universal Mobile Text & Container Boundary Safety */
  p, h1, h2, h3, h4, h5, h6, li, span, a, blockquote, figcaption, div, section, article, aside, main {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .p-6, .p-8 {
    padding: 1.1rem 0.75rem !important;
  }

  .my-10, .my-8 {
    margin-top: 1.25rem !important;
    margin-bottom: 1.25rem !important;
  }

  /* Footer Layout */
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }
}

@media (max-width: 640px) {
  .research-modal-overlay {
    padding: 0;
  }

  .research-modal-container {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }

  .research-modal-header {
    padding-top: max(12px, env(safe-area-inset-top, 12px));
  }

  .research-modal-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  }

  .lightbox__nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .lightbox__img {
    max-width: 94vw;
    max-height: 62vh;
  }

  .share-pill-container {
    scale: 0.88;
    transform-origin: bottom right;
    bottom: max(10px, env(safe-area-inset-bottom, 10px)) !important;
    right: max(10px, env(safe-area-inset-right, 10px)) !important;
  }
}

@media (max-width: 480px) {
  .gov-bar__inner {
    padding: 3px 8px;
    gap: 4px;
  }

  .gov-bar__links, .gov-bar__divider {
    display: none !important;
  }

  .gov-bar__title {
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  .gov-bar__subtitle {
    font-size: 10px !important;
    opacity: 0.9 !important;
  }

  .gov-bar__date {
    font-size: 11px !important;
  }

  .site-nav__inner {
    padding: 0 8px;
    gap: 6px;
  }

  .site-nav__brand-name {
    font-size: 1.05rem !important;
  }

  .site-nav__brand-sub {
    font-size: 9.5px !important;
    letter-spacing: 0.05em !important;
  }

  /* Mobile Smooth Horizontal Swipeable Tab Navigation (Native App Feel) */
  .tab-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    padding: 4px 4px 8px 4px !important;
    border-bottom: 1.5px solid #e2d9cc !important;
    margin-bottom: 1.25rem !important;
    scrollbar-width: none !important;
  }
  .tab-nav::-webkit-scrollbar {
    display: none !important;
  }
  .tab-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    white-space: nowrap !important;
    padding: 7px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    display: inline-flex !important;
    align-items: center !important;
    min-height: 36px !important;
  }
  .tab-btn.active {
    background: #801321 !important;
    color: #ffffff !important;
    border-color: #801321 !important;
    box-shadow: 0 2px 8px rgba(128,19,33,0.25) !important;
  }

  /* Responsive Cards & Containers for Phones */
  .intern-page, .radar-page, .tourism-page, .bhasha-page, .services-page, .admin-page {
    padding: 1rem 10px 4rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .studio-hero, .radar-hero, .bhasha-hero, .services-hero, .fellowship-hero, .tour-hero {
    padding: 1.75rem 1rem !important;
    border-radius: 16px !important;
    margin-bottom: 1.25rem !important;
  }

  .studio-split-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .ide-code-textarea, .ide-textarea {
    min-height: 220px !important;
    font-size: 12px !important;
    padding: 10px !important;
  }

  .offer-letter-card, .master-cert-card, .intern-id-badge-card {
    padding: 1.5rem 1rem !important;
    border-width: 4px !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .search-filter-box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .vocab-table-wrap, .rubric-table, .leader-table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .key-facts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .card, .content-block, .info-box, .module-card, .matrix-card, .multiplier-card, .pillar-card {
    padding: 1rem 0.85rem !important;
    border-radius: 8px !important;
  }

  /* Hub Page Headers & Links on Small Screens */
  .header-container {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.65rem !important;
  }
  .nav-links {
    justify-content: center !important;
    width: 100% !important;
    gap: 0.4rem !important;
  }
  .nav-links a {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    flex: 1 1 auto !important;
    text-align: center !important;
  }
  .streak-box {
    flex-direction: column !important;
    text-align: center !important;
    padding: 1.25rem 1rem !important;
    border-radius: 16px !important;
    gap: 0.75rem !important;
  }
  .streak-num {
    justify-content: center !important;
    font-size: 1.8rem !important;
  }
  .tri-pillar-bar {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    gap: 1rem !important;
  }
}

/* ─── Ultra-Small Screens (< 360px / Foldables) ────────────────────────── */
@media (max-width: 360px) {
  html {
    font-size: 13px;
  }

  .container, main.container, .container-wrap, .viral-container, .flywheel-container, .multiplier-container, .prep-container {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .key-facts-grid {
    grid-template-columns: 1fr !important;
  }

  .card, .content-block, .info-box, .module-card, .matrix-card, .multiplier-card {
    padding: 0.8rem 0.65rem !important;
  }

  .site-nav__brand-name {
    font-size: 0.95rem !important;
  }

  .hero-banner__title, .hero-h1, h1 {
    font-size: 1.35rem !important;
  }
}

/* ─── Universal Matrix Grid & Knowledge Deep Links ─────────────────────── */
.related-portal-links-matrix {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  background: #f8fafc !important;
}
.related-portal-links-matrix a {
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #e2d9cc !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}
.related-portal-links-matrix a:hover {
  background: #fdfbf7 !important;
  border-color: #c87a1e !important;
  color: #801321 !important;
  transform: translateY(-2px);
}
@media (max-width: 768px) {
  .related-portal-links-matrix {
    padding: 24px 12px !important;
  }
  .related-portal-links-matrix div[style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)) !important;
    gap: 8px !important;
  }
  .related-portal-links-matrix a {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM DIGITAL EXPERIENCE: CINEMATIC HERO, MAP & BENTO GRID
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. CINEMATIC HERO SECTION */
.cinematic-hero {
  position: relative;
  background: radial-gradient(120% 120% at 50% 10%, #ffffff 0%, #fbf9f5 55%, #f4eee2 100%);
  border-bottom: 1.5px solid #e2d9cc;
  padding: 3.75rem 1.5rem 3.25rem;
  overflow: hidden;
  text-align: center;
}

.cinematic-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(128, 19, 33, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.cinematic-hero__inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  z-index: 2;
}

.cinematic-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8f6f0;
  border: 1px solid rgba(128, 19, 33, 0.2);
  color: #801321;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.cinematic-hero__title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  color: #801321;
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin: 0 0 0.85rem;
}

.cinematic-hero__subtitle {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.04em;
  margin: 0 auto 1.5rem;
  max-width: 680px;
}

.cinematic-hero__desc {
  font-size: 0.95rem;
  color: #64748b;
  max-width: 720px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.cinematic-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-action-pill--primary {
  background: #801321;
  border-color: #801321;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(128, 19, 33, 0.25);
}

.hero-action-pill:hover {
  transform: translateY(-2px);
  border-color: #801321;
  box-shadow: 0 8px 20px rgba(128, 19, 33, 0.08);
}

.hero-action-pill--primary:hover {
  background: #961627;
  border-color: #961627;
  box-shadow: 0 8px 24px rgba(128, 19, 33, 0.35);
}

/* 2. SIGNATURE INTERACTIVE 20-DISTRICT MAP & INTELLIGENCE ENGINE */
.jk-map-section {
  background: #ffffff;
  border: 1px solid #e2d9cc;
  border-radius: 16px;
  padding: 2.25rem 2rem;
  margin: 2.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.map-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.map-division-tabs {
  display: flex;
  gap: 8px;
  background: #f8fafc;
  padding: 4px;
  border-radius: 30px;
  border: 1px solid #e2e8f0;
}

.map-division-tab {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-division-tab.active {
  background: #801321;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(128, 19, 33, 0.25);
}

.jk-map-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  align-items: start;
}

.jk-map-visual-box {
  background: radial-gradient(circle at center, #fdfbf7 0%, #f8f6f0 100%);
  border: 1.5px solid #e5dcca;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  text-align: center;
}

.jk-map-svg {
  width: 100%;
  max-height: 480px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.05));
}

/* ─── Animated Radar Beacon Pins on Map ─── */
.map-beacon-pin {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.map-beacon-pin .beacon-inner-dot {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), fill 0.2s ease, filter 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.map-beacon-pin:hover .beacon-inner-dot {
  transform: scale(1.6);
  fill: #801321 !important;
  filter: drop-shadow(0 0 10px rgba(128, 19, 33, 0.85));
}

.map-beacon-pin .beacon-pulse-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: beaconPulse 2.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.map-beacon-pin.is-active .beacon-pulse-ring {
  animation: activeBeaconPulse 1.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  stroke: #801321 !important;
  stroke-width: 2.5;
}

.map-beacon-pin.is-active .beacon-inner-dot {
  fill: #801321 !important;
  transform: scale(1.5);
  filter: drop-shadow(0 0 10px rgba(128, 19, 33, 0.9));
}

@keyframes beaconPulse {
  0% {
    r: 6;
    opacity: 0.9;
    stroke-width: 2;
  }
  50% {
    opacity: 0.45;
  }
  100% {
    r: 22;
    opacity: 0;
    stroke-width: 0.5;
  }
}

@keyframes activeBeaconPulse {
  0% {
    r: 8;
    opacity: 1;
    stroke-width: 3;
  }
  60% {
    opacity: 0.5;
  }
  100% {
    r: 30;
    opacity: 0;
    stroke-width: 0.5;
  }
}

/* ─── Animated District Modal Drawer ─── */
.jk-district-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.jk-district-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.jk-district-modal-card {
  background: #ffffff;
  border: 1.5px solid #e2d9cc;
  border-radius: 14px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.jk-district-modal-overlay.is-open .jk-district-modal-card {
  transform: scale(1) translateY(0);
}
.jk-district-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}
.jk-district-modal-close:hover {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
}

.district-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 0.85rem;
}

.carousel-nav-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  user-select: none;
}

.carousel-nav-btn:hover {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
  transform: scale(1.08);
}

.district-selector-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  flex: 1;
}
.district-selector-carousel::-webkit-scrollbar { display: none; }

.district-selector-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.district-selector-pill:hover,
.district-selector-pill.is-active {
  background: #801321;
  color: #ffffff;
  border-color: #801321;
  box-shadow: 0 2px 8px rgba(128, 19, 33, 0.25);
  transform: translateY(-1px);
}

.jk-map-hover-card {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

/* District Info Live Panel */
.jk-district-live-panel {
  background: #ffffff;
  border: 1.5px solid #e2d9cc;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.panel-fade-in {
  animation: panelSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes panelSlideIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dist-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.dist-panel-division {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #801321;
}

.dist-panel-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.75rem;
  font-weight: 800;
  color: #801321;
  margin: 2px 0 0;
}

.dist-panel-badge {
  background: #f8f6f0;
  border: 1px solid rgba(128, 19, 33, 0.2);
  color: #801321;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 16px;
}

.dist-panel-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 1.25rem;
}

.dist-stat-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  border-radius: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dist-stat-item:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.dist-stat-lbl {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dist-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.dist-detail-row {
  margin-bottom: 0.85rem;
}

.dist-detail-lbl {
  display: block;
  font-size: 0.82rem;
  color: #801321;
  margin-bottom: 2px;
}

.dist-detail-txt {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.55;
  margin: 0;
}

/* District Action Buttons */
.dist-panel-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.dist-modal-open-btn {
  flex: 1 1 180px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #801321 0%, #9e1b2d 100%);
  color: #ffffff !important;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(128, 19, 33, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}

.dist-modal-open-btn:hover {
  background: linear-gradient(135deg, #961627 0%, #b31f34 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(128, 19, 33, 0.4);
}

.dist-modal-open-btn:active {
  transform: translateY(0);
}

.dist-explore-btn {
  flex: 1 1 180px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: #801321 !important;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid #801321;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(128, 19, 33, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dist-explore-btn:hover {
  background: #801321;
  color: #ffffff !important;
  border-color: #801321;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(128, 19, 33, 0.3);
}

.dist-explore-btn .btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.dist-explore-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* 3. MODERN ASYMMETRICAL BENTO GRID */
.bento-section {
  margin: 2.5rem 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.bento-card {
  background: #ffffff;
  border: 1px solid #e2d9cc;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
  color: inherit !important;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: #801321;
  box-shadow: 0 10px 28px rgba(128, 19, 33, 0.08);
}

.bento-card--span-7 { grid-column: span 7; }
.bento-card--span-5 { grid-column: span 5; }
.bento-card--span-4 { grid-column: span 4; }
.bento-card--span-8 { grid-column: span 8; }
.bento-card--span-6 { grid-column: span 6; }

.bento-card__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.bento-card__badge--saffron,
.bento-card__badge--red {
  background: #f8f6f0;
  border: 1px solid rgba(128, 19, 33, 0.2);
  color: #801321;
}

.bento-card__badge--green {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.bento-card__title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #801321;
  margin: 0 0 0.5rem;
}

.bento-card__desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.bento-card__link {
  font-weight: 700;
  font-size: 0.85rem;
  color: #801321;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 4. PREPARE FOR J&K EXAMS & CAREER HUB SPOTLIGHT */
.exams-spotlight-section {
  background: linear-gradient(135deg, #ffffff 0%, #fdfbf7 100%);
  border: 1.5px solid #e2d9cc;
  border-radius: 16px;
  padding: 2.25rem 2rem;
  margin: 2.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.exam-target-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.exam-target-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.exam-target-pill:hover,
.exam-target-pill.active {
  background: #801321;
  color: #ffffff !important;
  border-color: #801321;
  box-shadow: 0 2px 8px rgba(128, 19, 33, 0.2);
}

.exams-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.exam-prep-card {
  background: #ffffff;
  border: 1px solid #e2d9cc;
  border-radius: 12px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  text-decoration: none !important;
  color: inherit !important;
}

.exam-prep-card:hover {
  transform: translateY(-3px);
  border-color: #d4af37;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.exam-prep-card__icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.exam-prep-card__title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #801321;
  margin: 0 0 0.4rem;
}

.exam-prep-card__desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.exam-prep-card__cta {
  font-weight: 700;
  font-size: 0.82rem;
  color: #801321;
}

/* Responsive Overrides for Bento, Map & District Modal */
@media (max-width: 992px) {
  .jk-map-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .bento-card--span-7,
  .bento-card--span-5,
  .bento-card--span-4,
  .bento-card--span-8,
  .bento-card--span-6 {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .map-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .map-division-tabs {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }
  .map-division-tab {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    font-size: 0.76rem;
    white-space: nowrap;
  }
  .jk-district-live-panel {
    padding: 1.25rem;
  }
  .dist-panel-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .dist-panel-footer {
    flex-direction: column;
  }
  .dist-modal-open-btn,
  .dist-explore-btn {
    width: 100%;
    flex: 1 1 100%;
  }
  .jk-district-modal-card {
    padding: 0;
    max-height: 94vh;
  }
}

/* ─── Global Accessibility, Touch Targets & Motion Polish ───────────────── */
:focus-visible {
  outline: 2.5px solid #801321;
  outline-offset: 2px;
}

button, .btn, .nav-link, a.action-btn, select, input[type="submit"] {
  touch-action: manipulation;
}

/* Universal Table Wrapping & Horizontal Scroll Safety */
table {
  max-width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Global Scrollbar Styling ─────────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: #801321 #f1efea;
}
*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
*::-webkit-scrollbar-track {
  background: #f1efea;
}
*::-webkit-scrollbar-thumb {
  background: #801321;
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: #961627;
}

/* ─── Global Card Hover Micro-Interactions ─────────────────────────────── */
.portal-card, .topic-category-card, .research-card, .district-card {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.portal-card:hover, .topic-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(128, 19, 33, 0.08);
}

/* ─── Print Stylesheet ─────────────────────────────────────────────────── */
@media print {
  #site-header, #site-footer, .no-print, .search-modal-backdrop, .lightbox, button {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }
  a {
    text-decoration: underline !important;
    color: #000000 !important;
  }
}

