:root {
  --ui-bg: #f7f6f2;
  --ui-card: #ffffff;
  --ui-ink: #0f172a;
  --ui-mute: #475569;
  --ui-line: #e5e3dc;
  --ui-brand: #0d2d6b;
  --ui-brand-soft: #eef3fc;
  --ui-accent: #e86f1c;
  --ui-ok: #0f766e;
}

body.app-shell {
  background-color: var(--ui-bg) !important;
  color: var(--ui-ink);
}

.surface-card {
  background: var(--ui-card) !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 1rem !important;
  box-shadow: 0 1px 2px rgba(13, 45, 107, 0.04), 0 8px 24px -16px rgba(13, 45, 107, 0.12) !important;
}

.card-hover:hover {
  transform: translateY(-2px) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(13, 45, 107, 0.08), 0 16px 32px -16px rgba(13, 45, 107, 0.16) !important;
}

/* Editorial Hero */
.hero-editorial {
  background: linear-gradient(135deg, #0d2d6b 0%, #153e8a 60%, #1e4b9e 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  box-shadow: 0 20px 40px -20px rgba(13, 45, 107, 0.45);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    gap: 2.5rem;
  }
}

.hero-sub {
  color: #dbeafe;
}

.hero-img-wrap {
  background: #faf9f5;
  border-radius: 1.25rem;
  padding: 0.75rem;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.35);
}

.hero-img-wrap img {
  border-radius: 0.875rem;
  width: 100%;
  height: auto;
  display: block;
}

/* Eligibility Banner */
.elig-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .elig-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.btn-brand {
  background-color: var(--ui-brand) !important;
  color: #ffffff !important;
}

.btn-brand:hover {
  background-color: #153e8a !important;
}

/* Quick scheme chips */
.quick-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background 0.15s ease, transform 0.15s ease;
}

.quick-chip:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

/* Clean Pagination override */
nav[role="navigation"] span[aria-current="page"] > span {
  background-color: var(--ui-brand) !important;
  color: #ffffff !important;
  border-color: var(--ui-brand) !important;
}

nav[role="navigation"] span[aria-disabled="true"] > span,
nav[role="navigation"] span.cursor-not-allowed {
  background-color: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: var(--ui-line) !important;
}

nav[role="navigation"] a {
  background-color: #ffffff !important;
  color: var(--ui-ink) !important;
  border-color: var(--ui-line) !important;
}

nav[role="navigation"] a:hover {
  background-color: var(--ui-brand-soft) !important;
  color: var(--ui-brand) !important;
}

/* Scheme detail tabs polish */
#tabs .tab-btn[aria-selected="true"],
#tabs .tab-btn.bg-blue-600 {
  background-color: var(--ui-brand) !important;
  color: #ffffff !important;
}

/* Category icon badge */
.cat-ico-badge {
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  background: var(--ui-brand-soft);
  color: var(--ui-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.group:hover .cat-ico-badge {
  background: var(--ui-brand);
  color: #ffffff;
}

/* Mobile CSS-only horizontal scroll-snap for Popular Schemes */
.snap-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 84%;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.snap-row::-webkit-scrollbar { display: none; }
.snap-row > a { scroll-snap-align: start; }

@media (min-width: 640px) {
  .snap-row {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 1.5rem;
  }
}
@media (min-width: 1280px) {
  .snap-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Audience "आप कौन हैं?" colourful grid */
.who-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .who-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .who-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.who-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 0.9375rem;
  text-align: center;
  color: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.35);
}
.who-btn:hover { transform: translateY(-2px); }

.state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .state-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .state-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
