/* ============================================================================
   NextGen Sarkari — full responsive review upgrades
   Loaded after the existing theme files so these rules are the final UI layer.
   Scope: public navigation, mobile header/drawer, homepage, listing filters,
   compact mobile cards, job actions and footer behavior.
   ========================================================================== */

:root {
  --ngs-mobile-nav-height: 64px;
  --ngs-drawer-layer: 7010;
  --ngs-overlay-layer: 7000;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(14, 165, 233, .14);
}

img {
  height: auto;
}

/* Keep the desktop layout centered and prevent oversized single cards. */
@media (min-width: 1025px) {
  nav.site-nav,
  .site-nav {
    justify-content: center !important;
    flex-wrap: nowrap !important;
  }

  .container,
  .main-content {
    width: min(1180px, calc(100% - 32px)) !important;
  }
}

/* --------------------------------------------------------------------------
   Header and navigation breakpoint
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  nav.site-nav,
  .site-nav {
    display: none !important;
  }

  .modern-nav-toggle {
    display: inline-flex !important;
  }

  header,
  .site-header,
  .page-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 6100 !important;
  }

  .logo-container,
  .site-brand,
  .sidebar-brand {
    width: 100% !important;
    max-width: 1180px !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  header,
  .site-header,
  .page-header {
    padding: 12px 22px !important;
  }

  .modern-theme-dot {
    display: inline-flex !important;
  }

  .modern-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 768px) {
  header,
  .site-header,
  .page-header {
    min-height: 62px !important;
    padding: 8px 12px !important;
  }

  .logo-container,
  .site-brand,
  .sidebar-brand {
    gap: 9px !important;
  }

  .logo-container .logo,
  .site-brand .logo,
  .sidebar-brand .logo,
  .logo {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 5px !important;
    border-radius: 13px !important;
  }

  .logo-container .site-brand-title,
  .site-brand-name h1,
  header h1,
  .site-header h1 {
    font-size: 1.02rem !important;
    line-height: 1.08 !important;
  }

  .modern-top-actions {
    gap: 5px !important;
  }

  .modern-theme-dot {
    display: none !important;
  }

  .modern-nav-toggle {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 12px !important;
  }

  .container,
  .main-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 430px) {
  .logo-container > div:not(.modern-top-actions) > p:not(.site-brand-title),
  .site-brand-name p,
  header .site-tagline,
  .site-header .site-tagline {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Compact right-side More drawer
   -------------------------------------------------------------------------- */
.modern-menu-overlay {
  z-index: var(--ngs-overlay-layer) !important;
  background: rgba(2, 8, 23, .42) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

.modern-menu-panel {
  z-index: var(--ngs-drawer-layer) !important;
  top: 76px !important;
  right: 12px !important;
  bottom: auto !important;
  width: min(350px, calc(100vw - 24px)) !important;
  max-height: calc(100dvh - 92px) !important;
  gap: 11px !important;
  padding: 15px !important;
  border-radius: 24px !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.modern-menu-panel-head {
  align-items: center !important;
  padding: 1px 1px 10px !important;
}

.modern-menu-kicker {
  padding: 4px 8px !important;
  font-size: .65rem !important;
}

.modern-menu-panel h2 {
  margin-top: 6px !important;
  font-size: 1.1rem !important;
  letter-spacing: -.035em !important;
}

.modern-menu-close {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 12px !important;
  font-size: 1.45rem !important;
}

.modern-menu-links {
  gap: 7px !important;
}

.modern-menu-section-label {
  margin: 4px 4px 0 !important;
  font-size: .64rem !important;
}

.modern-menu-link {
  width: 100%;
  min-height: 44px !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  text-align: left;
  cursor: pointer;
}

button.modern-menu-link {
  font: inherit;
}

.modern-menu-link-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 10px !important;
}

.modern-menu-link-icon .ng-ui-icon,
.modern-menu-link-icon .ng-sun-icon,
.modern-menu-link-icon .ng-moon-icon {
  width: 18px !important;
  height: 18px !important;
}

.modern-menu-link strong {
  font-size: .88rem !important;
}

.modern-menu-link-copy small {
  margin-top: 1px !important;
  font-size: .67rem !important;
  line-height: 1.25 !important;
}

.modern-menu-link--feature {
  min-height: 52px !important;
  padding-right: 52px !important;
}

.modern-menu-badge {
  right: 10px !important;
  padding: 3px 6px !important;
  font-size: .56rem !important;
}

.modern-menu-divider {
  margin-top: 3px !important;
}

.modern-menu-cta {
  display: none !important;
}

body.modern-menu-open .modern-bottom-nav {
  pointer-events: none !important;
}

@media (max-width: 768px) {
  .modern-menu-panel {
    top: 68px !important;
    right: 9px !important;
    width: min(84vw, 320px) !important;
    max-height: calc(100dvh - 82px) !important;
    padding: 13px !important;
    border-radius: 21px !important;
  }

  /* Home, Jobs, Updates, Papers and Study are already in the bottom bar. */
  .modern-menu-link--mobile-duplicate {
    display: none !important;
  }

  .modern-menu-navigation-label {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .modern-menu-panel {
    width: calc(100vw - 18px) !important;
  }
}

/* --------------------------------------------------------------------------
   Bottom navigation
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .modern-bottom-nav {
    z-index: 5000 !important;
    height: calc(var(--ngs-mobile-nav-height) + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(var(--ngs-mobile-nav-height) + env(safe-area-inset-bottom, 0px)) !important;
    padding: 5px 7px env(safe-area-inset-bottom, 0px) !important;
  }

  .modern-bottom-nav a {
    min-height: 52px !important;
    gap: 2px !important;
    padding: 4px 2px !important;
    font-size: .67rem !important;
  }

  .modern-bottom-icon .ng-ui-icon {
    width: 20px !important;
    height: 20px !important;
  }
}

/* --------------------------------------------------------------------------
   Homepage mobile density
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body.home-page .main-content {
    padding-top: 10px !important;
  }

  body.home-page .modern-announcement {
    margin: 8px 10px 0 !important;
  }

  body.home-page .modern-announcement-inner {
    min-height: 38px !important;
    padding: 7px 10px !important;
    font-size: .76rem !important;
  }

  body.home-page .hero {
    min-height: 0 !important;
    margin: 0 0 12px !important;
    padding: 22px 16px !important;
    border-radius: 20px !important;
  }

  body.home-page .hero h1,
  body.home-page .hero h2 {
    max-width: 100% !important;
    margin-bottom: 8px !important;
    font-size: clamp(1.7rem, 8vw, 2.05rem) !important;
    line-height: 1.08 !important;
  }

  body.home-page .hero-text {
    max-width: 100% !important;
    margin: 0 !important;
    font-size: .91rem !important;
    line-height: 1.5 !important;
  }

  body.home-page .hero-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 15px !important;
  }

  body.home-page .hero-buttons a {
    width: 100% !important;
    min-height: 42px !important;
    padding: 9px 10px !important;
    font-size: .79rem !important;
    white-space: nowrap !important;
  }

  body.home-page .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 0 20px !important;
  }

  body.home-page .stat-card {
    min-height: 76px !important;
    padding: 12px !important;
    border-radius: 16px !important;
  }

  body.home-page .stat-card span {
    font-size: 1.5rem !important;
  }

  body.home-page .stat-card small {
    font-size: .73rem !important;
  }

  body.home-page .section-headline {
    gap: 8px !important;
    margin: 18px 0 10px !important;
  }

  body.home-page .section-headline > h2,
  body.home-page .section-headline-title {
    font-size: 1.15rem !important;
  }

  body.home-page .section-headline > a,
  body.home-page .section-cta {
    min-height: 32px !important;
    padding: 6px 9px !important;
    font-size: .69rem !important;
  }

  body.home-page .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.home-page .category-card {
    min-height: 88px !important;
    gap: 7px !important;
    padding: 11px 6px !important;
    border-radius: 16px !important;
    text-align: center !important;
  }

  body.home-page .category-card .icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 11px !important;
  }

  body.home-page .category-card .icon .ng-ui-icon {
    width: 18px !important;
    height: 18px !important;
  }

  body.home-page .category-card p {
    margin: 0 !important;
    font-size: .69rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
  }

  body.home-page .home-jobs-section {
    position: relative;
    padding-bottom: 18px;
  }

  body.home-page .home-jobs-section::after {
    content: "Swipe to view all 4 jobs →";
    position: absolute;
    right: 2px;
    bottom: 0;
    color: #64748b;
    font-size: .66rem;
    font-weight: 750;
  }

  body.home-page .home-jobs-controls .home-jobs-scroll {
    display: none !important;
  }
}

@media (max-width: 365px) {
  body.home-page .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* --------------------------------------------------------------------------
   Compact filter toolbars and content cards
   -------------------------------------------------------------------------- */
.updates-filter-panel,
.papers-filter-card,
.results-filter-card,
.syllabus-filter-card {
  border-radius: 18px !important;
}

@media (max-width: 768px) {
  .updates-filter-panel,
  .papers-filter-card,
  .results-filter-card,
  .syllabus-filter-card {
    margin: 12px 0 16px !important;
    padding: 11px !important;
    border-radius: 16px !important;
  }

  .updates-filter-grid,
  .papers-filter-grid,
  .results-filter-grid,
  .syllabus-filter-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .updates-filter-grid > input:first-child,
  .papers-filter-grid > input:first-child,
  .results-filter-grid > .search-field:first-child,
  .syllabus-filter-grid > .search-field:first-child {
    grid-column: 1 / -1 !important;
  }

  .updates-filter-grid input,
  .updates-filter-grid select,
  .papers-filter-grid input,
  .papers-filter-grid select,
  .results-filter-grid input,
  .results-filter-grid select,
  .syllabus-filter-grid input,
  .syllabus-filter-grid select {
    width: 100% !important;
    min-height: 42px !important;
    padding: 9px 10px !important;
    font-size: .78rem !important;
    border-radius: 11px !important;
  }

  .results-filter-grid label,
  .syllabus-filter-grid label {
    margin-bottom: 5px !important;
    font-size: .72rem !important;
  }

  .community-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .community-button {
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 8px !important;
    font-size: .74rem !important;
  }

  .papers-grid,
  .results-grid,
  .syllabus-grid {
    grid-template-columns: 1fr !important;
    gap: 11px !important;
  }

  .paper-card,
  .results-card,
  .syllabus-card {
    min-height: 0 !important;
    padding: 15px !important;
    border-radius: 17px !important;
  }

  .paper-card h3,
  .results-card h3,
  .syllabus-card h3 {
    font-size: 1rem !important;
    line-height: 1.35 !important;
  }

  .paper-card p,
  .results-card p,
  .syllabus-card p {
    margin: 6px 0 !important;
    font-size: .81rem !important;
    line-height: 1.48 !important;
  }

  .paper-card .primary-btn,
  .results-card .primary-btn,
  .syllabus-card .primary-btn {
    width: auto !important;
    min-height: 36px !important;
    padding: 8px 11px !important;
    font-size: .75rem !important;
  }
}

/* Latest updates are cards on phones instead of a squeezed desktop table. */
.updates-mobile-cards {
  display: none;
}

@media (max-width: 768px) {
  .updates-table-wrap {
    display: none !important;
  }

  .updates-mobile-cards {
    display: grid;
    gap: 10px;
  }

  .updates-mobile-card {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #dceaf2;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .055);
  }

  .updates-mobile-card-top,
  .updates-mobile-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .updates-mobile-card-top {
    justify-content: space-between;
  }

  .updates-mobile-card h2 {
    margin: 0;
    color: #172033;
    font-size: .98rem;
    line-height: 1.38;
    letter-spacing: -.018em;
  }

  .updates-mobile-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #64748b;
    font-size: .79rem;
    line-height: 1.48;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .updates-mobile-card .updates-action {
    justify-self: start;
    min-height: 35px;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: .73rem;
  }
}

body.modern-dark .updates-mobile-card {
  background: #102032;
  border-color: rgba(148, 163, 184, .2);
}

body.modern-dark .updates-mobile-card h2 {
  color: #f1f5f9;
}

body.modern-dark .updates-mobile-card p {
  color: #a9b7c6;
}

/* --------------------------------------------------------------------------
   Jobs search panel and mobile rows
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .jobs-search-portal {
    padding: 12px 10px !important;
  }

  .jobs-search-inner {
    padding: 15px !important;
    border-radius: 18px !important;
  }

  .jobs-search-copy h1 {
    font-size: 1.55rem !important;
  }

  .jobs-search-copy p {
    font-size: .82rem !important;
  }

  .jobs-search-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 7px !important;
  }

  .jobs-search-form button {
    min-width: 72px !important;
    padding: 9px 11px !important;
  }

  .jobs-search-filters {
    display: flex !important;
    gap: 7px !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
    scrollbar-width: none;
  }

  .jobs-search-filters::-webkit-scrollbar {
    display: none;
  }

  .jobs-search-filters button {
    flex: 0 0 auto !important;
    min-height: 34px !important;
    padding: 7px 11px !important;
    font-size: .72rem !important;
  }
}

/* --------------------------------------------------------------------------
   Compact mobile footer accordion
   -------------------------------------------------------------------------- */
.ngs-footer-toggle {
  width: 100%;
  margin: 0 0 13px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-align: left;
  text-transform: uppercase;
  cursor: default;
}

.ngs-footer-toggle-icon {
  display: none;
}

@media (max-width: 768px) {
  .ngs-footer-inner {
    padding-top: 18px !important;
  }

  .ngs-footer-brand {
    margin-bottom: 12px !important;
  }

  .ngs-footer-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  .ngs-footer-section {
    display: block !important;
    overflow: hidden;
    border: 1px solid rgba(148, 210, 223, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
  }

  .ngs-footer-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    margin: 0 !important;
    padding: 9px 11px !important;
    font-size: .69rem !important;
    cursor: pointer;
  }

  .ngs-footer-toggle-icon {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    transition: transform .18s ease;
  }

  .ngs-footer-section.is-open .ngs-footer-toggle-icon {
    transform: rotate(180deg);
  }

  .ngs-footer-links,
  .ngs-footer-socials {
    display: none !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
    padding: 0 7px 7px !important;
  }

  .ngs-footer-section.is-open .ngs-footer-links,
  .ngs-footer-section.is-open .ngs-footer-socials {
    display: grid !important;
  }

  .ngs-footer-link,
  .ngs-footer-socials .ngs-footer-link {
    justify-content: flex-start !important;
    min-height: 34px !important;
    padding: 6px 7px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    font-size: .76rem !important;
  }

  .ngs-footer-bottom {
    margin-top: 11px !important;
  }
}

/* Dark-mode details for new controls. */
body.modern-dark .ngs-footer-toggle {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .modern-menu-panel,
  .modern-menu-overlay,
  .modern-menu-link,
  .ngs-footer-toggle-icon {
    transition: none !important;
  }
}

/* Final mobile job rows: the complete row is the action, so no narrow Action column. */
@media (max-width: 768px) {
  .jobs-listing-page .jobs-mobile-head,
  .jobs-listing-page .jobs-mobile-row {
    grid-template-columns: minmax(0, 1fr) 86px !important;
  }

  .jobs-listing-page .jobs-mobile-row {
    position: relative;
    min-height: 96px !important;
    padding-right: 17px;
  }

  .jobs-listing-page .jobs-mobile-head span:last-child {
    padding-left: 7px !important;
    padding-right: 9px !important;
    text-align: left !important;
  }

  .jobs-listing-page .mobile-job-main,
  .jobs-listing-page .mobile-job-date {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .jobs-listing-page .mobile-job-date {
    border-right: 0 !important;
  }

  .jobs-listing-page .mobile-job-action,
  .jobs-listing-page .mobile-job-view {
    display: none !important;
  }

  .jobs-listing-page .mobile-row-chevron {
    position: absolute;
    top: 50%;
    right: 6px;
    color: #0ea5e9;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-50%);
  }
}

@media (max-width: 370px) {
  .jobs-listing-page .jobs-mobile-head,
  .jobs-listing-page .jobs-mobile-row {
    grid-template-columns: minmax(0, 1fr) 78px !important;
  }
}

body.modern-dark.jobs-listing-page .mobile-row-chevron {
  color: #7dd3fc;
}

/* Homepage semantic H1 keeps the same visual treatment as the previous H2. */
body.home-page .hero h1 {
  max-width: 850px;
  margin: 0 auto 16px;
  color: var(--ng-text, #0f172a);
  font-family: 'Poppins', Inter, sans-serif;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-align: center;
}


/* ==========================================================================
   Mobile correction pack v2 — 23 Jul 2026
   Keeps the More panel compact, restores every navigation resource, fixes the
   homepage contrast, and limits the main Study Material page to four cards.
   ========================================================================== */

/* All menu resources stay available, but the panel remains a compact drawer. */
.modern-menu-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.modern-menu-nav-grid .modern-menu-link {
  min-width: 0;
}

.modern-menu-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.modern-menu-link--mobile-duplicate {
  display: flex !important;
}

@media (max-width: 768px) {
  .modern-menu-panel {
    top: 70px !important;
    right: 10px !important;
    bottom: auto !important;
    width: min(350px, calc(100vw - 30px)) !important;
    max-height: min(62dvh, 500px) !important;
    padding: 13px !important;
    border-radius: 22px !important;
    overflow-y: auto !important;
  }

  .modern-menu-panel-head {
    position: sticky;
    top: -13px;
    z-index: 2;
    margin: -1px -1px 3px;
    padding: 2px 2px 9px !important;
    background: inherit;
  }

  .modern-menu-panel h2 {
    font-size: 1rem !important;
  }

  .modern-menu-kicker {
    font-size: .58rem !important;
  }

  .modern-menu-navigation-label {
    margin-top: 0 !important;
  }

  .modern-menu-nav-grid .modern-menu-link {
    min-height: 42px !important;
    padding: 7px 8px !important;
  }

  .modern-menu-nav-grid .modern-menu-link-icon {
    width: 29px !important;
    height: 29px !important;
    min-width: 29px !important;
  }

  .modern-menu-nav-grid .modern-menu-link strong {
    min-width: 0;
    overflow: hidden;
    font-size: .73rem !important;
    line-height: 1.15;
    text-overflow: ellipsis;
  }

  .modern-menu-link--feature {
    min-height: 46px !important;
    min-width: 0 !important;
    padding: 7px 32px 7px 8px !important;
  }

  .modern-menu-tools-grid .modern-menu-link-icon {
    width: 29px !important;
    height: 29px !important;
    min-width: 29px !important;
  }

  .modern-menu-link--feature .modern-menu-link-copy small,
  .modern-menu-theme .modern-menu-link-copy small {
    display: none !important;
  }

  .modern-menu-link--feature strong,
  .modern-menu-theme strong {
    font-size: .72rem !important;
    line-height: 1.15 !important;
  }

  .modern-menu-theme {
    min-height: 42px !important;
  }

  .modern-menu-badge {
    right: 8px !important;
  }
}

@media (max-width: 370px) {
  .modern-menu-panel {
    width: calc(100vw - 22px) !important;
    right: 7px !important;
    max-height: 66dvh !important;
  }

  .modern-menu-nav-grid {
    gap: 6px;
  }
}

/* Homepage: restore a strong brand and remove the decorative bar crossing H1. */
body.home-page .site-header .site-brand-name,
body.home-page .site-header .site-brand-title {
  opacity: 1 !important;
  visibility: visible !important;
}

body.home-page .site-header .site-brand-name {
  display: flex !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

body.home-page .site-header .site-brand-title {
  display: block !important;
  color: #10213b !important;
  -webkit-text-fill-color: #10213b !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  text-shadow: none !important;
}

body.home-page .main-content .hero h1 {
  position: relative;
  z-index: 2;
  color: #ffffff !important;
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 8px 25px rgba(0, 0, 0, .22) !important;
}

@media (max-width: 768px) {
  body.home-page .main-content .hero::after {
    display: none !important;
    content: none !important;
  }

  body.home-page .modern-announcement-inner {
    align-items: center !important;
    line-height: 1.28 !important;
  }

  body.home-page .modern-announcement a {
    color: #10213b !important;
    font-size: .76rem !important;
    font-weight: 800 !important;
  }

  body.home-page .site-header {
    background: rgba(255, 255, 255, .96) !important;
    border-bottom: 1px solid rgba(14, 165, 233, .14) !important;
  }
}

/* Latest four study materials: four on desktop, horizontal swipe on phones. */
#allStudyMaterials.study-latest-carousel {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

#allStudyMaterials.study-latest-carousel .study-resource-card {
  min-width: 0;
}

#allStudyMaterials.study-latest-carousel .study-resource-thumb {
  object-fit: contain !important;
  background: #f3f8ff !important;
}

.sm-latest-swipe-hint {
  display: none;
}

@media (max-width: 980px) {
  #allStudyMaterials.study-latest-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  .sm-all-materials-section {
    overflow: hidden;
  }

  #allStudyMaterials.study-latest-carousel {
    display: flex !important;
    gap: 12px !important;
    margin-inline: -2px;
    padding: 2px 2px 10px;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #allStudyMaterials.study-latest-carousel::-webkit-scrollbar {
    display: none;
  }

  #allStudyMaterials.study-latest-carousel .study-resource-card {
    display: grid !important;
    grid-template-columns: 108px minmax(0, 1fr) !important;
    grid-template-rows: auto auto 1fr auto !important;
    flex: 0 0 min(88vw, 340px) !important;
    min-height: 144px !important;
    gap: 4px 11px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    scroll-snap-align: start;
  }

  #allStudyMaterials.study-latest-carousel .study-resource-thumb {
    grid-column: 1;
    grid-row: 1 / 5;
    width: 108px !important;
    height: 100% !important;
    min-height: 122px !important;
    margin: 0 !important;
    border-radius: 13px !important;
    object-fit: contain !important;
  }

  #allStudyMaterials.study-latest-carousel .study-resource-meta {
    grid-column: 2;
    grid-row: 1;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    margin: 0 !important;
    overflow: hidden;
  }

  #allStudyMaterials.study-latest-carousel .study-resource-meta .badge {
    min-width: 0;
    padding: 4px 7px !important;
    overflow: hidden;
    font-size: .6rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #allStudyMaterials.study-latest-carousel h3 {
    grid-column: 2;
    grid-row: 2;
    min-height: 0 !important;
    margin: 2px 0 0 !important;
    font-size: .9rem !important;
    line-height: 1.28 !important;
    -webkit-line-clamp: 2;
  }

  #allStudyMaterials.study-latest-carousel p {
    grid-column: 2;
    grid-row: 3;
    margin: 0 !important;
    font-size: .72rem !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 2;
  }

  #allStudyMaterials.study-latest-carousel .study-resource-actions {
    grid-column: 2;
    grid-row: 4;
    margin-top: 2px !important;
  }

  #allStudyMaterials.study-latest-carousel .primary-btn {
    min-height: 32px !important;
    padding: 6px 10px !important;
    border-radius: 9px !important;
    font-size: .69rem !important;
  }

  .sm-latest-swipe-hint {
    display: block;
    margin: 4px 2px 0;
    color: #64748b;
    font-size: .68rem;
    font-weight: 750;
    text-align: right;
  }
}


/* ==========================================================================
   Desktop hero + Study Material menu correction v3 — 23 Jul 2026
   ========================================================================== */

/* Keep the desktop homepage intro premium but much more compact. */
@media (min-width: 769px) {
  body.home-page .main-content {
    padding-top: 34px !important;
  }

  body.home-page .main-content .hero {
    width: min(100%, 920px) !important;
    min-height: 0 !important;
    margin: 0 auto 22px !important;
    padding: 42px 54px 44px !important;
    border-radius: 28px !important;
  }

  body.home-page .main-content .hero h1,
  body.home-page .main-content .hero h2 {
    max-width: 760px !important;
    margin: 0 auto 14px !important;
    font-size: clamp(2.55rem, 4.3vw, 3.55rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -.045em !important;
    text-align: center !important;
  }

  body.home-page .main-content .hero-text {
    max-width: 640px !important;
    margin: 0 auto !important;
    font-size: 1.02rem !important;
    line-height: 1.55 !important;
    text-align: center !important;
  }

  body.home-page .main-content .hero-buttons {
    justify-content: center !important;
    margin-top: 23px !important;
    gap: 12px !important;
  }

  body.home-page .main-content .hero .primary-btn,
  body.home-page .main-content .hero .secondary-btn {
    min-height: 44px !important;
    padding: 10px 22px !important;
    font-size: .88rem !important;
  }

  body.home-page .stat-grid {
    max-width: 1050px !important;
    gap: 16px !important;
    margin: 0 auto 34px !important;
  }

  body.home-page .stat-card {
    min-height: 112px !important;
    padding: 20px 16px !important;
    border-radius: 20px !important;
  }

  body.home-page .stat-card > span {
    font-size: 2.25rem !important;
    line-height: 1 !important;
  }

  body.home-page .stat-card > small {
    margin-top: 9px !important;
    font-size: .78rem !important;
  }
}

/* The drawer is generated by modern-ui.js; legacy static panels are removed. */
#modernMenuPanel.modern-menu-panel {
  pointer-events: none;
}

#modernMenuPanel.modern-menu-panel.is-open {
  pointer-events: auto;
}


/* Compliance and trust notices — refined 2026-08-04 */
.independence-notice {
  max-width: 920px;
  margin: 34px auto 0;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(14, 116, 144, .20);
  border-radius: 16px;
  background: rgba(248, 252, 255, .92);
  color: #0f2942;
  box-shadow: 0 10px 24px rgba(15, 41, 66, .05);
}
.independence-notice-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(14, 165, 233, .22);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(14, 165, 233, .12), rgba(20, 184, 166, .12));
  color: #0369a1;
  font-size: .88rem;
  font-weight: 900;
  line-height: 1;
}
.independence-notice-copy {
  min-width: 0;
}
.independence-notice-copy > span {
  display: block;
  color: #52677d;
  font-size: .78rem;
  line-height: 1.45;
}
.independence-notice > a {
  padding: 7px 10px;
  border-radius: 10px;
  color: #0369a1;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.independence-notice > a:hover {
  background: rgba(14, 165, 233, .09);
  text-decoration: underline;
}
.ngs-footer-disclaimer {
  margin-top: 22px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  font-size: .84rem;
  line-height: 1.55;
}
.ngs-footer-disclaimer strong { color: #fff; }
@media (max-width: 760px) {
  .independence-notice {
    grid-template-columns: 32px minmax(0, 1fr);
    margin: 28px 14px 0;
    padding: 12px;
    gap: 10px;
  }
  .independence-notice-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  .independence-notice-copy > span {
    font-size: .74rem;
  }
  .independence-notice > a {
    grid-column: 2;
    width: max-content;
    margin-top: -2px;
    padding: 4px 0;
  }
}

/* AdSense quality upgrade: original editorial guidance */
.jobs-editorial-guide {
  margin: 28px 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
}

.jobs-guide-points p {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
}

.jobs-editorial-guide h2 {
  margin: 0 0 8px;
  color: #0f172a;
}

.jobs-editorial-guide > p,
.jobs-guide-points p {
  color: #52637a;
  line-height: 1.7;
}

.jobs-guide-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 820px) {
  .jobs-guide-points {
    grid-template-columns: 1fr;
  }

  .jobs-editorial-guide {
    border-radius: 18px;
  }
}


/* ==========================================================================
   Syllabus content pages — 05 Aug 2026
   ========================================================================== */
.syllabus-index-hero,
.syllabus-detail-hero,
.syllabus-content-card,
.syllabus-source-card,
.syllabus-index-guide {
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}
.syllabus-index-hero,
.syllabus-detail-hero { padding: clamp(24px, 4vw, 44px); margin-bottom: 24px; }
.syllabus-index-hero h1,
.syllabus-detail-hero h1 { margin: 10px 0 12px; color: #0f172a; font-size: clamp(2rem, 4.5vw, 3.35rem); line-height: 1.08; letter-spacing: -.04em; }
.syllabus-index-hero p,
.syllabus-detail-hero > p { max-width: 820px; color: #52637a; font-size: 1rem; line-height: 1.75; }
.syllabus-meta-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.syllabus-meta-row span { padding: 7px 10px; border: 1px solid rgba(14,165,233,.16); border-radius: 999px; background: #f0f9ff; color: #075985; font-size: .76rem; font-weight: 700; }
.syllabus-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0 0 24px; }
.syllabus-facts > div { padding: 18px; border: 1px solid rgba(148,163,184,.22); border-radius: 18px; background: rgba(248,250,252,.92); }
.syllabus-facts span { display: block; margin-bottom: 6px; color: #64748b; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.syllabus-facts strong { color: #0f172a; font-size: .98rem; line-height: 1.4; }
.syllabus-content-card { margin-bottom: 22px; padding: clamp(22px, 3.6vw, 34px); }
.syllabus-content-card h2,
.syllabus-source-card h2,
.syllabus-index-guide h2 { margin: 0 0 16px; color: #0f172a; font-size: clamp(1.35rem, 2.5vw, 1.9rem); }
.syllabus-table-wrap { overflow-x: auto; border: 1px solid rgba(148,163,184,.22); border-radius: 16px; }
.syllabus-table { width: 100%; border-collapse: collapse; min-width: 650px; background: #fff; }
.syllabus-table th,
.syllabus-table td { padding: 13px 14px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.syllabus-table th { background: #f0f9ff; color: #0f3a5e; font-size: .8rem; }
.syllabus-table td { color: #42566d; font-size: .88rem; }
.syllabus-table tbody tr:last-child td { border-bottom: 0; }
.syllabus-note { margin-top: 14px; padding: 13px 15px; border-left: 4px solid #0ea5e9; border-radius: 10px; background: #f8fafc; color: #52637a; font-size: .88rem; line-height: 1.65; }
.syllabus-topic-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.syllabus-topic-grid section { padding: 18px; border: 1px solid rgba(148,163,184,.22); border-radius: 17px; background: #f8fafc; }
.syllabus-topic-grid h3 { margin: 0 0 10px; color: #0f172a; font-size: 1rem; }
.syllabus-topic-grid ul,
.syllabus-step-list { margin: 0; padding-left: 20px; color: #52637a; }
.syllabus-topic-grid li,
.syllabus-step-list li { margin: 7px 0; line-height: 1.62; }
.syllabus-step-list li { padding-left: 4px; }
.syllabus-source-card { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 22px; padding: clamp(22px, 3.6vw, 32px); }
.syllabus-source-card p { margin: 0; max-width: 760px; color: #52637a; line-height: 1.65; }
.syllabus-source-card .primary-btn { flex: 0 0 auto; }
.syllabus-faq details { border-top: 1px solid #e2e8f0; padding: 14px 0; }
.syllabus-faq details:first-of-type { border-top: 0; }
.syllabus-faq summary { cursor: pointer; color: #0f172a; font-weight: 750; }
.syllabus-faq details p { margin: 10px 0 0; color: #52637a; line-height: 1.65; }
.syllabus-disclaimer { margin: 0 0 22px; padding: 14px 16px; border: 1px solid rgba(14,116,144,.2); border-radius: 14px; background: #f0f9ff; color: #52637a; font-size: .83rem; line-height: 1.6; }
.syllabus-index-guide { margin-top: 28px; padding: clamp(22px, 3.6vw, 32px); }
.syllabus-index-guide > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.syllabus-index-guide p { margin: 0; padding: 17px; border: 1px solid rgba(148,163,184,.22); border-radius: 16px; background: #f8fafc; color: #52637a; line-height: 1.65; }
.syllabus-card { display: flex; flex-direction: column; }
.syllabus-card h2 { margin: 12px 0 8px; color: #0f172a; font-size: 1.12rem; line-height: 1.35; }
.syllabus-card p { color: #52637a; line-height: 1.6; }
.syllabus-card-org { color: #0369a1 !important; font-weight: 700; }
.syllabus-card .primary-btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 820px) {
  .syllabus-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .syllabus-topic-grid,
  .syllabus-index-guide > div { grid-template-columns: 1fr; }
  .syllabus-source-card { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .syllabus-detail-container { padding-left: 14px; padding-right: 14px; }
  .syllabus-index-hero,
  .syllabus-detail-hero,
  .syllabus-content-card,
  .syllabus-source-card,
  .syllabus-index-guide { border-radius: 18px; }
  .syllabus-facts { grid-template-columns: 1fr; gap: 10px; }
  .syllabus-facts > div { padding: 15px; border-radius: 15px; }
  .syllabus-index-hero h1,
  .syllabus-detail-hero h1 { font-size: 2rem; }
  .syllabus-topic-grid section { padding: 15px; }
  .syllabus-topic-grid h3,
  .syllabus-faq summary { font-weight: 650; }
  .syllabus-table th,
  .syllabus-table td { padding: 11px 12px; }
}
body.modern-dark .syllabus-index-hero,
body.modern-dark .syllabus-detail-hero,
body.modern-dark .syllabus-content-card,
body.modern-dark .syllabus-source-card,
body.modern-dark .syllabus-index-guide { background: rgba(15,23,42,.92); border-color: rgba(56,189,248,.22); }
body.modern-dark .syllabus-index-hero h1,
body.modern-dark .syllabus-detail-hero h1,
body.modern-dark .syllabus-content-card h2,
body.modern-dark .syllabus-source-card h2,
body.modern-dark .syllabus-index-guide h2,
body.modern-dark .syllabus-facts strong,
body.modern-dark .syllabus-topic-grid h3,
body.modern-dark .syllabus-faq summary,
body.modern-dark .syllabus-card h2 { color: #f8fafc; }
body.modern-dark .syllabus-facts > div,
body.modern-dark .syllabus-topic-grid section,
body.modern-dark .syllabus-index-guide p,
body.modern-dark .syllabus-note { background: rgba(30,41,59,.82); border-color: rgba(148,163,184,.18); }
